/* Nexado Digital single pager. Spec: design.md */

:root {
  --ink: #01030B;
  --paper: #F7FCFF;
  --accent: #EB4D21;
  --accent-hover: #D0431C;
  --pill-dark: #434343;
  --pill-light: #E4E9EC;
  --muted: rgba(247, 252, 255, 0.72);
  --line-dark: rgba(247, 252, 255, 0.09);
  --line-light: rgba(1, 3, 11, 0.12);
  --frame-gap: 44px;
  --nav-h: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  line-height: 1.25;
}

.muted { color: var(--muted); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  padding: 0 var(--frame-gap);
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.wordmark-logo {
  height: 34px;
  width: auto;
  display: block;
}

/* Desktop: the menu wrapper is layout-transparent so links center and the CTA
   sits right, exactly as before. On mobile it becomes the dropdown panel. */
.nav-menu { display: contents; }

.nav-burger { display: none; }

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  margin-left: auto;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 2px;
  transition: background 0.25s ease;
}

.nav-cta:hover { background: var(--accent-hover); }

.nav-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Panels and frames ---------- */

.panel {
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
}

.panel-light { background: var(--paper); }
.panel-dark { background: var(--ink); }

.frame {
  position: absolute;
  inset: var(--nav-h) var(--frame-gap) var(--frame-gap);
  border: 1px solid var(--line-dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.frame-light { border-color: var(--line-light); }

.barcode {
  flex: none;
  height: 56px;
  border-bottom: 1px solid var(--line-dark);
  background: repeating-linear-gradient(
    90deg,
    rgba(247, 252, 255, 0.14) 0 1px,
    transparent 1px 7px
  );
}

/* ---------- Shared components ---------- */

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  background: var(--pill-dark);
  color: var(--paper);
  width: fit-content;
}

.pill-on-light {
  background: var(--pill-light);
  color: var(--ink);
}

.btn {
  position: relative;
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  padding: 14px 24px;
  border-radius: 2px;
  width: fit-content;
  transition: background 0.25s ease;
}

.btn:hover { background: var(--accent-hover); }

.btn:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.btn-plus {
  position: absolute;
  top: -9px;
  right: -9px;
  font-size: 17px;
  font-weight: 500;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.btn:hover .btn-plus { transform: rotate(90deg); }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(235, 77, 33, 0.55), inset 0 0 10px rgba(235, 77, 33, 0.25);
}

/* ---------- 1. Hero ---------- */

.hero-frame { display: block; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Force its own compositor layer: without this, WebKit repaints the canvas
     together with sibling layers (nav, mosaic cells) on scroll-snap, which is
     what shows up as a flicker/flash on iOS Safari. */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: none;
}

.hero-mosaic .cell {
  background: var(--paper);
  outline: 1px solid var(--paper); /* covers sub-pixel grid seams */
}

.hero-mosaic .cell.gone {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-content {
  position: absolute;
  top: clamp(24px, 8vh, 90px);
  left: clamp(20px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-content h1 { color: var(--ink); }

.hero-foot {
  position: absolute;
  left: clamp(20px, 4vw, 64px);
  bottom: clamp(24px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 380px;
}

.hero-blurb { color: var(--paper); }

/* ---------- 2. About ---------- */

.about-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 0 24px;
  z-index: 1;
}

.about-statement { max-width: 760px; }

.sphere-half {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.sphere-half .sphere {
  width: min(70vh, 90%);
  height: 200%;
}

/* ---------- 3. Services ---------- */

.section-head {
  padding: clamp(20px, 3.5vh, 40px) clamp(20px, 3vw, 48px) 0;
}

.head-rule {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.services-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0 clamp(24px, 3vw, 56px);
  padding: clamp(16px, 3vh, 36px) clamp(20px, 3vw, 48px);
}

.service {
  border-top: 1px solid var(--line-dark);
  padding-top: clamp(14px, 2.4vh, 26px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Hover: lift the card, light the rule, fill the number. Pointer devices only. */
@media (hover: hover) {
  .service {
    transition: opacity 0.6s ease, transform 0.3s ease, border-color 0.3s ease;
  }

  .service .num {
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  }

  .service h3 { transition: color 0.3s ease; }

  .service:hover {
    transform: translateY(-4px);
    border-top-color: var(--accent);
  }

  .service:hover .num {
    background: var(--accent);
    color: var(--paper);
    box-shadow: 0 0 26px rgba(235, 77, 33, 0.8), inset 0 0 10px rgba(235, 77, 33, 0.25);
  }

  .service:hover h3 { color: var(--accent); }
}

/* ---------- 4. How we work (two models, one panel) ---------- */

.models {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  padding: clamp(14px, 2.6vh, 32px) clamp(20px, 3vw, 48px) clamp(18px, 3vh, 40px);
}

.model {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 20px);
  min-height: 0;
  padding-right: clamp(20px, 3vw, 48px);
}

.model + .model {
  border-left: 1px solid var(--line-dark);
  padding-left: clamp(20px, 3vw, 48px);
  padding-right: 0;
}

.model-title { font-size: clamp(22px, 2vw, 28px); }

.model-for { max-width: 460px; }

.ticks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.2vh, 24px);
}

.ticks li {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticks h4 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.ticks .muted { max-width: 520px; }

/* ---------- 5. Clients ---------- */

.clients-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 0 clamp(20px, 4vw, 64px);
}

.client-wall {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 860px;
  margin-top: clamp(10px, 2.4vh, 28px);
}

.client-wall li {
  background: var(--paper);
  border-radius: 2px;
  height: clamp(64px, 9vh, 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
}

/* Center tile: an open seat, not a logo. */
.client-wall li.logo-placeholder {
  background: transparent;
  border: 2px dashed rgba(247, 252, 255, 0.28);
  padding: 0;
  transition: border-color 0.25s ease;
}

.logo-placeholder a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.logo-placeholder:hover { border-color: var(--accent); }

.client-wall img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Hypelab's only available logo is white text; recolor it for the light tile. */
.logo-invert { filter: invert(1) hue-rotate(180deg); }

/* ---------- 6. Free digital audit ---------- */

#audit .frame {
  background:
    radial-gradient(ellipse 55% 60% at 50% 115%, rgba(235, 77, 33, 0.28), transparent 70%),
    var(--ink);
}

.audit-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  min-height: 0;
  padding: clamp(14px, 2.6vh, 32px) clamp(20px, 3vw, 48px) clamp(18px, 3vh, 40px);
}

.audit-left {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 20px);
  min-height: 0;
}

.audit-blurb { max-width: 480px; }

.audit-ticks { gap: clamp(8px, 1.6vh, 16px); }

.audit-ticks .muted { max-width: 440px; }

/* ---------- Audit form ---------- */

.audit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  width: 100%;
  justify-self: end;
}

.audit-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.audit-form input,
.audit-form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: rgba(247, 252, 255, 0.04);
  border: 1px solid rgba(247, 252, 255, 0.18);
  border-radius: 2px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.audit-form textarea {
  resize: vertical;
  min-height: 68px;
  line-height: 1.45;
}

.audit-form input:focus,
.audit-form textarea:focus { border-color: var(--accent); }

.audit-form input::placeholder,
.audit-form textarea::placeholder { color: rgba(247, 252, 255, 0.35); }

.audit-form .btn {
  border: 0;
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
}

/* Honeypot: visually gone, still in the DOM for bots. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status { font-size: 14px; min-height: 1.4em; margin: 0; }

.form-done {
  font-size: 18px;
  font-weight: 500;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}

/* ---------- 7. Contact / footer ---------- */

.footer {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.footer-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: 0 clamp(20px, 3vw, 48px);
  min-height: 0;
}

.footer-statement { max-width: 380px; }

.sphere-full {
  height: min(52vh, 460px);
  aspect-ratio: 1;
}

.sphere-full .sphere { width: 100%; height: 100%; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-self: end;
  max-width: 320px;
}

.footer-mail {
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  width: fit-content;
}

.footer-mail:hover { color: var(--accent); }

.footer-logo {
  height: 18px;
  width: auto;
  display: block;
  margin: 0 auto;
  opacity: 0.9;
}

.copyright {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  padding: 10px 0 6px;
}

.footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  font-size: 13px;
  color: rgba(247, 252, 255, 0.4);
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--paper);
  border-bottom-color: var(--accent);
}

