/* Sand: shared base for /sand/ and /sand-stadium/. Night palette, sand on charcoal.
   Tokens, kinetic's nav, buttons and the rooms below the hero, each room in its own form.
   Each route adds its hero: sand-monolith.css (/sand/) or sand-stadium.css (/sand-stadium/).
   Archivo throughout, 500 for display. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/archivo/archivo-400.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/archivo/archivo-500.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/archivo/archivo-600.woff2) format("woff2"); }

:root {
  --ground: #1C1A17;
  --raised: #24211D;
  --sunken: #151310;
  --ink: #F3EFE8;
  --muted: #A8A199;
  --soft: rgba(243, 239, 232, 0.74);
  --line: rgba(243, 239, 232, 0.12);
  --line-strong: rgba(243, 239, 232, 0.28);
  --sand: #C9A876;
  --on-light: #1C1A17;

  --growth: #8B9382;
  --sports: #B08867;
  --experiences: #7C8B94;
  --digital: #C9A876;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);

  --edge: max(20px, 5vw);
  --nav-top: 12px;
  --nav-h: 58px;
  --room-y: clamp(104px, 11vw, 176px);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M2 8h11M9 4l4 4-4 4'/%3E%3C/svg%3E");
}

.d-growth { --c: var(--growth); }
.d-sports { --c: var(--sports); }
.d-experiences { --c: var(--experiences); }
.d-digital { --c: var(--digital); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ground); color: var(--ink); scroll-padding-top: calc(var(--nav-top) + var(--nav-h) + 24px); scrollbar-color: var(--line-strong) var(--ground); }
body { font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ol, ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--sand); color: var(--on-light); }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 30; left: 12px; top: 12px; padding: 12px 18px; background: var(--ink); color: var(--on-light); border-radius: 6px; transform: translateY(-160%); transition: transform 0.24s var(--ease); }
.skip:focus-visible { transform: none; }
.arr { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; transition: transform 0.24s var(--ease); }

/* ---------------- nav: kinetic's floating panel ---------------- */
.nav { position: fixed; z-index: 20; top: var(--nav-top); left: 12px; right: 12px; height: var(--nav-h); display: flex; background: rgba(36, 33, 29, 0.94); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.brand { display: flex; align-items: center; padding: 0 22px; border-right: 1px solid var(--line); }
.logo { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1; }
.logo small { display: block; margin-top: 4px; font-size: 9px; font-weight: 500; letter-spacing: 0.32em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 4px; padding: 0 12px; font-size: 15px; color: var(--muted); }
.nav-links a { display: flex; align-items: center; height: 44px; padding: 0 12px; transition: color 0.24s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.grow { flex: 1; }
.cell { display: none; align-items: center; padding: 0 18px; border-left: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.cell:hover { color: var(--ink); }
.cta { display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--ink); color: var(--on-light); font-size: 15px; font-weight: 600; transition: background-color 0.24s var(--ease); }
.cta:hover { background: var(--sand); }
.cta svg { width: 16px; height: 16px; }
.menu { position: fixed; z-index: 19; top: calc(var(--nav-top) + var(--nav-h) + 6px); left: 12px; right: 12px; padding: 12px 22px 28px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.menu-mail { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; color: var(--muted); }

/* ---------------- buttons ---------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 12px; height: 50px; padding: 0 22px; border-radius: 6px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; transition: background-color 0.12s var(--ease), box-shadow 0.12s var(--ease), color 0.12s var(--ease); }
.btn-solid { background: var(--ink); color: var(--on-light); }
.btn-solid:hover { background: var(--sand); }
.btn-solid:hover .arr, .more:hover .arr { transform: translateX(4px); }
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ================================================================
   Rooms below the hero
   ================================================================ */
.room-s, .rail-room, .close-room { position: relative; padding: var(--room-y) var(--edge); border-top: 1px solid var(--line); }
.head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 64px; align-items: end; margin-bottom: clamp(48px, 5vw, 80px); }
.head h2 { font-size: clamp(34px, 3.9vw, 60px); font-weight: 500; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; max-width: 16ch; }
.head p { max-width: 44ch; color: var(--soft); text-wrap: pretty; }

/* drawn rules: lines arrive left to right as a room enters (sand.js adds .in) */
.draw { position: relative; }
.draw::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: var(--rule, 1px); background: var(--rule-c, var(--ink)); transform-origin: 0 50%; transform: scaleX(var(--drawn, 1)); transition: transform 0.9s var(--ease) var(--delay, 0s); }
html.reveal .draw::before { --drawn: 0; }
html.reveal .in .draw::before, html.reveal .draw.in::before { --drawn: 1; }

/* The Group: a ledger, then the sequence */
.ledger th, .ledger td, .terms th, .terms td { text-align: left; vertical-align: baseline; padding: 22px 24px 22px 0; border-top: 1px solid var(--line); }
.ledger thead th, .terms thead th { padding-top: 0; padding-bottom: 14px; border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.ledger tbody th, .terms tbody th { width: 30%; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.ledger td, .terms td { font-size: 16px; color: var(--soft); }
.ledger td:last-child { color: var(--muted); }
.ledger .us th, .ledger .us td { border-top: 1px solid var(--ink); color: var(--ink); padding-top: 26px; padding-bottom: 26px; }
.ledger .us th { white-space: nowrap; }
.ledger .us td:last-child { color: var(--ink); font-weight: 500; }

.sequence { margin-top: clamp(80px, 9vw, 136px); }
.seq-title { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; max-width: 36ch; }
.seq-title span { color: var(--muted); }
.seq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 44px; }
.seq li { position: relative; padding-top: 30px; }
.seq li::after { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; background: var(--ink); }
.seq h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.seq p { margin-top: 10px; font-size: 16px; color: var(--soft); max-width: 30ch; }
.seq { --rule-c: var(--line-strong); }

/* Directions: the rail, one colour per column, in order */
.rail-room { background: var(--sunken); }
.rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.col { --rule: 4px; --rule-c: var(--c); display: flex; flex-direction: column; min-height: 100%; padding: 36px 28px 40px; border-top: 4px solid rgba(243, 239, 232, 0.06); transition: background-color 0.24s var(--ease); scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 24px); }
.col::before { top: -4px; }
.col + .col { border-left: 1px solid var(--line); }
.col:nth-child(2) { --delay: 80ms; } .col:nth-child(3) { --delay: 160ms; } .col:nth-child(4) { --delay: 240ms; }
@media (hover: hover) and (pointer: fine) { .col:hover { background: var(--ground); } }
.no { font-size: clamp(56px, 5vw, 80px); font-weight: 500; line-height: 0.9; letter-spacing: -0.04em; color: var(--c); font-variant-numeric: tabular-nums; }
.col h3 { margin-top: 28px; font-size: clamp(26px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.col > p { margin-top: 12px; font-size: 16px; color: var(--soft); }
.svc { margin-top: 24px; border-top: 1px solid var(--line); }
.svc li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.co { margin-top: 24px; font-size: 16px; font-weight: 600; color: var(--c); }
.more { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: auto; padding-top: 16px; font-size: 15px; font-weight: 500; }
.more:hover { color: var(--sand); }

/* How we work: a track that returns to its start */
.track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 34px; --rule-c: var(--line-strong); }
.track li { position: relative; }
.track li::before { content: ""; position: absolute; left: 0; top: -38px; width: 9px; height: 9px; border: 1px solid var(--ink); background: var(--ground); }
.track li:last-child::before { background: var(--sand); border-color: var(--sand); }
.track h3 { font-size: clamp(26px, 2.3vw, 34px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.track p { margin-top: 12px; font-size: 16px; color: var(--soft); max-width: 28ch; }
.track::after { content: ""; position: absolute; right: 0; top: -1px; width: 16px; height: 16px; translate: 4px -50%; background: var(--line-strong); -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }

/* Why Bergence: the figures as a statement, each with its line */
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.figs > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.figs dd { display: flex; align-items: baseline; font-size: clamp(76px, 9vw, 136px); font-weight: 500; line-height: 0.88; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.figs .unit { margin-left: 0.06em; font-size: 0.42em; letter-spacing: -0.02em; color: var(--sand); }
.figs dt { font-size: 17px; color: var(--soft); }
.qual { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* Working with us: terms as a ledger */
.terms td:last-child { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Contact: the one centred line */
.close-room { background: var(--sunken); text-align: center; padding-top: clamp(128px, 14vw, 216px); padding-bottom: clamp(128px, 14vw, 216px); }
.close-room h2 { margin: 0 auto; max-width: 12ch; font-size: clamp(48px, 6.6vw, 96px); font-weight: 500; line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
.mail { display: inline-flex; align-items: center; min-height: 44px; margin-top: 44px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -0.02em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--sand); transition: color 0.24s var(--ease); }
.mail:hover { color: var(--sand); }
.close-room p { margin-top: 16px; color: var(--muted); }

/* Footer */
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 24px var(--edge); border-top: 1px solid var(--line); background: var(--sunken); font-size: 14px; color: var(--muted); }
.footer .brand { padding: 0; border: 0; min-height: 44px; }
.footer p { margin-right: auto; }
.footer nav { display: flex; gap: 8px 24px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer nav a:hover { color: var(--ink); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col:nth-child(3) { border-left: 0; }
  .col:nth-child(n + 3) { border-top-width: 4px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .cell.menu-btn { display: flex; }
  .brand { border-right: 0; padding: 0 16px; }
  .cta { padding: 0 14px; gap: 8px; font-size: 14px; white-space: nowrap; }
  .head { grid-template-columns: minmax(0, 1fr); }
  .seq, .track, .figs { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .seq::before { display: none; }
  .seq li { padding-top: 22px; border-top: 1px solid var(--line-strong); }
  .seq li::after { top: -4px; }
  .track { padding-top: 0; }
  .track::before, .track::after { display: none; }
  .track li { padding-top: 26px; border-top: 1px solid var(--line-strong); }
  .track li::before { top: -5px; }
  .ledger thead { display: none; }
  .ledger tr, .terms tr { display: block; padding: 20px 0; border-top: 1px solid var(--line); }
  .ledger .us { border-top-color: var(--ink); }
  .ledger th, .ledger td, .terms th, .terms td { display: block; width: auto !important; padding: 0; border: 0 !important; }
  .ledger td, .terms td { margin-top: 6px; }
  .ledger td:nth-of-type(1)::before { content: "Strong at: "; color: var(--muted); }
  .ledger td:nth-of-type(2)::before { content: "Absent from: "; color: var(--muted); }
  .ledger .us td:nth-of-type(2)::before { content: ""; }
  .terms thead { display: none; }
  .terms td:last-child { white-space: normal; }
  .actions { margin-top: 28px; }
  .ledger .us th, .ledger .us td { padding: 0; }
  .ledger .us td { margin-top: 6px; }
}
@media (max-width: 600px) {
  .rail { grid-template-columns: minmax(0, 1fr); }
  .col + .col { border-left: 0; }
  .col { padding-left: 0; padding-right: 0; }
  .figs dd { font-size: clamp(72px, 22vw, 104px); }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer p { margin-right: 0; }
}
@media (min-width: 901px) { .menu { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .draw::before, .btn, .arr, .col, .cta { transition: none; }
}
