/* Home v4 — Pango-luxury rebuild. Loaded after concept.css/structure.css: only
   overrides/extends what those don't cover. KDS tokens only; one accent (rust).
   Motion: cubic-bezier(.32,.72,0,1) ease-out everywhere, per PANGO-NOTES.md. */
:root {
  --v4-ease: cubic-bezier(.32, .72, 0, 1);
  --v4-section-gap: clamp(96px, 11vw, 160px);
}

/* --------------------------------------------------------- header morph -- */
/* Pango-style nav -> pill at scrollY>50 (body.is-header-pill, home-v4.js).
   Smoothness: the header box itself never moves or resizes. Only its glass
   layer (::before, absolutely positioned, so no page reflow) and its side
   padding animate, and the hero insets with clip-path instead of margin, so
   the heavy D4 hero is never re-laid out mid-animation. */
:root { --pill-w: 56rem; --pill-side: max(24px, calc(50% - var(--pill-w) / 2)); }
#site-header {
  transition: padding-inline .7s var(--v4-ease);
}
#site-header::before {
  transition: inset .7s var(--v4-ease), border-radius .7s var(--v4-ease),
    box-shadow .7s var(--v4-ease), border-color .7s var(--v4-ease), opacity .3s linear;
  border: .5px solid transparent;
  border-bottom-color: var(--color-border-glass);
}
body.is-header-pill #site-header { padding-inline: calc(var(--pill-side) + 22px); }
body.is-header-pill #site-header::before {
  inset: 10px var(--pill-side);
  border-radius: 999px;
  border-color: rgba(38, 37, 30, .08);
  box-shadow: 0 12px 32px -14px rgba(38, 37, 30, .22);
  opacity: 1;
}
#site-header .header-contact { transition: border-radius .7s var(--v4-ease), padding .7s var(--v4-ease), background-color .2s, color .2s; }
body.is-header-pill #site-header .header-contact { border-radius: 999px; padding: 9px 18px; min-height: 38px; }
@media (prefers-reduced-motion: reduce) {
  #site-header, #site-header::before, #site-header .header-contact { transition: none; }
}
@media (max-width: 900px) {
  body.is-header-pill #site-header { padding-inline: var(--site-gutter); }
  body.is-header-pill #site-header::before { inset: 0; border-radius: 0; box-shadow: none; border-color: transparent transparent var(--color-border-glass); }
  body.is-header-pill #site-header .header-contact { border-radius: var(--radius-sm); padding: 10px 12px; }
}

/* Same trigger insets the full-bleed hero into a rounded card, page background
   showing around it. clip-path is paint-only, so it stays smooth. */
