/* ============================================================
   APXORA — Atelier design system
   Strategy-memo aesthetic. Bone paper, deep ink, ember signal.
   Used by index / platform / company / contact pages.
   ------------------------------------------------------------
   RESPONSIVE BREAKPOINT CONVENTION (max-width, desktop-down):
     <= 480px  small phones
     <= 640px  phones (primary mobile breakpoint)
     <= 900px  tablets / landscape phones
     <= 1200px small laptops
   Rule of thumb: collapse to a single column at <=640; land any
   intermediate 2-col steps at <=900. (CSS vars can't be used in
   media queries, so this is a convention, not a token.)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500;1,9..144,600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

:root {
  /* Paper system — bone, dust, ink */
  --bone:        #efeae0;
  --bone-2:      #e6e0d3;
  --bone-3:      #d8d1c0;
  --ink:         #14110d;
  --ink-2:       #2c2822;
  --ink-3:       #4a4640;
  --muted:       #807a70;
  --rule:        rgba(20, 17, 13, 0.14);
  --rule-strong: rgba(20, 17, 13, 0.32);
  --paper-warm:  #f5f0e6;

  /* Signal — single warm vermilion */
  --signal:      #d9341a;
  --signal-ink:  #a52612;
  --signal-soft: #f3c5bc;

  /* Deep — used sparingly, navy/ink ground */
  --deep:        #0c1014;
  --deep-2:      #161c22;

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --sans:    "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --container: 1320px;
  --pad:       clamp(20px, 4vw, 64px);
  --gap:       clamp(20px, 3vw, 40px);
  --rule-h:    1px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bone); color: var(--ink); }
/* Clip any horizontal overflow at the root so a stray wide element never widens
   the mobile visual viewport (which causes the whole page to zoom out / "shrink"
   — most visible when the off-canvas menu slides in). `clip` (not `hidden`) is
   used so neither element becomes a scroll container that would break the
   sticky nav. */
html { overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01", "cv11";
  letter-spacing: -0.005em;
  overflow-x: clip;
  max-width: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--signal); color: var(--bone); }

/* ---------------- Type ---------------- */

.display {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
.display-italic { font-family: var(--display); font-style: italic; font-weight: 400; }

h1, h2, h3, h4, h5 { font-weight: 500; letter-spacing: -0.012em; line-height: 1.12; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); display: inline-block; }
.eyebrow .num { color: var(--ink); font-weight: 600; }

.mono   { font-family: var(--mono); font-feature-settings: "ss02", "calt"; }
.serif  { font-family: var(--display); }
.italic { font-style: italic; }

p          { color: var(--ink-2); }
p.lede     { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--ink); max-width: 56ch; }
p.body     { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
p.body-sm  { font-size: 14px; line-height: 1.6; color: var(--ink-3); }

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

/* Marginalia — numbered side note, characteristic of memos */
.margin-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
}
.margin-note::before {
  content: attr(data-num);
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--signal);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
  position: relative;
  top: 1px;
}

/* ---------------- Layout ---------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--rule); }
.section.tight { padding: clamp(48px, 6vw, 80px) 0; }

/* Editorial 12-col grid for memo-style layouts */
.col12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }

/* ---------------- Section header (memo style) ---------------- */
.s-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
  align-items: end;
}
.s-head .left  { display: flex; flex-direction: column; gap: 18px; }
.s-head .right { padding-bottom: 4px; }
.s-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1;
  text-wrap: balance;
}
.s-head h2 em { font-style: italic; color: var(--signal); }
@media (max-width: 820px) {
  .s-head { grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px; margin-bottom: 40px; }
}

/* ---------------- Top nav ----------------
   Desktop: brand left · links centered · CTA right (flex).
   Mobile (<=820px): brand + hamburger only; a self-contained drawer (with its
   own brand + close button) slides in from the right over a scrim. Drawer and
   scrim are always in the DOM and animated via the .open class. */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px var(--pad);
  background: color-mix(in oklab, var(--bone) 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
}
.nav .brand { display: flex; align-items: center; }
.nav .brand .brand-img { height: 26px; width: auto; display: block; }

/* Desktop links — centered between brand and CTA via auto side margins. */
.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0 auto;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--signal);
}
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Hamburger — mobile only. */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: none; color: var(--ink); cursor: pointer;
  margin-left: auto;
  margin-right: calc(-1 * (44px - 22px) / 2);
}
.nav-toggle:focus-visible,
.nav-drawer-close:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 8px;
}

/* Scrim behind the drawer — its own compositor layer so the page doesn't
   repaint behind the backdrop-filtered nav (which flickers). */
