/* Valira Studios — site styles
   Type: Newsreader (display/serif), Schibsted Grotesk (text), IBM Plex Mono (labels). All self-hosted, SIL OFL 1.1. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations"),
       url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations"),
       url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --ink: #16150f;
  --ink-2: #3a372f;
  --muted: #625d52;
  --rule: #d3ccbc;
  --accent: #c23b17;
  --accent-dark-bg: #ef6c45;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.4vw, 56px);
  --max: 1328px;
  --gap: clamp(16px, 2.2vw, 32px);
  --header-h: 64px;
  --section-y: clamp(80px, 10vw, 152px);
  --ease: cubic-bezier(.2, .7, .1, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font: 500 .875rem/1 var(--sans);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type primitives ---------- */
.label {
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(2.875rem, 1.15rem + 6.6vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.display em, .h2 em {
  font-style: italic;
  font-weight: 320;
  color: var(--accent);
  letter-spacing: -.02em;
}

.h2 {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(2.125rem, 1.35rem + 3vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.125rem, 1.02rem + .45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 33em;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 22px 0 24px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:hover .icon { transform: translateX(3px); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .9375rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: .35em;
  transition: text-decoration-color .2s var(--ease);
}
.link-arrow:hover { text-decoration-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 92px; height: 25px; }
.brand-sub {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  font: 500 .6875rem/1.9 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; align-items: center; gap: clamp(24px, 3vw, 40px); }
.site-nav ul { display: flex; gap: clamp(20px, 2.6vw, 36px); }
.site-nav ul a {
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  padding-bottom: 2px;
  transition: background-size .25s var(--ease);
}
.site-nav ul a:hover { background-size: 100% 1px; }

.menu-toggle { display: none; }

@media (max-width: 759px) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 2px 0 12px;
    background: none;
    border: 0;
    color: var(--ink);
    font: 500 .75rem/1 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .menu-toggle-icon {
    position: relative;
    width: 18px;
    height: 8px;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transition: transform .25s var(--ease);
  }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { height: 0; border-bottom: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; border-top: 1px solid currentColor; transform: rotate(-90deg);
  }

  .header-bar { flex-wrap: wrap; row-gap: 0; }
  .site-nav { width: 100%; justify-content: space-between; padding-bottom: 14px; }
  .site-nav ul { gap: 20px; }
  .site-nav .btn { display: none; }

  .js .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 24px;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a {
    display: block;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 380;
    letter-spacing: -.01em;
    background: none;
  }
  .js .site-nav .btn { display: inline-flex; justify-content: center; margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6.5vw, 96px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
.kicker { display: flex; flex-wrap: wrap; gap: 6px 0; margin-bottom: clamp(24px, 3vw, 36px); }
.kicker span:not(:last-child)::after { content: "/"; margin: 0 .9em; color: var(--rule); }

.hero .display { max-width: 11.5em; }
@media (min-width: 1000px) {
  .hero .display { max-width: none; font-size: clamp(3.5rem, calc(6.6vw - 6px), 5.75rem); }
  .hero .display .line { display: block; white-space: nowrap; }
}
@media (max-width: 479px) {
  .kicker .hide-sm { display: none; }
}
.hero .lead { margin-top: clamp(24px, 3vw, 36px); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(32px, 4vw, 44px);
}

.hero-figure { justify-self: center; width: 100%; max-width: 560px; }
.hero-figure figcaption { margin-top: 8px; text-align: center; text-transform: none; letter-spacing: .02em; font-weight: 400; }

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); }
  .hero-figure { justify-self: end; margin-right: calc(var(--gap) * -.5); }
}

/* Dial */
.dial { width: 100%; height: auto; overflow: visible; }
.dial-ring { fill: none; stroke: var(--ink); stroke-width: 1; }
.dial-faint { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 1 5; }
.dial-ticks { fill: none; stroke: var(--muted); stroke-width: .75; }
.dial-major { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.dial-chevrons { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.dial-node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; }
.dial-marker { fill: var(--accent); }
.dial-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  fill: var(--ink);
}
.dial-num { fill: var(--accent); }
.phone-body { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; }
.phone-island, .phone-home { fill: var(--ink); }
.phone-axis { fill: none; stroke: var(--muted); stroke-width: .75; }
.phone-cac { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.phone-ltv { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; }
.phone-pay { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.phone-txt { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; fill: var(--accent); }
.phone-txt.muted { fill: var(--muted); }

.dial-orbit { transform-box: view-box; transform-origin: 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .dial-orbit { animation: orbit 36s linear infinite; }
  .phone-ltv { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.8s .3s var(--ease) forwards; }
  .phone-pay { opacity: 0; animation: fade .4s 1.5s var(--ease) forwards; }
}
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px var(--gap);
  margin-top: clamp(56px, 6vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}
.facts dd { margin-top: 8px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); max-width: 22em; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ---------- Sections ---------- */
.section { padding-top: var(--section-y); }
.section-tint {
  margin-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--paper-2);
}
.section-tint .section-head { border-top-color: var(--ink); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px var(--gap);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-num { display: flex; gap: 14px; }
.section-num span { color: var(--accent); }
.section-head .h2 { margin-top: 8px; max-width: 14em; }
.section-intro { max-width: 34em; font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); }

@media (min-width: 900px) {
  .section-head { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .section-head .section-num { grid-column: 1 / span 3; }
  .section-head .h2 { grid-column: 4 / span 9; margin-top: -6px; }
  .section-head .section-intro { grid-column: 4 / span 6; }
}

/* ---------- Services ---------- */
.services { counter-reset: svc; }
.service {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 12px 12px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--rule);
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service-num {
  font: 500 .8125rem/2.6 var(--mono);
  color: var(--accent);
  letter-spacing: .04em;
}
.service-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.375rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.service-desc, .service-tags { grid-column: 2; }
.service-desc { color: var(--ink-2); max-width: 36em; }
.service-tags { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 4px; }
.service-tags li {
  font: 400 .8125rem/1.6 var(--mono);
  color: var(--muted);
}
.service-tags li:not(:last-child)::after { content: "/"; margin: 0 .6em; color: var(--rule); }

@media (min-width: 900px) {
  .service {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    padding: 36px 0 40px;
    transition: background-color .3s var(--ease);
  }
  .service-num { grid-column: 1 / span 1; line-height: 1.6; padding-top: .55em; }
  .service-title { grid-column: 2 / span 4; padding-right: 1rem; }
  .service-desc { grid-column: 6 / span 4; padding-top: .3em; }
  .service-tags { grid-column: 10 / span 3; flex-direction: column; gap: 0; margin-top: 0; padding-top: .35em; }
  .service-tags li { border-bottom: 1px solid var(--rule); padding: 5px 0; }
  .service-tags li:first-child { padding-top: 0; }
  .service-tags li:last-child { border-bottom: 0; }
  .service-tags li:not(:last-child)::after { content: none; }
}

/* ---------- Approach ---------- */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 0 0 36px 32px;
}
.step::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: -8px;
  border-left: 1px solid var(--ink);
}
.step:last-child::before { border-left-style: dashed; border-left-color: var(--muted); }
.step::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.25px solid var(--ink);
}
.step:first-child::after { background: var(--accent); border-color: var(--accent); }
.step-title {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.875rem);
  line-height: 1;
  letter-spacing: -.02em;
}
.step p:not(.label) { color: var(--ink-2); max-width: 30em; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); }
  .step { padding: 36px 0 0; }
  .step::before { left: 0; right: calc(var(--gap) * -1); top: 5px; bottom: auto; border-left: 0; border-top: 1px solid var(--ink); }
  .step:last-child::before { right: 0; border-top-style: dashed; border-top-color: var(--muted); }
  .step::after { top: 0; }
}

