/* Landing page layout (index.html only).
   Loaded last, on top of styles.css, product-story.css, galleries.css, light-demo.css and modes.css.
   One rhythm for every section:
     - sections size to their content; only the hero fills the first screen;
     - the same vertical padding everywhere (--sec);
     - split sections use one two-column grid with the same gap (--split-gap);
     - every image frame takes the colour of the image's own backdrop, so no inner box shows. */

.sahai-home {
  --sec:clamp(72px,8vw,120px);
  --split-gap:clamp(40px,6vw,96px);
  --radius:20px;
}

/* ---------- Shared type ---------- */
.sahai-home .display,
.sahai-home .sm-app h2 {font-size:clamp(40px,4.3vw,64px);line-height:1.04;margin:0}
.sahai-home .section-label {margin:0 0 18px}
/* One label style everywhere (light-guide kicker); beats older paragraph rules such as .light-copy>p and .closing p. */
.sahai-home main p.section-label {font:550 .76rem/1.4 var(--sans);letter-spacing:.095em;text-transform:uppercase;color:var(--accent)}
.sahai-home main>section {scroll-margin-top:var(--sahai-nav-height,72px)}

/* Every content section uses the same padding and sizes to its content. */
.sahai-home main>section:not(.product-hero):not(.closing) {padding-block:var(--sec);min-height:0}