.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(12, 16, 20, 0.45);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  will-change: opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.nav-scrim.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* The drawer — a self-contained panel; its header (brand + close) travels with
   it, so nothing reflows during the slide. Hidden entirely on desktop. */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  flex-direction: column;
  background: var(--bone);
  border-left: 1px solid var(--rule);
  box-shadow: -18px 0 50px rgba(12, 16, 20, 0.18);
  z-index: 60;
  padding: 16px clamp(22px, 6vw, 32px) calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.3s;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.nav-drawer-head .brand { display: flex; align-items: center; }
.nav-drawer-close {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--ink); cursor: pointer;
  margin-right: calc(-1 * (44px - 22px) / 2);
}
.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.nav-drawer-links a {
  display: block;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}
.nav-drawer-links a:hover,
.nav-drawer-links a.active { color: var(--signal); }
.nav-drawer-cta {
  margin-top: auto;
  padding-top: 24px;
}
.nav-drawer-cta .btn { width: 100%; justify-content: center; }

@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-scrim { display: block; }
  .nav-drawer { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-drawer, .nav-scrim { transition: none; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bone); }
.btn-signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-signal:hover { background: var(--signal-ink); border-color: var(--signal-ink); }
@media (max-width: 640px) {
  /* Larger tap targets on touch screens (clears ~44px). */
  .btn { padding: 13px 20px; }
}

/* ---------------- Responsive table wrapper ----------------
   Wrap any wide <table> in <div class="table-scroll"> so it pans
   horizontally on small screens instead of overflowing the page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------- Reveal (transition-based — robust to hidden tabs) ---------------- */
.reveal,
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.reveal.in,
.reveal-stagger.in > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.in > *:nth-child(1)  { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2)  { transition-delay: 0.06s; }
.reveal-stagger.in > *:nth-child(3)  { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(4)  { transition-delay: 0.18s; }
.reveal-stagger.in > *:nth-child(5)  { transition-delay: 0.24s; }
.reveal-stagger.in > *:nth-child(6)  { transition-delay: 0.30s; }
.reveal-stagger.in > *:nth-child(7)  { transition-delay: 0.36s; }
.reveal-stagger.in > *:nth-child(8)  { transition-delay: 0.42s; }
.reveal-stagger.in > *:nth-child(9)  { transition-delay: 0.48s; }
.reveal-stagger.in > *:nth-child(10) { transition-delay: 0.54s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------- Footer ---------------- */
.foot {
  background: var(--ink);
  color: var(--bone);
  padding: 80px var(--pad) 32px;
  position: relative;
}
.foot .top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: var(--gap);
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(239, 234, 224, 0.18);
}
.foot-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(239, 234, 224, 0.3);
  color: rgba(239, 234, 224, 0.8);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.foot-social a:hover {
  color: var(--ink);
  background: var(--bone);
  border-color: var(--bone);
}
.foot .brand {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.foot .brand .brand-img { height: 36px; width: auto; display: block; }
.foot .brand-old {
  font-family: var(--display);
  font-style: italic;
  font-size: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.foot .brand-old .glyph {
  width: 28px; height: 28px;
  background: var(--signal);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.foot p { color: rgba(239, 234, 224, 0.7); font-size: 14px; max-width: 36ch; }
.foot h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 18px;
}
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot ul a { color: rgba(239, 234, 224, 0.8); font-size: 14px; }
.foot ul a:hover { color: var(--bone); }
.foot .legal {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(239, 234, 224, 0.5);
  padding-top: 28px;
}
@media (max-width: 1024px) {
  .foot .top { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 820px) {
  .foot .top { grid-template-columns: 1fr 1fr; }
  .foot .legal { flex-direction: column; gap: 8px; }
}

/* ---------------- Cookie consent ---------------- */
.cookie-banner {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: 16px;
  z-index: 1000;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--ink);
  color: var(--bone);
  border: 1px solid rgba(239, 234, 224, 0.16);
  border-radius: 6px;
  padding: 18px 22px;
  box-shadow: 0 24px 64px rgba(12, 16, 20, 0.4);
}
.cookie-banner-text p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(239, 234, 224, 0.85);
  max-width: 52ch;
}
.cookie-banner-text a,
.cookie-intro a { color: var(--bone); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-text a:hover { color: #fff; }
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cookie-banner-actions .btn-ghost {
  color: var(--bone);
  border-color: rgba(239, 234, 224, 0.35);
}
.cookie-banner-actions .btn-ghost:hover {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

/* Preferences modal */
.cookie-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 20, 0.55);
  backdrop-filter: blur(2px);
}
.cookie-modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  background: var(--paper-warm);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 30px 80px rgba(12, 16, 20, 0.45);
}
.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cookie-modal-head h3 {
  font-family: var(--display);
  font-size: 26px;
  margin: 0;
}
.cookie-x {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.cookie-x:hover { color: var(--ink); }
.cookie-intro {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0 0 22px;
}
.cookie-cats {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.cookie-cat { border-bottom: 1px solid var(--rule); }
.cookie-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
.cookie-cat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  padding: 0;
}
.cookie-caret {
  display: inline-block;
  transition: transform .2s ease;
  color: var(--signal);
  font-size: 12px;
}
.cookie-caret.open { transform: rotate(90deg); }
.cookie-always {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
  white-space: nowrap;
}
.cookie-cat-desc {
  margin: 0 0 16px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
/* Toggle switch */
.cookie-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--bone-3);
  border-radius: 999px;
  transition: background .2s ease;
}
.cookie-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.cookie-switch input:checked + .cookie-slider { background: var(--signal); }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(18px); }
.cookie-switch input:focus-visible + .cookie-slider { outline: 2px solid var(--ink); outline-offset: 2px; }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; justify-content: center; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* ---------------- Tag / pill ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  background: var(--bone);
}
.tag.tag-signal { color: var(--signal); border-color: var(--signal-soft); background: rgba(217, 52, 26, 0.04); }
.tag.tag-ink    { color: var(--bone); background: var(--ink); border-color: var(--ink); }