.includes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px var(--gap);
  margin-top: clamp(72px, 9vw, 128px);
}
.includes-title { padding-top: 4px; }
.includes-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--gap); }
.includes-list > div { padding: 20px 0 24px; border-top: 1px solid var(--rule); }
.includes-list dt {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 420;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.includes-list dd { margin-top: 6px; color: var(--ink-2); font-size: 1rem; max-width: 28em; }

@media (min-width: 640px) {
  .includes-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .includes { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .includes-title { grid-column: 1 / span 3; border-top: 1px solid var(--ink); padding-top: 20px; }
  .includes-list { grid-column: 4 / span 9; }
  .includes-list > div:nth-child(-n+2) { border-top-color: var(--ink); }
}

/* ---------- Channels ---------- */
.stack-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px var(--gap);
  padding: 22px 0 26px;
  border-top: 1px solid var(--rule);
}
.stack-row:last-child { border-bottom: 1px solid var(--rule); }
.stack-row h3 { padding-top: .2em; }
.stack-list { display: flex; flex-wrap: wrap; row-gap: 2px; }
.stack-list li {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.stack-list li:not(:last-child)::after {
  content: "/";
  margin: 0 .32em;
  color: var(--muted);
  font-weight: 250;
}
.stack-list li:nth-child(odd) { font-style: normal; }

@media (min-width: 900px) {
  .stack-row { grid-template-columns: repeat(12, minmax(0, 1fr)); padding: 26px 0 30px; }
  .stack-row h3 { grid-column: 1 / span 3; padding-top: .9em; }
  .stack-list { grid-column: 4 / span 9; }
}

/* ---------- Engagement ---------- */
.models { display: grid; grid-template-columns: minmax(0, 1fr); }
.model {
  display: flex;
  flex-direction: column;
  padding: 24px 0 36px;
  border-top: 1px solid var(--ink);
}
.model-key {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  letter-spacing: 0;
}
.model-title {
  margin: 28px 0 14px;
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.875rem, 1.45rem + 1.3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.model > p:not(.label) { color: var(--ink-2); max-width: 30em; }
.model-meta { margin-top: auto; padding-top: 28px; }
.model-meta > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.model-meta dt { padding-top: .2em; }
.model-meta dd { font-size: .9375rem; line-height: 1.5; }

@media (min-width: 900px) {
  .models { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); }
  .model { padding: 24px var(--gap) 8px; border-left: 1px solid var(--rule); }
  @supports (grid-template-rows: subgrid) {
    .model { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .model-key { align-self: start; }
    .model-meta { margin-top: 0; }
  }
  .model:first-child { padding-left: 0; border-left: 0; }
  .model:last-child { padding-right: 0; }
}

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:first-child { border-top-color: var(--ink); }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 56px 22px 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + .7vw, 1.625rem);
  font-weight: 380;
  line-height: 1.25;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 16px;
  border-top: 1.25px solid var(--ink);
  transition: transform .3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent); }
