/* ══════════════════════════════════════════════════════════════════════════
   MOBILE LAYER — Carlo Schembri portfolio
   ------------------------------------------------------------------------
   Everything in this file is wrapped in `@media (max-width: 768px)`.
   It is loaded AFTER all other stylesheets so it overrides them only for
   phones & small tablets. Desktop behaviour is untouched.

   Breakpoints used:
     · ≤ 768px   — mobile default (all rules)
     · ≤ 480px   — compact phones
     · ≤ 360px   — very narrow phones (iPhone SE 1st gen, old Androids)

   Touch target minimum: 44 × 44 CSS px (WCAG 2.5.5).
   iOS zoom prevention:  form inputs ≥ 16px font-size.
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ─── 0. GLOBAL BASE ──────────────────────────────────────────────────
     Prevents iOS auto-zoom on input focus, removes tap highlights,
     eliminates horizontal scrolling surprises.
  */
  html { -webkit-text-size-adjust: 100%; }
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  body {
    -webkit-tap-highlight-color: rgba(176, 141, 87, 0.18);
    touch-action: manipulation;
  }
  *, *::before, *::after { -webkit-tap-highlight-color: transparent; }
  body, main, section, article, .hero, .about, .categories, .atelier, .contact, .footer {
    max-width: 100vw;
  }

  /* iOS auto-zoom fix: form controls must be ≥ 16px */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Respect iOS safe areas */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }

  /* ═══════════════════════════════════════════════════════════════════════
     1. NAVIGATION
     Hamburger & drawer already exist in components.css / main.css. This
     block enlarges touch targets and polishes drawer padding.
  ═══════════════════════════════════════════════════════════════════════ */

  /* ── Nav: force flexbox so brand + burger are always on one row ─────── */
  #site-header .nav-inner,
  header.nav .nav-inner {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    min-height: 56px;
  }
  /* Remove the negative margin trick that can cause overflow on narrow phones */
  .nav-mark {
    margin: 0;
    padding: 8px 0;
    flex-shrink: 0;
  }
  .nav-mark-logo {
    height: 64px;
    margin-top: -10px;
    margin-bottom: -10px;
  }
  .nav-burger {
    width: 44px; height: 44px;          /* WCAG touch target */
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .nav-drawer {
    width: min(92vw, 420px);
    padding: calc(env(safe-area-inset-top, 0) + 80px) 32px 40px;
  }
  .nav-drawer a {
    padding: 12px 0;                    /* 44px+ hit row */
    display: block;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }
  /* Close button in drawer — if present.
     .mobile-nav-close is fully styled in components.css; no override here. */
  .nav-drawer .drawer-close {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     2. INDEX.HTML — HERO
     Hotspots are hidden on phones (by main.css@640). We leave them hidden
     but add a clearer mobile scroll hint and push the chrome safely into
     the viewport.
  ═══════════════════════════════════════════════════════════════════════ */

  .hero {
    min-height: 100vh;
    min-height: 100svh;                 /* small-viewport unit avoids iOS URL-bar jump */
  }
  .hero-title {
    font-size: clamp(2.4rem, 10vw, 4.2rem);
    line-height: 1.0;                   /* 0.96 clips ascenders on some phones */
  }
  /* Keep kicker and tagline from overflowing narrow screens */
  .ht-kicker {
    font-size: 9px;
    letter-spacing: 0.32em;
    gap: 10px;
    margin-bottom: 20px;
  }
  .ht-kicker .ht-rule { width: 32px; }
  .ht-tagline {
    font-size: 10px;
    letter-spacing: 0.32em;
    margin-top: 18px;
  }
  .hero-sub {
    font-size: 13px;
    letter-spacing: 0.28em;
  }
  .hero-scroll {
    bottom: calc(env(safe-area-inset-bottom, 0) + 24px);
  }
  .hero-video,
  .hero video {
    object-fit: cover;
  }

  /* Preview panel stays hidden on mobile; ensure it cannot leak in */
  .preview, .hotspot-preview { display: none !important; }

  /* Hotspots: use the hero.css pill-grid layout (820px breakpoint already sets
     display:flex + flex-wrap + justify-content:center). Just ensure it holds. */
  .hotspots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }

  /* 641–768px: hero chrome collapses to a single centred CTA column */
  .hero-chrome {
    left: 0 !important;
    right: 0 !important;
    bottom: max(40px, calc(env(safe-area-inset-bottom, 0) + 32px)) !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 20px !important;
  }
  .hero-enter {
    justify-content: center !important;
    min-width: 200px;
    max-width: 320px;
    padding: 15px 28px !important;
  }
  /* Scroll hint visible at 641–768 where there's no bottom strip */
  .hero-scroll {
    display: inline-flex !important;
    justify-self: center;
  }
  .hero-chrome-mark { display: none !important; }

  /* ═══════════════════════════════════════════════════════════════════════
     3. INDEX.HTML — ABOUT
     Stack photo over text with sensible proportions.
  ═══════════════════════════════════════════════════════════════════════ */

  /* About: no extra section padding — grid handles spacing */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  .about-photo-col {
    height: 110vw;                      /* tall enough to show full portrait */
    min-height: 340px !important;
    max-height: 620px;
  }
  /* Show more of the portrait — center 28% reveals face + full figure */
  .about-photo-col img {
    object-position: center 28%;
  }
  .about-text-col {
    padding: 40px 22px 48px !important;
    gap: 22px !important;
  }
  .about-heading {
    font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
  }
  .about-bio {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }
  .about-signoff {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .about-cta {
    width: 100%;
    justify-content: center;
    padding: 16px 24px !important;     /* 48px tall tap target */
  }
  .about-signature { text-align: left !important; }

  /* ═══════════════════════════════════════════════════════════════════════
     4. INDEX.HTML — CATEGORIES TEASER
  ═══════════════════════════════════════════════════════════════════════ */

  .categories, #categories { padding: 56px 0 64px; }

  /* Header: collapse 2-col grid, trim excessive bottom margin */
  .categories-header {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 36px !important;
  }
  .categories-heading, .categories-lede { grid-column: 1 !important; }
  .categories-heading { font-size: clamp(2rem, 9vw, 3rem) !important; }
  .categories-lede { font-size: 14px !important; }

  /* Card grid: single column, tighter gap */
  .ch-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 20px !important;             /* override clamp gutter with fixed mobile pad */
  }

  /* Hero card: remove 16/9 ratio — let min-height drive the height */
  .ch-card--hero {
    aspect-ratio: unset !important;
    min-height: 56vw !important;            /* ~210px on 375px, never too short */
    max-height: 340px;
  }
  /* Counter cards: remove 4/3 ratio, use a portrait-friendly height */
  .ch-card--counter {
    aspect-ratio: unset !important;
    min-height: 72vw !important;            /* ~270px on 375px — shows image well */
    max-height: 400px;
  }

  /* Card body: absolute positioned — override left/right/bottom, not padding */
  .ch-card-body {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    gap: 8px !important;
  }
  /* Card meta top row: tighter inset */
  .ch-card-meta-top {
    left: 16px !important;
    right: 16px !important;
    top: 14px !important;
  }
  .ch-card-title { font-size: clamp(1.3rem, 5.5vw, 1.9rem) !important; }

  /* Footer: stack vertically, hide decorative rules on small screens */
  .categories-foot {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 40px !important;
  }
  .cf-rule { display: none !important; }
  .categories-cta {
    width: auto !important;               /* don't try to be 100% in flex row */
    align-self: center;
    padding: 14px 28px !important;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     5. INDEX.HTML — ALTAIR
  ═══════════════════════════════════════════════════════════════════════ */

  .atelier, #atelier { padding: 64px 0; }
  .atelier-inner,
  .atelier-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Move image above text and give it a generous landscape aspect ratio */
  .atelier-frame {
    order: -1;
    aspect-ratio: 4 / 3 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    justify-self: stretch !important;
  }
  .atelier-cta {
    width: 100%;
    justify-content: center;
    padding: 16px 24px !important;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     5b. INDEX.HTML — &BOLD
  ═══════════════════════════════════════════════════════════════════════ */

  .andbold-grid {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  .andbold-photo-col {
    height: 100vw;
    min-height: 280px !important;
    max-height: 480px;
  }
  .andbold-photo-vid {
    object-position: 50% 30%;
  }
  .andbold-text-col {
    padding: 40px 22px 48px !important;
    gap: clamp(28px, 4.5vh, 42px) !important;
  }
  .andbold-heading {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    margin-bottom: 6px !important;  /* extra push away from body text */
  }
  .andbold-body {
    font-size: 15.5px !important;
    line-height: 1.72 !important;
  }
  .andbold-signoff {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .andbold-cta {
    width: 100%;
    justify-content: center;
    padding: 14px 24px !important;       /* 44px+ tap target */
  }
  .andbold-ident { text-align: left !important; }
  /* Bottom bleed is a desktop-to-desktop section bridge — not needed on mobile */
  .andbold-section-bleed { display: none; }

  /* ═══════════════════════════════════════════════════════════════════════
     5c. INDEX.HTML — PROJECTS (tab-folder stack)
     Stack story above folder, make tabs horizontally swipeable, keep
     the active card comfortably readable on portrait phones.
  ═══════════════════════════════════════════════════════════════════════ */

  .projects {
    padding: clamp(70px, 9vh, 110px) 0 clamp(60px, 8vh, 100px) !important;
  }
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    padding: 0 22px !important;
  }
  .projects-story { gap: 18px !important; }
  .projects-heading {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.08 !important;
  }
  .projects-body {
    font-size: 15.5px !important;
    line-height: 1.72 !important;
  }
  /* Meta row stays one line, smaller type, smaller gaps */
  .projects-meta {
    gap: 18px !important;
    font-size: 9px !important;
    letter-spacing: 0.32em !important;
  }
  .projects-meta-item strong { font-size: 18px !important; }

  /* Folder: full width of column, centred */
  .pr-folder {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* Tab row: scrolls horizontally if cramped; kept stylistically minimal */
  .pr-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 4px !important;
    scroll-snap-type: x mandatory;
  }
  .pr-tabs::-webkit-scrollbar { display: none; }
  .pr-tab {
    flex: 1 0 auto !important;
    min-width: 33.333%;
    scroll-snap-align: start;
    padding: 12px 10px 18px !important;
    min-height: 58px;                 /* WCAG touch target */
    letter-spacing: 0.22em !important;
  }
  .pr-tab[aria-selected="true"] { transform: translateY(-5px) !important; padding-bottom: 23px !important; }
  .pr-tab__num { font-size: 18px !important; margin-bottom: 3px !important; }
  .pr-tab__title {
    font-size: 10px !important;
    letter-spacing: 0.20em !important;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
  }

  /* Deck: portrait 3:4 for small tablets (641–768px); phones override in experience.css */
  .pr-deck {
    aspect-ratio: 3 / 4 !important;
  }

  /* Side cards: translucent layer preserving folder metaphor (641–768px range) */
  .pr-card[data-state="left"],
  .pr-card[data-state="right"] {
    --ty: 10px !important;
    --rot: 0deg !important;
    --sc: 0.95 !important;
    --op: 0.28 !important;
    pointer-events: none;
  }
  .pr-card[data-state="left"]  { --tx: -10px !important; }
  .pr-card[data-state="right"] { --tx:  10px !important; }
  .pr-card__title { font-size: clamp(22px, 6vw, 30px) !important; }
  .pr-card__desc  { font-size: 14px !important; line-height: 1.65 !important; }

  /* Dots centred on phones */
  .pr-spine {
    justify-content: center !important;
    margin-top: 14px !important;
  }
  .pr-spine__dot { width: 18px; height: 2px; border-radius: 2px; }
  .pr-spine__dot[aria-current="true"] { width: 32px; }

  /* ═══════════════════════════════════════════════════════════════════════
     6. INDEX.HTML — CONTACT FORM
  ═══════════════════════════════════════════════════════════════════════ */

  .contact, #contact { padding: 56px 0; }
  .contact-grid,
  .cm-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  /* Compact story column on phones */
  .contact-story { gap: 0 !important; }
  .contact-heading {
    font-size: clamp(2.2rem, 9vw, 3.2rem) !important;
    padding-bottom: clamp(20px, 3.5vh, 32px) !important;
    margin-bottom: 0 !important;
  }
  .contact-lede {
    font-size: 15px !important;
    line-height: 1.72 !important;
    margin-top: clamp(24px, 4vh, 40px) !important;
    margin-bottom: clamp(16px, 2.5vh, 28px) !important;
  }
  .contact-link-row {
    padding: 10px 0 !important;
    grid-template-columns: 80px 1fr !important;
    gap: 12px !important;
  }
  .contact-link-val { font-size: 14px !important; }
  .contact-meta {
    gap: 14px !important;
    margin-top: 8px !important;
    padding-top: 16px !important;
  }
  .cm-value { font-size: 15px !important; }
  .cm-form, .contact-form {
    display: flex; flex-direction: column;
    gap: 20px;
    padding: 20px !important;  /* down from 28px */
  }
  .cm-form label,
  .contact-form label {
    font-size: 10px;
    letter-spacing: 0.36em;
  }
  .cm-form input,
  .cm-form textarea,
  .contact-form input,
  .contact-form textarea {
    padding: 14px 14px !important;     /* comfortable inner padding */
    font-size: 16px !important;
  }
  .cm-form textarea, .contact-form textarea { min-height: 120px; }
  .cf-actions { flex-direction: column; gap: 12px; }
  .cf-submit {
    width: 100%;
    justify-content: center;
    padding: 16px 24px !important;
  }
  .cm-form button[type="submit"],
  .contact-form button[type="submit"] {
    width: 100%;
    padding: 16px 24px !important;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     7. INDEX.HTML — FOOTER
     NOTE: footer uses class .foot (not .footer). Corrected references.
  ═══════════════════════════════════════════════════════════════════════ */

  .foot, footer.foot { padding: 48px 20px 36px; }
  .foot-cols {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .foot-col--brand {
    justify-content: flex-start !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(196, 167, 108, 0.12) !important;
    margin-top: 4px !important;
    grid-column: span 1 !important;
  }
  .foot-brand-img { height: 72px !important; max-height: 72px !important; }
  .foot-bottom {
    flex-direction: column !important;
    gap: 4px !important;
    text-align: center !important;
    font-size: 10px !important;
    padding-top: 20px !important;
  }
  .foot-col a {
    padding: 8px 0;                   /* comfortable touch target */
    font-size: 15px;
  }

  /* Section kickers read smaller on phones */
  .section-kicker {
    font-size: 10px;
    letter-spacing: 0.36em;
  }
  .section-kicker .sk-rule { width: 28px; }

  /* ═══════════════════════════════════════════════════════════════════════
     8. CHAPTERS.HTML — CHOOSER (cinematic vs basic)
  ═══════════════════════════════════════════════════════════════════════ */

  .cho-header { padding: 18px 20px !important; }
  .cho-mark { font-size: 13px; letter-spacing: 0.26em; }
  .cho-intro { padding: 56px 20px 32px !important; }
  .cho-intro h1 { font-size: clamp(1.8rem, 8vw, 2.6rem) !important; }
  .cho-intro p { font-size: 15px !important; line-height: 1.7 !important; }

  .cho-gate {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 20px !important;
  }
  .cho-door {
    min-height: clamp(380px, 60vh, 520px) !important;
    padding: 28px 20px !important;
  }
  .cho-door-number { font-size: 52px !important; }
  .cho-door-title  { font-size: clamp(1.4rem, 5.5vw, 1.9rem) !important; }
  .cho-door-cta {
    padding: 14px 22px;
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .cho-divider { display: none !important; }

  /* ═══════════════════════════════════════════════════════════════════════
     9. CHAPTERS-BASIC.HTML
     Fixed: correct class names, dark theme index strip, accurate sticky top.
  ═══════════════════════════════════════════════════════════════════════ */

  /* Page top-padding clears the unified .nav header (64px on phones, see
     navbar.css). */
  .bs { padding-top: var(--nav-height, 64px) !important; }
  /* Belt-and-braces: never let the basic page horizontal-scroll on phones. */
  .basic-body, .basic-body main, .bs { overflow-x: hidden; }

  /* Hero: left-aligned, tighter on phones */
  .bs-hero { padding: 36px 20px 28px !important; text-align: left !important; }
  .bs-title { font-size: clamp(2rem, 8.5vw, 2.8rem) !important; }
  .bs-hero-meta { margin-top: 20px !important; gap: 14px !important; }

  /* Body: single-column, full-width, no extra padding */
  .bs-body {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* ── Sticky index strip ─────────────────────────────────────────────
     Dark background (page is dark). Sticky just below the 56px header.
     Horizontal pill strip of chapter buttons.
  ── */
  .bs-index,
  aside.bs-index {
    position: sticky !important;
    top: var(--nav-height, 64px) !important;
    z-index: 150 !important;
    width: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    background: rgba(10, 9, 8, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196, 167, 108, 0.10);
    align-self: auto !important;
  }
  .bs-index-inner {
    flex-direction: row !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-height: none !important;
    padding: 10px 16px !important;
    gap: 6px !important;
  }
  .basic-body .bs-index-inner {
    padding-right: max(152px, 22vw) !important;
  }
  .bs-index-inner::-webkit-scrollbar { display: none; }
  .bs-index-label,
  .bs-index-progress { display: none !important; }
  .bs-index-list {
    flex-direction: row !important;
    gap: 6px !important;
    flex-shrink: 0;
  }
  .bs-ix {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 7px 10px !important;
    min-height: 36px;
    border: 1px solid rgba(196, 167, 108, 0.10) !important;
    border-bottom: 1px solid rgba(196, 167, 108, 0.10) !important;
  }
  .bs-ix:hover { padding-left: 10px !important; }
  .bs-ix-title { font-size: 12px; }
  .bs-ix-count { display: none !important; }
  .bs-index-tools {
    margin-top: 0 !important;
    flex-shrink: 0;
    padding-left: 8px;
    border-left: 1px solid rgba(196, 167, 108, 0.12);
  }
  .bs-tool { width: 36px !important; height: 36px !important; }

  /* ── Chapter stream ─────────────────────────────────────────────────
     Extra bottom padding makes room for the floating Index button.
  ── */
  .bs-stream {
    padding: 32px 20px 110px !important;  /* 110px clears the floating btn */
    gap: 60px !important;
  }
  .bs-ch { scroll-margin-top: 120px; }

  /* ── Chapter header: roman left, title + meta stacked right ──────── */
  .bs-ch-head {
    grid-template-columns: auto 1fr !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    gap: 2px 12px !important;
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
  }
  .bs-ch-roman {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    font-size: 26px !important;
    padding-right: 6px;
    border-right: 1px solid rgba(196, 167, 108, 0.18);
    margin-right: 2px;
  }
  .bs-ch-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    font-size: clamp(16px, 5vw, 24px) !important;
  }
  .bs-ch-meta {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    text-align: left !important;
    white-space: normal !important;
    font-size: 8px !important;
  }

  /* ── Photo grid ─────────────────────────────────────────────────────
     sm + md → 2 columns with breathing room between tiles.
     lg → single column.
  ── */
  .bs-grid { gap: 12px !important; }
  .bs-grid.is-sm,
  .bs-grid.is-md { grid-template-columns: repeat(2, 1fr) !important; }
  .bs-grid.is-lg  { grid-template-columns: 1fr !important; }
  .bs-tile-num { opacity: 1 !important; transform: none !important; }

  /* ── Chapter index floating button ──────────────────────────────── */
  /* Phone-specific tweaks — base styling/position is in basic.css so the
     button is now visible on all viewports (bottom-left, pairing with
     the bottom-right cx-switch). */
  .bs-ch-menu-btn {
    bottom: max(20px, env(safe-area-inset-bottom, 20px)) !important;
  }

  /* ── Coda ───────────────────────────────────────────────────────── */
  .bs-coda { padding: 48px 20px 56px !important; text-align: left !important; }
  .bs-coda-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .bs-btn {
    justify-content: center !important;
    min-height: 52px !important;
    padding: 16px 24px !important;
  }

  /* ── Lightbox ────────────────────────────────────────────────────── */
  .bs-lb-figure {
    max-width: 100vw !important;
    padding: 0 16px !important;
    gap: 12px !important;
  }
  .bs-lb-figure img {
    max-height: 70vh !important;
    max-height: 70svh !important;
    max-width: calc(100vw - 32px) !important;
  }
  .bs-lb-close { top: 12px !important; right: 12px !important; width: 48px !important; height: 48px !important; }
  .bs-lb-prev  { left: 8px !important;  width: 48px !important; height: 48px !important; }
  .bs-lb-next  { right: 8px !important; width: 48px !important; height: 48px !important; }
  .bs-lb-caption { font-size: 9px !important; gap: 10px !important; }

  /* ═══════════════════════════════════════════════════════════════════════
     10. CHAPTERS-CINEMATIC.HTML
     The pannable atlas stays, but we:
       · enlarge minimap dots / nav tap targets
       · convert detail-panel to a bottom sheet
       · ensure media carousel arrows are 44px
       · add touch-friendly :active states in place of :hover
  ═══════════════════════════════════════════════════════════════════════ */

  /* Chrome / top nav */
  .chrome, .cin-chrome { padding: 14px 18px !important; }
  .chrome-mark { font-size: 13px !important; }
  .chrome-nav, .cin-nav-links { display: none !important; }

  /* Atlas stage: make it the full screen, readable */
  .atlas-stage, .stage {
    touch-action: pan-x pan-y;         /* allow native two-finger pan */
    overscroll-behavior: contain;
  }
  .atlas-hint, .stage-hint { font-size: 10px !important; }

  /* Node cards on the atlas */
  .node-card {
    min-width: 120px;
    padding: 12px !important;
  }
  .node-card .node-title { font-size: 14px !important; }

  /* Navigator minimap — bump dot targets to 10px (visible) but keep a
     24px transparent hit area around them via padding. */
  .navigator, .atlas-navigator {
    left: 14px !important;
    bottom: calc(env(safe-area-inset-bottom, 0) + 14px) !important;
    padding: 10px !important;
    min-width: 100px !important;
  }
  .navigator-dot, .minimap-dot {
    width: 10px !important; height: 10px !important;
    padding: 7px;
    background-clip: content-box;
  }

  /* Index sidebar collapses behind a button */
  .cin-index,
  .atlas-index {
    right: 12px !important;
    top: calc(env(safe-area-inset-top, 0) + 60px) !important;
    max-width: min(82vw, 300px) !important;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cin-index-toggle, .atlas-index-toggle {
    width: 44px; height: 44px;
  }

  /* Detail panel → bottom sheet */
  .detail, .cin-detail, .detail-panel {
    position: fixed !important;
    left: 0 !important; right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 86vh;
    height: auto !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(107, 101, 92, 0.22);
    border-radius: 12px 12px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform .45s cubic-bezier(.2, .9, .3, 1);
    z-index: 60;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 24px) !important;
  }
  .detail.is-open, .cin-detail.is-open, .detail-panel.is-open {
    transform: translateY(0);
  }
  .detail-inner, .cin-detail-inner { padding: 24px 20px !important; }
  .detail-title,
  .cin-detail-title { max-width: none !important; font-size: clamp(1.6rem, 6vw, 2.1rem) !important; }

  /* Bottom-sheet grab handle */
  .detail::before,
  .detail-panel::before,
  .cin-detail::before {
    content: "";
    position: sticky; top: 8px; left: 50%;
    display: block;
    width: 44px; height: 4px;
    margin: 8px auto 12px;
    background: rgba(107, 101, 92, 0.35);
    border-radius: 2px;
  }

  /* Detail close button */
  .detail-close, .cin-detail-close {
    width: 44px !important; height: 44px !important;
    top: 10px !important; right: 10px !important;
  }

  /* Media carousel controls */
  .detail-media-nav,
  .cin-detail-nav,
  .media-nav-btn {
    width: 44px !important; height: 44px !important;
  }
  .strip-thumb, .thumb-strip-item {
    width: 96px !important; height: 68px !important;
  }

  /* Lightbox */
  .lightbox, .cin-lightbox {
    padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
  }
  .lightbox-nav { width: 44px !important; height: 44px !important; }
  .lightbox-close {
    width: 44px !important; height: 44px !important;
    top: calc(env(safe-area-inset-top, 0) + 8px) !important;
    right: 8px !important;
  }

  /* Remove hover-dependent transforms on touch (main.css hover survives
     on desktop; we only neutralize here). */
  .node-card:hover,
  .media-plate:hover,
  .strip-thumb:hover,
  .detail-media-nav:hover { transform: none; }

  /* ═══════════════════════════════════════════════════════════════════════
     11. MODE-SELECTOR bar (used on chapters-cinematic / -basic)
  ═══════════════════════════════════════════════════════════════════════ */
  .mode-selector, .mode-switch {
    bottom: calc(env(safe-area-inset-bottom, 0) + 14px) !important;
    padding: 6px !important;
  }
  .mode-selector a, .mode-switch a,
  .mode-selector button, .mode-switch button {
    min-height: 44px;
    padding: 10px 16px !important;
    font-size: 11px !important;
    letter-spacing: 0.26em !important;
  }
  .basic-body .cx-switch.cx-switch--docked {
    right: 16px !important;
    bottom: auto !important;
    z-index: 165 !important;
  }
  .basic-body .cx-switch.cx-switch--docked .cx-switch-btn {
    min-height: 36px !important;
    padding: 8px 13px 8px 11px !important;
    gap: 8px !important;
    font-size: 8px !important;
    letter-spacing: 0.24em !important;
  }
  .basic-body .cx-switch.cx-switch--docked .cx-switch-menu {
    top: calc(100% + 8px) !important;
    bottom: auto !important;
    min-width: min(74vw, 248px) !important;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     12. GENERIC — buttons, links, focus ring
  ═══════════════════════════════════════════════════════════════════════ */
  a, button, [role="button"] { min-height: 44px; }
  /* NOTE: .nav-cta is sized-down (not hidden) on phones in navbar.css so the
     Shop button sits next to the burger. Don't apply the 44px min-height
     here — that would force it taller than the burger and break alignment. */
  .cta-pill, .btn, .about-cta {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  :focus-visible {
    outline: 2px solid var(--bronze, #b08d57);
    outline-offset: 3px;
  }

  /* Improve text selection on dark photography overlays */
  ::selection { background: var(--bronze, #b08d57); color: var(--warm-white, #f6f2ec); }

  /* ═══════════════════════════════════════════════════════════════════════
     13. PERFORMANCE — mobile
     Tone down decorative animation cost on phones.
  ═══════════════════════════════════════════════════════════════════════ */
  #grain { opacity: 0.35; }            /* film grain lighter on mobile */
  .reveal { transition-duration: 0.7s; }

  /* ══════════════════════════════════════════════════════════════════════
     ≤ 480px  — COMPACT PHONES
     ══════════════════════════════════════════════════════════════════════ */
  @media (max-width: 480px) {
    .nav-mark-logo { height: 80px; margin-top: -14px; margin-bottom: -14px; }
    .hero-title { font-size: clamp(2.2rem, 12vw, 3.4rem); }
    .hero-chrome { padding: 20px 16px; gap: 14px; }

    .about-text-col { padding: 32px 18px 40px !important; }
    .about-bio { font-size: 15.5px !important; }

    .ch-grid { gap: 16px; }
    .ch-card { min-height: 280px; }
    .ch-card-body { padding: 18px !important; }

    .atelier, #atelier { padding: 52px 0; }
    .atelier-frame { max-width: 200px !important; }

    .contact, #contact { padding: 48px 0; }

    /* Chooser doors tighter */
    .cho-intro { padding: 44px 18px 28px !important; }
    .cho-door { min-height: clamp(340px, 58vh, 460px) !important; padding: 24px 18px !important; }
    .cho-door-number { font-size: 44px !important; }

    /* Basic chapter grid: still 2-col is fine, keep gap tight */
    .bs-chapter-grid, .bs-grid { gap: 6px !important; }

    /* Footer gets single-file links */
    .footer-links { gap: 8px !important; }
  }

  /* ══════════════════════════════════════════════════════════════════════
     ≤ 360px  — NARROW PHONES (iPhone SE 1st gen, small Androids)
     ══════════════════════════════════════════════════════════════════════ */
  @media (max-width: 360px) {
    #site-header .nav-inner, header.nav .nav-inner { padding: 0 14px; }
    .nav-drawer { width: 96vw; padding: 72px 22px 32px; }

    .hero-title { font-size: clamp(2rem, 13vw, 3rem); }
    .hero-sub   { font-size: 11.5px; letter-spacing: 0.24em; }
    .hero-chrome { padding: 16px 12px; }

    .about-text-col { padding: 28px 14px 36px !important; }
    .about-heading  { font-size: clamp(1.6rem, 7.5vw, 2.1rem) !important; }
    .about-bio      { font-size: 15px !important; line-height: 1.7 !important; }

    .ch-card { min-height: 240px; }
    .ch-card-body { padding: 14px !important; }

    .bs-chapter-grid, .bs-grid { grid-template-columns: 1fr !important; }

    .cho-door { min-height: 300px !important; padding: 20px 14px !important; }
    .cho-door-number { font-size: 36px !important; }

    .detail-inner, .cin-detail-inner { padding: 20px 14px !important; }
  }

  /* ══════════════════════════════════════════════════════════════════════
     LANDSCAPE PHONES — compress vertical hero so scroll cue is visible
     ══════════════════════════════════════════════════════════════════════ */
  @media (orientation: landscape) and (max-height: 480px) {
    .hero { min-height: 100vh; }
    .hero-title { font-size: clamp(2rem, 8vh, 3rem); }
    .hero-chrome { padding: 14px 20px; gap: 10px; }
    .hero-scroll { bottom: 12px; }
    .about-photo-col { height: 60vh; max-height: 480px; }
  }

} /* ← end outer @media (max-width: 768px) */


/* ══════════════════════════════════════════════════════════════════════════
   MOBILE HOTSPOT STRIP — ≤ 640px
   Replaces the scattered absolute-positioned chapter pins with a
   horizontally-scrolling pill strip anchored to the bottom of the hero.
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* ── Hero height: use small-viewport unit so the strip isn't hidden
     below iOS Safari's address bar. Fallback order matters: svh last. ── */
  .hero {
    height: 100vh !important;
    height: 100svh !important;
    min-height: 0 !important;
  }

  /* ── Strip container ─────────────────────────────────────────────────
     Override: main.css sets display:none AND inset:0 (full-hero spread).
     We need to un-spread it and pin it to the bottom only.
  ── */
  .hotspots {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    /* Reset the full-hero spread from main.css */
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
    z-index: 6;
    height: auto !important;
    /* Horizontal scroll */
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 8px;
    padding: 24px 20px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    pointer-events: auto !important;
    /* Dark atmospheric gradient behind strip */
    background: linear-gradient(to top,
      rgba(10,9,8,0.90) 0%,
      rgba(10,9,8,0.60) 50%,
      transparent 100%);
    /* Visibility: match main.css — container is opacity:0 until hero
       reaches ready/fade, then transitions in */
  }
  .hotspots::-webkit-scrollbar { display: none; }

  /* ── Individual chapter pills ────────────────────────────────────── */
  .hotspot {
    /* Remove JS-placed absolute positioning */
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    /* Bypass the JS bloom stagger — always visible once container is */
    opacity: 1 !important;
    scale: 1 !important;
    /* Pill geometry */
    flex: 0 0 auto;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 9px 13px;
    min-width: 80px;
    max-width: 160px;
    min-height: 52px;
    /* Glass pill */
    background: rgba(10, 9, 8, 0.58);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 167, 108, 0.20);
    transition: background 0.2s, border-color 0.2s;
  }
  .hotspot:active,
  .hotspot:focus-visible {
    background: rgba(176, 141, 87, 0.24);
    border-color: rgba(196, 167, 108, 0.50);
  }
  .hotspot.is-dim {
    opacity: 0.38 !important;
    filter: none;
  }

  /* ── Pin: show only the roman numeral ──────────────────────────── */
  .hs-pin {
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    border-radius: 0;
  }
  .hs-pin-num {
    position: static !important;
    z-index: auto;
    opacity: 1 !important;
    transform: none !important;
    font-family: var(--font-sc);
    font-size: 8px;
    letter-spacing: 0.28em;
    color: var(--bronze-pale);
    line-height: 1;
    transition: none;
  }
  .hs-pin-ring,
  .hs-pin-core,
  .hs-pin-pulse { display: none !important; }

  /* ── Label: static, below the numeral ────────────────────────── */
  .hs-label {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: block !important;
    white-space: nowrap;
    pointer-events: none;
    gap: 0;
  }
  /* Remove the hairline pseudo — it doesn't work in this layout */
  .hs-label::before { display: none !important; content: none !important; }
  .hs-label-rule { display: none !important; }
  .hs-label-text {
    display: block !important;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 400;
    font-style: italic;
    color: var(--warm-white);
    opacity: 0.90;
    line-height: 1.15;
    transition: none;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* In the pill layout the roman numeral is already rendered by .hs-pin-num,
     so hide the duplicate from within the label text — show only the name. */
  .hs-label-num,
  .hs-label-dash { display: none !important; }
  .hs-label-name {
    max-width: none !important;
    display: inline !important;
    font-style: italic;
  }

  /* hs-left variant: same on mobile, no reversal */
  .hotspot.hs-left .hs-label {
    flex-direction: row !important;
    left: auto !important;
    right: auto !important;
  }

  /* ── Hero chrome: lift above strip, centre the Archives CTA ─────── */
  .hero-chrome {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 108px !important;           /* clear the ~80px strip + breathing room */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px !important;
    gap: 14px !important;
  }
  /* The chapter-number label hides; scroll cue re-shown as a simpler hint */
  .hero-chrome-mark { display: none !important; }
  /* Scroll hint: stripped back, just the animated line */
  .hero-scroll {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.55;
  }
  .hero-scroll span:first-child { display: none; } /* hide the SCROLL text */
  /* Archives CTA: centred, comfortable tap target */
  .hero-enter {
    flex: none;
    min-width: 200px;
    max-width: 300px;
    justify-content: center !important;
    padding: 14px 28px !important;
  }

  /* ── Hero title: tighter on very small screens ─────────────────── */
  .ht-name {
    font-size: clamp(3rem, 13vw, 5rem) !important;
  }

  /* ── Chapter overlay ──────────────────────────────────────────── */
  .ovl-head { padding: 12px 16px !important; }
  .ovl-title { font-size: clamp(1.15rem, 4.8vw, 1.6rem) !important; }
  .ovl-close { width: 40px !important; height: 40px !important; }
  .ovl-body { padding: 20px 12px 80px !important; }
  .ovl-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* ── Lightbox ─────────────────────────────────────────────────── */
  .lb-figure {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100svh - 80px) !important;
  }
  .lb-figure img { max-height: calc(100svh - 120px) !important; }

  /* ── Mobile chapter quick-view bottom sheet ───────────────────── */
  .hs-quick,
  .hs-quick-backdrop { display: block; }

  .hs-quick {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 820;
    background: rgba(12, 10, 9, 0.97);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-top: 1px solid rgba(196, 167, 108, 0.20);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    will-change: transform;
  }
  .hs-quick.is-open { transform: translateY(0); }

  .hs-quick-drag {
    width: 38px; height: 4px;
    background: rgba(196, 167, 108, 0.24);
    border-radius: 2px;
    margin: 14px auto 0;
  }
  .hs-quick-body {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 16px 20px 6px;
    align-items: start;
  }
  .hs-quick-thumb {
    width: 96px; height: 120px;
    overflow: hidden;
    background: rgba(20, 18, 16, 0.8);
    flex-shrink: 0;
  }
  .hs-quick-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .hs-quick-info {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    gap: 3px;
  }
  .hs-quick-num {
    font-family: var(--font-sc, 'Cormorant SC', serif);
    font-size: 8px;
    letter-spacing: 0.44em;
    text-transform: uppercase;
    color: var(--bronze-pale, #c4a76c);
    display: block;
  }
  .hs-quick-name {
    margin: 3px 0 0;
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
    color: var(--warm-white, #f6f2ec);
    line-height: 1.2;
  }
  .hs-quick-meta {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 11px;
    color: rgba(232, 226, 214, 0.42);
    display: block;
    margin-top: 3px;
  }
  .hs-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
  }
  .hs-quick-steppers { display: flex; gap: 6px; }
  .hs-quick-step {
    width: 38px; height: 38px;
    min-height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(196, 167, 108, 0.24);
    color: rgba(232, 226, 214, 0.65);
    transition: border-color 0.18s, color 0.18s, background 0.18s;
  }
  .hs-quick-step:active {
    border-color: var(--bronze-pale, #c4a76c);
    color: var(--bronze-pale, #c4a76c);
    background: rgba(196, 167, 108, 0.10);
  }
  .hs-quick-open {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    min-height: 38px;
    background: rgba(196, 167, 108, 0.09);
    border: 1px solid rgba(196, 167, 108, 0.38);
    font-family: var(--font-sc, 'Cormorant SC', serif);
    font-size: 8px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--bronze-pale, #c4a76c);
    transition: background 0.22s, border-color 0.22s, color 0.22s;
  }
  .hs-quick-open:active {
    background: var(--bronze-pale, #c4a76c);
    border-color: var(--bronze-pale, #c4a76c);
    color: var(--ink-deep, #0a0908);
  }
  .hs-quick-backdrop {
    position: fixed; inset: 0;
    z-index: 810;
    background: rgba(10, 9, 8, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.36s;
  }
  .hs-quick-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* ═══════════════════════════════════════════════════════════════════════
     MOBILE PERFORMANCE LAYER
     ------------------------------------------------------------------------
     Tame expensive continuous animations, heavy blur stacks, and filter
     transitions that cause jank on phone GPUs. Keep the look, kill the cost.
     All rules inside `@media (max-width: 768px)`.
  ═══════════════════════════════════════════════════════════════════════ */

  /* ── Disable slow continuous "section glow" keyframes ──
     These 24–32s infinite radial-gradient animations run constantly on
     decorative ::after layers. They're imperceptible on mobile but cost
     a full-section repaint every frame. Replace with a static glow. */
  .about::after,
  .contact::after,
  .foot::after,
  .footer-atmos,
  .about-atmos,
  .contact-atmos {
    animation: none !important;
  }

  /* ── Atelier orbs: kill dual blur animations on mobile ── */
  .atelier-orb,
  .atelier-orb-1,
  .atelier-orb-2 {
    animation: none !important;
    filter: blur(20px) !important;  /* lighter blur — still atmospheric */
  }
  .atelier-scan { animation: none !important; }

  /* ── Ambient orbs: cheaper on small phones ── */
  .ambient-orbs {
    filter: blur(32px) !important;
    animation-duration: 90s !important;   /* slower → fewer paints */
  }

  /* ── Hero atmos chapter: 48px blur is extremely costly on mobile GPUs.
        Panel is rarely shown on phones (no hover), so lighten aggressively. */
  .hero-atmos-chapter {
    filter: blur(24px) saturate(1.05) !important;
    transform: scale(1.06) !important;
    transition: opacity 0.3s ease !important;
  }
  .hero[data-state="ready"] .hero-atmos-chapter.active {
    transform: scale(1.02) !important;
  }

  /* ── Hero video: no filter() on mobile either — was causing stutter ── */
  .hero-video {
    filter: none !important;
    transition: transform 0.8s ease !important;
  }

  /* ── Hero scroll-cue: continuous 2.4s infinite animation, decorative only.
        Mobile already hides SCROLL text; kill the line loop entirely. */
  .hscroll-line-inner { animation: none !important; }

  /* ── About / Atelier / Andbold photo filters: shorten transitions ──
        Large filter chains in 0.8–1.6s cubic-bezier transitions cause
        visible jank on mid-range phones. Keep the transform, snap filters. */
  .about-photo-col img,
  .atelier-frame-img,
  .andbold-photo-vid {
    transition: transform 0.6s ease, opacity 0.4s ease !important;
    filter: none !important;   /* the sepia/contrast stack is barely visible on small screens */
  }

  /* ── Reveal animations: drop will-change persistence.
        `will-change: opacity, transform` on every .reveal pins GPU layers
        for the whole session. Let the browser decide on the fly. */
  .reveal { will-change: auto !important; }

  /* ── Preview panel backdrop-filter: already display:none on mobile,
        but ensure no backdrop-filter calculation runs if force-shown. */
  .preview,
  .preview-inner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* ── Nav theme crossfade: keep it, but skip backdrop-filter on mobile
        (the semi-transparent header reads fine without native blur). */
  #site-header,
  #site-header .nav-inner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* ── Generic: any element animating filter/box-shadow/width/height is
        converted to opacity-only on mobile where practical. */
  .hero-atmos,
  .ambient-stage,
  .atelier-atmos,
  .foot::after,
  .about::after,
  .contact::after {
    /* ensure these decorative layers never capture paint on scroll */
    contain: paint;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   GLOBAL REDUCED-MOTION HAMMER
   Hard cap all continuous/long animations and transitions system-wide for
   users who ask for reduced motion. Complements the per-file @media rules.
═══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }
  .ambient-orbs,
  .atelier-orb,
  .atelier-orb-1,
  .atelier-orb-2,
  .atelier-scan,
  .hscroll-line-inner,
  .about::after,
  .contact::after,
  .foot::after {
    animation: none !important;
  }
  video[autoplay] { /* respect preference — don't autoplay ambient video */
    /* JS gates autoplay via matchMedia; CSS leaves this as a safety net */
  }
}

