/* Namib Partners, chaptered editorial. Tokens from brand/BRAND.md, nothing else. */

@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/spectral-400.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/spectral-400i.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/jost-400.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("assets/fonts/worksans-var.woff2") format("woff2"); }

:root {
  --ink: #121A2A;
  --sand: #C2A17B;
  --sand-text: #7E5339;
  --paper: #EFE8DD;
  --card: #FBF8F3;
  --line: #E4DACA;
  --line-strong: #DDD3C4;
  --soft: #5F5950;
  --prose: #4A463F;
  --ink-line: #2C3648;
  --ink-raise: #1D2740;

  --sc-canvas: var(--paper);
  --sc-surface: var(--card);
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--soft);
  --sc-accent: var(--sand);
  --sc-accent-ink: var(--ink);
  --sc-font-display: "Spectral", Georgia, serif;
  --sc-font-text: "Work Sans", system-ui, sans-serif;
  --sc-font-mono: "Jost", system-ui, sans-serif;
  --sc-shadow-color: 28 30% 20%;

  --label: "Jost", system-ui, sans-serif;
  --folio-pad: 0px;
  --wrap: 70rem;
}

@media (min-width: 900px) { :root { --folio-pad: 6.5rem; } }
@media (min-width: 1180px) { :root { --folio-pad: 8.5rem; } }