/* ---------- Hero ---------- */
.sahai-home .product-hero {background:linear-gradient(100deg,#f6f2ea 12%,#f3f0e8 55%,#eceee2)}
@media (min-width:901px) {
  .sahai-home main>section.product-hero {
    display:grid;align-items:center;
    min-height:min(calc(100svh - var(--sahai-nav-height,72px)),900px);
  }
}
.sahai-home .product-hero-inner {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--split-gap)}
.sahai-home .product-hero-copy {padding-block:clamp(48px,6vw,88px)}
.sahai-home .product-hero-copy>p:not(.product-type) {max-width:38ch}
.sahai-home .hero-image-stage {height:clamp(360px,40vw,580px);margin:0}
.hero-image-stage img[src$="finish-hanging-silver-navy-1120.webp"] {mask-image:none;mix-blend-mode:normal;filter:none;border-radius:14px}
.hero-facts {display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin:28px 0 0;padding-top:16px;border-top:1px solid #d2d2c5;width:fit-content;color:#53574e;font-size:.88rem;line-height:1.5}
.hero-facts b {color:var(--ink);font-weight:600}

/* ---------- Split sections (copy beside media) ---------- */
.sahai-home .conversation-layout,
.sahai-home .signal-layout,
.sahai-home .sm-app-inner {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  column-gap:var(--split-gap);row-gap:0;align-items:center;
}

/* ---------- First question (Companion sample) ---------- */
.sahai-home .first-question {--phase:#986d27;background:#fffdf8;border-block:1px solid var(--line)}
.conversation-copy {max-width:540px}
.conversation-intro {max-width:42ch;margin:20px 0 24px;color:var(--muted);font-size:clamp(1rem,1.15vw,1.1rem);line-height:1.6}
.conversation-options,.conversation-actions {display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px}
.conversation-options {justify-content:space-between;border-block:1px solid var(--line);padding:10px 0}
.conversation-options label,.conversation-script dt {color:#585b50;font:550 .74rem/1.4 var(--sans);letter-spacing:.095em;text-transform:uppercase}
.conversation-options select {border:1px solid #c5c7b9;background:#fffdf8;color:var(--ink);border-radius:8px;padding:8px 12px;font:inherit;font-size:.92rem}
.conversation-script {margin:24px 0;display:grid;gap:18px}
.conversation-script div {padding-left:16px;border-left:2px solid var(--line);transition:border-color .2s}
.conversation-script div[data-active] {border-color:var(--phase)}
.conversation-script dd {font:400 clamp(20px,1.75vw,26px)/1.35 var(--serif);letter-spacing:-.02em;margin:4px 0 0;max-width:34ch}
.conversation-actions #talk-stop {border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;padding:10px 3px}
.conversation-actions label {display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:.9rem}
.conversation-actions input {accent-color:#454e3c}
.conversation-note {margin:12px 0 0;font-size:.82rem;line-height:1.45;color:var(--muted)}
.first-question[data-phase=listening] {--phase:#bb3659}
.first-question[data-phase=thinking] {--phase:#77538e}
.first-question[data-phase=speaking] {--phase:#267350}

/* The device render has a cool grey studio backdrop: fill a square frame with it edge to edge. */
.sahai-home .conversation-stage {
  justify-self:end;width:100%;max-width:580px;margin:0;overflow:hidden;
  border-radius:var(--radius);background:#e3e8eb;display:block;
}
.sahai-home .conversation-stage>img {display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;mix-blend-mode:normal;filter:none}
.sahai-home .conversation-stage figcaption {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:#f3f4f1;border-top:1px solid #dadfd9;font-size:.9rem}
.conversation-stage figcaption span {display:inline-flex;align-items:center;gap:9px;font-weight:550}
.conversation-stage figcaption span::before {content:"";background:var(--phase);width:10px;height:10px;border-radius:50%;transition:background .2s}
.conversation-stage figcaption a {text-decoration:underline;text-underline-offset:4px}

/* ---------- Modes ---------- */
.sahai-home .modes-section {display:block}
.sahai-home .modes-section .chapter-heading {display:flex;align-items:flex-end;justify-content:space-between;gap:24px 64px;margin:0 0 40px}
.sahai-home .modes-section .chapter-heading>p {max-width:36ch;margin:0 0 6px;color:var(--muted);font-size:1.02rem;line-height:1.6}
.sahai-home .mode-explorer {display:grid;gap:24px}
.sahai-home .mode-menu {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border-block:1px solid var(--line)}
.sahai-home .mode-choice {display:grid;align-content:center;gap:4px;min-height:64px;padding:12px 14px;text-align:left;border-bottom:2px solid transparent;color:var(--muted)}
.sahai-home .mode-choice+.mode-choice {border-left:1px solid var(--line)}
.sahai-home .mode-choice strong {font-weight:600;font-size:.98rem;color:inherit}
.sahai-home .mode-choice small {display:block;font-size:.8rem;line-height:1.3;font-weight:400}
.sahai-home .mode-choice:hover {background:#f1f0e8;color:var(--ink)}
.sahai-home .mode-choice[aria-selected=true] {background:#efeee5;color:var(--ink);border-bottom-color:var(--accent)}

.sahai-home .mode-panel {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;padding:0;overflow:hidden;
  border:1px solid #dcdccf;border-radius:var(--radius);background:#f3f2eb;align-items:stretch;
}
.sahai-home .mode-panel-copy {align-self:center;padding:clamp(28px,4.5vw,72px)}
.sahai-home .mode-panel h3 {font-size:clamp(30px,3vw,46px);max-width:16ch}
.sahai-home .mode-panel-copy>p {margin:18px 0 22px;max-width:44ch}
.sahai-home .mode-panel-copy .mode-metric {margin:0 0 22px;padding-top:16px}

/* Progress line on the active mode, driven by its walkthrough (site.js sets --mode-progress). */
.sahai-home .mode-choice {position:relative}
.sahai-home [data-autoplay] .mode-choice[aria-selected=true]::after {
  content:"";position:absolute;left:0;bottom:-2px;height:2px;width:100%;background:#2e332a;
  transform-origin:left;transform:scaleX(var(--mode-progress,0));
}

/* The chapter fits one screen at every size: the section is one screen tall, the heading and
   mode tabs take what they need, and the panel (all six the same height) fills the rest, so the
   page never jumps while the modes cycle. The phone screenshot scales to the panel. */
.sahai-home main>section.modes-section:not(.product-hero):not(.closing) {
  display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;
  height:calc(100svh - var(--sahai-nav-height,72px));min-height:600px;max-height:1000px;padding-block:clamp(28px,4svh,48px);
}
.sahai-home .modes-section .chapter-heading {flex:none;margin-bottom:clamp(18px,3svh,28px)}
.sahai-home .modes-section .mode-explorer {flex:1 1 auto;min-height:0;max-height:760px;grid-template-rows:auto minmax(0,1fr);gap:clamp(14px,2svh,20px)}
.sahai-home .mode-panels {min-height:0;display:grid}
.sahai-home .mode-panel {height:100%;min-height:0;grid-template-rows:minmax(0,1fr)}
/* The walkthrough films are 716 × 1388 phone recordings on a #eff2f6 studio backdrop:
   the column takes that colour so the film has no visible edge, and the film is as tall as
   the panel allows (less the link below it), never wider than the column. */
.sahai-home .mode-panel .mode-phone {min-height:0;container-type:size;padding:0;background:#eff2f6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.sahai-home .mode-film {display:block;height:min(calc(100cqh - 48px),calc((100cqw - 24px) * 1.9385));width:auto;aspect-ratio:716/1388;background:#eff2f6;object-fit:contain}
.sahai-home .mode-phone .mode-phone-link {display:inline;width:auto;cursor:pointer;font-size:.85rem;color:#424a40;text-decoration:underline;text-underline-offset:3px}
.sahai-home .mode-panel-copy {overflow:hidden}

/* ---------- App pairing (media left, copy right) ---------- */

/* ---------- Wear it (gallery) ---------- */
.sahai-home .hardware-section {background:#efeee7}
.sahai-home .gallery-heading {display:flex;align-items:flex-end;justify-content:space-between;gap:24px 48px;margin:0 0 40px}
.sahai-home .gallery-heading .section-label {margin:0 0 18px}
.sahai-home .gallery-heading p {margin:20px 0 0;max-width:52ch;color:var(--muted);font-size:clamp(1rem,1.15vw,1.1rem);line-height:1.6}
.sahai-home .gallery-heading p .text-link {margin-left:6px}
.sahai-home .hardware-rail {gap:24px;grid-auto-columns:calc((100% - 48px) / 3)}
.sahai-home .hardware-slide .detail-frame {aspect-ratio:4/5;height:auto;border-radius:16px;background:#ebebeb}
.sahai-home .hardware-slide .detail-frame img {object-fit:contain;mix-blend-mode:normal}
.sahai-home .hardware-slide .detail-frame.wear-photo img {object-fit:cover;object-position:50% 55%}
.sahai-home .hardware-slide .detail-frame.on-white {background:#f7f7f7}
.sahai-home .hardware-slide:nth-child(2) .wear-photo img {object-position:50% 62%}
.sahai-home .hardware-slide figcaption {padding-top:16px}
.sahai-home .hardware-slide h3 {font-size:1.12rem;font-weight:600}
.sahai-home .hardware-slide p {margin-top:6px}

/* ---------- Status light ---------- */
.sahai-home .light-section {background:var(--paper)}
.sahai-home .signal-layout {grid-template-areas:"intro device" "extra device";align-items:center}
.sahai-home .signal-intro {align-self:end;max-width:520px}
.sahai-home .signal-intro>p {margin:20px 0 28px;max-width:40ch;font-size:clamp(1rem,1.15vw,1.1rem)}
.sahai-home .signal-intro .light-select {display:grid;grid-template-columns:repeat(4,max-content);gap:8px;margin:0}
.sahai-home .signal-extras {align-self:start;margin-top:28px;display:flex;gap:12px 24px;align-items:center;flex-wrap:wrap}
.sahai-home .signal-figure {justify-self:end;width:100%;max-width:580px}
.sahai-home .signal-stage {display:block;height:auto;min-height:0;aspect-ratio:1;padding:0;overflow:hidden;border-radius:var(--radius);background:#e3e8eb}
.sahai-home .signal-device {width:100%;height:100%;max-width:none;filter:none}
.sahai-home .signal-device video {display:block;width:100%;height:100%;aspect-ratio:1;object-fit:cover;mix-blend-mode:normal}
.sahai-home .signal-caption {margin-top:0;padding:16px 0 0;border-top:0}
.sahai-home .signal-caption button {white-space:nowrap}

/* ---------- Colours (photo left, studio right) ---------- */
.sahai-home .colour-chapter {background:#fffdf8;border-top:1px solid var(--line)}
.sahai-home .colour-chapter>.wrap {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  grid-template-areas:"photo intro" "photo bench";column-gap:var(--split-gap);row-gap:36px;align-items:start;
}
.sahai-home .colour-intro {grid-area:intro;display:block;margin:0;align-self:end}
.sahai-home .colour-intro-side>p {margin:20px 0 0;max-width:42ch;color:var(--muted);font-size:clamp(1rem,1.15vw,1.1rem);line-height:1.6}
.sahai-home .colour-numbers {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:28px 0 20px;padding-top:18px;border-top:1px solid var(--line)}
.sahai-home .colour-numbers>div {display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:6px}
.sahai-home .colour-numbers dt {font:550 .7rem/1.35 var(--sans);letter-spacing:.095em;text-transform:uppercase;color:var(--muted)}
.sahai-home .colour-numbers dd {margin:0;font:400 clamp(2rem,3vw,2.8rem)/1 var(--serif);letter-spacing:-.03em;color:var(--accent)}
/* The finish preview (the device that changes colour) takes the photo column; the picker sits under the intro. */
.sahai-home .colour-chapter .finish-workbench {display:contents}
.sahai-home .colour-chapter .finish-preview {grid-area:photo;align-self:stretch;min-height:clamp(420px,44vw,620px);padding:clamp(24px,3vw,40px) clamp(20px,3vw,40px) 22px;border-radius:var(--radius,20px);background:radial-gradient(90% 70% at 50% 38%,#f7f6f0,#ecebe3 70%,#e4e3da)}
.sahai-home .colour-chapter .finish-preview img {width:min(62%,360px)}
.sahai-home .colour-chapter .finish-console {grid-area:bench;justify-content:flex-start}
.sahai-home .finish-preview strong {font-size:clamp(19px,1.5vw,24px)}
.sahai-home .finish-console form {gap:12px}
.sahai-home .finish-console label {font-size:clamp(22px,2vw,28px)}
.finish-hint {margin:-4px 0 4px;color:var(--muted);font-size:.9rem;line-height:1.5;max-width:40ch}

/* ---------- FAQ and closing ---------- */
.sahai-home .faq-section {border-top:1px solid var(--line)}
.sahai-home .closing {padding-block:clamp(64px,7vw,104px)}

/* ---------- Tablet ---------- */
@media (max-width:1100px) {
  .sahai-home .mode-menu {grid-template-columns:repeat(3,minmax(0,1fr))}
  .sahai-home .mode-choice:nth-child(4) {border-left:0}
  .sahai-home .mode-choice:nth-child(n+4) {border-top:1px solid var(--line)}
  .sahai-home .hardware-rail {grid-auto-columns:calc((100% - 24px) / 2)}
}
@media (max-width:900px) {
  .sahai-home .conversation-layout,
  .sahai-home .signal-layout,
  .sahai-home .sm-app-inner,
  .sahai-home .product-hero-inner {grid-template-columns:minmax(0,1fr);row-gap:40px}
  .sahai-home .signal-layout {grid-template-areas:"intro" "device" "extra"}
  .sahai-home .colour-chapter>.wrap {grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "photo" "bench";row-gap:32px}
  .sahai-home .conversation-copy,.sahai-home .sm-app-copy,.sahai-home .signal-intro {max-width:640px}
  .sahai-home :is(.conversation-stage,.signal-figure) {justify-self:start;max-width:560px}
  .sahai-home .signal-extras {margin-top:24px}
  .sahai-home .colour-chapter .finish-preview {min-height:0;max-width:560px}
  .sahai-home .modes-section .chapter-heading {display:block}
  .sahai-home .modes-section .chapter-heading>p {margin:20px 0 0}
}

/* ---------- Phone ---------- */
@media (max-width:760px) {
  .sahai-home {--sec:64px;--split-gap:32px;--radius:16px}
  .sahai-home .product-hero-copy {padding:40px 0 0}
  .sahai-home .hero-image-stage {height:clamp(260px,72vw,380px);margin-top:8px}

  .sahai-home .modes-section .chapter-heading,.sahai-home .gallery-heading {margin-bottom:28px}
  /* Phone: modes sit in one scrolling row so the panel stays on screen; the panel is fixed height. */
  .sahai-home .modes-section .chapter-heading {display:flex;align-items:flex-end;gap:16px}
  .sahai-home .mode-explorer {gap:16px}
  .sahai-home .mode-menu {display:flex;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}
  .sahai-home .mode-menu {mask-image:linear-gradient(to right,transparent,#000 22px,#000 calc(100% - 22px),transparent)}
  .sahai-home .mode-menu::-webkit-scrollbar {display:none}
  .sahai-home .mode-choice,.sahai-home .mode-choice:nth-child(n) {flex:none;min-height:52px;padding:9px 16px;border-top:0;scroll-snap-align:center}
  .sahai-home .mode-choice small {display:none}
  .sahai-home .mode-choice:nth-child(n+2) {border-left:1px solid var(--line)}
  /* Fills the screen on a normal phone; on a short phone it grows rather than shrink the screenshot. */
  .sahai-home main>section.modes-section:not(.product-hero):not(.closing) {height:auto;max-height:none;min-height:calc(100svh - var(--sahai-nav-height,64px));padding-block:24px}
  .sahai-home .modes-section .mode-explorer {min-height:590px;max-height:none}
  .sahai-home .modes-section .display {font-size:clamp(32px,9vw,40px)}
  .sahai-home .mode-panel {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .sahai-home .mode-panel-copy {align-self:start;padding:20px 20px 16px}
  .sahai-home .mode-panel h3 {font-size:1.4rem;max-width:none}
  .sahai-home .mode-panel-copy>p {font-size:.9rem;line-height:1.45;margin:10px 0 12px}
  .sahai-home .mode-panel-copy .mode-metric {font-size:.84rem;margin-bottom:10px;padding-top:10px}
  .sahai-home .mode-film {height:min(calc(100cqh - 40px),calc((100cqw - 24px) * 1.9385))}
  .sahai-home .mode-panel .text-link {font-size:.88rem;white-space:normal}
  .sahai-home .mode-phone .mode-phone-link {font-size:.78rem}
  /* On a phone the walkthrough carries the mode: keep the headline, key fact and guide link,
     drop the longer description, and give the film the rest of the panel. */
  .sahai-home .mode-panel-copy>p:not(.mode-metric):not(.mode-battery) {display:none}
  .sahai-home .mode-panel h3 {font-size:1.3rem;margin-bottom:10px}
  .sahai-home .mode-panel-copy .mode-metric {border-top:0;padding-top:0;margin:0 0 8px}
  .sahai-home .mode-panel-copy {padding:16px 18px 12px}


  .sahai-home .gallery-heading {flex-direction:column;align-items:flex-start}
  .sahai-home .hardware-rail {gap:14px;grid-auto-columns:80%}

  .sahai-home .signal-intro .light-select {grid-template-columns:repeat(2,minmax(0,1fr))}
  .sahai-home .signal-intro .light-select button {justify-content:flex-start}

  .sahai-home .colour-numbers dt {font-size:.64rem;letter-spacing:.06em}
  .sahai-home .colour-chapter .finish-preview {justify-self:stretch;padding:20px 16px 14px}
  .sahai-home .colour-chapter .finish-preview img {width:min(58%,230px)}

  .conversation-script dd {font-size:1.3rem}
}
@media (max-width:380px) {
  .sahai-home .mode-panel-copy>p {font-size:.86rem}
}

/* ---------- Battery line (homepage mode panels and mode guides) ---------- */
.mode-battery,.guide-battery {display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0 0 20px;font-size:.9rem;line-height:1.45;color:#3f463c}
.mode-battery span,.guide-battery span {font:600 .7rem/1.4 var(--mono,ui-monospace,monospace);letter-spacing:.08em;text-transform:uppercase;color:var(--accent,#905637)}
.mode-battery small,.guide-battery small {color:var(--muted);font-size:.8rem}
.guide-battery {margin:14px 0 0}

/* ---------- Colour panorama: full-bleed opener of the colour section ---------- */
.sahai-home .colour-panorama {margin:calc(-1 * var(--sec)) 0 clamp(40px,5vw,72px);overflow:hidden;background:#e9e7e4}
.sahai-home .colour-panorama img {display:block;width:100%;height:clamp(200px,26vw,440px);object-fit:cover;object-position:50% 50%}

/* ---------- Specifications highlight (mist blue, light-guide type) ---------- */
.sahai-home .spec-highlight {background:#e7edf1;color:var(--ink)}
.spec-head {display:flex;align-items:flex-end;justify-content:space-between;gap:20px 48px;margin:0 0 clamp(32px,4vw,52px)}
.sahai-home .spec-highlight .text-link {color:var(--ink)}
.spec-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;border-top:1px solid #cbd6dd}
.spec-cell {display:flex;flex-direction:column;gap:14px;padding:26px 24px 30px 0;border-bottom:1px solid #cbd6dd}
.spec-cell:not(:nth-child(4n+1)) {padding-left:24px;border-left:1px solid #cbd6dd}
.spec-cell dt {display:flex;align-items:center;gap:10px;font:550 .74rem/1.4 var(--sans);letter-spacing:.095em;text-transform:uppercase;color:#4f5d68}
.spec-cell dd {margin:0;display:grid;gap:8px}
.spec-icon {flex:none;width:34px;height:34px;padding:7px;border-radius:10px;background:#fff;box-shadow:inset 0 0 0 1px #d3dde3;color:#315b7b;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.spec-cell strong {font:400 clamp(30px,3vw,44px)/1.05 var(--serif);letter-spacing:-.035em;color:var(--ink)}
.spec-cell span {font-size:.9rem;line-height:1.5;color:#4f5d68;max-width:30ch}
@media (max-width:1000px) {
  .spec-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .spec-cell:not(:nth-child(4n+1)) {padding-left:0;border-left:0}
  .spec-cell:nth-child(even) {padding-left:20px;border-left:1px solid #cbd6dd}
}
@media (max-width:760px) {
  .spec-head {flex-direction:column;align-items:flex-start}
  .spec-cell {padding:20px 14px 22px 0;gap:10px}
  .spec-cell:nth-child(even) {padding-left:14px}
  .spec-cell strong {font-size:1.7rem}
  .spec-icon {width:30px;height:30px;padding:6px}
  .spec-cell span {font-size:.84rem}
  .sahai-home .mode-battery {margin-bottom:10px;font-size:.82rem}
}