/* ---------- Policy overlays ---------- */
/* Full-page, scrollable, closed ONLY by the X in the header (no backdrop or
   Escape close, by design). */

.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.policy-modal[hidden] { display: none; }

.policy-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(1, 3, 11, 0.94);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(6px);
}

.policy-head h2 { font-size: clamp(22px, 2vw, 30px); }

.policy-close {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(247, 252, 255, 0.25);
  border-radius: 2px;
  color: var(--paper);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.policy-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.policy-close:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.policy-body {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 4vh, 44px) clamp(20px, 5vw, 64px) 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.policy-body h3 {
  font-size: 20px;
  margin-top: 14px;
}

.policy-body a { color: var(--paper); }

.policy-body a:hover { color: var(--accent); }

.policy-body ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-updated { font-size: 14px; }

.policy-table-wrap { overflow-x: auto; }

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: var(--muted);
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line-dark);
  vertical-align: top;
}

.policy-table th {
  color: var(--paper);
  font-weight: 500;
}

/* Lock the page scroller while an overlay is open. */
html.modal-open,
html.modal-open body { overflow: hidden; }

/* ---------- Cookie consent banner ---------- */
/* Sits under the policy overlays (z 60) so its Cookie Policy link opens above it. */

.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 55;
  width: min(360px, calc(100vw - 40px));
  background: var(--ink);
  border: 1px solid rgba(247, 252, 255, 0.16);
  border-radius: 4px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(1, 3, 11, 0.55);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner.show {
  animation: cookie-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.cookie-banner.leaving { animation: cookie-out 0.45s ease both; }

/* Accept: the bite lands first (see .cookie-bite), then the card pops away. */
.cookie-banner.accepted { animation: cookie-pop 0.45s ease 0.55s both; }

@keyframes cookie-in {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes cookie-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(calc(100% + 24px)); opacity: 0; }
}