html { scroll-padding-top: 1.5rem; }
body { background: var(--paper); color: var(--ink); font-weight: 400; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ch--ink :focus-visible, .ch--ink ~ .folio :focus-visible { outline-color: var(--sand); }
::selection { background: var(--sand); color: var(--ink); }

/* ---------------------------------------------------------------- layout -- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sc-gutter);
}
@media (min-width: 900px) {
  .wrap { padding-inline-start: calc(var(--sc-gutter) + var(--folio-pad)); max-width: calc(var(--wrap) + var(--folio-pad)); }
}

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; font-family: var(--label); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 1rem; }

.ch { position: relative; }
.ch--paper { background: var(--paper); color: var(--ink); }
.ch--card  { background: var(--card);  color: var(--ink); }
.ch--ink {
  --sc-ink: var(--paper); --sc-ink-soft: #C9C0B2; --sc-canvas: var(--ink);
  background: var(--ink); color: var(--paper);
}

/* --------------------------------------------------------------- type ----- */
.h-title, .h-chapter, .h-call, .h-item, .who__name, .seven__n { font-family: "Spectral", Georgia, serif; font-weight: 400; margin: 0; }
.h-title {
  font-size: clamp(2.05rem, 1.15rem + 3.5vw, 3.7rem);
  line-height: 1.04; letter-spacing: .005em; text-wrap: balance; max-width: 19em;
}
.h-chapter {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.05; letter-spacing: .005em; text-wrap: balance; max-width: 16em;
}
.h-chapter--wide { max-width: 20em; }
.h-item { font-size: clamp(1.25rem, 1.08rem + .7vw, 1.6rem); line-height: 1.2; letter-spacing: .005em; text-wrap: balance; }
.h-call { font-size: clamp(2.4rem, 1.2rem + 5vw, 5rem); line-height: 1; letter-spacing: .005em; text-wrap: balance; max-width: 14em; }

.lede { font-size: var(--sc-t-lg); line-height: 1.5; color: var(--prose); max-width: 38ch; margin: 0; text-wrap: pretty; }
.body { color: var(--prose); max-width: 56ch; margin: 0; text-wrap: pretty; }
.body--lg { font-size: var(--sc-t-lg); line-height: 1.55; max-width: 44ch; }
.ch--ink .body, .ch--ink .lede { color: #CFC7B9; }
.note { font-family: var(--label); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #BDB4A5; margin: 0; }

/* ------------------------------------------------------------- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--label); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 8px; text-decoration: none; white-space: nowrap;
  min-height: 40px;
  transition: transform 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out), color 140ms var(--sc-ease-out);
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--lg { font-size: 12px; padding: 14px 24px; min-height: 48px; }
@media (hover: hover) and (pointer: fine) { .btn--ink:hover { background: #1E2A44; } }
.btn:active { transform: scale(.97); }
.link { font-family: var(--label); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 10px 4px; border-bottom: 1px solid transparent; transition: border-color 140ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover { border-color: var(--sand-text); } }

/* ---------------------------------------------------------------- title --- */
.title { min-height: 100svh; display: flex; }
.title > .wrap { display: flex; flex-direction: column; min-height: 100svh; padding-block: clamp(1rem, 3vh, 2rem) clamp(2.5rem, 7vh, 5rem); }
.title__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.title__mark { display: block; line-height: 0; width: clamp(150px, 40vw, 190px); }
.title__mark svg { width: 100%; height: auto; }
.title__links { display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.5rem); }
.title__body { flex: 1; display: grid; align-content: center; gap: clamp(2rem, 5vh, 3.5rem); padding-top: clamp(2rem, 6vh, 4rem); }
.title__copy { display: grid; gap: clamp(1rem, 2.4vh, 1.75rem); justify-items: start; }
.title__copy p { margin: 0; }

@media (min-width: 900px) {
  .title__body { grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 1fr); align-items: end; gap: clamp(3rem, 6vw, 6rem); }
  .slip { margin-bottom: .25rem; }
}
@media (max-width: 520px) {
  .title__links .link { display: none; }
}

.slip {
  margin: 0; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 1.25rem 1.4rem 1.1rem; display: grid; gap: .25rem; max-width: 22rem;
  box-shadow: 0 1px 2px hsl(var(--sc-shadow-color) / .10), 0 14px 28px -14px hsl(var(--sc-shadow-color) / .22), inset 0 1px 0 #fff;
}
.slip__top { font-family: var(--label); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sand-text); }
.slip__when { font-family: "Spectral", Georgia, serif; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.1rem); line-height: 1.1; margin: .35rem 0 0; color: var(--ink); }
.slip__when span { font-variant-numeric: tabular-nums; }
.slip__meta { margin: 0; color: var(--soft); font-size: var(--sc-t-sm); }
.slip__state { margin: .8rem 0 0; display: flex; align-items: center; gap: .55rem; font-family: var(--label); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.slip__tick { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.slip__tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid var(--paper); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.slip__note { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px dashed var(--line-strong); font-family: var(--label); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--soft); }

/* ----------------------------------------------------------------- leak --- */
.leak { background: var(--ink); }
.leak__stage { background: var(--ink); display: flex; align-items: center; }
.leak__wrap { display: grid; gap: clamp(1.25rem, 3.5vh, 2.5rem); align-items: center; }
.leak__text { display: grid; gap: clamp(.9rem, 2vh, 1.4rem); justify-items: start; }
.leak__text .h-chapter { color: var(--paper); font-size: clamp(1.8rem, 1rem + 2.7vw, 3.1rem); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin: .2rem 0 0; padding: 0; font-family: var(--label); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #D8D0C3; }
.legend li { display: flex; align-items: center; gap: .5rem; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; }
.legend__visitor { background: var(--paper); border-radius: 50% !important; width: .55rem !important; height: .55rem !important; }
.legend__open { border: 1px dashed var(--sand); }
.legend__booked { background: var(--sand); }

@media (min-width: 900px) {
  .leak__wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); }
}

.cal { --h: 320px; width: 100%; max-width: 34rem; justify-self: end; }
.cal__days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: .55rem; font-family: var(--label); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: #D8D0C3; text-align: center; }
.cal__grid { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cal__col { position: relative; display: grid; grid-template-rows: repeat(8, 1fr); gap: 5px; }
.cell {
  position: relative; border-radius: 5px; height: clamp(1.45rem, 4.6vh, 2.5rem);
  border: 1px dashed color-mix(in oklab, var(--sand) 62%, transparent);
}
.cell--booked { border: 1px solid transparent; background: var(--sand); }
.cell::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--sand);
  opacity: clamp(0, calc((var(--sc-p, 0) - var(--t, 1)) * 16), 1);
}
.cell--booked::after { display: none; }

/* Visitors drift down a column and never land. They stop once the slots fill. */
.dots { position: absolute; inset: 0; pointer-events: none; }
.dot {
  position: absolute; left: 50%; top: 0; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 0 0 2px var(--ink);
  --y: mod(calc(var(--sc-p, 0) * 2.6 + var(--o)), 1);
  translate: 0 calc(var(--y) * var(--h));
  opacity: calc(min(1, calc(var(--y) * 7), calc((1 - var(--y)) * 7)) * clamp(0, calc((.5 - var(--sc-p, 0)) * 12), 1));
}