html, body { background: var(--color-surface-sunken, #EFEEE8); }
.hero-v4 { clip-path: inset(0 0 0 0 round 0); transition: clip-path .7s var(--v4-ease); }
body.is-header-pill .hero-v4 { clip-path: inset(84px 24px 0 24px round 24px); }
@media (prefers-reduced-motion: reduce) { .hero-v4 { transition: none; } }
@media (max-width: 900px) { body.is-header-pill .hero-v4 { clip-path: none; } }

/* ------------------------------------------------------------------ hero -- */
.hero-v4 .product-hero-copy { padding-top: 0; }
/* Centre the title exactly like product.html (a global .hero h1 max-width was pinning it left). */
.hero-v4 .product-hero-copy h1 { max-width: none; margin-left: auto; margin-right: auto; }
/* Owner: title sat on top of the line's machine labels. Push the scrim up and
   make it stronger so the huge headline always clears the SVG labels below it. */
.hero-v4 .product-hero-content::after {
  inset: 18% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(247, 247, 244, .9) 40%, var(--color-bg) 80%);
}

/* -------------------------------------------------------------- 2. film -- */
.film-v4 {
  padding-top: var(--v4-section-gap);
  padding-bottom: 60px;
  border-top: 1px solid var(--color-border);
}
.film-v4-head {
  max-width: 680px;
  margin: 0 auto clamp(48px, 5vw, 72px);
  text-align: center;
}
.film-v4-head h2 {
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.03;
  margin: 0 0 18px;
}
.film-v4-head p {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 auto;
  max-width: 52ch;
}
/* Owner: the video was "humongous". Pango caps its contained video near 896px;
   we go slightly tighter (880px) and it's centred under the "Meet Kito." block. */
.film-v4-card {
  max-width: 880px;
  margin-inline: auto;
}
.film-v4-launch.launch-section {
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px -48px rgba(38, 37, 30, .28);
  background: var(--color-bg);
}
.film-v4-launch .launch-frame { border-radius: 0; margin: 0; aspect-ratio: 16 / 9; }
.film-v4-launch .launch-frame img,
.film-v4-launch .launch-frame video { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .film-v4-head h2 { font-size: clamp(32px, 9vw, 44px); }
  .film-v4-card { max-width: none; }
}

/* ------------------------------------------------------------- k-win -- */
/* shots/kit/window.css supplies the real .k-win (sidebar copied verbatim from
   the flow-builder shot, one window surface). This block only (a) makes its
   fixed 1300x880 content slot responsive and (b) adds the cross-fade + one
   flat floating card on top — it never redesigns the kit's own chrome. */
.k-win { width: 100%; }
.k-win__content { position: relative; width: 100% !important; height: auto !important; aspect-ratio: 1300 / 880; }
.kit-slot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s var(--v4-ease);
  pointer-events: none;
}
.kit-slot.is-active { position: relative; opacity: 1; pointer-events: auto; }
.kit-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kit-card {
  position: absolute;
  left: 224px;
  bottom: 5%;
  width: 30%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 20px 40px -22px rgba(38, 37, 30, .38);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--v4-ease), transform .5s var(--v4-ease);
  pointer-events: none;
}
.kit-card.is-active { opacity: 1; transform: none; }
.kit-card img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .kit-slot, .kit-card { transition: none !important; }
}
@media (max-width: 640px) {
  .k-win { grid-template-columns: 1fr !important; }
  .k-win__sidebar { display: none; }
  .kit-card { left: 16px; width: 46%; }
}

/* --------------------------------------------------------- 3. showcase -- */
.showcase-v5-section {
  padding-top: var(--v4-section-gap);
  padding-bottom: var(--v4-section-gap);
  border-top: 1px solid var(--color-border);
}
.showcase-v4-kicker {
  max-width: 46ch;
  margin: 0 0 clamp(32px, 4vw, 48px);
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 400;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--color-text-primary);
  line-height: 1.35;
}
/* Owner round 3/4: the whole row-list + window pins, and the SECTION supplies
   ~38vh of scroll per row (tightened from 70vh — pacing was too slow) so the
   six capabilities advance evenly and release right after Performance
   (see home-v4.js initShowcase). */