@keyframes cookie-pop {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to { transform: translateY(8px) scale(0.6); opacity: 0; }
}

.cookie-top {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cookie-svg {
  width: 56px;
  height: 56px;
  flex: none;
}

/* Idle: a slow happy wobble. */
.cookie-rock {
  transform-origin: 32px 32px;
  animation: cookie-wiggle 3.6s ease-in-out infinite;
}

@keyframes cookie-wiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Occasional blink. */
.cookie-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: cookie-blink 4.2s infinite;
}

@keyframes cookie-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  93%, 95% { transform: scaleY(0.12); }
  97% { transform: scaleY(1); }
}

/* The bite: hidden until Accept, then it snaps in. */
.cookie-bite {
  opacity: 0;
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.1s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-banner.accepted .cookie-bite {
  opacity: 1;
  transform: scale(1);
}

.cookie-banner.accepted .cookie-rock {
  animation: cookie-munch 0.45s ease;
}

@keyframes cookie-munch {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-9deg) scale(0.95); }
  65% { transform: rotate(6deg); }
}

/* Crumbs that fall from the bite. */
.cookie-crumbs {
  position: absolute;
  left: 38px;
  top: 2px;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

.cookie-crumbs i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #B87F45;
  border-radius: 1px;
  opacity: 0;
}

.cookie-crumbs i:nth-child(1) { left: 2px;  top: 6px; }
.cookie-crumbs i:nth-child(2) { left: 12px; top: 0; width: 4px; height: 4px; background: #D89A5B; }
.cookie-crumbs i:nth-child(3) { left: 20px; top: 8px; }
.cookie-crumbs i:nth-child(4) { left: 8px;  top: 12px; width: 3px; height: 3px; background: #5A3A22; }
.cookie-crumbs i:nth-child(5) { left: 16px; top: 14px; width: 4px; height: 4px; }

.cookie-banner.accepted .cookie-crumbs i { animation: crumb-fall 0.7s ease-in both; }

.cookie-banner.accepted .cookie-crumbs i:nth-child(odd) { animation-name: crumb-fall-left; }
.cookie-banner.accepted .cookie-crumbs i:nth-child(1) { animation-delay: 0.05s; }
.cookie-banner.accepted .cookie-crumbs i:nth-child(2) { animation-delay: 0.12s; }
.cookie-banner.accepted .cookie-crumbs i:nth-child(3) { animation-delay: 0.02s; }
.cookie-banner.accepted .cookie-crumbs i:nth-child(4) { animation-delay: 0.18s; }
.cookie-banner.accepted .cookie-crumbs i:nth-child(5) { animation-delay: 0.09s; }

@keyframes crumb-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(10px, 46px) rotate(220deg); }
}