/* leak list: rows on a hairline, not cards */
.leak__list { padding-top: clamp(2.5rem, 6vw, 5rem); }
.costs { list-style: none; margin: 0; padding: 0; display: grid; }
.costs li { display: grid; gap: .5rem 3rem; padding-block: clamp(1.4rem, 3vw, 2.2rem); border-top: 1px solid var(--ink-line); }
.costs li:last-child { border-bottom: 1px solid var(--ink-line); }
.costs .h-item { color: var(--paper); }
@media (min-width: 800px) { .costs li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; } }

/* ---------------------------------------------------------------- scope --- */
.scope__head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.scope { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 6vw, 6rem); }
.scope li { display: grid; gap: .6rem; align-content: start; }
.scope li::before { content: ""; width: 2.25rem; height: 2px; background: var(--sand); margin-bottom: .6rem; }
@media (min-width: 760px) {
  .scope { grid-template-columns: 1fr 1fr; }
  .scope li:nth-child(even) { margin-top: clamp(2rem, 5vw, 4rem); }
}
.scope__end { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; font-family: "Spectral", Georgia, serif; font-style: italic; font-size: var(--sc-t-xl); line-height: 1.3; color: var(--ink); max-width: 28ch; text-wrap: balance; }

/* -------------------------------------------------------------- process --- */
.process__top { padding-bottom: clamp(4rem, 8vw, 8rem); }
.process__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.seven { display: flex; align-items: baseline; gap: 1rem; margin: clamp(2rem, 5vw, 3.5rem) 0 0; }
.seven__n { font-size: clamp(5rem, 3rem + 9vw, 9rem); line-height: .85; color: var(--ink); font-variant-numeric: tabular-nums; }
.seven__t { font-family: var(--label); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sand-text); max-width: 11ch; line-height: 1.5; }
.steps-act { position: relative; }
.steps { list-style: none; margin: 0; padding: 0 0 0 2.4rem; display: grid; gap: clamp(1.8rem, 4vw, 2.8rem); counter-reset: s; position: relative; }
.steps li { position: relative; display: grid; gap: .4rem; }
.steps li::before { content: ""; position: absolute; left: -2.4rem; top: .45em; width: .8rem; height: .8rem; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); box-sizing: border-box; z-index: 1; }
.steps__rule { position: absolute; left: .35rem; top: .7em; bottom: .9rem; width: 2px; margin-left: -1px; background: var(--sand); }
@media (min-width: 900px) { .process__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }

/* ------------------------------------------------------------------ who --- */
.who { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.who__name { font-family: var(--label); font-size: .78rem; letter-spacing: .42em; text-transform: uppercase; color: var(--sand-text); }
@media (min-width: 900px) { .who { margin-left: clamp(0rem, 10vw, 9rem); } }

/* ------------------------------------------------------------------ faq --- */
.faq__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .faq__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); align-items: start; } }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding-block: 1.25rem; font-family: "Spectral", Georgia, serif; font-size: clamp(1.15rem, 1.02rem + .6vw, 1.45rem); line-height: 1.25; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--label); font-size: 1.4rem; line-height: 1; color: var(--sand-text); transition: transform 200ms var(--sc-ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > .body { padding-bottom: 1.4rem; }
.faq summary:focus-visible { outline-offset: -2px; }

/* ----------------------------------------------------------------- call --- */
.call { min-height: 100svh; display: flex; }
.call__wrap { display: flex; flex-direction: column; justify-content: space-between; gap: 4rem; padding-block: clamp(4.5rem, 10vh, 8rem) clamp(1.5rem, 4vh, 2.5rem); min-height: 100svh; }
.call__main { display: grid; gap: clamp(1.4rem, 3vh, 2.2rem); align-content: center; flex: 1; }
.call__line { margin: 0; font-family: "Spectral", Georgia, serif; font-size: clamp(1.4rem, 1.05rem + 1.4vw, 2.1rem); line-height: 1.3; color: #D8D0C3; max-width: 30ch; }
.runlink {
  color: var(--paper); text-decoration: underline; text-decoration-color: var(--sand);
  text-decoration-thickness: 3px; text-underline-offset: .22em; font-style: italic;
  transition: color 140ms var(--sc-ease-out), text-decoration-color 140ms var(--sc-ease-out);
}
@media (hover: hover) and (pointer: fine) { .runlink:hover { color: var(--sand); } }
.foot { border-top: 1px solid var(--ink-line); padding-top: 1.25rem; display: grid; gap: .3rem; font-size: var(--sc-t-sm); color: #C9C0B2; }
.foot p { margin: 0; }
.foot a { color: #E6DFD2; text-underline-offset: .2em; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--sand); } }

/* ---------------------------------------------------------------- folio --- */
.folio { position: fixed; z-index: 60; color: var(--ink); }
.folio ol { list-style: none; margin: 0; padding: 0; }
.folio a { text-decoration: none; color: inherit; display: flex; align-items: center; }
.folio__n {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--soft);
  font-family: "Spectral", Georgia, serif; font-size: 1rem; line-height: 1; font-variant-numeric: tabular-nums;
  transition: background-color 200ms var(--sc-ease-out), color 200ms var(--sc-ease-out), border-color 200ms var(--sc-ease-out);
}
.folio__t { font-family: var(--label); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sand-text); white-space: nowrap; opacity: 0; transition: opacity 200ms var(--sc-ease-out); }
.folio__title { font-family: var(--label); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sand-text); margin: 0; }
.folio__line { position: absolute; background: var(--line-strong); }
.folio__fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 0; transform: scale(var(--fx, 0), var(--fy, 0)); }

