/* ==========================================================================
   TINKERTECT — site styles
   Palette: robin's egg blue · cocoa ("Vintage Sisters") · ivory
   Type: Fraunces (display) · Hanken Grotesk (text) · DM Mono (annotation)
   ========================================================================== */

:root {
  --egg: #96ded1;
  --egg-50: #eef8f6;
  --egg-100: #d3efe9;
  --egg-200: #b9e7de;
  --egg-600: #4fa597;
  --egg-ink: #23564f;

  --cocoa: #3c251f;
  --cocoa-900: #26160f;
  --cocoa-800: #2f1d18;
  --cocoa-700: #4a2f28;
  --cocoa-500: #6b4a3f;

  --ivory: #f6f2ea;
  --paper: #fbf8f2;
  --gold: #b99459;
  --blush: #e8b6aa;

  /* rgb channels, so translucent tints follow the theme (CMS overrides these) */
  --egg-rgb: 150 222 209;
  --egg-50-rgb: 238 248 246;
  --egg-100-rgb: 211 239 233;
  --egg-600-rgb: 79 165 151;
  --cocoa-rgb: 60 37 31;
  --cocoa-800-rgb: 47 29 24;
  --cocoa-900-rgb: 38 22 15;
  --ivory-rgb: 246 242 234;

  --logo-url: url("/assets/img/logo-mask.png");

  --ff-display: "Fraunces", "Iowan Old Style", "Times New Roman", serif;
  --ff-text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --ff-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ff-sign: "Mrs Saint Delafield", "Snell Roundhand", cursive;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(16px, 3.4vw, 52px);
  --section-y: clamp(96px, 13vw, 200px);
  --radius: 22px;

  /* theme defaults (ivory) */
  --bg: var(--ivory);
  --fg: var(--cocoa);
  --muted: rgb(var(--cocoa-rgb) / 0.72);
  --line: rgb(var(--cocoa-rgb) / 0.18);
  --accent: var(--egg-600);
}

[data-theme="egg"] {
  --bg: var(--egg);
  --fg: var(--cocoa);
  --muted: rgb(var(--cocoa-rgb) / 0.76);
  --line: rgb(var(--cocoa-rgb) / 0.24);
  --accent: var(--cocoa);
}
[data-theme="cocoa"] {
  --bg: var(--cocoa);
  --fg: var(--egg-100);
  --muted: rgb(var(--egg-100-rgb) / 0.7);
  --line: rgb(var(--egg-rgb) / 0.2);
  --accent: var(--egg);
}
[data-theme="ivory"] {
  --bg: var(--ivory);
  --fg: var(--cocoa);
  --muted: rgb(var(--cocoa-rgb) / 0.72);
  --line: rgb(var(--cocoa-rgb) / 0.18);
  --accent: var(--egg-600);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--cocoa);
  font-family: var(--ff-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--egg); color: var(--cocoa); }
:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 4px; border-radius: 4px; }
[data-theme="cocoa"] :focus-visible { outline-color: var(--egg); }

[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--cocoa); color: var(--egg); padding: 12px 18px; border-radius: 999px;
  font: 400 13px/1 var(--ff-mono); transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* ---------- shared atoms ---------- */
.mono {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section { position: relative; background: var(--bg); color: var(--fg); }
.speckle {
  --speckle-size: 640px;
  position: absolute; inset: 0; pointer-events: none;
  background-color: var(--speckle-color, var(--cocoa));
  -webkit-mask: url("../img/speckle.svg") 0 0 / var(--speckle-size) repeat;
          mask: url("../img/speckle.svg") 0 0 / var(--speckle-size) repeat;
  opacity: 0.42;
}
[data-theme="cocoa"] .speckle { --speckle-color: var(--egg); opacity: 0.12; }

.logo-mask {
  display: inline-block;
  aspect-ratio: 2475 / 646;
  background-color: currentColor;
  -webkit-mask: var(--logo-url) center / contain no-repeat;
          mask: var(--logo-url) center / contain no-repeat;
}

.label {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted);
}
.label::before {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7;
}

.display {
  font-family: var(--ff-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  letter-spacing: -0.025em;
  line-height: 0.98;
}
.display em, .italic { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 28px;
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 104px);
}
.sec-head .label { grid-column: 1 / -1; }
.sec-head h2 { grid-column: 1 / span 8; font-size: clamp(44px, 6.6vw, 112px); }
.sec-head > p:not(.label) { grid-column: 9 / span 4; color: var(--muted); max-width: 38ch; font-size: 17px; }

.arch { border-radius: 999px 999px 0 0; overflow: hidden; }

/* pill CTA with nested icon */
.btn {
  --b-bg: var(--cocoa); --b-fg: var(--egg-100); --b-ic: var(--egg);
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 24px;
  border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg);
  font: 500 15px/1 var(--ff-text);
  letter-spacing: 0.01em;
  transition: transform .5s var(--ease-spring), background-color .4s var(--ease-out);
}
.btn__ic {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--b-ic); color: var(--cocoa);
  transition: transform .6s var(--ease-spring);
}
.btn__ic svg { width: 14px; height: 14px; }
.btn:hover .btn__ic { transform: translate(3px, -2px) scale(1.06); }
.btn:active { transform: scale(0.98); }
.btn--egg { --b-bg: var(--egg); --b-fg: var(--cocoa); --b-ic: var(--cocoa); }
.btn--egg .btn__ic { color: var(--egg); }
.btn--ghost { --b-bg: transparent; --b-fg: currentColor; box-shadow: inset 0 0 0 1px var(--line); }

.link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease-out);
  padding-bottom: 2px;
}
.link-u:hover { background-size: 100% 1px; }

/* paper grain — fixed, never scrolls */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.15 0 0 0 0 0.12 0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- reveals ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 44px, 0);
  filter: blur(8px);
  transition: opacity 1.1s var(--ease-out), transform 1.3s var(--ease-out), filter 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.14em 0.1em 0; margin: -0.04em -0.14em -0.1em 0; }
.js [data-split] .w > span {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  transition: transform 1.25s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms + var(--d, 0) * 1ms);
}
.js [data-split].is-in .w > span { transform: none; }