@keyframes crumb-fall-left {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(-12px, 42px) rotate(-200deg); }
}

.cookie-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.cookie-body {
  font-size: 14px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  flex: 1;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-accept {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--paper);
}

.cookie-accept:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.cookie-decline {
  background: none;
  border: 1px solid rgba(247, 252, 255, 0.25);
  color: var(--paper);
}

.cookie-decline:hover { border-color: var(--paper); }

.cookie-btn:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.cookie-policy-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

.cookie-policy-link:hover { color: var(--accent); }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- Responsive ---------- */

/* Short desktop windows: tighten dense panels so nothing clips inside the frame. */
@media (max-height: 780px) and (min-width: 721px) {
  .models, .audit-grid {
    padding-top: clamp(10px, 1.8vh, 20px);
    padding-bottom: clamp(12px, 2vh, 24px);
  }

  .model, .audit-left { gap: clamp(8px, 1.6vh, 16px); }

  .ticks { gap: clamp(8px, 1.6vh, 16px); }

  .audit-form { gap: 8px; }

  .audit-form label { gap: 4px; }

  .audit-form input,
  .audit-form textarea { padding: 8px 12px; }

  .audit-form textarea { min-height: 44px; }

  .audit-form .btn { margin-top: 2px; padding: 11px 20px; }

  .client-wall li { height: clamp(56px, 8vh, 80px); }
}

@media (max-width: 720px), (max-height: 700px) {
  html { scroll-snap-type: y proximity; }

  .panel {
    height: auto;
    min-height: 100svh;
  }
}

@media (max-width: 720px) {
  :root { --frame-gap: 14px; --nav-h: 64px; }

  /* Single-row bar: logo left, burger right; links live in a dropdown panel. */
  .nav {
    justify-content: space-between;
    padding: 0 var(--frame-gap);
  }

  .wordmark-logo { height: 28px; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line-light);
    padding: 4px var(--frame-gap) 20px;
    box-shadow: 0 18px 30px rgba(1, 3, 11, 0.12);
  }

  .nav.nav-open .nav-menu { display: flex; }

  .nav-links {
    position: static;
    transform: none;
    flex-direction: column;
    gap: 0;
  }

  .nav-links a {
    font-size: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line-light);
  }

  .nav-cta {
    display: inline-block;
    margin: 16px 0 0;
    text-align: center;
    padding: 13px 18px;
  }

  .frame { position: relative; inset: auto; margin: calc(var(--nav-h) + 10px) var(--frame-gap) var(--frame-gap); min-height: calc(100svh - var(--nav-h) - 24px); }

  .hero-frame { display: flex; }

  .hero-content { position: relative; top: auto; left: auto; padding: 32px 20px 0; }

  .hero-foot { position: relative; left: auto; bottom: auto; margin: auto 20px 32px; padding-top: 40vh; }

  .services-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 0; }

  .service { padding-bottom: 18px; }

  .models { grid-template-columns: 1fr; padding: 16px 20px 24px; }

  .model { padding-right: 0; }

  .model + .model {
    border-left: none;
    border-top: 1px solid var(--line-dark);
    padding-left: 0;
    margin-top: 20px;
    padding-top: 20px;
  }

  .client-wall { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .client-wall li { height: 64px; padding: 12px 14px; }

  /* The open seat spans its own full row in the middle of the wall. */
  .logo-placeholder { grid-column: 1 / -1; height: 56px; }

  .audit-grid { grid-template-columns: 1fr; gap: 24px; padding: 16px 20px 28px; align-items: start; }

  .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }

  .audit-form { justify-self: stretch; max-width: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 32px 20px;
    gap: 24px;
  }

  .footer-contact { justify-self: center; align-items: center; }

  .sphere-full { height: min(40vh, 300px); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-mosaic .cell.gone { transition: none; }

  .btn, .btn-plus { transition: none; }

  .service, .service .num, .service h3, .nav-burger span, .logo-placeholder {
    transition: none;
  }

  .service:hover { transform: none; }

  .cookie-banner, .cookie-rock, .cookie-eye, .cookie-crumbs i {
    animation: none !important;
  }

  .cookie-bite { transition: none; }

  .cookie-banner.show { transform: none; opacity: 1; }
}
