/* ==========================================================================
   Oasis Code — components (light survey sheet)
   Order: buttons, header, overlay, water channel, sheet + map, legend,
          rate card, flow + pacing, delivery log, about, pool, footer, legal
   ========================================================================== */

/* Buttons: actions are ink, never a colour. --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.9rem 1.35rem;
  border: var(--rule-w) solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: background-color 170ms var(--ease), border-color 170ms var(--ease), color 170ms var(--ease);
}

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #22302f; }
.btn--ghost { border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: #ffffff; }
.btn--sm { padding: 0.6rem 1rem; font-size: 0.9375rem; }

/* Header ------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--rule-w) solid var(--rule-soft);
  transition: border-color 200ms var(--ease);
}

.header.is-scrolled { border-bottom-color: var(--rule); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark { width: 22px; height: 22px; flex: none; color: var(--ink); }

.nav { margin-left: auto; }

.nav__list { display: flex; gap: 26px; }

.nav__link {
  font-size: 0.9375rem;
  color: var(--mute);
  padding-block: 6px;
  border-bottom: var(--rule-w) solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); border-bottom-color: var(--water); }

.header__actions { margin-left: 28px; display: flex; align-items: center; gap: 12px; }
.header__actions--end { margin-left: auto; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: border-color 160ms var(--ease);
}

.menu-toggle:hover { border-color: var(--ink); }

@media (max-width: 999px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header__actions { margin-left: auto; }
}

@media (max-width: 560px) {
  .header__actions .btn { display: none; }
}

/* Overlay menu ------------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding-bottom: 36px;
  background: var(--paper);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

.overlay[hidden] { display: none; }
.overlay.is-open { opacity: 1; transform: none; }

.overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
  padding-inline: var(--gutter);
  border-bottom: var(--rule-w) solid var(--rule-soft);
  flex: none;
}

.overlay__nav {
  flex: 1;
  overflow-y: auto;
  padding: clamp(20px, 5vw, 48px) var(--gutter) 0;
}

.overlay__nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 106%;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding: 0.42em 0;
  border-bottom: var(--rule-w) solid var(--rule-soft);
}

.overlay__nav a:hover { color: var(--water); }

.overlay__foot { padding: 26px var(--gutter) 0; flex: none; }
.overlay__foot .btn { width: 100%; }

.overlay__meta {
  margin-top: 20px;
  display: grid;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mute);
}

.close {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: border-color 160ms var(--ease);
}

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

/* Water channel: the spine the whole sheet is irrigated from -------------- */

.channel { display: none; }

@media (min-width: 1180px) {
  .channel {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    width: var(--channel);
    height: 100vh;
    pointer-events: none;
  }

  .channel__bed {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--rule-soft);
  }

  .channel__fill {
    position: absolute;
    left: 24px;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--water);
    transition: height 120ms linear;
  }

  /* Kept clear of the line: the label sits beside it, never through it. */
  .channel__label {
    position: absolute;
    bottom: 30px;
    left: 42px;
    writing-mode: vertical-rl;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--mute);
  }
}

/* The sheet: a drawn plan on graph paper ---------------------------------- */

.hero { padding-block: clamp(18px, 3vw, 40px) clamp(48px, 6vw, 88px); }

.sheet {
  position: relative;
  margin-top: clamp(20px, 3vw, 36px);
  padding: clamp(22px, 3.2vw, 46px);
  border: var(--rule-w) solid var(--ink);
  background-color: var(--paper-2);
  background-image:
    linear-gradient(to right, var(--grid-strong) var(--rule-w), transparent var(--rule-w)),
    linear-gradient(to bottom, var(--grid-strong) var(--rule-w), transparent var(--rule-w)),
    linear-gradient(to right, var(--grid) var(--rule-w), transparent var(--rule-w)),
    linear-gradient(to bottom, var(--grid) var(--rule-w), transparent var(--rule-w));
  background-size:
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size);
}

.sheet__grid { display: grid; gap: clamp(26px, 3.4vw, 44px); }

@media (min-width: 900px) {
  .sheet__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: end;
  }

  .sheet__lead { align-self: start; }
}

.sheet__lead,
.sheet__map { min-width: 0; }

.sheet__title { max-width: 14ch; }

.sheet__sub {
  margin-top: 22px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--mute);
  max-width: 42ch;
}

.sheet__cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.sheet__map { margin: 0; }

.sheet__foot {
  margin-top: clamp(26px, 3.2vw, 44px);
  padding-top: clamp(18px, 2vw, 26px);
  border-top: var(--rule-w) solid var(--rule);
  display: grid;
  gap: 22px;
}