/* ==========================================================================
   LOADER
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 90;
  background: var(--egg); color: var(--cocoa);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-io) .1s;
}
.loader .speckle { opacity: .5; }
.loader__inner { position: relative; display: grid; justify-items: center; gap: 22px; }
.loader .logo-mask { width: min(64vw, 420px); }
.loader__line { width: min(64vw, 420px); height: 1px; background: rgb(var(--cocoa-rgb) / .2); overflow: hidden; }
.loader__line i { display: block; height: 100%; background: var(--cocoa); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .25s linear; }
.loader__row { width: min(64vw, 420px); display: flex; justify-content: space-between; }
.is-loaded .loader { clip-path: inset(0 0 100% 0); pointer-events: none; }
.no-loader .loader { display: none; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  --h-fg: var(--cocoa); --h-bg: rgb(var(--ivory-rgb) / 0.72); --h-line: rgb(var(--cocoa-rgb) / 0.14);
  position: fixed; z-index: 50;
  top: 16px; left: var(--gutter); right: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--h-fg);
  pointer-events: none;
  transition: color .5s var(--ease-out), transform .6s var(--ease-spring);
}
.site-header > * { pointer-events: auto; }
html[data-hdr="egg"] .site-header { --h-fg: var(--cocoa); --h-bg: rgb(var(--egg-100-rgb) / 0.7); --h-line: rgb(var(--cocoa-rgb) / 0.16); }
html[data-hdr="cocoa"] .site-header { --h-fg: var(--egg-100); --h-bg: rgb(var(--cocoa-800-rgb) / 0.7); --h-line: rgb(var(--egg-rgb) / 0.18); }
.site-header.is-hidden { transform: translateY(-140%); }

.brand { display: block; padding: 6px 0; }
.brand .logo-mask { width: clamp(108px, 9vw, 136px); display: block; }

.nav {
  display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: 999px;
  background: var(--h-bg);
  box-shadow: inset 0 0 0 1px var(--h-line);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
          backdrop-filter: blur(16px) saturate(1.3);
  transition: background-color .5s var(--ease-out);
}
.nav a {
  position: relative;
  font: 400 11.5px/1 var(--ff-mono); letter-spacing: 0.09em; text-transform: uppercase;
  padding: 11px 14px; border-radius: 999px;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="true"] { background: var(--h-fg); color: var(--h-bg); }
html[data-hdr="cocoa"] .nav a:hover, html[data-hdr="cocoa"] .nav a[aria-current="true"] { color: var(--cocoa); }

.hdr-right { display: flex; align-items: center; gap: 14px; }
.hdr-clock { display: flex; align-items: center; gap: 8px; font: 400 11.5px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.hdr-clock .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.4s var(--ease-io) infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.menu-btn {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--h-bg); box-shadow: inset 0 0 0 1px var(--h-line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  position: relative;
}
.menu-btn span {
  position: absolute; left: 15px; right: 15px; height: 1.5px; background: currentColor;
  transition: transform .5s var(--ease-spring), top .5s var(--ease-spring);
}
.menu-btn span:nth-child(1) { top: 20px; }
.menu-btn span:nth-child(2) { top: 27px; }
.menu-open .menu-btn span:nth-child(1) { top: 23.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 23.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: rgb(var(--egg-rgb) / 0.92);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  color: var(--cocoa);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease-out), visibility 0s linear .5s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .5s var(--ease-out); }
.menu ol { display: grid; gap: 4px; }
.menu li { overflow: hidden; }
.menu a {
  display: flex; align-items: baseline; gap: 14px;
  font: 300 clamp(40px, 11vw, 72px)/1.05 var(--ff-display); letter-spacing: -0.02em;
  transform: translateY(105%);
  transition: transform .8s var(--ease-out);
}
.menu a .mono { font-size: 11px; }
.menu-open .menu a { transform: none; }
.menu-open .menu li:nth-child(2) a { transition-delay: .05s; }
.menu-open .menu li:nth-child(3) a { transition-delay: .1s; }
.menu-open .menu li:nth-child(4) a { transition-delay: .15s; }
.menu-open .menu li:nth-child(5) a { transition-delay: .2s; }
.menu-open .menu li:nth-child(6) a { transition-delay: .25s; }
.menu-open .menu li:nth-child(7) a { transition-delay: .3s; }
.menu__foot { margin-top: 40px; display: flex; justify-content: space-between; border-top: 1px solid rgb(var(--cocoa-rgb) / .25); padding-top: 16px; }

/* ==========================================================================
   CURSOR
   ========================================================================== */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
    mix-blend-mode: normal;
  }
  .cursor__dot {
    position: absolute; left: 0; top: 0;
    width: 0; height: 0; margin: 0; border-radius: 50%;
    background: var(--egg);
    box-shadow: 0 10px 30px -10px rgb(var(--cocoa-900-rgb) / .5);
    transition: width .45s var(--ease-spring), height .45s var(--ease-spring), margin .45s var(--ease-spring), background-color .3s;
  }
  .cursor__label {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6);
    font: 500 11px/1 var(--ff-mono); letter-spacing: .1em; text-transform: uppercase;
    color: var(--cocoa); opacity: 0; white-space: nowrap;
    transition: opacity .3s var(--ease-out), transform .45s var(--ease-spring);
  }
  .cursor.is-label .cursor__dot { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .cursor.is-label .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  padding: 104px var(--gutter) 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto auto;
  column-gap: 20px;
  overflow: hidden;
}
.hero__meta {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; z-index: 2;
}
.hero__meta span:nth-child(2) { flex: 1; text-align: center; }

.hero__word {
  grid-column: 1 / span 8; grid-row: 2;
  align-self: end;
  position: relative; z-index: 3;
  margin: 0 0 clamp(16px, 2.4vw, 34px);
  line-height: 0;
}
.hero__word .logo-mask { width: 100%; }
.js .hero__word .logo-mask { clip-path: inset(0 0 100% 0); transition: clip-path 1.6s var(--ease-out) .25s; }
html.is-loaded .hero__word .logo-mask, html.no-loader .hero__word .logo-mask { clip-path: inset(-10% -2% -10% -2%); }