.folio a[aria-current="step"] .folio__n { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.folio a.is-passed .folio__n { border-color: var(--ink); color: var(--ink); }
.folio a[aria-current="step"] .folio__t { opacity: 1; }

/* dark grounds */
html[data-ground="dark"] .folio { color: var(--paper); }
html[data-ground="dark"] .folio__n { background: var(--ink); border-color: var(--ink-line); color: #C9C0B2; }
html[data-ground="dark"] .folio__t, html[data-ground="dark"] .folio__title { color: var(--sand); }
html[data-ground="dark"] .folio__line { background: var(--ink-line); }
html[data-ground="dark"] .folio__fill { background: var(--sand); }
html[data-ground="dark"] .folio a[aria-current="step"] .folio__n { background: var(--sand); color: var(--ink); border-color: var(--sand); }
html[data-ground="dark"] .folio a.is-passed .folio__n { border-color: var(--sand); color: var(--paper); }

/* desktop: vertical rail in the left margin */
@media (min-width: 900px) {
  .folio { left: clamp(1rem, 2.4vw, 2.25rem); top: 50%; translate: 0 -50%; display: grid; gap: 1.1rem; }
  .folio__title { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; }
  .folio ol { display: grid; gap: 1.3rem; position: relative; }
  .folio__line { left: .95rem; width: 2px; margin-left: -1px; top: 4.2rem; bottom: .95rem; --fx: 1; }
  .folio__fill { transform: scale(1, var(--fy, 0)); }
  .folio a { gap: .8rem; padding-block: 2px; }
  .folio__n { position: relative; z-index: 1; }
}
@media (min-width: 900px) and (max-width: 1179px) { .folio__t { display: none; } }
@media (min-width: 900px) { .folio__title { display: none; } .folio__line { top: .95rem; } }

/* phone: a bar at the bottom edge */
@media (max-width: 899px) {
  body { padding-bottom: 3.25rem; }
  .folio { left: 0; right: 0; bottom: 0; height: 3.25rem; background: color-mix(in oklab, var(--paper) 94%, transparent); border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); height: calc(3.25rem + env(safe-area-inset-bottom)); }
  html[data-ground="dark"] .folio { background: color-mix(in oklab, var(--ink) 94%, transparent); border-top-color: var(--ink-line); }
  .folio__title { position: absolute; left: var(--sc-gutter); top: 50%; translate: 0 -50%; display: none; }
  .folio ol { display: flex; justify-content: space-around; align-items: center; height: 3.25rem; padding-inline: .5rem; }
  .folio a { min-width: 2.75rem; min-height: 2.75rem; justify-content: center; }
  .folio__t { display: none; }
  .folio__line { left: 0; right: 0; top: -1px; height: 2px; }
  .folio__fill { transform: scale(var(--fx, 0), 1); }
}

/* --------------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .folio__fill, .folio__n, .folio__t { transition: none; }
  .dot { opacity: 0; }
  .steps__rule { clip-path: none !important; }
}
