/* =========================================================
   Averra — mobile & responsive optimisations
   Loaded after averra.css; refines small-viewport behaviour
   across all pages without touching base styles.
   ========================================================= */

/* unified footer legal links */
.foot { flex-wrap: wrap; }
.foot-legal { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.foot-legal a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: color 180ms ease, border-color 180ms ease; }
.foot-legal a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.foot-legal .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); opacity: 0.6; }
@media (max-width: 720px) {
  .foot-legal { gap: 8px; font-size: 10.5px; }
  .foot-legal .dot { display: none; }
}

/* keep media inside viewport — fluid by default */
img, svg, video { max-width: 100%; height: auto; }

/* prevent iOS form input zoom (any input < 16px would zoom) */
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px !important; }
}

/* tighter gutters + safe-area on phones */
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .page { padding-left: max(18px, env(safe-area-inset-left));
          padding-right: max(18px, env(safe-area-inset-right));
          padding-bottom: 80px; }
  .foot { padding-left: max(18px, env(safe-area-inset-left));
          padding-right: max(18px, env(safe-area-inset-right)); }
}

/* ---------- Top nav: shrink + allow wrap on phones ---------- */
@media (max-width: 720px) {
  .topbar-row { padding-top: 12px; gap: 8px; top: 12px; }
  .nav-pill { padding: 5px 6px; gap: 0; flex-wrap: nowrap; max-width: calc(100vw - 86px); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-pill::-webkit-scrollbar { display: none; }
  .nav-pill .nav-mark { width: 24px; height: 24px; margin-right: 2px; margin-left: 2px; }
  .nav-pill .nav-mark img { width: 18px !important; height: 18px !important; }
  .nav-pill a { padding: 7px 10px; font-size: 12px; }
  .theme-toggle { width: 40px; height: 40px; }
}
@media (max-width: 420px) {
  .nav-pill a { padding: 6px 9px; font-size: 11.5px; }
}

/* ---------- HERO TWIN (home) ---------- */
@media (max-width: 720px) {
  .hero-twin { min-height: 100vh; }
  .hero-twin .twin-stage { padding: clamp(20px, 5vh, 40px) 18px 0; }
  .hero-twin .orb { width: clamp(180px, 56vw, 240px); margin-bottom: 32px; }
  .hero-twin .orbits { width: 110vw; }
  .hero-twin .headline { font-size: clamp(40px, 10.5vw, 64px); line-height: 1.0; max-width: 14ch; }
  .hero-twin .lede-row { margin-top: 22px; }
  .hero-twin .lede-row p { font-size: 16px; line-height: 1.5; }
  .hero-twin .tech-strip { margin: 28px 14px 0; padding: 10px 14px; }
  .hero-twin .meta-strip { padding: 16px 18px; font-size: 9.5px; letter-spacing: 0.22em; gap: 12px; flex-wrap: wrap; }
  .hero-twin .eyebrow-row .eyebrow { font-size: 10px; letter-spacing: 0.26em; }
}

/* ---------- HERO ELEGANT / CINEMA ---------- */
@media (max-width: 720px) {
  .hero-elegant { padding: 100px 18px 80px; min-height: auto; }
  .hero-elegant .headline { font-size: clamp(40px, 10vw, 60px); }
  .hero-elegant .lede-row p { font-size: 16px; }
  .hero-elegant .audience { gap: 12px; padding: 12px 16px; font-size: 9.5px; letter-spacing: 0.18em; flex-wrap: wrap; justify-content: center; }
  .hero-cinema { min-height: 100vh; }
  .hero-cinema .headline { font-size: clamp(44px, 11vw, 72px); }
  .hero-cinema .lede-row p { font-size: 16px; }
  .hero-cinema .meta-strip { padding: 14px 18px; font-size: 9px; letter-spacing: 0.18em; gap: 10px; flex-wrap: wrap; }
  .hero-cinema .focal-rings { width: 160px; height: 160px; }
}

/* ---------- generic page-head ---------- */
@media (max-width: 720px) {
  .page-head { padding: 90px 0 30px; }
  .page-head .display { font-size: clamp(40px, 10vw, 60px); margin-bottom: 24px; }
  .page-head .lede { font-size: 17px; line-height: 1.55; }
  h2.section-title { font-size: clamp(32px, 8vw, 48px); }
  .lede { font-size: 17px; }
  hr.rule { margin: 60px 0; }
}

/* ---------- routes (home cards) ---------- */
@media (max-width: 720px) {
  .routes .route { padding: 28px 22px 24px; min-height: 200px; }
  .routes.routes-light .route, .routes.routes-dark .route { padding: 28px 22px 24px; min-height: 200px; }
  .route .title, .routes.routes-light .route .title, .routes.routes-dark .route .title { font-size: 26px; }
}

/* ---------- feature lists, shifts ---------- */
@media (max-width: 720px) {
  .feature-list li { padding: 22px 4px 20px; grid-template-columns: 40px 1fr; gap: 16px; }
  .feature-list h4 { font-size: 19px; }
  .shift { padding: 32px 22px 28px; min-height: auto; }
  .shift h4 { font-size: 26px; }
  .cols { gap: 32px; margin-top: 50px; }
  .cols .col-l h3 { font-size: clamp(26px, 6vw, 36px); }
}

/* ---------- contact page ---------- */
@media (max-width: 720px) {
  .contact-block { gap: 32px; margin-top: 50px; }
  .channels { gap: 1px !important; }
  .ch { padding: 22px 18px !important; }
  .write { gap: 32px; }
  .write .intro h3 { font-size: clamp(26px, 6.5vw, 36px) !important; }
  .cform { gap: 18px; }
  .cform .submit-row { flex-wrap: wrap; gap: 14px; }
  .signal { padding: 32px 0 !important; }
  .signal .left h3 { font-size: clamp(24px, 6vw, 34px) !important; }
}

/* ---------- partners page ---------- */
@media (max-width: 720px) {
  .aud-cell { padding: 28px 22px !important; min-height: auto !important; }
  .value-row { padding: 36px 0 !important; gap: 24px !important; }
  .signup-strip { padding: 28px 22px !important; }
  .signup-strip h3 { font-size: clamp(24px, 6vw, 34px) !important; }
  .partners-fineprint { gap: 22px !important; padding: 28px 0 !important; }
}

/* ---------- investors page ---------- */
@media (max-width: 720px) {
  .inv-stage { padding: 100px 18px 100px !important; min-height: 100vh; }
  .inv-headline { font-size: clamp(36px, 10vw, 60px) !important; line-height: 1.04 !important; }
  .inv-sub { font-size: 16px !important; line-height: 1.5 !important; }
  .inv-mail { margin-top: 32px !important; flex-wrap: wrap; gap: 8px !important; }
  .inv-mail a { font-size: 18px !important; }
  .inv-meta { padding: 14px 18px !important; font-size: 9px !important; letter-spacing: 0.2em !important; gap: 10px; flex-wrap: wrap; }
}

/* ---------- technology page ---------- */
@media (max-width: 720px) {
  .tech-hero { padding: 100px 0 60px !important; }
  .tech-hero h1 { font-size: clamp(40px, 10vw, 64px) !important; }
  .tech-hero .lede { font-size: 17px !important; }
  .stack-section .head h2 { font-size: clamp(30px, 7.5vw, 44px) !important; }
  .glass-grid { gap: 14px !important; }
  .glass-card { padding: 22px !important; }
  .glass-card .meta { font-size: 10px !important; }
  .glass-card h3, .glass-card .title { font-size: clamp(22px, 5.5vw, 28px) !important; }
  .trend-ticker { font-size: 11px !important; }
}

/* ---------- privacy page ---------- */
@media (max-width: 720px) {
  .privacy-doc { padding: 0 !important; }
  .privacy-doc h2 { font-size: 22px !important; }
  .privacy-doc h3 { font-size: 16px !important; }
  .privacy-doc p, .privacy-doc li { font-size: 15px !important; }
}

/* ---------- footer ---------- */
@media (max-width: 720px) {
  .foot { flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px 18px; font-size: 11px; }
  .foot .foot-mark span { font-size: 16px; }
}

/* ---------- shared grid collapses for very small screens ---------- */
@media (max-width: 540px) {
  .signals, .rail-grid { grid-template-columns: 1fr !important; }
  .hero-twin .meta-strip, .hero-cinema .meta-strip, .inv-meta { justify-content: flex-start; }
}

/* ---------- a11y: respect reduced motion globally ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- print ---------- */
@media print {
  .topbar-row, .theme-toggle, .cookie-banner, .cookie-fab, .grain,
  body::before, body::after,
  .hero-twin .orbits, .hero-twin .orb, .horizon,
  .hero-cinema .ecg-stage, .hero-cinema .focal, .hero-cinema .focal-rings, .hero-cinema .particles,
  .trend-ticker { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: underline; }
}