.faq summary:hover::before, .faq summary:hover::after { border-color: var(--accent); }
.faq-body { padding: 0 56px 28px 0; }
.faq-body p { color: var(--ink-2); max-width: 38em; }

@media (min-width: 900px) {
  #faq .section-head { margin-bottom: 0; border-bottom: 0; }
  #faq .container { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  #faq .section-head { grid-column: 1 / -1; grid-row: 1; grid-template-columns: subgrid; align-self: start; align-content: start; }
  #faq .section-head .h2 { grid-column: 1 / span 3; grid-row: 2; font-size: clamp(2rem, 1.2rem + 1.8vw, 3rem); margin-top: 0; }
  #faq .section-head .section-num { grid-row: 1; }
  .faq { grid-column: 4 / span 9; grid-row: 1; align-self: start; margin-top: 30px; position: relative; }
  .faq details:first-child summary { padding-top: 22px; }
  .faq details:first-child { border-top-color: transparent; }
}

/* ---------- Contact ---------- */
.contact {
  margin-top: var(--section-y);
  padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 7vw, 96px);
  background: var(--ink);
  color: var(--paper);
}
.contact ::selection { background: var(--paper); color: var(--ink); }
.contact :focus-visible { outline-color: var(--accent-dark-bg); }
.contact .label { color: #a9a395; }
.contact .section-num span { color: var(--accent-dark-bg); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px var(--gap);
  padding-top: 20px;
  border-top: 1px solid #4a473e;
}
.contact .h2 { color: var(--paper); }
.contact-email {
  margin-top: clamp(28px, 4vw, 48px);
  font-family: var(--serif);
  font-weight: 340;
  font-size: calc(.25rem + 8vw);
  line-height: 1.05;
  letter-spacing: -.025em;
}
.contact-email a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .14em;
  text-decoration-color: #5d594f;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.contact-email .nw { white-space: nowrap; }
.contact-email a:hover { color: var(--accent-dark-bg); text-decoration-color: currentColor; }
.contact-note { margin-top: clamp(24px, 3vw, 36px); max-width: 34em; color: #d8d3c7; font-size: 1.0625rem; }

.contact-meta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
.contact-meta > div { padding: 14px 0 16px; border-top: 1px solid #3a3830; }
.contact-meta dd { margin-top: 6px; font-size: .9375rem; line-height: 1.5; color: #e9e5db; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .contact-grid > .section-num { grid-column: 1 / span 3; }
  .contact-main { grid-column: 4 / span 9; }
  .contact-email { font-size: min(5.2vw, 4.75rem); }
  .contact-meta { grid-column: 4 / span 9; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); margin-top: clamp(48px, 6vw, 80px); }
}

/* ---------- Footer ---------- */
.site-footer { padding: clamp(56px, 7vw, 88px) 0 32px; font-size: .9375rem; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px var(--gap);
}
.footer-brand p { margin-top: 18px; max-width: 26em; color: var(--ink-2); line-height: 1.55; }
.footer-col h2 { margin-bottom: 14px; }
.footer-col li + li { margin-top: 6px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-col address { margin-top: 14px; color: var(--muted); line-height: 1.55; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  color: var(--muted);
}
.footer-base .sep { margin: 0 .5em; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { color: var(--ink); text-decoration: underline; }

.footer-brand { grid-column: 1 / -1; }
@media (max-width: 639px) {
  .footer-grid > :nth-child(4) { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 999px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / span 5; }
  .footer-grid > :nth-child(2) { grid-column: 6 / span 2; }
  .footer-grid > :nth-child(3) { grid-column: 8 / span 2; }
  .footer-grid > :nth-child(4) { grid-column: 10 / span 3; }
}

/* ---------- Legal pages ---------- */
.legal-head {
  padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--ink);
}
.legal-switch ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: clamp(28px, 4vw, 48px); }
.legal-switch a {
  font: 500 .75rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.legal-switch a:hover { color: var(--ink); }
.legal-switch a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.legal-title {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(2.75rem, 1.4rem + 5vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.028em;
}
.legal-updated { margin-top: 20px; }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px var(--gap);
  padding: clamp(32px, 5vw, 72px) 0 clamp(64px, 8vw, 120px);
}
.toc[hidden] { display: none; }
.toc-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::after { content: "+"; font-size: 1rem; line-height: 1; }
.toc-details[open] summary::after { content: "\2013"; }
.toc-list { counter-reset: toc; padding: 10px 0 0; }
.toc-list li { counter-increment: toc; }
.toc-list a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 1px solid var(--rule);
  font-size: .875rem;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc-list a:hover { color: var(--ink); }
.toc-list a.is-active { color: var(--ink); border-left-color: var(--accent); }

@media (min-width: 1000px) {
  .legal-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .toc { grid-column: 1 / span 3; }
  .toc-details { position: sticky; top: calc(var(--header-h) + 32px); }
  .toc-details summary { pointer-events: none; border-top: 0; border-bottom: 0; padding: 0 0 8px; color: var(--muted); }
  .toc-details summary::after, .toc-details[open] summary::after { content: none; }
  .legal-body { grid-column: 4 / span 7; }
}

.legal-body { max-width: 42rem; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.legal-body > * + * { margin-top: 1.1em; }
.legal-body .legal-lede { font-size: 1.25rem; line-height: 1.55; color: var(--ink); }
.legal-body h2 {
  margin-top: 2.2em;
  padding-top: .9em;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}
.legal-body > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-body h3 {
  margin-top: 2em;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.legal-body h2 + *, .legal-body h3 + * { margin-top: .75em; }
.legal-body h4 { margin-top: 1.6em; font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.legal-body a { color: var(--ink); text-decoration-color: var(--accent); }
.legal-body a:hover { color: var(--accent); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body ul, .legal-body ol { padding-left: 1.5em; }
.legal-body ul { list-style: none; }
.legal-body ul > li { position: relative; }
.legal-body ul > li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: .78em;
  width: .45em;
  border-top: 1px solid var(--accent);
}
.legal-body ol { list-style: decimal; }
.legal-body ol > li::marker { font-family: var(--mono); font-size: .85em; color: var(--muted); }
.legal-body li + li { margin-top: .45em; }
.legal-body li > ul, .legal-body li > ol { margin-top: .45em; }
.legal-body address {
  padding: 18px 20px;
  border-left: 2px solid var(--ink);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.7;
  color: var(--ink);
}
.legal-body .note {
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  color: var(--ink);
}
.legal-body .table-wrap { overflow-x: auto; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.legal-body th, .legal-body td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.legal-body th { font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.legal-body dl > dt { margin-top: 1em; font-weight: 600; color: var(--ink); }
.legal-body dl > dd { margin-top: .2em; }
.legal-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(64px, 10vw, 160px) 0 clamp(80px, 10vw, 160px); }
.notfound-code { display: flex; gap: 14px; margin-bottom: 28px; }
.notfound-code span { color: var(--accent); }
.notfound .display { max-width: 10em; }
.notfound .lead { margin-top: 28px; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-pending { opacity: 0; transform: translateY(14px); }
  .reveal-in {
    opacity: 1;
    transform: none;
    transition: opacity .8s var(--ease), transform .8s var(--ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