.showcase-v5-track { position: relative; height: var(--track-h, calc(100vh + 6 * 38vh)); }
.showcase-v5-pin {
  position: sticky;
  top: calc(var(--pinned-header-height, 74px) + 24px);
  height: calc(100vh - var(--pinned-header-height, 74px) - 24px);
  display: flex;
  align-items: center;
}
.showcase-v5-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: center;
  width: 100%;
}
.showcase-v5-rows { list-style: none; margin: 0; padding: 0; }
.showcase-v5-rows .shot-row {
  display: flex;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--color-border-subtle);
  cursor: pointer;
  border-left: 2px solid transparent;
  padding-left: 14px;
  margin-left: -16px;
  transition: border-color .5s var(--v4-ease);
}
.showcase-v5-rows > .shot-row:last-child { border-bottom: 1px solid var(--color-border-subtle); }
.shot-row-num { font-size: 11px; letter-spacing: .08em; color: var(--color-text-muted); padding-top: 3px; flex: none; width: 20px; }
.shot-row-copy h3 {
  margin: 0 0 4px;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--color-text-muted);
  transition: color .5s var(--v4-ease);
}
.shot-row-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 34ch;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .4s var(--v4-ease), max-height .4s var(--v4-ease);
}
.shot-row.is-active { border-left-color: var(--color-accent, #BB3D13); }
.shot-row.is-active .shot-row-copy h3 { color: var(--color-text-primary); }
.shot-row.is-active .shot-row-copy p { opacity: 1; max-height: 50px; }
.showcase-v5-win-wrap { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .shot-row, .shot-row-copy h3, .shot-row-copy p { transition: none !important; }
}

/* Reduced motion or mobile: no pin, no scroll math (home-v4.js's initShowcase
   skips the scroll-progress path in both cases) — rows stack above the ONE
   shared window, tapping a row swaps its content/card via plain click. */
@media (max-width: 900px) {
  .showcase-v5-track { height: auto !important; }
  .showcase-v5-pin { position: static; height: auto; }
  .showcase-v5-grid { grid-template-columns: 1fr; gap: 24px; }
  .showcase-v5-rows .shot-row { flex-wrap: wrap; }
  .shot-row-copy p { opacity: 1; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-v5-track { height: auto !important; }
  .showcase-v5-pin { position: static; height: auto; }
  .showcase-v5-grid { grid-template-columns: 1fr; gap: 24px; }
  .shot-row-copy p { opacity: 1; max-height: none; }
}

/* ----------------------------------------------------- 4. start anywhere -- */
/* Owner round 4: reverted from the ink band + product shot. Back to the D4
   line with robot arms, sized down to ~one viewport, on paper, no box. */
.start-v6 {
  padding-top: 72px;
  padding-bottom: 72px;
  border-top: 1px solid var(--color-border);
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.start-v6-inner { width: 100%; }
.start-v6-inner > h2#start-v4-title {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.05;
  margin: 0 0 clamp(28px, 3.5vw, 44px);
}
.start-v6-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.sa-rows { border-top: 1px solid var(--color-border); }
.sa-row { border-bottom: 1px solid var(--color-border); }
.sa-q {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 15px 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 17px);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.3;
  color: var(--color-text-muted);
  transition: color .4s var(--v4-ease);
}
.sa-row.is-active .sa-q { color: var(--color-text-primary); }
.sa-a { padding: 0 0 18px; max-width: 48ch; }
.sa-a p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--color-text-primary); }
.sa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-chip {
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 4px 10px;
}
.start-v6-copy .sa-foot { margin: 20px 0 16px; font-size: 13px; color: var(--color-text-secondary); max-width: 42ch; }
.start-v6-stage { width: 100%; }
.start-v6-stage .k-d4.k-d4--start { padding: 0; border: 0; }
.start-v6-stage .k-d4--start .kd4-intro { display: none; }
.start-v6-stage .k-d4--start .kd4-chapters { display: none; }
.start-v6-stage .k-d4--start .kd4-seq { display: block; }
.start-v6-stage .k-d4--start .kd4-stage-col { position: static; }
.start-v6-stage .k-d4--start .kd4-pin { position: static; height: auto; }
.start-v6-stage .k-d4--start .kd4-scene { width: 100%; height: auto; }
.start-v6-stage .k-d4--start .kd4-stage { background: none; border: 0; box-shadow: none; }
.start-v6-stage .k-d4--start .kd4-index,
.start-v6-stage .k-d4--start .kd4-progress { display: none; }

@media (max-width: 900px) {
  .start-v6 { min-height: 0; }
  .start-v6-grid { grid-template-columns: 1fr; }
  .start-v6-stage { order: -1; margin-bottom: 20px; }
}

/* --------------------------------------------------- 5. what makes it work -- */
/* Owner round 4: Legora "latest innovations" pattern — left heading + short
   muted intro, generous gap, then one row of four equal tall tiles. */
.wmw-v5 {
  padding-top: 120px;
  padding-bottom: 120px;
  border-top: 1px solid var(--color-border);
}
.wmw-head { margin-bottom: 96px; }
.wmw-head h2 {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.wmw-intro {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0;
}
.wmw-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.wmw-card { display: flex; flex-direction: column; }
.wmw-card-panel {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(160deg, #E9E7DF 0%, #EFEEE8 55%, #F3F2EE 100%);
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  margin-bottom: 20px;
}
.wmw-card h3 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 0 0 8px;
}
.wmw-card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0 0 14px;
}
.wmw-card-link { font-size: 13px; color: var(--color-text-primary); margin-top: auto; }

@media (max-width: 1100px) {
  .wmw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
}
@media (max-width: 640px) {
  .wmw-grid { grid-template-columns: 1fr; gap: 40px; }
  .wmw-v5 { padding-top: 80px; padding-bottom: 80px; }
  .wmw-head { margin-bottom: 56px; }
}

/* Owner: film still too big. The .film-v4-card wrapper isn't in the markup, so size the frame itself. */
.film-v4 .launch-frame {
  max-width: 880px;
  margin-inline: auto;
  border-radius: 18px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 40px 80px -48px rgba(38, 37, 30, .28);
  overflow: hidden;
}
@media (max-width: 760px) { .film-v4 .launch-frame { max-width: none; } }

