/**
 * OTTO — living phone · v4B hero shell (www homepage) · PALETTE C
 * Source: Brand palette-c-ready/phone/living-phone.css (2026-10-07) — only the blocks INTEGRATION §3 names:
 * scrolly/stage, .panel, .step-label, .stage-caption/.cap-title/.progress, .info-chips/.chip-signal,
 * mobile media query, reduced-motion, "DM Sans Fallback". NOT :root plate / body / .top / .btn-soft / .end.
 * Web mapping (re-verified against main f81f7cd): .scrolly-grid → .phone-hero .hero-inner · .scrolly → section.phone-hero[data-lp].
 * Load order: tokens-www-no-wood.css → living-phone-chrome.css → THIS → tokens-palette-c.css (last).
 * Terracotta only as signal (chip «Hvordan afregnes det?» + «Kun dig» in the phone). Never a surface.
 * Only transform/opacity animate. Reduced motion = static final frame (JS + CSS below).
 * Locks: Style C no-wood · Soft-claim · Autobot PARK · LI/Meta HOLD · Calendly OUT.
 */

/* Metric-matched fallback for DM Sans (Brand, measured in Chrome vs Arial/Liberation Sans on the page's strings).
   Local fonts only — 0 extra files. Keeps H1/lede/chip wraps stable while the self-hosted woff2 swaps in. */
@font-face { font-family: "DM Sans Fallback"; font-weight: 400; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 91%; ascent-override: 108.8%; descent-override: 34.1%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback"; font-weight: 500 600; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 92.8%; ascent-override: 106.7%; descent-override: 33.4%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback"; font-weight: 700; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 92.5%; ascent-override: 107%; descent-override: 33.5%; line-gap-override: 0%; }

:root {
  --font-page-sans: "DM Sans", "DM Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.phone-hero {
  --font-page-sans: "DM Sans", "DM Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* H1 on phones: palette C says 1.95rem. Scale with the column (100vw − 36px gutter), capped at 1.95rem from ~390px.
     Re-checked 2026-10-08 for the H1 «Dit AI-marketingteam til bilforhandlere og værksteder.»: 3 lines at 320/360/390
     with the same breaks in DM Sans woff2 and DM Sans Fallback (no swap reflow). Measured in Chrome. */
  --h1-size-mobile: min(1.95rem, calc((100vw - 36px) / 11.5));
}

/* ============================================================
   Web fit · green as TEXT → --green-text #00785e (AA on paper/cream).
   #00a884 stays for fills (btn-soft, progress, dots). Defined in tokens-palette-c.css.
   ============================================================ */
.eyebrow,
.faq summary::after,
#hvad .mikro a,
#faq a,
#afregning a:not(.btn-soft),
.crumb a,
.chip.tone,
.loop span[aria-hidden="true"],
.site-nav a[aria-current="page"],
.site-nav a:not(.btn):not(.btn-soft)[aria-current="page"] {
  color: var(--green-text);
}
:focus-visible { outline-color: var(--green-text); }

/* ============================================================
   Hero shell — section.phone-hero[data-lp] (was v4B float hero)
   ============================================================ */
.phone-hero {
  position: relative;
  padding: 0;
  overflow: visible; /* sticky needs no overflow:hidden ancestor */
  font-family: var(--font-page-sans);
  -webkit-font-smoothing: antialiased;
}
.phone-hero .hero-inner {
  position: relative;
  z-index: 1;
  order: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  column-gap: 64px;
}
.phone-hero .hero-copy,
.phone-hero .panel { grid-column: 1; }
.phone-hero .stage { grid-column: 2; grid-row: 1 / span 4; }
.phone-hero .stage-sticky {
  position: sticky;
  top: max(72px, calc(50vh - 340px));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 40px;
}
/* No 3D rotate (Otto CF SAMPLE: text went soft at 2× DPR). JS adds a whole-px translateY parallax only. */
.phone-hero .phone-tilt { transform: none; }
/* Desktop: keep the whole phone on short laptop screens (vh is stable on desktop → no CLS). */
.phone-hero .lp-phone-scope { --screen-h: clamp(520px, calc(100vh - 150px), 680px); }