/* Title block: a drawing says what it is before you read it. */
.plan-key {
  max-width: 64ch;
  padding: 14px 16px;
  border: var(--rule-w) solid var(--ink);
  background: var(--paper-2);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mute);
}

.plan-key__title {
  display: block;
  margin-bottom: 6px;
  font-stretch: var(--wdth-label);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* Map: six arcs from the sheet corner, and the pool ----------------------- */

.map { width: 100%; height: auto; }

.map__arc { fill: none; stroke: var(--ink); stroke-opacity: 0.36; stroke-width: 1; }
.map__arc--dashed { stroke: var(--water); stroke-opacity: 0.6; stroke-dasharray: 3 4; }
.map__pool { fill: var(--water-soft); stroke: var(--water); stroke-width: 1.25; }
.map__pool-core { fill: var(--water); }

.map__index,
.map__marker-label,
.map__place { font-family: var(--font-mono); font-size: 12px; }

.map__index { fill: var(--mute); }
.map__marker-label { fill: var(--ink); }
.map__place { fill: var(--ink); }

.map__leader { stroke: var(--water); stroke-width: 1; }
.map__marker { fill: var(--water); }

.js .map__reveal {
  opacity: 0;
  transition: opacity 700ms var(--ease);
  transition-delay: var(--d, 0ms);
}

.js.is-loaded .map__reveal { opacity: 1; }

/* Legend: what makes the r01…r06 indices mean something ------------------- */

.legend { display: grid; gap: 16px 22px; }

@media (min-width: 700px) { .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .legend { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.legend__row {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: var(--rule-w) solid var(--rule-soft);
}

.legend__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.legend__index { color: var(--mute); }
.legend__share { color: var(--water); }
.legend__name { font-size: 0.9375rem; }

/* Rate card: services as a document, not as a card grid ------------------- */

.rate { font-size: 1rem; }

.rate thead th {
  padding-bottom: 12px;
  border-bottom: var(--rule-w) solid var(--ink);
  font-stretch: var(--wdth-label);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.rate thead th:nth-child(1) { width: 26%; }
.rate thead th:nth-child(2) { width: 58%; }
.rate thead th:nth-child(3) { width: 16%; }

.rate tbody tr {
  border-bottom: var(--rule-w) solid var(--rule-soft);
  transition: background-color 160ms var(--ease);
}

.rate tbody tr:hover { background-color: var(--water-soft); }

.rate td { padding: 20px 22px 20px 0; vertical-align: top; }
.rate td:last-child { padding-right: 0; }

.rate__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.rate__note { font-size: 0.9375rem; line-height: 1.55; color: var(--mute); }

.rate__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rate__foot {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mute);
  max-width: 68ch;
}

@media (max-width: 860px) {
  .rate thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .rate, .rate tbody, .rate tr, .rate td { display: block; }

  .rate tbody tr { padding: 20px 0; }

  .rate td { padding: 0; }
  .rate td + td { margin-top: 12px; }

  .rate td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-stretch: var(--wdth-label);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: var(--mute);
  }
}

/* First 90 days: the channel that fills as the campaign runs -------------- */

.flow { position: relative; padding-top: 46px; }

.flow__bed {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--rule-soft);
}

.flow__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--water);
  transition: width 1400ms var(--ease);
}

.flow.is-in .flow__fill { width: 100%; }

.flow__steps { display: grid; gap: 34px; }

.flow__step { position: relative; padding-right: 26px; }

.flow__node {
  position: absolute;
  top: -51px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 2px solid var(--water);
}

.flow__day {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--water);
}

.flow__step h3 { margin-bottom: 10px; }

.flow__text { font-size: 0.9375rem; line-height: 1.6; color: var(--mute); max-width: 34ch; }

@media (min-width: 960px) {
  .flow__steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
}

@media (max-width: 959px) {
  .flow { padding-top: 0; padding-left: 32px; }

  .flow__bed { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }

  .flow__fill { width: 2px; height: 0; transition: height 1400ms var(--ease); }
  .flow.is-in .flow__fill { width: 2px; height: 100%; }

  .flow__step { padding-right: 0; padding-bottom: 32px; }
  .flow__node { top: 6px; left: -37px; }
}

/* Pacing chart ------------------------------------------------------------- */

.pacing { margin-top: clamp(40px, 5vw, 72px); }

.chart__svg { width: 100%; height: auto; }

.chart__line { fill: none; }

/* Without JavaScript both lines are simply drawn; with it, they draw once. */
.js .chart__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1100ms var(--ease);
}

.js [data-reveal].is-in .chart__line { stroke-dashoffset: 0; }

