/* WYLD demo — tokens, reset, type scale, grid, reveal primitives */

@font-face { font-family: 'Fraunces fallback'; src: local('Georgia'); size-adjust: 96%; }

/* ---------------------------------------------------------------
   PALETTES — demo switcher only. Every colour on the site resolves
   through these tokens, so a palette is a token set and nothing else.
   Stripping the switcher before launch means deleting palette.js, its
   script tag and markup, the .pbar block in components.css, and the
   html[data-palette] blocks below. Nothing else changes.
   --------------------------------------------------------------- */

html[data-palette="earth"] {
  --ink:    #17100C;
  --ink-2:  #221812;
  --bone:   #EDE2D1;
  --paper:  #F7EFE3;
  --moss:   #5E4632;
  --ember:  #A85B33;
  --stone:  #94826F;
  --line:   rgba(23,16,12,.16);
  --line-d: rgba(237,226,209,.18);
  --bone-rgb: 237,226,209;
  --ink-rgb: 23,16,12;
}

html[data-palette="cold"] {
  --ink:    #0B1015;
  --ink-2:  #141C24;
  --bone:   #E7ECEF;
  --paper:  #F4F7F9;
  --moss:   #3E5666;
  --ember:  #3F7FA6;
  --stone:  #7C8A94;
  --line:   rgba(11,16,21,.15);
  --line-d: rgba(231,236,239,.18);
  --bone-rgb: 231,236,239;
  --ink-rgb: 11,16,21;
}

html[data-palette="forest"] {
  --ink:    #0A110C;
  --ink-2:  #121B14;
  --bone:   #ECE7D8;
  --paper:  #F6F3E9;
  --moss:   #38503D;
  --ember:  #8E6428;
  --stone:  #857F6E;
  --line:   rgba(10,17,12,.15);
  --line-d: rgba(236,231,216,.18);
  --bone-rgb: 236,231,216;
  --ink-rgb: 10,17,12;
}

html[data-palette="mono"] {
  --ink:    #000000;
  --ink-2:  #0D0D0D;
  --bone:   #FFFFFF;
  --paper:  #F7F7F7;
  --moss:   #333333;
  --ember:  #CE1F16;
  --stone:  #8A8A8A;
  --line:   rgba(0,0,0,.16);
  --line-d: rgba(255,255,255,.2);
  --bone-rgb: 255,255,255;
  --ink-rgb: 0,0,0;
}

:root {
  --ink:    #0A0B0A;
  --ink-2:  #151813;
  --bone:   #F1EDE4;
  --paper:  #FBF9F4;
  --moss:   #47513F;
  --ember:  #B4551F;
  --stone:  #8B887E;
  --line:   rgba(10,11,10,.14);
  --line-d: rgba(241,237,228,.16);
  --bone-rgb: 241,237,228;
  --ink-rgb: 10,11,10;

  --f-display: 'Fraunces', 'Fraunces fallback', Georgia, serif;
  --f-ui: 'Archivo', system-ui, -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --fs-hero:  clamp(3.5rem, 11vw, 12rem);
  --fs-d1:    clamp(2.5rem, 6.2vw, 5.75rem);
  --fs-d2:    clamp(1.9rem, 3.6vw, 3.375rem);
  --fs-d3:    clamp(1.4rem, 2.1vw, 2rem);
  --fs-state: clamp(1.3rem, 2.55vw, 2.125rem);
  --fs-body:  1.0625rem;

  --gutter: clamp(20px, 4.4vw, 72px);
  --maxw: 1560px;
  --colgap: clamp(16px, 2vw, 34px);
  --header-h: 76px;

  --ease: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-ui);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; text-align: inherit; }
input { font: inherit; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--ember); color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ---------- display type ---------- */
.d {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  line-height: .92;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.d--hero { font-size: var(--fs-hero); letter-spacing: -.035em; font-weight: 300; }
.d--1 { font-size: var(--fs-d1); letter-spacing: -.03em; }
.d--2 { font-size: var(--fs-d2); }
.d--3 { font-size: var(--fs-d3); line-height: 1.04; letter-spacing: -.015em; }
.d--it { font-style: italic; }

/* ---------- mono furniture ---------- */
.m {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.m--500 { font-weight: 500; }
.m--9 { font-size: 9px; letter-spacing: .16em; }
.m--12 { font-size: 12px; }
.m--stone { color: var(--stone); }
.m--moss { color: var(--moss); }

.eyebrow { display: flex; align-items: baseline; gap: .9em; }
.eyebrow__n { color: var(--stone); }

.body { max-width: 62ch; }
.body + .body { margin-top: 1.1em; }
.lead { font-size: 1.1875rem; line-height: 1.6; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- grounds ---------- */
.g-dark { background: var(--ink); color: var(--bone); }
.g-dark-2 { background: var(--ink-2); color: var(--bone); }
.g-light { background: var(--bone); color: var(--ink); }
.g-paper { background: var(--paper); color: var(--ink); }
.g-dark .m--stone { color: rgba(241,237,228,.52); }
.g-dark a:hover { color: var(--bone); }
.g-light a:hover, .g-paper a:hover { color: var(--ink); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--colgap); }
.sec { position: relative; }
.sec--xl { padding-block: clamp(96px, 15vh, 190px); }
.sec--lg { padding-block: clamp(76px, 11vh, 148px); }
.sec--md { padding-block: clamp(56px, 8vh, 104px); }
.sec--sm { padding-block: clamp(40px, 5vh, 68px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.g-dark .rule, .rule--d { background: var(--line-d); }

/* ---------- reveals (only active once <html class="js">) ---------- */
.js .rv {
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.js .rv.is-in { opacity: 1; transform: none; }

.js .rv-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .rv-img.is-in { clip-path: inset(0 0 0 0); }
.js .rv-img > img { transform: scale(1.08); transition: transform 1.5s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .rv-img.is-in > img { transform: none; }

.ln { display: block; overflow: hidden; }
.js .ln > i { display: block; font-style: inherit; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--l, 0) * 60ms); }
.js .is-in .ln > i { transform: none; }

/* Film grain over photography, weighted to the ground it sits on: nearly clean
   on bone, noticeably present on ink. Falling light means a higher ISO means
   more grain — a photographer reads the site's own exposure that way. */
.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: overlay; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.g-light .grain::after, .g-paper .grain::after { opacity: .025; }
.g-dark .grain::after, .g-dark-2 .grain::after, .hero .grain::after { opacity: .075; }
.pin__vp .grain::after { opacity: .085; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 900;
  padding: 10px 14px; background: var(--bone); color: var(--ink);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .rv-img, .js .rv-img > img, .js .ln > i {
    transition-duration: .01s !important; transition-delay: 0s !important;
    transform: none !important; clip-path: none !important;
  }
}
