/* Native document flow for phones/tablets. Desktop styles remain untouched.
   Keep this media query identical to the one in motion.js. */
@media (max-width: 900px), (max-width: 1180px) and (hover: none) and (pointer: coarse) {
  html, body {
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
    scroll-behavior: auto;
    overscroll-behavior-y: auto;
    touch-action: auto;
  }

  /* A compact, opaque header avoids repainting a full-screen blur on scroll. */
  .header, .v-header, .contact-header {
    height: 74px;
    padding: 0 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    background: #030816;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header > p, .v-header > p, .contact-header > p { display: none; }
  .brand, .odyssial-logo, .contact-logo { min-width: 0; max-width: 100%; }
  .brand img, .odyssial-logo img, .contact-logo img {
    width: clamp(88px, 28vw, 172px);
    max-width: 100%;
    height: auto;
  }
  .site-nav { gap: 12px; }
  .brands-trigger { gap: 7px; font-size: 14px; white-space: nowrap; letter-spacing: 0; }
  .nav-contact { min-height: 44px; padding: 0 12px; font-size: 14px; letter-spacing: 0; }
  .brands-panel {
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 510px;
    margin-left: auto;
    max-height: calc(100svh - 96px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: linear-gradient(145deg, #06152f, #090721);
  }
  .brand-menu-card { min-width: 0; min-height: 166px; padding: 16px; }
  .brand-menu-card img { width: 100%; margin: 22px 0 38px; }
  .brand-menu-card b { left: 16px; right: 12px; bottom: 16px; font-size: 14px; letter-spacing: 0; }

  /* No pinned scene, tall artificial track, canvas or scroll-linked effects. */
  #tide, .film { display: none; }
  #experience .scroll-track { height: auto; overflow: visible; }
  #experience .stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "origin" "unknown" "brands" "passage" "destination";
    overflow: hidden;
    overflow: clip;
    perspective: none;
    background: linear-gradient(140deg, #020c1b, #080a25 48%, #100928);
  }
  #experience .stage::before, #experience .stage::after,
  #experience .axis, #experience .coordinates, #experience .route,
  #experience .chapters, #experience .progress, #experience .scroll { display: none; }
  #experience .stage *, #experience .stage *::before, #experience .stage *::after {
    animation: none;
    will-change: auto;
  }
  #experience .stage > .scene {
    position: relative;
    inset: auto;
    width: auto;
    min-width: 0;
    height: auto;
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
    padding: 64px clamp(20px, 6vw, 64px);
  }
  #experience .scene > .scene-number,
  #experience .scene > h1, #experience .scene > h2, #experience .scene > p {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 680px;
    height: auto;
    overflow: visible;
    transform: none;
  }
  #experience .scene > h1, #experience .scene > h2 {
    margin: 24px 0 20px;
    padding-bottom: .12em;
    font-size: clamp(36px, 8.6vw, 76px);
    line-height: 1.1;
    letter-spacing: -.058em;
    word-break: normal;
    overflow-wrap: normal;
  }
  #experience .scene > p {
    display: block;
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: #aabbd1;
  }
  #experience .scene-number { font-size: 14px; line-height: 1.6; letter-spacing: .12em; }

  #experience .hero {
    grid-area: intro;
    position: relative;
    inset: auto;
    justify-self: center;
    width: 89%;
    min-height: 540px;
    min-height: max(540px, 90svh);
    padding: 135px 0 195px;
    opacity: 1;
    transform: none;
    transform-style: flat;
    filter: none;
  }
  #experience .hero-type { font-size: clamp(34px, 11.5vw, 135px); line-height: 1.1; padding: .12em 0; }
  #experience .hero-type span, #experience .hero-emblem { transform: none; }
  #experience .stage > .hero-copy {
    grid-area: intro;
    align-self: end;
    justify-self: center;
    width: min(88%, 640px);
    margin: 0 0 70px;
    padding: 0;
  }
  #experience .hero-copy > p { font-size: 14px; line-height: 1.7; letter-spacing: .12em; color: #dae7f7; }
  #experience .hero-copy small { font-size: 16px; line-height: 1.7; }

  #experience .origin-landscape {
    grid-area: origin;
    position: relative;
    inset: auto;
    min-width: 0;
    align-self: stretch;
    opacity: .86;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  #experience .origin-landscape img {
    position: absolute;
    inset: 0;
    object-position: 67% center;
    filter: none;
  }
  #experience .origin-landscape::before {
    background: linear-gradient(180deg, #020713f5, #020713c4 36%, #02071308 67%, #080a25 100%);
  }
  #experience .origin-landscape::after, #experience .origin-beacon { display: none; }
  #experience .stage > .origin { grid-area: origin; min-height: 680px; padding-bottom: 300px; }

  #experience .stage > .unknown { grid-area: unknown; padding-bottom: 30px; }
  #experience .unknown-word {
    top: auto;
    bottom: 50px;
    font-size: 19vw;
    transform: translateX(-50%);
    opacity: .5;
  }
  #experience .trident {
    position: relative;
    display: block;
    inset: auto;
    width: 104px;
    height: 280px;
    margin: 32px 8% 0 auto;
    transform: rotate(-5deg);
    filter: none;
  }
  #experience .trident path { stroke-dashoffset: 0; }

  #experience .stage > .brand-map { grid-area: brands; }
  #experience .brand-map::before { display: none; }
  #experience .ecosystem {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 680px;
    height: auto;
    margin: 38px auto 0;
    padding: 32px 14px 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    transform: none;
    border-radius: 24px;
    box-shadow: none;
  }
  #experience .ecosystem::before, #experience .ecosystem::after,
  #experience .map-orbit { display: none; }
  #experience .map-core {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    justify-self: center;
    width: 150px;
    margin: 8px 0 35px;
    transform: none;
    box-shadow: 0 0 40px #315dff33, inset 0 0 30px #42ddff12;
  }
  #experience .brand-node {
    position: relative;
    inset: auto;
    min-width: 0;
    width: auto;
    height: auto;
    padding: 18px;
    transform: none;
    transition: border-color .2s ease;
    pointer-events: auto;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: linear-gradient(145deg, #0a1a3c, #07102b);
    border-radius: 18px;
  }
  #experience .brand-node > span, #experience .brand-node strong,
  #experience .brand-node img {
    position: relative;
    display: block;
    inset: auto;
    width: auto;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: .04em;
  }
  #experience .vessial-node { grid-column: 1 / -1; min-height: 200px; }
  #experience .vessial-node img { width: min(78%, 290px); height: auto; margin: 26px 0 24px; }
  #experience .next-node { min-height: 150px; padding: 16px; }
  #experience .next-node strong { margin-top: 24px; letter-spacing: 0; overflow-wrap: anywhere; }

  #experience .stage > .passage { grid-area: passage; padding-bottom: 90px; }
  #experience .signal-field { inset: auto 0 70px; width: 100%; height: 240px; opacity: .55; }
  #experience .signal-field i { transform: none; box-shadow: none; }
  #experience .aperture {
    position: relative;
    inset: auto;
    width: min(44vw, 220px);
    margin: 80px auto 40px;
    transform: none;
    box-shadow: 0 0 35px #334cff33, inset 0 0 30px #47e6ff15;
  }

  #experience .ithaca {
    grid-area: destination;
    position: relative;
    inset: auto;
    min-width: 0;
    opacity: 1;
  }
  #experience .stage > .destination {
    grid-area: destination;
    min-height: 680px;
    padding: 90px 20px 70px;
  }
  #experience .destination > h2 { font-size: clamp(32px, 7.4vw, 72px); }
  #experience .destination > p { max-width: 520px; }
  #experience .arrival-ring { width: min(78vw, 550px); transform: translate(-50%, -50%); box-shadow: none; }
  #experience .island { filter: none; }
  #experience .final-mark { position: relative; inset: auto; margin-top: 65px; }
  #experience .final-mark small { font-size: 14px; line-height: 1.6; letter-spacing: .04em; }

  /* Only short, once-per-section reveals; content never depends on JS visibility. */
  #experience .stage > .scene.mobile-enter { animation: mobile-reveal 460ms ease-out; }
  @keyframes mobile-reveal {
    from { opacity: .75; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }

  /* The detail/contact pages already scroll normally; remove their costly loops. */
  .v-hero *, .v-hero *::before, .v-hero *::after,
  .contact-orbit, .contact-orbit *, .contact-orbit::before, .contact-orbit::after { animation: none; }
  .vessel-study, .vessial-hero-logo, .vessel-study .bow-pupil,
  .vessel-study .data-nodes circle, .return-visual svg circle { filter: none; }
  .v-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 680px;
    min-height: max(680px, 100svh);
    padding: 140px 24px 75px;
  }
  .v-intro { width: 100%; margin: 0; }
  .vessial-hero-logo { width: min(100%, 640px); }
  .vessel-study { position: relative; inset: auto; width: 100%; max-width: 720px; margin: 45px auto 0; }
  .vessel-study svg { display: block; }
  .v-hero .scan { display: none; }
  .route-orbit { right: -12%; top: 66%; width: min(90vw, 620px); }
  .scroll-note { left: 24px; right: 24px; bottom: 26px; font-size: 14px; line-height: 1.6; letter-spacing: .07em; }
  .origin-title h2, .return-copy h2, .role h2, .contact-intro h1 { line-height: 1.1; padding-bottom: .12em; overflow: visible; }
  .v-header ~ main > .origin, .v-header ~ main > .role { padding: 80px clamp(20px, 6vw, 64px); }
  .origin-title { flex-wrap: wrap; gap: 28px; }
  .formula { grid-template-columns: minmax(0, 1fr); }
  .return { grid-template-columns: minmax(0, 1fr); }
  .return-visual { min-height: 420px; }
  .return-copy { min-width: 0; padding: 70px clamp(20px, 6vw, 64px); }
  .role-grid { grid-template-columns: minmax(0, 1fr); }
  .role-grid article, .role-grid article + article { padding: 32px 0; border-right: 0; border-bottom: 1px solid #d8e0ea; }
  .contact-main { grid-template-columns: minmax(0, 1fr); padding: 125px clamp(20px, 6vw, 64px) 70px; gap: 45px; }
  .contact-intro h1 { font-size: clamp(40px, 9.6vw, 84px); }
  .contact-form-wrap { min-width: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .contact-form-wrap form { grid-template-columns: minmax(0, 1fr); }
  .contact-form-wrap label { min-width: 0; }
  .contact-footer { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .contact-footer p { display: none; }
  .contact-footer a { justify-self: start; }

  @media (max-width: 360px) {
    .site-nav { gap: 8px; }
    .brands-panel { grid-template-columns: minmax(0, 1fr); }
    .brand-menu-card { min-height: 165px; }
    .brand-menu-card img { width: 185px; max-width: 90%; }
    #experience .ecosystem { padding-left: 10px; padding-right: 10px; gap: 10px; }
    #experience .next-node { grid-column: 1 / -1; min-height: 135px; }
  }
  @media (prefers-reduced-motion: reduce) {
    #experience .stage > .scene.mobile-enter { animation: none; }
  }
}