.hero__portrait {
  grid-column: 9 / span 4; grid-row: 2 / span 2;
  justify-self: end; align-self: center;
  position: relative; z-index: 1;
  width: clamp(240px, 25vw, 410px);
  margin-top: clamp(24px, 4vh, 48px);
}
.hero__frame { aspect-ratio: 3 / 4; background: var(--cocoa); position: relative; }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: sepia(.15) contrast(1.02); }
.js .hero__frame img { transform: scale(1.18); transition: transform 2.2s var(--ease-out) .35s; }
html.is-loaded .hero__frame img, html.no-loader .hero__frame img { transform: scale(1); }
.hero__portrait figcaption { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.hero__ring {
  position: absolute; inset: -14px -14px auto -14px; aspect-ratio: 3 / 4; height: auto;
  border-radius: 999px 999px 0 0; border: 1px solid var(--line); border-bottom: 0;
  pointer-events: none;
}

.hero__mascot {
  position: absolute; z-index: 4;
  left: clamp(-150px, -9vw, -96px); bottom: 34px;
  display: grid; justify-items: center; gap: 2px;
}
.hero__mascot-tag {
  font: 400 26px/1 var(--ff-sign); color: var(--cocoa);
  transform: rotate(-8deg) translate(-44px, 6px);
  white-space: nowrap;
}

.hero__entry {
  grid-column: 1 / span 7; grid-row: 3;
  position: relative; z-index: 2;
  padding-bottom: clamp(28px, 5vh, 56px);
}
.phon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; }
.phon .ipa { font: 400 15px/1 var(--ff-mono); letter-spacing: .02em; text-transform: none; }
.phon .pos { font: italic 400 18px/1 var(--ff-display); text-transform: none; letter-spacing: 0; }
.say {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 9px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font: 400 11px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .3s var(--ease-out), box-shadow .3s;
}
.say:hover { background: var(--cocoa); color: var(--egg); box-shadow: none; }
.say svg { width: 14px; height: 14px; }
.say.is-speaking svg { animation: pulse .8s infinite; }
.senses { display: grid; gap: 14px; counter-reset: s; }
.senses li {
  display: grid; grid-template-columns: 34px 1fr;
  font: 300 clamp(19px, 1.85vw, 28px)/1.3 var(--ff-display);
  font-variation-settings: "opsz" 36, "SOFT" 60;
  max-width: 34em;
}
.senses .n { font: 400 13px/2.2 var(--ff-mono); color: var(--muted); }
.senses em { font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }

.hero__ticker {
  grid-column: 1 / -1; grid-row: 4;
  margin: 0 calc(var(--gutter) * -1);
  border-top: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 16px 0 18px;
  position: relative; z-index: 2;
  background: var(--egg);
}
.ticker__track { display: inline-flex; animation: ticker 48s linear infinite; }
.ticker__track span { font: italic 300 clamp(18px, 1.7vw, 24px)/1 var(--ff-display); font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; padding-right: 26px; }
.ticker__track span::after { content: "✶"; font-style: normal; padding-left: 26px; font-size: .8em; color: var(--cocoa-500); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================================
   INTRO
   ========================================================================== */
.intro { padding: var(--section-y) var(--gutter); }
.intro__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 56px;
}
.intro .label { grid-column: 1 / -1; }
.intro__text {
  grid-column: 1 / span 8;
  font: 300 clamp(27px, 3.05vw, 50px)/1.24 var(--ff-display);
  font-variation-settings: "opsz" 72, "SOFT" 50;
  letter-spacing: -0.012em;
}
.intro__text em { font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; }

.chip {
  display: inline-flex; align-items: center; gap: .28em;
  padding: 0 .42em .04em .16em; margin: 0 .04em;
  border-radius: 999px;
  background: var(--egg-100);
  font-style: italic;
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  white-space: nowrap;
  line-height: 1.12;
  vertical-align: .04em;
  transition: background-color .4s var(--ease-out), transform .5s var(--ease-spring);
}
.chip:hover { background: var(--egg); transform: rotate(-1.5deg); }
.chip--plain { padding-left: .42em; }
.chip__img {
  width: 1.02em; height: 1.02em; border-radius: 50%; overflow: hidden; flex: none;
  transition: width .5s var(--ease-spring), height .5s var(--ease-spring);
  background: var(--cocoa);
}
.chip__img img { width: 100%; height: 100%; object-fit: cover; }
.chip:hover .chip__img { width: 1.6em; height: 1.02em; border-radius: 999px; }
.chip__ic { width: .9em; height: .9em; flex: none; color: var(--cocoa); }
.chip__ic svg { width: 100%; height: 100%; }

.roller {
  display: inline-grid; vertical-align: bottom;
  height: 1.24em; overflow: hidden;
  padding: 0 .3em; margin: 0 .02em;
  border-radius: .3em;
  background: var(--cocoa); color: var(--egg-100);
  font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  line-height: 1.24;
}
.roller__list { display: grid; transition: transform .9s var(--ease-spring); }
.roller__list span { display: block; text-align: center; }

