/* ============================================================
   AMJ — responsive + accessibility (loaded last)
   ============================================================ */

/* ---------- Accessibility: focus, reduced motion ---------- */
:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.has-cursor :where(a, button):focus-visible { outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .display.reveal-lines .ln > span { transform: none !important; }
  .hero .est, .hero .scroll-cue, .hero .hero-meta, .hero-floaters { opacity: 1 !important; transform: none !important; }
  .kenburns { animation: none !important; }
  .hero-flow i::after, .stat-lane::after { animation: none !important; transform: none !important; opacity: 0.45; }
  .hero-3d { opacity: 1; }
}

/* ---------- Mobile nav burger ---------- */
.nav-burger { display: none; width: 44px; height: 44px; position: relative; z-index: 60; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), background 0.3s; }
.nav:not(.solid) .nav-burger span { background: oklch(0.97 0.005 250); }
:root[data-theme="dark"] .nav-burger span { background: var(--ink); }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.menu-open .nav-burger span { background: oklch(0.97 0.005 250) !important; }

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column;
  justify-content: center; gap: 6px; padding: clamp(24px, 8vw, 56px);
  background: linear-gradient(160deg, oklch(0.20 0.04 250), oklch(0.12 0.03 250));
  clip-path: circle(0% at calc(100% - 44px) 44px);
  transition: clip-path 0.6s var(--ease); pointer-events: none;
}
body.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 44px); pointer-events: auto; }
.mm-close {
  position: absolute; top: clamp(18px, 5vw, 32px); right: clamp(20px, 6vw, 42px); z-index: 2;
  min-height: 44px; display: inline-flex; align-items: center; gap: 10px;
  padding: 0 15px; border: 1px solid oklch(0.97 0.005 250 / 0.24); border-radius: 999px;
  color: oklch(0.97 0.005 250); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s, border-color 0.3s;
}
.mm-close:active {
  background: oklch(0.97 0.005 250 / 0.1); border-color: oklch(0.97 0.005 250 / 0.38);
}
.mm-close-icon {
  position: relative; width: 15px; height: 15px; flex: 0 0 15px;
}
.mm-close-icon::before,
.mm-close-icon::after {
  content: ""; position: absolute; top: 7px; left: 0; width: 15px; height: 2px;
  background: currentColor; border-radius: 2px;
}
.mm-close-icon::before { transform: rotate(45deg); }
.mm-close-icon::after { transform: rotate(-45deg); }
body.menu-open .mm-close { opacity: 1; transform: none; transition-delay: 0.12s; }
.mm-links { display: flex; flex-direction: column; gap: 8px; }
.mm-links > a,
.mm-dd-toggle {
  font-family: var(--serif); font-size: clamp(34px, 11vw, 56px); font-weight: 500;
  color: oklch(0.97 0.005 250); line-height: 1.1; display: flex; align-items: center; gap: 0.32em;
  opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
  padding: 4px 0;
}
.mm-links a:active,
.mm-dd-toggle:active,
.mm-links a.is-active,
.mm-dd.is-active .mm-dd-toggle { color: oklch(0.72 0.10 244); }
.mm-dd { opacity: 1; }
.mm-dd-toggle { width: 100%; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mm-dd-caret {
  flex: 0 0 auto; font-family: var(--mono); font-size: 0.34em; line-height: 1;
  width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid oklch(0.97 0.005 250 / 0.3); color: oklch(0.97 0.005 250 / 0.85);
  transition: transform 0.45s var(--ease), background 0.3s, border-color 0.3s;
}
.mm-dd.is-open .mm-dd-caret {
  transform: rotate(-180deg);
  background: oklch(0.97 0.005 250 / 0.12); border-color: transparent;
}
.mm-dd-menu {
  display: grid; grid-template-rows: 0fr; overflow: hidden; opacity: 0;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.35s var(--ease);
}
.mm-dd.is-open .mm-dd-menu { grid-template-rows: 1fr; opacity: 1; }
.mm-dd-inner {
  min-height: 0; display: grid; gap: 4px;
  margin: 10px 0 6px 0.4em; padding-left: clamp(16px, 4.5vw, 28px);
  border-left: 1px solid oklch(0.97 0.005 250 / 0.16);
}
.mm-dd-inner a {
  font-family: var(--sans); font-size: clamp(17px, 4.4vw, 21px); font-weight: 600; line-height: 1.25;
  color: oklch(0.9 0.015 250 / 0.94); padding: 11px 14px; margin-left: -6px; border-radius: 14px;
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s, color 0.3s;
}
.mm-dd.is-open .mm-dd-inner a { opacity: 1; transform: none; }
.mm-dd.is-open .mm-dd-inner a:nth-child(1) { transition-delay: 0.08s; }
.mm-dd.is-open .mm-dd-inner a:nth-child(2) { transition-delay: 0.15s; }
.mm-dd-inner a:active { background: oklch(0.97 0.005 250 / 0.07); }
.mm-dd-inner a.is-active { color: oklch(0.72 0.10 244); background: oklch(0.72 0.10 244 / 0.1); }
.mm-dd-inner a small {
  display: block; margin-top: 3px; font-family: var(--sans); font-size: 12.5px; font-weight: 400;
  color: oklch(0.72 0.02 250 / 0.8); letter-spacing: 0;
}
.mm-dd-inner a.is-active small { color: oklch(0.72 0.10 244 / 0.75); }
body.menu-open .mm-links > a,
body.menu-open .mm-dd-toggle { opacity: 1; transform: none; }
body.menu-open .mm-links > a:nth-of-type(1) { transition-delay: 0.12s; }
body.menu-open .mm-links > a:nth-of-type(2) { transition-delay: 0.18s; }
body.menu-open .mm-dd-toggle { transition-delay: 0.24s; }
body.menu-open .mm-links > a:nth-of-type(3) { transition-delay: 0.30s; }
body.menu-open .mm-links > a:nth-of-type(4) { transition-delay: 0.36s; }
.mm-cta {
  margin-top: 34px; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: 0.03em; color: oklch(0.99 0.005 250);
  background: var(--accent); padding: 16px 30px; border-radius: 999px;
  opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease) 0.42s, transform 0.5s var(--ease) 0.42s;
}
.mm-cta .pulse { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.99 0.005 250); }
body.menu-open .mm-cta { opacity: 1; transform: none; }
.mm-foot { margin-top: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: oklch(0.75 0.02 250 / 0.8); opacity: 0; transition: opacity 0.5s var(--ease) 0.5s; }
body.menu-open .mm-foot { opacity: 1; }
body.menu-open { overflow: hidden; }