/* ---------------- Hairline rule ---------------- */
.hr      { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.hr-strong { border: 0; border-top: 1px solid var(--ink); margin: 0; }
.hr-double {
  height: 4px; border: 0; background:
    linear-gradient(var(--ink), var(--ink)) top/100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom/100% 1px no-repeat;
}

/* ---------------- Number plate (big stat, editorial) ---------------- */
.numplate {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 9vw, 140px);
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--ink);
}
.numplate .accent { color: var(--signal); font-style: italic; }
.numplate-lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 40ch;
  line-height: 1.5;
  margin-top: 14px;
}

/* ---------------- Memo card (hairline editorial card) ---------------- */
.memo {
  border-top: 1px solid var(--ink);
  padding: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.memo .num {
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  color: var(--signal);
  line-height: 1;
}
.memo h4 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.memo p { font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 38ch; }

/* ---------------- Stamp (editorial annotation) ---------------- */
.stamp {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--signal);
  padding: 5px 9px;
  display: inline-block;
  transform: rotate(-2deg);
  background: var(--bone);
}

/* ---------------- Logos band (tiered) ---------------- */
.logos {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bone-2);
  padding: clamp(56px, 8vw, 96px) 0;
}
.logos-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
.logos-head .eyebrow { align-self: start; padding-top: 6px; }
.logos-headline {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 720px;
  margin: 0;
}
.logos-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
}
.logo-group {
  padding: 28px 32px 32px 0;
  border-right: 1px dashed var(--rule);
}
.logo-group:nth-child(2) { padding-left: 32px; }
.logo-group:last-child { padding-left: 32px; padding-right: 0; border-right: 0; }

.logo-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.logo-group-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.logo-group-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.logo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.logo-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  min-height: 84px;
}
.logo-cell:last-child { border-bottom: 0; }
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  max-width: 100%;
  overflow: hidden;
}
.logo-mark img {
  display: block;
  max-width: 100%;
}
.logo-cell--card .logo-mark img {
  /* full marketing card — give it more presence, drop the multiply trick */
  mix-blend-mode: normal;
  border-radius: 4px;
}
.logo-cell.no-logo .logo-mark {
  min-height: 44px;
}
.logo-name {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
.logo-note {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
.logo-group--customers .logo-name { font-style: italic; }
.logo-group--customers .logo-cell:first-child .logo-note {
  color: var(--signal);
}
.logo-group--customers .logo-cell:first-child .logo-note::before {
  content: "● ";
  color: var(--signal);
}

@media (max-width: 900px) {
  .logos-head { grid-template-columns: 1fr; gap: 16px; }
  .logos-grid { grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
  .logo-group {
    padding: 24px 0 24px 0 !important;
    border-right: 0;
    border-bottom: 1px dashed var(--rule);
  }
  .logo-group:last-child { border-bottom: 0; }
}

/* ---------------- Image plates ---------------- */
.plate {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  border: 1px solid var(--ink);
}
.plate img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; mix-blend-mode: luminosity; filter: contrast(1.05) saturate(0.5); }
.plate.plain img { mix-blend-mode: normal; filter: none; opacity: 1; }
.plate-cap {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--signal);
  padding: 4px 8px;
}

/* ---------------- Tables (memo style) ---------------- */
.memo-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}
.memo-table th, .memo-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.memo-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.memo-table tbody tr:hover { background: var(--bone-2); }

/* ---------------- Density utilities ---------------- */
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack    { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row      { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------------- Back-to-top button ----------------
   Floating, appears after scrolling past the first viewport (see <ScrollToTop/>).
   Kept below the cookie banner (z 1000) so a first-visit consent prompt stays on top. */
.to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(12, 16, 20, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.to-top:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.to-top:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 0.2s ease; transform: none; }
  .to-top.show { transform: none; }
}

/* ---------------- Print helpers (hide chrome on PDF) ---------------- */
@media print {
  .nav, .foot, .logos, .to-top { display: none !important; }
}
