/* Prototype responsive — desktop (prototype.css) locked above 1200px.
   Tablet 769–1200: keep 2-column scene, shrink dash first.
   Mobile ≤768: vertical document flow. */

/* ——— Mid desktop width only (no composition rewrite) ——— */
@media (max-width: 1440px) and (min-width: 1201px) {
  .hero-shell {
    width: var(--container-wide);
    max-width: var(--container-max-wide);
  }
  .hero-title {
    font-size: clamp(2.35rem, 3.2vw, 3.2rem);
  }
}

/* ——— Tablet / small laptop: 2 columns, dash shrinks first ——— */
@media (max-width: 1200px) and (min-width: 769px) {
  .hero {
    max-height: none;
    min-height: 0;
  }

  .hero-shell {
    width: var(--container-wide);
    max-width: var(--container-max-wide);
    grid-template-columns: minmax(0, 44%) minmax(0, 56%);
    grid-template-rows: auto auto;
    height: auto;
    max-height: none;
    gap: 0.75rem 1.25rem;
  }

  .hero-copy {
    margin-top: 2rem;
    max-width: none;
    align-self: start;
  }

  .hero-title {
    font-size: clamp(2.1rem, 3.4vw, 2.85rem);
  }

  .hero-visual-stage,
  .hero-stage {
    height: 560px;
    min-height: 560px;
    max-height: 560px;
    margin-top: 2rem;
    align-self: start;
    overflow: visible;
  }

  /* Woman stays protagonist */
  .woman-wrapper,
  .hero-person {
    left: -2%;
    bottom: 0;
    top: auto;
    height: 520px;
    max-width: 54%;
  }

  /* Shrink dashboard before woman */
  .dashboard-wrapper,
  .dash {
    right: -10%;
    top: 12%;
    width: min(400px, 50%);
  }

  .alice-float {
    width: 42%;
    max-width: 168px;
    padding: 8px 10px;
  }

  .dash-kpis {
    gap: 3px;
    right: -4px;
  }

  .kpi-chip {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .woman-wrapper .welcome-audio-btn,
  .welcome-audio-btn {
    left: 8%;
    bottom: 8%;
    min-height: 44px;
  }

  .hero-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

/* Nav collapse — owned by site-nav.css (mega menu + drawer).
   Legacy rules below are neutralized to avoid break points fighting. */
@media (max-width: 1100px) {
  /* no-op: see css/site-nav.css @media (max-width: 980px) */
}

/* Narrow tablet: still 2-col but tighter */
@media (max-width: 900px) and (min-width: 769px) {
  .hero-shell {
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
    gap: 0.5rem 1rem;
  }

  .hero-visual-stage,
  .hero-stage {
    height: 500px;
    min-height: 500px;
    max-height: 500px;
  }

  .woman-wrapper,
  .hero-person {
    height: 460px;
    max-width: 56%;
    left: -2%;
  }

  .dashboard-wrapper,
  .dash {
    width: min(340px, 48%);
    top: 14%;
    right: -8%;
  }

  .dash-side {
    display: none;
  }

  .dashboard-wrapper,
  .dash {
    grid-template-columns: 1fr;
  }

  .kpi-chip.c3 {
    display: none;
  }
}

/* ========== MOBILE ≤768 — vertical document flow ========== */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  .header-inner {
    width: var(--container);
    max-width: var(--container-max);
  }
  .brand-word {
    font-size: 0.82rem;
  }
  .btn-header {
    padding: 0 0.85rem;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .hero {
    max-height: none;
    min-height: 0;
    padding: calc(var(--nav-h) + 0.85rem) 0 1.25rem;
    overflow: visible;
  }

  .hero-shell {
    width: var(--container);
    max-width: var(--container-max);
    display: flex;
    flex-direction: column;
    gap: var(--section-gap, 1.35rem);
    height: auto;
    max-height: none;
    margin-inline: auto;
  }

  /* 1–6: copy block (eyebrow → CTAs) */
  .hero-copy {
    order: 1;
    align-self: stretch;
    max-width: none;
    margin-top: 0;
    padding-top: 0.25rem;
  }

  .hero-title {
    font-size: clamp(2.35rem, 9.5vw, 3.1rem);
    line-height: 1.12;
    margin-bottom: 1rem;
    /* Reserve space for 2-line holo + follow/context — reduce shift */
    min-height: 7.5em;
  }

  .holo-follow,
  .holo-context {
    font-size: clamp(0.98rem, 3.8vw, 1.12rem);
  }

  .hero-sub {
    font-size: clamp(0.98rem, 3.6vw, 1.08rem);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* 7–9: visual stage — woman, listen, then simplified dash */
  .hero-visual-stage,
  .hero-stage {
    order: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    margin-top: 0;
    margin-inline: 0;
    gap: 0.85rem;
    padding: 0;
    overflow: visible;
    isolation: auto;
    background: transparent;
  }

  .stage-glow {
    inset: -22% -18% 4% -18%;
    opacity: 0.95;
    filter: none;
  }

  .stage-grid {
    display: none;
  }

  /* Woman / video — normal flow, full figure */
  .woman-wrapper,
  .hero-person {
    position: relative;
    order: 1;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(88vw, 360px);
    max-width: 92vw;
    height: auto;
    aspect-ratio: 768 / 1168;
    margin-inline: auto;
    z-index: 3;
    display: block;
    overflow: visible;
    pointer-events: none;
  }

  .woman-wrapper::before,
  .hero-person::before {
    inset: 12% -8% 0;
  }

  .hero-person-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
  }

  /* Listen — directly under / on lower edge of video */
  .woman-wrapper .welcome-audio-btn,
  .welcome-audio-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4%;
    width: max-content;
    margin-inline: auto;
    transform: none;
    z-index: 5;
    pointer-events: auto;
    min-height: 44px;
    padding: 0 16px 0 14px;
    white-space: nowrap;
  }

  .welcome-audio-btn:hover {
    /* touch devices — keep same as resting; :active handles feedback */
    background: rgba(23, 28, 38, 0.55);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .welcome-audio-btn:active,
  .welcome-audio-btn.is-playing {
    background: rgba(123, 77, 255, 0.28);
    border-color: rgba(123, 77, 255, 0.45);
  }

  /* Simplified dashboard — product feel, secondary to woman */
  .dashboard-wrapper,
  .dash {
    position: relative;
    order: 2;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    margin-inline: auto;
    z-index: 2;
    opacity: 1;
    grid-template-columns: 1fr;
    transform: none;
  }

  .dash-side {
    display: none;
  }

  .dash-main {
    border-radius: 18px;
    padding: 12px 12px 14px;
  }

  .dash-panels {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dash .progress-pct {
    font-size: 1.75rem;
  }

  .dash .chart {
    height: 64px;
    margin-top: 4px;
  }

  .panel.alice-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
  }

  .alice-mini .alice-prompt {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .alice-mini .wave {
    height: 18px;
  }

  .alice-float {
    display: none; /* compact Alice lives in-panel on mobile */
  }

  .dash-kpis {
    position: absolute;
    right: 10px;
    bottom: 10px;
    flex-direction: row;
    gap: 6px;
  }

  .kpi-chip.c3 {
    display: none; /* max 2 metrics */
  }

  .kpi-chip.c1,
  .kpi-chip.c2 {
    transform: none;
  }

  .woman-wrapper .welcome-audio-btn.enter,
  .woman-wrapper .welcome-audio-btn.enter.is-in,
  .welcome-audio-btn.enter,
  .welcome-audio-btn.enter.is-in {
    transform: none;
  }

  /* 10: benefits 2×2 */
  .hero-benefits {
    order: 3;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    max-width: none;
    padding-top: 1rem;
  }

  .benefit strong {
    font-size: 0.9rem;
  }

  .trust-strip {
    height: 92px;
  }

  .marquee-icon {
    width: 15px;
    height: 15px;
  }

  .marquee-item {
    gap: 8px;
    font-size: 0.84rem;
  }

  /* Keyword phases stay filter-free on small screens (avoid line flicker) */
  html.holo-ready .holo-keyword.is-blur,
  html.holo-ready .holo-keyword.is-entering,
  html.holo-ready .holo-keyword.is-hiding {
    filter: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.2rem, 10vw, 2.75rem);
    min-height: 7.25em;
  }

  .woman-wrapper,
  .hero-person {
    width: min(90vw, 340px);
  }

  .dashboard-wrapper,
  .dash {
    max-width: none;
  }

  .dash-kpis {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 8px;
    padding: 0 4px 4px;
  }
}

@media (max-width: 390px) {
  .lang-pill span {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.05rem, 9.5vw, 2.45rem);
  }

  .woman-wrapper,
  .hero-person {
    width: min(92vw, 320px);
  }

  .welcome-audio-btn .welcome-audio-label {
    font-size: 0.78rem;
  }
}