/* ============================================================
   Breakpoints
   ============================================================ */

/* ---- Tablet / small laptop ---- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .hero .scroll-cue { display: none; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 0; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* ---- Phones ---- */
@media (max-width: 640px) {
  :root { --gut: 20px; }
  html, body { overflow-x: hidden; }
  body { font-size: 16px; }
  section[id] { scroll-margin-top: 84px; }
  .sect { padding-block: clamp(56px, 16vw, 84px); }

  /* hero */
  .hero { min-height: 92svh; }
  .hero-inner { padding-top: 104px; }
  .display { font-size: clamp(40px, 13vw, 60px); }
  .hero .display { font-size: clamp(36px, 10.8vw, 48px); }
  .hero .lede { width: min(100%, 350px); max-width: 350px; min-width: 0; font-size: 16px; }
  .page-hero .display,
  .page-hero .lede {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .page-hero .lede {
    font-size: 16px;
    line-height: 1.55;
  }
  .hero-meta { width: min(100%, 350px); max-width: 350px; min-width: 0; align-items: stretch; gap: 22px; }
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; max-width: 100%; flex: none; justify-content: center; }
  .hero-flow { width: min(100%, 350px); max-width: 350px; min-width: 0; }
  .floater.f2 { display: none; }

  /* headings */
  .h2 { font-size: clamp(30px, 9vw, 44px); }
  .kicker { font-size: 11px; letter-spacing: 0.24em; }

  /* about pillars → single column already; tighten */
  .pillar { padding: 26px 22px 30px; }

  /* stats single column with divider rhythm */
  .stat { padding: 30px 22px; }
  .stat .val { font-size: clamp(46px, 16vw, 64px); }

  /* infrastructure */
  .home-infra { padding-bottom: clamp(40px, 11vw, 62px); }

  /* brands */
  .brand-intro { align-items: flex-start; flex-direction: column; }
  .brand-filter { gap: 8px; }
  .chip { padding: 14px 17px; font-size: 11px; }
  .brand-filter {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .brand-filter::-webkit-scrollbar { display: none; }
  .brand-cell { aspect-ratio: 3/2; }
  .brand-preview {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 20px 10px;
    margin-inline: -20px;
    background: transparent;
    border: 0;
    scrollbar-width: none;
  }
  .brand-preview::-webkit-scrollbar { display: none; }
  .brand-preview .brand-cell {
    flex: 0 0 min(74vw, 230px);
    min-height: 154px;
    scroll-snap-align: start;
  }
  .brand-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .brand-directory .brand-cell {
    min-height: 132px;
  }
  .brand-proof {
    grid-template-columns: 1fr 1fr;
  }
  .brand-proof div:nth-child(2) { border-right: 0; }
  .brand-proof div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .brand-proof-home {
    display: flex;
    gap: 8px;
    margin-top: 24px;
  }
  .brand-proof-home div,
  .brand-proof-home div:last-child,
  .brand-proof-home div:nth-child(2),
  .brand-proof-home div:nth-child(-n+2) {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 12px 14px;
  }
  .brand-proof-home span { font-size: 13px; line-height: 1.35; }
  .brand-cta-row { align-items: flex-start; flex-direction: column; }
  .brand-note {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
  }
  .brand-note b { flex: 0 0 auto; }
  .brand-note span { min-width: 0; }
  .brand-intro > .btn { display: none; }

  /* restaurants: stack cleanly */
  .resto-row { grid-template-columns: 1fr; gap: 6px; padding: 24px 22px; }
  .resto-row .rno { font-size: 12px; }
  .resto-logo-card {
    width: 100%;
    min-height: 102px;
    margin-bottom: 14px;
  }
  .resto-logo-card img {
    max-width: min(68%, 150px);
    max-height: 58px;
  }
  .resto-row .rname { font-size: clamp(26px, 9vw, 34px); }
  .resto-row .rdesc, .resto-row .rcta { grid-column: 1; }
  .resto-row .rcta { margin-top: 14px; }
  .resto-thumb { display: none !important; }

  /* news */
  .news-grid { gap: 24px; }
  .news-card { width: 100%; min-width: 0; }
  .news-card .nimg {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
  }
  .news-card .media {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .news-card .nmeta {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 16px;
    font-size: 10px;
    letter-spacing: 0.09em;
  }
  .news-card h4 {
    font-size: clamp(22px, 7vw, 28px);
    overflow-wrap: break-word;
  }
  .news-card p {
    font-size: 14.5px;
    line-height: 1.55;
    overflow-wrap: break-word;
  }

  /* coverage map */
  .client-logos { grid-template-columns: 1fr; gap: 10px; }
  .client-logo-card { min-height: 118px; }
  .client-channels { gap: 7px; }
  .client-channels span { font-size: 9.5px; padding: 7px 10px; }
  .netmap { aspect-ratio: 1 / 1; }
  .net-label { font-size: 9.5px; padding: 3px 7px; }
  .orbit-card { display: none; }
  .orbit-ring { width: 76%; height: 34%; }

  /* newsletter */
  .sub-form { flex-direction: column; }
  .sub-form input, .sub-form button { width: 100%; }
  .sub-form button { justify-content: center; }
  .news-cta .ring { display: none; }

  /* footer */
  .foot { padding-block: 52px 28px; }
  .foot-top { gap: 26px; }
  .foot h5 { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 12px; }
  .foot ul { gap: 8px; }
  .foot li,
  .foot ul a {
    font-size: 14px;
    line-height: 1.42;
    overflow-wrap: anywhere;
  }
  .foot .fbrand p {
    font-size: 14px !important;
    line-height: 1.5;
    max-width: 30ch !important;
  }
  .foot-bottom {
    align-items: flex-start;
    margin-top: 36px;
    padding-top: 20px;
  }
  .foot-bottom p {
    font-size: 11px;
    line-height: 1.45;
    letter-spacing: 0.02em;
  }
  .foot-social { justify-content: flex-start; }
  .foot-social a { width: 36px; height: 36px; }

  /* contact page */
  .contact-grid { gap: 34px; }
  .ci-row { padding: 18px; }
  .ci-row .k {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
  }
  .ci-row .v {
    font-size: 16px;
    line-height: 1.48;
    overflow-wrap: anywhere;
  }

  /* disable tilt jitter on touch (no hover anyway) */
  [data-tilt] { transform: none !important; }
}

/* ---- Very small ---- */
@media (max-width: 380px) {
  .display { font-size: 38px; }
  .mm-links > a,
  .mm-dd-toggle { font-size: 30px; }
  .mm-dd-inner a { font-size: 17px; }
}

/* ---- Landscape phones: shorter hero ---- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 120svh; }
}