.phone-hero .hero-copy {
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
  max-width: 30rem;
  text-align: left;
}
.phone-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-text);
  margin: 0 0 14px;
}
.phone-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: none;
}
.phone-hero h1 {
  margin: 0 0 18px;
  max-width: none;
  color: var(--ink);
  text-wrap: balance;
}
.phone-hero .lede { font-size: 1.08rem; color: var(--muted); max-width: 36ch; margin: 0 0 26px; line-height: 1.5; }
.phone-hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-start; }
.phone-hero .cta-note { font-size: 0.82rem; color: var(--muted); }
.phone-hero .scroll-hint { margin-top: 40px; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.phone-hero .scroll-hint::after { content: " ↓"; }

.phone-hero .panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 28rem;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.phone-hero .panel.is-active { opacity: 1; }
.phone-hero .panel h2 {
  font-family: var(--font-heading, var(--font-page-sans));
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 10px 0 12px;
  color: var(--ink);
  text-wrap: balance;
}
.phone-hero .panel p { color: var(--muted); font-size: 1.02rem; max-width: 34ch; }

.phone-hero .step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-text);
}
.phone-hero .step-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-soft); }

.phone-hero .stage-caption { display: none; }

/* ---------- Info chips: neutral × 2 + ONE terracotta signal chip ---------- */
.phone-hero .info-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.phone-hero .info-chips .chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
}
.phone-hero .info-chips .chip:hover { border-color: #d4cdc0; }
.phone-hero .chip-signal:focus-visible { outline: 2px solid var(--accent-signal-text); outline-offset: 2px; }
.phone-hero .info-chips .chip:focus-visible { outline: 2px solid var(--green-text); outline-offset: 2px; } /* neutral chips: green, terracotta stays signal-only */
.phone-hero .btn-soft:focus-visible { outline: 2px solid var(--green-text); outline-offset: 3px; }

/* ---------- Mobile: hero copy, then sticky phone + caption ---------- */
@media (max-width: 899px) {
  .phone-hero .hero-inner { grid-template-columns: minmax(0, 1fr); column-gap: 0; padding: 0 18px; }
  .phone-hero .hero-copy { grid-row: 1; min-height: 0; padding: 28px 0 12px; max-width: none; }
  .phone-hero .info-chips { margin-top: 16px; flex-direction: column; align-items: flex-start; } /* one chip per row: row count never depends on font metrics */
  .phone-hero .lede { font-size: 1rem; margin-bottom: 18px; }
  .phone-hero .scroll-hint { margin-top: 14px; }
  .phone-hero .panel { grid-column: 1; min-height: 100svh; visibility: hidden; }
  .phone-hero .panel[data-step-panel="1"] { grid-row: 2; }
  .phone-hero .panel[data-step-panel="2"] { grid-row: 3; }
  .phone-hero .panel[data-step-panel="3"] { grid-row: 4; }
  /* Pull the stage up by the nav reserve (minus 16px) so the unstuck phone sits right under the hero copy
     (no ~120px empty cream). Once stuck, padding-top still clears the nav. Static offset → no CLS.
     The transparent top band overlaps the hero copy's bottom padding, so it must not eat chip taps. */
  .phone-hero .stage { grid-column: 1; grid-row: 2 / span 3; margin-top: calc(16px - var(--lp-nav-h)); pointer-events: none; }
  /* www has a sticky nav (.top) and a fixed mobile CTA dock (.m-cta) — the sticky stage reserves both,
     so the phone and the caption are never covered. Fixed px + svh only → no reflow when the URL bar hides. */
  .phone-hero { --lp-nav-h: 64px; --lp-dock-h: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .phone-hero .stage-sticky {
    top: 0;
    height: 100svh;
    justify-content: center;
    padding: var(--lp-nav-h) 0 var(--lp-dock-h);
    gap: 18px;
  }
  .phone-hero .lp-phone-scope { --phone-w: min(340px, 86vw); --screen-h: min(660px, calc(100svh - 140px - var(--lp-nav-h) - var(--lp-dock-h))); }
  .phone-hero .stage-caption { display: block; width: var(--phone-w, 340px); max-width: 86vw; text-align: left; }
  .phone-hero .cap-title {
    font-family: var(--font-heading, var(--font-page-sans));
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-top: 6px;
    min-height: 2.4em; /* 2 lines reserved: caption swap must not move the phone (CLS) */
    color: var(--ink);
    transition: opacity 0.25s ease;
  }
  .phone-hero .progress { display: flex; gap: 6px; margin-top: 10px; }
  .phone-hero .progress i { display: block; height: 3px; flex: 1; border-radius: 2px; background: var(--line); transition: background 0.3s ease; }
  .phone-hero .progress i.on { background: var(--green); }
}

@media (max-width: 479px) {
  .phone-hero { --lp-nav-h: 100px; } /* nav wraps to two rows (~98px) below ~470px */
}

@media (prefers-reduced-motion: reduce) {
  .phone-hero .phone-tilt { transform: none !important; }
  .phone-hero .panel { opacity: 1; transition: none; }
  .phone-hero .cap-title,
  .phone-hero .progress i { transition: none; }
}
