/* ============================================================
   M&M Detailing — DESIGN DIRECTION "HEX FRAME" (v2 preview)
   Loaded AFTER styles.css. Overrides only.

   Brief: the site must not read like the generic dark+gold
   detailing template every AI builder produces. Three axes
   changed — TYPE, BUTTON GEOMETRY, HERO STRUCTURE — while the
   obsidian + gold brand palette is kept, because the gold comes
   from M&M's own logo, not from a template.
   ============================================================ */

:root {
  /* Display type: Archivo (expanded, mechanical, automotive) replaces Sora.
     Sora is the default geometric grotesk that every builder reaches for. */
  --f-display: 'Archivo', 'Sora', system-ui, sans-serif;

  /* Hexagon-derived corner notch, replacing the pill radius */
  --notch: 12px;

  /* The studio's own light — promoted to a structural accent */
  --hex-line: rgba(234, 241, 255, 0.42);
}

/* ============================================================
   PASS 2 — the page was sprawling, inconsistent and let a blurry
   phone photo of a certificate carry the credibility section.
   Fixes below, in order of how much they were hurting it.
   ============================================================ */

/* --- 1. Vertical rhythm. --section-y was clamp(4.5rem,9vw,8.5rem):
   ~136px top AND bottom per section, so ~270px of dead black between
   every block and an 8,600px page. Machined, not sprawling. --- */
:root {
  --section-y: clamp(3rem, 5vw, 4.75rem);
}
.section--tight {
  padding-block: clamp(2.2rem, 3.6vw, 3.4rem);
}

/* --- 2. One rail. The page flip-flopped between centred and
   left-aligned section heads with no logic behind which was which.
   Everything now hangs off the same left baseline. --- */
@media (min-width: 861px) {
  .section-head.center {
    text-align: left;
    margin-inline: 0;
  }
  .section-head.center .section-head__lead {
    margin-inline: 0;
  }
  .reels-section .btn-row,
  .section .btn-row {
    justify-content: flex-start;
  }
}
.section-head__title {
  text-wrap: balance;
  max-width: 26ch;
}
.section-head__lead {
  text-wrap: pretty;
}

/* --- 3. Signature: the divider becomes the light rig.
   A hairline with a single hex cell sat on it, echoing the hero frame
   and the ceiling the work is actually judged under. --- */
.divider {
  height: 22px;
  background: none;
  box-shadow: none;
  border: 0;
  position: relative;
  overflow: visible;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 22%, var(--line-strong) 78%, transparent);
}
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 22px;
  transform: translate(-50%, -50%);
  background: var(--obsidian);
  border: 1px solid rgba(203, 161, 76, 0.55);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* --- 4. Reviews. Cards were fixed-height with the quote stretched by
   flex:1, so a two-line review left a void the size of a paragraph. --- */
.marquee__track {
  align-items: flex-start;
}
.review {
  align-self: flex-start;
}
.review__quote {
  flex: 0 1 auto;
}

/* --- 5. The NASIOL block was the worst thing on the page: a dim,
   skewed phone photo of a printed certificate at 4/5 ratio, given half
   the width. A blurry scan of paperwork undercuts a premium claim
   instead of supporting it. Demote it to a proof chip — small, squared,
   clearly a document — and give the space back to the claim itself. --- */
#nasiol .feature {
  grid-template-columns: 0.52fr 1fr;
  align-items: start;
  gap: clamp(1.6rem, 4vw, 3.2rem);
}
#nasiol .feature__media img {
  aspect-ratio: 1 / 1;
  object-position: 50% 22%;
  filter: contrast(1.12) brightness(1.06);
}
#nasiol .feature__media {
  border-radius: 14px;
  max-width: 340px;
}
#nasiol .feature__body .section-head__title {
  max-width: 16ch;
}
@media (max-width: 860px) {
  #nasiol .feature {
    grid-template-columns: 1fr;
  }
  #nasiol .feature__media {
    max-width: 240px;
  }
}