.chart__line--spend { stroke: var(--ink); stroke-opacity: 0.32; stroke-width: 1.5; }
.chart__line--return { stroke: var(--water); stroke-width: 2.5; transition-delay: 220ms; }

.chart__grid { stroke: var(--rule-soft); stroke-width: 1; }
.chart__baseline { stroke: var(--rule); stroke-width: 1; }

.js .chart__axis { opacity: 0; transition: opacity 420ms var(--ease) 900ms; }
.js [data-reveal].is-in .chart__axis { opacity: 1; }

.chart__label { font-family: var(--font-mono); font-size: 11px; fill: var(--mute); }
.chart__value { font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart__value--return { fill: var(--water); }
.chart__value--spend { fill: var(--mute); }
.chart__dot--return { fill: var(--water); }
.chart__dot--spend { fill: var(--ink); fill-opacity: 0.32; }

.pacing__caption {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 74ch;
}

/* Delivery log ------------------------------------------------------------ */

.log { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--rule-w) solid var(--ink); }

.log__item { padding: 26px 26px 26px 0; }

.log__item + .log__item {
  padding-left: 26px;
  border-left: var(--rule-w) solid var(--rule-soft);
}

.log__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.log__label { display: block; margin-top: 12px; font-size: 0.9375rem; color: var(--mute); max-width: 24ch; }

.log__note { margin-top: 26px; font-family: var(--font-mono); font-size: 12.5px; color: var(--mute); max-width: 62ch; }

@media (max-width: 900px) {
  .log { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .log__item + .log__item { padding-left: 0; border-left: 0; }
  .log__item:nth-child(even) { padding-left: 24px; border-left: var(--rule-w) solid var(--rule-soft); }
  .log__item:nth-child(n + 3) { border-top: var(--rule-w) solid var(--rule-soft); }
}

@media (max-width: 520px) {
  .log { grid-template-columns: minmax(0, 1fr); }

  .log__item,
  .log__item:nth-child(even) { padding: 22px 0; border-left: 0; }
  .log__item + .log__item { border-top: var(--rule-w) solid var(--rule-soft); }
}

/* About ------------------------------------------------------------------- */

.about { display: grid; gap: 30px 64px; }

@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* Operating facts, set the way the sheet sets data. */
.about__data { margin-top: 28px; display: grid; gap: 12px; max-width: 32ch; }

.about__data > div { padding-top: 12px; border-top: var(--rule-w) solid var(--rule-soft); }
.about__data dt { font-family: var(--font-mono); font-size: 11.5px; color: var(--mute); }
.about__data dd { font-size: 0.9375rem; }

.about__body p { color: var(--mute); max-width: 62ch; }
.about__body p + p { margin-top: 1.1em; }
.about__body strong { color: var(--ink); font-weight: 600; }

.office {
  margin-top: 34px;
  padding-top: 22px;
  border-top: var(--rule-w) solid var(--rule-soft);
  display: grid;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--mute);
}

.office a { color: var(--water); }
.office a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The pool: where the channel ends --------------------------------------- */

.pool {
  background: var(--water);
  color: var(--paper);
  padding-block: clamp(56px, 7vw, 104px);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.pool__grid { display: grid; gap: 30px 56px; }

@media (min-width: 900px) {
  .pool__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
}

.pool__title { color: var(--paper); font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 18ch; }

.pool__body {
  margin-top: 22px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: #d9e9ea;
  max-width: 46ch;
}

.pool__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }

.pool__mail {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.pool__mail:hover { text-decoration-thickness: 2px; }

.pool__meta {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #b9d5d7;
}

/* Footer ------------------------------------------------------------------ */

.footer {
  border-top: var(--rule-w) solid var(--rule-soft);
  padding-block: 32px 44px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mute);
}

.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.footer__row + .footer__row { margin-top: 18px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer__links a:hover { color: var(--ink); }

/* Legal pages ------------------------------------------------------------- */

.legal { padding-block: clamp(44px, 7vw, 100px); }

/* Legal pages carry no channel, so they do not reserve space for it. */
@media (min-width: 1180px) {
  body.page-legal { padding-left: 0; }
}

.legal__title { max-width: 22ch; }
.legal__meta { margin-top: 22px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--mute); }

.prose { margin-top: clamp(28px, 4.5vw, 48px); max-width: 68ch; }

.prose h2 {
  margin-top: 2.1em;
  font-size: 1.1875rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0;
  line-height: 1.35;
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose ul, .prose ol { margin-top: 0.9em; color: var(--mute); }
.prose li + li { margin-top: 0.5em; }
.prose ul, .prose ol { list-style: disc; padding-left: 1.15em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--water); text-decoration: underline; text-underline-offset: 3px; }