/* ------------------------------------------ glass slide: hero -> Meet Kito -- */
/* The hero stays pinned (site.js data-layered) while the page slides over it.
   The first screen of the sliding sheet is frosted glass, so the factory line
   keeps moving, blurred, behind "Meet Kito."; the rest of the sheet is solid.
   The solid edge sits a full viewport below the glass, so it never shows over
   the hero. */
.hero.hero-v4[data-layered=true] { position: sticky; top: var(--hero-sticky-top, 0px); z-index: 0; }
.hero.hero-v4[data-layered=true]:has(:focus-visible) { position: relative; top: auto; }
#page-content {
  background: linear-gradient(to bottom, transparent 0, transparent 100vh, var(--color-bg) 100vh);
  box-shadow: none;
}
#page-content::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 100vh;
  z-index: -1; pointer-events: none;
  border-radius: 32px 32px 0 0;
  background: linear-gradient(to bottom, rgba(247, 247, 244, .5) 0, rgba(247, 247, 244, .82) 45%, var(--color-bg) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 -24px 48px -24px rgba(38, 37, 30, .18);
}
#page-content > .film-v4 { border-top: 0; }
@media (max-width: 900px) { #page-content::before { border-radius: 24px 24px 0 0; } }
/* Without the pinned hero (reduced motion) there's nothing to slide over. */
@media (prefers-reduced-motion: reduce) {
  #page-content { background: var(--color-bg); }
  #page-content::before { display: none; }
}
.hero-v4 .product-hero-copy {
  transform: translate3d(0, calc(var(--hero-out, 0) * -90px), 0);
  opacity: calc(1 - var(--hero-out, 0) * 1.2);
  will-change: transform, opacity;
}

/* Mobile showcase: the kicker sits inside the pin (desktop centring), so on
   phones the pin must stack, and the active row's copy must not clip. */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .showcase-v5-pin { display: block; }
  .showcase-v5-pin > .showcase-v4-kicker { margin: 0 0 28px; }
  .shot-row.is-active .shot-row-copy p { max-height: none; }
}

/* Review notes 25.9 ------------------------------------------------------ */
/* 7: Start anywhere questions read as headlines, not list items. */
.sa-q { font-weight: 500; color: var(--color-text-secondary); }
.sa-row.is-active .sa-q { color: var(--color-text-primary); }
/* 8: the status line takes the old shelf label's place and its mono type. */
.k-d4--start .kd4-stage { position: relative; }
.k-d4--start .kd4-stage-status {
  font-family: var(--kd4-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--color-text-primary); min-height: 0;
}
@media (min-width: 901px) {
  .k-d4--start .kd4-stage-status { position: absolute; top: 3%; left: 14%; right: 20px; padding: 0; }
}
/* 9: the material line in "It checks what's true" is the held field. */
.wmw-v__sub--held { color: var(--color-accent, #BB3D13); }

/* Home audit (25.9) ------------------------------------------------------ */
/* Phones: the factory's right-hand "Your channels" label was cut off. */
@media (max-width: 700px) {
  .hero-v4 .product-hero-visual .k-d4--hero .kd4-scene { width: min(104vw, 440px); transform: translateX(-52%); }
}
/* As the glass sheet rises, the whole factory fades too, so no fragment of it
   (the server, the held bay) is left floating above the sheet's edge. */
.hero-v4 .product-hero-visual { opacity: calc(1 - var(--hero-fade, 0)); }

/* Review note 11 (25.9): the showcase intro reads as the section headline,
   not a timid kicker. Medium weight, headline scale, two balanced lines. */
.showcase-v4-kicker {
  max-width: 20ch;
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
  text-wrap: balance;
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .showcase-v5-pin > .showcase-v4-kicker { margin: 0 0 clamp(28px, 3.5vh, 48px); }
}
.showcase-v4-kicker { max-width: 30ch; }

/* "Meet Kito." matches the showcase headline's weight. */
.film-v4-head h2 { font-weight: 500; letter-spacing: -.035em; }
/* Phones: centre the factory in the space between the header and the
   headline instead of leaving a gap above the title. */
@media (max-width: 640px) {
  .hero-v4 .product-hero-visual .k-d4--hero .kd4-scene { transform: translate(-52%, 64px); }
}