/* --- 6. Horizontal scroll on services.html at 390px (pre-existing, also on
   the live site: scrollWidth 425 vs viewport 390). `.ceramic-grid` uses
   `1fr`, whose implicit `min-width: auto` lets a long unbreakable string
   inside the card push the track to 397px inside a 350px grid. minmax(0,1fr)
   clamps the track; the wrap rules stop long product names doing it again. --- */
.ceramic-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 780px) {
  .ceramic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ceramic-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.svc-grid,
.steps {
  grid-auto-columns: minmax(0, 1fr);
}
.svc,
.step {
  min-width: 0;
}

/* ---------- TYPE ---------- */
.hero__title,
.page-hero__title,
.section-head__title,
.cta-band__title {
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.eyebrow {
  letter-spacing: 0.22em;
}

/* ---------- BUTTONS: chamfered, not pills ---------- */
.btn {
  border-radius: 0;
  clip-path: polygon(
    var(--notch) 0,
    100% 0,
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    0 100%,
    0 var(--notch)
  );
  font-stretch: 108%;
  letter-spacing: 0.02em;
}
.btn--lg {
  --notch: 16px;
}
/* the ghost button loses its visible border under clip-path — rebuild it
   as an inset ring so the outline still reads */
.btn--ghost {
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--gold);
}

/* ---------- HERO: editorial split, not full-bleed photo ---------- */
.hero {
  min-height: auto;
  display: block;
  padding: clamp(1.6rem, 3.4vw, 2.6rem) 0 clamp(1.8rem, 3.4vw, 2.8rem);
  background: radial-gradient(120% 90% at 78% 12%, #14171d 0%, var(--obsidian) 62%);
}
.hero > picture,
.hero__scrim,
.hero__cue {
  display: none; /* photo is re-placed inside the frame below */
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 3.4vw, 2.8rem);
  align-items: center;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}

.hero__content {
  max-width: none;
}

/* the hero must out-rank the section headings, or the page has no focal point */
.hero__title {
  font-size: clamp(2.4rem, 4.3vw, 3.95rem);
  line-height: 0.99;
  text-shadow: none;
}

/* an index rule above the headline — editorial, not a floating pill badge */
.hero__eyebrow {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.95rem;
  margin-bottom: 1.15rem;
}

.hero__lead {
  max-width: 46ch;
}

.hero__trust {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.6rem;
  font-size: 0.82rem;
}
/* the dots dangle whenever the row wraps — spacing carries the separation instead */
.hero__trust .dot {
  display: none;
}

/* ---------- THE HEX FRAME (the ownable bit) ---------- */
.hexframe {
  position: relative;
  aspect-ratio: 1 / 1.06;
  display: grid;
  place-items: center;
}
.hexframe__media {
  position: absolute;
  inset: 12%;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
  background: #000;
}
.hexframe__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}
/* the studio light rig, drawn as real structure around the photo */
.hexframe__ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hexframe__ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hexframe__cap {
  position: absolute;
  left: 50%;
  bottom: -0.4rem;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-dim);
  background: var(--obsidian);
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
}

/* ---------- MOBILE ---------- */
@media (max-width: 900px) {
  .hero {
    padding-top: 1.1rem;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .hero__media-col {
    order: -1;
  }
  /* the frame must not eat the first screen — headline + primary CTA stay above
     the fold at 390x844, which is where this went wrong before */
  .hexframe {
    aspect-ratio: 1 / 0.92;
    max-width: min(300px, 74vw);
    margin-inline: auto;
  }
  .hexframe__cap {
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    bottom: -0.15rem;
  }
  .hero__eyebrow {
    padding-top: 0.7rem;
    margin-bottom: 0.85rem;
  }
  .hero__eyebrow .eyebrow {
    letter-spacing: 0.13em;
    font-size: 0.66rem;
  }
  .hero__title {
    font-size: clamp(2rem, 8.2vw, 2.7rem);
  }
  .hero__lead {
    font-size: 0.97rem;
  }
  .hero__trust {
    margin-top: 1.2rem;
    padding-top: 0.9rem;
  }
}