.syllabus {
  grid-column: 10 / span 3; align-self: start;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.syllabus h3 { margin-bottom: 14px; color: var(--muted); }
.syllabus li {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; line-height: 1.4;
}
.syllabus li::before { content: ""; width: 11px; height: 11px; margin-top: 5px; border: 1px solid var(--cocoa); border-radius: 2px; }
.syllabus li.done::before { background: var(--cocoa); box-shadow: inset 0 0 0 2px var(--ivory); }
.syllabus li.bla { font: italic 300 19px/1.3 var(--ff-display); color: var(--muted); }
.syllabus li.bla::before { border-style: dashed; }

.intro__gallery {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-items: end;
  margin-top: clamp(24px, 4vw, 64px);
}
.mat {
  background: var(--paper);
  padding: clamp(12px, 1.4vw, 20px);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(var(--cocoa-rgb) / .07), 0 40px 70px -40px rgb(var(--cocoa-rgb) / .45), 0 12px 24px -18px rgb(var(--cocoa-rgb) / .3);
}
.mat img { width: 100%; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.painting { grid-column: 2 / span 4; }
.painting .mat { padding: clamp(18px, 2.4vw, 34px); background: linear-gradient(145deg, #fdfbf6, #efe9dd); }
.fig-cap { margin-top: 14px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.facts { grid-column: 7 / span 3; align-self: center; }
.facts dl { display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font: 300 19px/1.3 var(--ff-display); font-variation-settings: "opsz" 36, "SOFT" 60; }
.sign { margin-top: 26px; font: 400 clamp(56px, 6vw, 88px)/1 var(--ff-sign); color: var(--cocoa); transform: rotate(-4deg); transform-origin: left; }
.polaroid { grid-column: 10 / span 3; justify-self: end; width: min(100%, 300px); rotate: 3.5deg; transition: rotate .8s var(--ease-spring), translate .8s var(--ease-spring), opacity 1.1s var(--ease-out), transform 1.3s var(--ease-out), filter 1.1s var(--ease-out); }
.polaroid:hover { rotate: -1deg; translate: 0 -8px; }
.polaroid .mat { padding: 12px 12px 18px; background: #fffdf9; }
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.polaroid figcaption { padding-top: 14px; font: italic 300 17px/1.3 var(--ff-display); text-align: center; color: var(--cocoa-700); }

/* ==========================================================================
   TERMS (pinned merge)
   ========================================================================== */
.terms { overflow: hidden; }
.terms__pin {
  min-height: 100svh;
  padding: clamp(110px, 14vh, 150px) var(--gutter) clamp(48px, 8vh, 90px);
  display: grid; grid-template-rows: auto auto 1fr auto; row-gap: 22px;
  position: relative;
}
.terms__kicker { font: italic 300 clamp(22px, 2.2vw, 32px)/1.2 var(--ff-display); color: var(--muted); font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
.merge {
  --wght: 300; --soft: 0; --wonk: 0;
  position: relative;
  align-self: center;
  display: flex; align-items: baseline; flex-wrap: nowrap;
  white-space: nowrap;
  font-family: var(--ff-display);
  font-size: clamp(54px, 10.4vw, 186px);
  line-height: .92;
  letter-spacing: -0.03em;
  font-weight: var(--wght);
  font-variation-settings: "opsz" 144, "SOFT" var(--soft), "WONK" var(--wonk);
}
.merge__a { color: var(--ivory); }
.merge__plus { color: var(--egg); font-style: italic; padding: 0 .22em; display: inline-block; font-size: .7em; align-self: center; }
.merge__b { color: var(--egg); display: inline-flex; }
.merge__b .drop, .merge__b .keep { display: inline-block; }
.merge__b .drop { color: var(--egg-200); }
.terms__defs {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.def { grid-column: span 5; }
.def + .def { grid-column: 7 / span 5; }
.def dt { font: italic 300 30px/1.1 var(--ff-display); margin-bottom: 8px; font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
.def dt i { font: 400 12px/1 var(--ff-mono); font-style: normal; letter-spacing: .08em; color: var(--muted); margin-left: 8px; text-transform: uppercase; }
.def dd { color: var(--muted); max-width: 42ch; }
.terms__result {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.terms__result .ipa { grid-column: 1 / span 3; color: var(--egg); }
.no-caps { text-transform: none; letter-spacing: .02em; font-size: 14px; }
.terms__result p { grid-column: 4 / span 8; font: 300 clamp(22px, 2.3vw, 36px)/1.25 var(--ff-display); font-variation-settings: "opsz" 48, "SOFT" 60; color: var(--egg-100); }
.terms__result strong { font-weight: 500; font-style: italic; color: var(--egg); font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.terms__swap { display: grid; row-gap: 28px; }
.terms__swap.is-stacked > * { grid-area: 1 / 1; }

/* ==========================================================================
   FUNDAMENTALS
   ========================================================================== */
.fund { padding: var(--section-y) var(--gutter); }
.fund__list { border-bottom: 1px solid var(--line); }
.fund__row {
  position: relative;
  display: grid; grid-template-columns: 70px minmax(0, 1.25fr) minmax(0, 1fr) 170px;
  column-gap: 24px; align-items: center;
  padding: clamp(20px, 2.4vw, 34px) 0;
  border-top: 1px solid var(--line);
  isolation: isolate;
}
.fund__row::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1;
  background: var(--egg);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .7s var(--ease-spring);
}
.fund__row:hover::before { transform: scaleY(1); transform-origin: top; }
.fund__row .n { color: var(--muted); }
.fund__row h3 {
  font: 300 clamp(28px, 3.5vw, 58px)/1.02 var(--ff-display);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  transition: font-variation-settings .6s var(--ease-out), transform .7s var(--ease-spring);
}
.fund__row:hover h3 { font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; transform: translateX(12px); font-style: italic; }
.fund__row p { color: var(--muted); max-width: 40ch; font-size: 16px; }
.fund__row .tag { justify-self: end; text-align: right; color: var(--muted); display: grid; gap: 8px; justify-items: end; }
.fund__count { color: var(--cocoa); letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; transition: background-color .4s var(--ease-out), color .4s; }
.fund__row:hover .fund__count { background: var(--cocoa); color: var(--egg); box-shadow: none; }
.fund__row .thumb { display: none; }

.fund__preview {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: clamp(200px, 17vw, 270px); aspect-ratio: 3 / 4;
  pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(.6);
  transition: opacity .35s var(--ease-out);
  will-change: transform;
  background: var(--cocoa);
  box-shadow: 0 30px 60px -30px rgb(var(--cocoa-rgb) / .6);
}
.fund__preview.is-on { opacity: 1; }
.fund__preview img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   ARCHIVE
   ========================================================================== */
.archive { padding: clamp(96px, 12vh, 130px) 0 clamp(40px, 6vh, 70px); overflow: hidden; }
.archive__head {
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 18px;
  align-items: end;
  margin-bottom: clamp(24px, 3.4vh, 40px);
}
.archive__head .label { grid-column: 1 / -1; }
.archive__head h2 { grid-column: 1 / span 6; font-size: clamp(44px, 5.2vw, 88px); }
.archive__head .archive__status { grid-column: 7 / -1; justify-self: end; align-self: end; margin-bottom: 8px; }
.archive__head .filters { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .fnum { opacity: .55; margin-right: 7px; }
.filters button[aria-pressed="true"] .fnum { opacity: .7; }
.filters button, .view-toggle button {
  font: 400 11px/1 var(--ff-mono); letter-spacing: .09em; text-transform: uppercase;
  padding: 10px 13px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  transition: background-color .35s var(--ease-out), color .35s, box-shadow .35s;
}
.filters button:hover, .view-toggle button:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.filters button[aria-pressed="true"], .view-toggle button[aria-pressed="true"] { background: var(--egg); color: var(--cocoa); box-shadow: none; }
.filters sup { font-size: 9px; margin-left: 3px; opacity: .7; }
.archive__status { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; color: var(--muted); }
.archive__status > span { white-space: nowrap; }
.view-toggle { display: flex; gap: 4px; }
.tc { color: var(--egg); font-variant-numeric: tabular-nums; }

.strip { position: relative; padding: 26px 0; }
.strip::before, .strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background-color: rgb(var(--egg-rgb) / .22);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='10'><rect x='4' y='1' width='16' height='8' rx='2' fill='%23fff'/></svg>") 0 0 / 34px 10px repeat-x;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='10'><rect x='4' y='1' width='16' height='8' rx='2' fill='%23fff'/></svg>") 0 0 / 34px 10px repeat-x;
}
.strip::before { top: 0; }
.strip::after { bottom: 0; }
.strip__viewport { overflow: hidden; }
.strip__track {
  display: flex; align-items: flex-end; gap: clamp(18px, 2vw, 30px);
  padding: 0 var(--gutter);
  width: max-content;
  will-change: transform;
}
.frame { flex: none; display: grid; gap: 12px; }
.frame__media {
  --h: clamp(240px, 40vh, 520px);
  position: relative; display: block;
  height: var(--h); aspect-ratio: var(--ar, .8);
  border-radius: 14px; overflow: hidden;
  background: var(--cocoa-700);
  text-align: left;
  isolation: isolate;
}
.frame__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter .8s var(--ease-out);
  filter: saturate(.92);
}
.frame__media:hover img { transform: scale(1.05); filter: saturate(1.05); }
.frame__media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(var(--egg-rgb) / .14);
  pointer-events: none;
}
.frame__badge {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 10px; border-radius: 999px;
  background: rgb(var(--cocoa-900-rgb) / .62); color: var(--egg-100);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 400 10.5px/1 var(--ff-mono); letter-spacing: .1em; text-transform: uppercase;
  transform: translateY(6px); opacity: .9;
  transition: transform .5s var(--ease-spring), background-color .3s;
}
.frame__media:hover .frame__badge { transform: none; background: var(--egg); color: var(--cocoa); }
.frame__badge svg { width: 10px; height: 10px; }
.frame__meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10.5px; }
.frame__title { font: 300 clamp(22px, 1.9vw, 30px)/1.05 var(--ff-display); letter-spacing: -0.015em; font-variation-settings: "opsz" 72, "SOFT" 50; }
.frame__title em { font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; }
.frame__sub { color: var(--muted); font-size: 14.5px; line-height: 1.35; max-width: 30ch; }
.frame[hidden] { display: none; }

/* typographic covers for files without thumbnails */
.tcover {
  position: absolute; inset: 0; display: grid; align-content: space-between;
  padding: 18px 18px 60px; color: var(--cocoa); background: var(--egg);
}
.tcover .cal { width: 74%; }
[data-theme] .tcover .speckle { --speckle-color: var(--cocoa); opacity: .45; }
.tcover__top { display: flex; justify-content: space-between; position: relative; font-size: 10px; }
.tcover__title { position: relative; font: 300 clamp(26px, 2.6vw, 40px)/1 var(--ff-display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; font-style: italic; }
.tcover__big { position: relative; font: 300 clamp(70px, 8vw, 130px)/.85 var(--ff-display); letter-spacing: -0.04em; font-variation-settings: "opsz" 144, "SOFT" 50; }
.tcover--paper { background: var(--paper); }
.tcover--paper .rule { position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 27px, rgb(var(--egg-600-rgb) / .25) 27px 28px); }
.tcover--paper q { position: relative; font: italic 300 clamp(19px, 1.6vw, 24px)/1.3 var(--ff-display); font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; quotes: "“" "”"; }
.tcover--cocoa { background: var(--cocoa-800); color: var(--egg-100); box-shadow: inset 0 0 0 1px rgb(var(--egg-rgb) / .2); }
.tcover .wave { position: relative; display: flex; align-items: center; gap: 3px; height: 70px; }
.tcover .wave i { flex: 1; background: var(--egg); border-radius: 2px; height: var(--v); transform-origin: center; animation: wave 1.6s var(--ease-io) infinite alternate; animation-delay: calc(var(--k) * -90ms); }
@keyframes wave { to { transform: scaleY(.35); } }
.tcover .cal { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.tcover .cal i { aspect-ratio: 1; border-radius: 3px; background: rgb(var(--cocoa-rgb) / .12); }
.tcover .cal i.on { background: var(--cocoa); }
.tcover .cal i.hi { background: var(--paper); }

/* index (list) view */
.index { padding: 0 var(--gutter); }
.index[hidden] { display: none; }
.index table { width: 100%; border-collapse: collapse; }
.index th { text-align: left; color: var(--muted); font: 400 11px/1 var(--ff-mono); letter-spacing: .09em; text-transform: uppercase; padding: 0 12px 14px 0; border-bottom: 1px solid var(--line); }
.index td { padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); vertical-align: middle; transition: color .3s; }
.index td.t { font: 300 clamp(20px, 2vw, 30px)/1.1 var(--ff-display); font-variation-settings: "opsz" 72, "SOFT" 50; }
.index td.m { color: var(--muted); font-size: 15px; }
.index tr { cursor: pointer; transition: background-color .35s var(--ease-out); }
.index tbody tr:hover { background: rgb(var(--egg-rgb) / .08); }
.index tbody tr:hover td.t { color: var(--egg); font-style: italic; }
.index .open { text-align: right; color: var(--egg); }

/* ==========================================================================
   WARDS
   ========================================================================== */
.wards { padding: var(--section-y) var(--gutter); background: var(--paper); }
.wards__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 64px; align-items: center; }

.casenote {
  grid-column: 1 / span 6;
  position: relative; overflow: hidden;
  background: #fffdf8;
  border-radius: 8px;
  padding: clamp(26px, 3.4vw, 52px) clamp(24px, 3.4vw, 52px) clamp(26px, 3vw, 44px) clamp(56px, 6vw, 92px);
  box-shadow: 0 0 0 1px rgb(var(--cocoa-rgb) / .08), 0 50px 80px -50px rgb(var(--cocoa-rgb) / .5);
  background-image:
    linear-gradient(90deg, transparent calc(clamp(40px, 4.4vw, 68px) - 1px), rgb(var(--egg-600-rgb) / .55) calc(clamp(40px, 4.4vw, 68px) - 1px) clamp(40px, 4.4vw, 68px), transparent clamp(40px, 4.4vw, 68px)),
    repeating-linear-gradient(transparent 0 33px, rgb(var(--egg-600-rgb) / .2) 33px 34px);
}
.casenote__rx {
  position: absolute; right: -10px; top: -40px;
  font: 300 260px/1 var(--ff-display); color: var(--egg-100);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; font-style: italic;
  pointer-events: none; user-select: none;
}
.casenote__hd { position: relative; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin-bottom: 28px; }
.casenote h3 { position: relative; font: 300 clamp(30px, 3.2vw, 50px)/1.05 var(--ff-display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 60; margin-bottom: 24px; }
.casenote h3 em { font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.casenote blockquote { position: relative; margin: 0 0 28px; font: 300 19px/1.75 var(--ff-display); color: var(--cocoa-700); max-width: 44ch; font-variation-settings: "opsz" 24, "SOFT" 50; }
.casenote blockquote p + p { margin-top: 1.1em; }
.casenote__ft { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px dashed rgb(var(--cocoa-rgb) / .25); padding-top: 18px; }
.casenote__ft .sig { font: 400 40px/1 var(--ff-sign); }

.dearpt { grid-column: 8 / span 5; }
.fan {
  position: relative; height: clamp(380px, 38vw, 520px);
  display: block; width: 100%;
}
.fan__card {
  position: absolute; left: 50%; top: 50%;
  width: clamp(190px, 17vw, 260px); aspect-ratio: 4 / 5;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px rgb(var(--cocoa-rgb) / .08), 0 30px 50px -28px rgb(var(--cocoa-rgb) / .55);
  transform: translate(-50%, -50%) translateX(var(--x)) rotate(var(--r));
  transition: transform .9s var(--ease-spring);
  background: #fde3d2;
}
.fan__card img { width: 100%; height: 100%; object-fit: cover; }
.fan__card:nth-child(1) { --x: -36%; --r: -11deg; z-index: 1; }
.fan__card:nth-child(2) { --x: -12%; --r: -4deg; z-index: 2; }
.fan__card:nth-child(3) { --x: 12%; --r: 4deg; z-index: 3; }
.fan__card:nth-child(4) { --x: 36%; --r: 11deg; z-index: 4; }
.fan:hover .fan__card:nth-child(1), .fan:focus-visible .fan__card:nth-child(1) { --x: -92%; --r: -14deg; }
.fan:hover .fan__card:nth-child(2), .fan:focus-visible .fan__card:nth-child(2) { --x: -32%; --r: -5deg; }
.fan:hover .fan__card:nth-child(3), .fan:focus-visible .fan__card:nth-child(3) { --x: 30%; --r: 5deg; }
.fan:hover .fan__card:nth-child(4), .fan:focus-visible .fan__card:nth-child(4) { --x: 90%; --r: 14deg; }
.dearpt__cap { margin-top: 26px; display: grid; gap: 10px; text-align: center; justify-items: center; }
.dearpt__cap h3 { font: 300 clamp(30px, 3vw, 46px)/1 var(--ff-display); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; font-style: italic; }
.dearpt__cap p { color: var(--muted); max-width: 40ch; }
.dearpt__cap ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.dearpt__cap li { font: 400 10.5px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 11px; border-radius: 999px; background: var(--egg-100); }

.wards__note {
  grid-column: 3 / span 8; text-align: center;
  font: 300 clamp(24px, 2.4vw, 38px)/1.3 var(--ff-display);
  font-variation-settings: "opsz" 48, "SOFT" 60;
}
.wards__note em { font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }

/* ==========================================================================
   MUSES
   ========================================================================== */
.muses { padding: 0 var(--gutter) var(--section-y); background: var(--paper); }
.muses__inner { border-top: 1px solid var(--line); padding-top: clamp(64px, 8vw, 120px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 36px; }
.muses__intro { grid-column: 1 / span 4; }
.muses__intro h2 { font-size: clamp(44px, 5vw, 84px); margin: 22px 0 18px; }
.muses__intro p { color: var(--muted); max-width: 32ch; }
.muses__list { grid-column: 6 / -1; }
.muses__list li {
  display: grid; grid-template-columns: 200px 1fr; align-items: baseline; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.muses__list li:first-child { border-top: 1px solid var(--line); }
.muses__list .mono { color: var(--muted); }
.muses__list .who { font: italic 300 clamp(34px, 4.2vw, 68px)/1 var(--ff-display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.muses__list .who span { color: var(--egg-600); font-style: normal; font-size: .5em; vertical-align: .5em; margin: 0 .3em; }

/* ==========================================================================
   ENTERPRISES
   ========================================================================== */
.ent { padding: var(--section-y) var(--gutter); overflow: hidden; }
.ent .sec-head, .ent__stage, .ent__legend { position: relative; }
.ent__stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-items: center; }
.facade { grid-column: 1 / span 8; width: 100%; height: auto; overflow: visible; color: var(--cocoa); }
.facade .ln { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.facade .ln-thin { fill: none; stroke: currentColor; stroke-width: .8; opacity: .55; vector-effect: non-scaling-stroke; }
.facade .dim { fill: none; stroke: currentColor; stroke-width: .8; opacity: .7; vector-effect: non-scaling-stroke; }
.facade text { font-family: var(--ff-mono); font-size: 13px; letter-spacing: .12em; fill: currentColor; text-transform: uppercase; }
.facade .ped-t { font-family: var(--ff-display); font-size: 46px; letter-spacing: 0; font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.facade .room { cursor: pointer; outline: none; }
.facade .room .glass { fill: rgb(var(--cocoa-rgb) / .07); transition: fill .6s var(--ease-out); }
.facade .room .glow { fill: var(--cocoa); opacity: 0; transition: opacity .6s var(--ease-out); }
.facade .room .num { font-size: 12px; }
.facade .room .star { fill: var(--egg); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4) rotate(-40deg); transition: opacity .5s var(--ease-out), transform .8s var(--ease-spring); }
.facade .room:hover .glass, .facade .room:focus-visible .glass { fill: rgb(var(--cocoa-rgb) / .16); }
.facade .room.is-active .glow { opacity: 1; }
.facade .room.is-active .star { opacity: 1; transform: none; }
.facade .room.is-active .num { fill: var(--egg); }
.facade .draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: 0; }
.js .facade.is-pending .draw { stroke-dashoffset: var(--len, 2000); }
.facade.is-drawn .draw { transition: stroke-dashoffset 2.4s var(--ease-out); }

.ent__panel {
  grid-column: 9 / span 4;
  position: relative;
  padding: clamp(24px, 2.4vw, 36px);
  border-radius: var(--radius);
  background: rgb(var(--egg-50-rgb) / .6);
  box-shadow: inset 0 0 0 1px rgb(var(--cocoa-rgb) / .14), 0 30px 60px -40px rgb(var(--cocoa-rgb) / .45);
}
.ent__panel .mono { color: var(--muted); display: flex; justify-content: space-between; }
.ent__panel h3 { font: 300 clamp(34px, 3.2vw, 52px)/1 var(--ff-display); letter-spacing: -0.02em; margin: 26px 0 8px; font-variation-settings: "opsz" 144, "SOFT" 60; }
.ent__panel h3 em { font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.ent__panel .sub { font: italic 300 19px/1.3 var(--ff-display); color: var(--cocoa-700); margin-bottom: 18px; font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
.ent__panel p.body { color: var(--muted); }
.ent__panel ul { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.ent__panel li { font: 400 10.5px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(var(--cocoa-rgb) / .25); }
.ent__status { margin-top: 26px; padding-top: 16px; border-top: 1px dashed rgb(var(--cocoa-rgb) / .3); display: flex; align-items: center; gap: 10px; }
.ent__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--cocoa); animation: pulse 2s infinite; }
.ent__swap { transition: opacity .35s var(--ease-out), transform .5s var(--ease-out); }
.ent__swap.is-out { opacity: 0; transform: translateY(8px); }
.ent__legend { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.ent__legend button {
  font: 400 11px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 11px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(var(--cocoa-rgb) / .3);
  transition: background-color .35s var(--ease-out), color .35s;
}
.ent__legend button:hover { background: rgb(var(--cocoa-rgb) / .08); }
.ent__legend button[aria-pressed="true"] { background: var(--cocoa); color: var(--egg); box-shadow: none; }

/* ==========================================================================
   CONTACT + FOOTER
   ========================================================================== */
.contact { padding: var(--section-y) var(--gutter) clamp(64px, 8vw, 120px); overflow: hidden; }
.contact__big {
  font-size: clamp(84px, 17vw, 300px);
  line-height: .86; letter-spacing: -0.045em;
  color: var(--egg);
  margin: 26px 0 clamp(40px, 5vw, 72px);
}
.contact__big em { color: var(--ivory); }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 40px; align-items: start; }
.contact__lede { grid-column: 1 / span 6; font: 300 clamp(22px, 2.1vw, 32px)/1.3 var(--ff-display); color: var(--egg-100); font-variation-settings: "opsz" 48, "SOFT" 60; }
.contact__cta { grid-column: 8 / span 5; display: grid; gap: 22px; justify-items: start; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); }
.contact__links a:hover { color: var(--egg); }

.footer { padding: 0 var(--gutter) 28px; overflow: hidden; }
.footer__top {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 32px;
  align-items: center;
  border-top: 1px solid var(--line); padding: 44px 0;
}
.stamp { grid-column: 1 / span 2; width: 132px; height: 132px; position: relative; color: var(--egg); }
.stamp svg { width: 100%; height: 100%; animation: spin 26s linear infinite; }
.stamp text { font-family: var(--ff-mono); font-size: 9.2px; fill: currentColor; text-transform: uppercase; }
.stamp b { position: absolute; inset: 0; display: grid; place-items: center; font: 300 46px/1 var(--ff-display); color: var(--egg); }
@keyframes spin { to { transform: rotate(360deg); } }
.disclaimer { grid-column: 3 / span 6; }
.disclaimer h3 { color: var(--egg); margin-bottom: 10px; }
.disclaimer p { font: 300 clamp(18px, 1.6vw, 22px)/1.4 var(--ff-display); color: var(--egg-100); font-variation-settings: "opsz" 36, "SOFT" 60; max-width: 46ch; }
.footer__nav { grid-column: 10 / span 3; display: grid; gap: 10px; justify-items: end; text-align: right; }
.footer__nav a { color: var(--muted); transition: color .3s; }
.footer__nav a:hover { color: var(--egg); }
.footer__mark { color: var(--egg); line-height: 0; margin-top: 10px; }
.footer__mark .logo-mask { width: 100%; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-top: 22px; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: clamp(10px, 3vw, 40px); }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgb(var(--cocoa-900-rgb) / .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .5s var(--ease-out); }
.lightbox__panel {
  position: relative; width: min(1180px, 100%); max-height: 100%;
  display: grid; grid-template-rows: auto auto 1fr auto;
  background: var(--ivory); color: var(--cocoa);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .6);
  animation: rise .7s var(--ease-spring);
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.98); } }
.lightbox__hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px 24px 14px; }
.lightbox__hd h3 { font: 300 clamp(28px, 3vw, 44px)/1 var(--ff-display); letter-spacing: -0.02em; margin-top: 8px; font-variation-settings: "opsz" 144, "SOFT" 60; }
.lightbox__hd .mono { color: var(--muted); }
.lightbox__close { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font: 400 11px/1 var(--ff-mono); letter-spacing: .09em; text-transform: uppercase; flex: none; }
.lightbox__close:hover { background: var(--cocoa); color: var(--egg); }
.lightbox__tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 24px 14px; }
.lightbox__tabs button { font: 400 11px/1 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; padding: 9px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.lightbox__tabs button[aria-selected="true"] { background: var(--egg); color: var(--cocoa); box-shadow: none; }
.lightbox__viewer { position: relative; background: var(--cocoa-900); min-height: 0; height: min(68vh, 660px); }
.lightbox__viewer iframe { width: 100%; height: 100%; border: 0; }
.lightbox__viewer .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--egg); }
.lightbox__ft { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 24px 20px; }
.lightbox__ft p { color: var(--muted); max-width: 64ch; font-size: 15.5px; }
.lightbox__ft a { font: 400 11px/1 var(--ff-mono); letter-spacing: .09em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }

/* ==========================================================================
   MASCOT
   ========================================================================== */
.mascot {
  position: relative; display: block; flex-shrink: 0;
  width: var(--size, 150px); height: var(--size, 150px);
  padding: 0; border: 0; background: transparent; appearance: none;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.mascot__squash { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 78%; }
.mascot__layer { position: absolute; inset: 0; background-size: 300% 300%; background-repeat: no-repeat; }
.mascot:focus-visible { outline-offset: 0; border-radius: 50%; }
.js .mascot { opacity: 0; transform: translateY(30px) scale(.7) rotate(-8deg); transition: opacity .8s var(--ease-out) 1.4s, transform 1.1s var(--ease-spring) 1.4s; }
html.is-loaded .mascot, html.no-loader .mascot { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .nav a { padding: 11px 10px; }
  .hdr-clock { display: none; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav, .hdr-right .btn { display: none; }
  .menu-btn { display: block; }
  .site-header { top: 12px; }

  .sec-head h2, .sec-head > p:not(.label) { grid-column: 1 / -1; }

  .hero { grid-template-rows: auto auto auto auto auto; padding-top: 84px; row-gap: 0; }
  .hero__meta { font-size: 10px; }
  .hero__meta span:nth-child(2) { display: none; }
  .hero__word { grid-column: 1 / -1; grid-row: 2; margin: clamp(36px, 8vh, 64px) 0 22px; }
  .hero__portrait { grid-column: 1 / -1; grid-row: 4; justify-self: end; width: min(62vw, 340px); margin: 8px 0 40px; }
  .hero__entry { grid-column: 1 / -1; grid-row: 3; padding-bottom: 20px; }
  .hero__mascot { left: -116px; bottom: 18px; }
  .hero__mascot-tag { font-size: 22px; }
  .hero__ticker { grid-row: 5; }

  .intro__text, .syllabus { grid-column: 1 / -1; }
  .painting { grid-column: 1 / span 7; }
  .polaroid { grid-column: 8 / -1; width: 100%; }
  .facts { grid-column: 1 / -1; order: 3; margin-top: 40px; }

  .terms__pin { min-height: 0; padding-top: 110px; padding-bottom: 90px; row-gap: 26px; }
  .merge { font-size: clamp(44px, 12vw, 96px); flex-wrap: wrap; white-space: normal; }
  .def, .def + .def { grid-column: 1 / -1; }
  .def + .def { margin-top: 20px; }
  .terms__result .ipa, .terms__result p { grid-column: 1 / -1; }
  .terms__result p { margin-top: 10px; }

  .fund__row { grid-template-columns: 44px 1fr; row-gap: 10px; }
  .fund__row p { grid-column: 2; }
  .fund__row .tag { grid-column: 2; justify-self: start; justify-items: start; text-align: left; }
  .fund__row .tag > span:first-child { display: none; }
  .fund__row .thumb { display: block; grid-column: 2; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; margin-top: 8px; }
  .fund__row .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .fund__preview { display: none; }

  .archive__head h2, .archive__head .archive__status { grid-column: 1 / -1; justify-self: start; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  .strip__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .strip__viewport::-webkit-scrollbar { display: none; }
  .frame { scroll-snap-align: start; scroll-margin-left: var(--gutter); }
  .frame__media { --h: min(62vh, 108vw); max-width: 86vw; }
  .index td.m:nth-child(4), .index th:nth-child(4), .index td.m:nth-child(5), .index th:nth-child(5) { display: none; }

  .casenote, .dearpt, .wards__note { grid-column: 1 / -1; }
  .muses__intro, .muses__list { grid-column: 1 / -1; }
  .muses__list li { grid-template-columns: 1fr; gap: 6px; }

  .facade, .ent__panel { grid-column: 1 / -1; }
  .ent__panel { margin-top: 28px; }

  .contact__lede, .contact__cta { grid-column: 1 / -1; }
  .stamp { grid-column: 1 / span 4; }
  .disclaimer { grid-column: 1 / -1; }
  .footer__nav { grid-column: 1 / -1; justify-items: start; text-align: left; }
}

@media (max-width: 560px) {
  .painting { grid-column: 1 / span 8; }
  .polaroid { grid-column: 6 / -1; margin-top: -30%; z-index: 2; }
  .hero .mascot { --size: 108px !important; }
  .fig-cap { justify-content: flex-start; }
  .lightbox__viewer { height: 62vh; }
  .casenote { padding-left: 52px; }
  .casenote__rx { font-size: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1; transform: none; filter: none; }
}
