/* =============================================================
   THE NOITE — shared base: reset, surface, nav, footer, buttons
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--void) var(--texture) repeat;
  background-size: calc(160 * var(--u)) calc(160 * var(--u));
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-hi); }
button { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* the surface texture lives on anything that must hide what's behind it */
.tex { background: var(--void) var(--texture) repeat; background-size: calc(160 * var(--u)) calc(160 * var(--u)); }

/* film grain, fixed so it costs one paint */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: calc(12 * var(--u)); top: calc(-60 * var(--u)); z-index: 100;
  padding: calc(10 * var(--u)) calc(16 * var(--u)); border-radius: calc(999 * var(--u)); background: var(--text); color: var(--void);
  font: 500 max(11px, calc(12 * var(--u)))/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.skip:focus { top: calc(12 * var(--u)); color: var(--void); }

/* ---------- layout ---------- */
.wrap { width: 100%; padding-inline: var(--gutter); }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

/* ---------- type ---------- */
.heading {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  color: var(--heading-color);
}
.h-section { font-size: max(11px, calc(var(--fs-section) * var(--u))); line-height: var(--lh-section); letter-spacing: var(--ls-section); }
.label {
  font-family: var(--font-mono);
  font-size: max(11px, calc(11 * var(--u)));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mono-link {
  font-family: var(--font-mono);
  font-size: max(11px, calc(12 * var(--u)));
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------- links: quiet underline that draws in ---------- */
.link {
  display: inline-flex;
  align-items: center;
  min-height: max(44px, calc(44 * var(--u)));
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: calc(6 * var(--u));
  transition: text-decoration-color .2s ease, color .2s ease;
}
.link:hover, .link[aria-current='page'] { color: var(--text-hi); text-decoration-color: rgba(238, 238, 240, .5); }

:focus-visible { outline: 1px solid var(--ultraviolet); outline-offset: calc(4 * var(--u)); }

/* ---------- nav ---------- */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: calc(28 * var(--u));
}
.nav__logo img { height: calc(20 * var(--u)); width: auto; aspect-ratio: 803 / 563; }
.nav__links { display: flex; gap: calc(40 * var(--u)); align-items: center; }
@media (max-width: 1100px) { .nav__links { gap: 32px; } }
@media (max-width: 760px) {
  .nav { padding-block: calc(20 * var(--u)); }
  .nav__logo img { height: calc(18 * var(--u)); }
  .nav__links { gap: calc(20 * var(--u)); }
  .nav__links .mono-link { font-size: max(11px, calc(11 * var(--u))); letter-spacing: .14em; }
}

.page-top { position: relative; }

/* per-page ambient light (Contact: key-light beam; 404: ember + falling streak) */
.light { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.light i { position: absolute; display: block; }
.light--beam { height: 82vh; min-height: calc(640 * var(--u)); opacity: .55; }
.light--beam .beam {
  right: -18%; top: -6%;
  width: 34%; height: 120%;
  transform-origin: 50% 0;
  background: linear-gradient(to right, rgba(var(--wick-rgb), 0), rgba(var(--uv-rgb), .38) 45%, rgba(170, 140, 230, .22) 55%, rgba(var(--wick-rgb), 0));
  filter: blur(calc(40 * var(--u)));
  animation: beam 24s ease-in-out infinite;
}
.light--beam .pool {
  left: -6%; bottom: 4%;
  width: 48%; height: 24%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61, 31, 92, .75), rgba(9, 9, 11, 0));
  filter: blur(calc(52 * var(--u)));
  animation: pool 20s ease-in-out infinite;
}
.light--ember { height: 100vh; opacity: .6; }
.light--ember .ember {
  /* sized by screen height too, so its soft edge never reaches the clip line */
  right: 14%; top: 32vh;
  width: min(26vw, 50vh); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--uv-rgb), .5), rgba(61, 31, 92, .18) 55%, rgba(9, 9, 11, 0));
  filter: blur(calc(40 * var(--u)));
  animation: ember 9s ease-in-out infinite;
}
.light--ember .fall {
  left: 62%; top: 3vh;
  width: 2px; height: 24vh;
  background: linear-gradient(to bottom, rgba(196, 170, 240, 0), rgba(196, 170, 240, .55), rgba(196, 170, 240, 0));
  filter: blur(calc(4 * var(--u)));
  animation: fall 16s ease-in-out infinite;
}
@keyframes beam { 0%, 100% { transform: rotate(-32deg) translateX(0); opacity: .9; } 50% { transform: rotate(-28deg) translateX(-3%); opacity: 1; } }
@keyframes pool { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3%, -2%); } }
@keyframes ember { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes fall { 0% { transform: translateY(-6%) rotate(8deg); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateY(10%) rotate(8deg); opacity: 0; } }
@media (max-width: 760px) {
  .light--ember .ember { width: min(60vw, 50vh); right: 4%; filter: blur(calc(32 * var(--u))); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  min-height: max(44px, calc(46 * var(--u)));
  padding: 0 calc(22 * var(--u));
  border-radius: calc(999 * var(--u));
  border: 0;
  background: var(--text);
  color: var(--void);
  font: 500 max(11px, calc(12 * var(--u)))/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow .2s ease, background .2s ease;
}
.btn:hover { color: var(--void); background: var(--text-hi); box-shadow: 0 0 calc(32 * var(--u)) rgba(var(--uv-rgb), .7); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  min-height: max(44px, calc(48 * var(--u)));
  padding: 0 calc(24 * var(--u));
  border-radius: calc(999 * var(--u));
  border: 1px solid rgba(238, 238, 240, .32);
  background: transparent;
  color: var(--text);
  font: 500 max(11px, calc(12 * var(--u)))/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-outline:hover { background: var(--text); color: var(--void); border-color: var(--text); }
.btn-outline svg { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
.btn-outline .i-check { display: none; }
.btn-outline.is-copied .i-check { display: block; }
.btn-outline.is-copied .i-copy { display: none; }
/* stretched link: the whole card is the hit area */
.stretch::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-card); }

/* ---------- footer ---------- */
.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: auto;
  padding: calc(120 * var(--u)) 0 calc(140 * var(--u));
  border-top: 1px solid var(--line);
}
.footer__mark {
  position: absolute;
  /* full content width at every size; anchored to the top of the footer so
     the bottom edge always crops it, however wide the screen is */
  left: var(--gutter);
  top: calc(50 * var(--u));
  width: calc(100% - var(--gutter) * 2);
  height: auto;
  aspect-ratio: 803 / 563;
  opacity: .05;
  pointer-events: none;
  z-index: -1;
}
.footer__email { font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading-color-strong); font-size: max(11px, calc(var(--fs-footer-email) * var(--u))); line-height: var(--lh-footer-email); letter-spacing: var(--ls-footer-email); }
.footer__blurb { margin-top: calc(16 * var(--u)); max-width: calc(360 * var(--u)); font-size: max(11px, calc(14 * var(--u))); line-height: 1.6; color: var(--text-3); }
.footer h4 { margin-bottom: calc(12 * var(--u)); font-size: max(11px, calc(13 * var(--u))); font-weight: 500; color: var(--text-3); }
.footer__col { display: flex; flex-direction: column; }
.footer__col .link { min-height: calc(40 * var(--u)); font-size: max(11px, calc(14 * var(--u))); }
.footer__a { grid-column: 1 / span 5; }
.footer__b { grid-column: 8 / span 2; }
.footer__c { grid-column: 11 / span 2; }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: calc(16 * var(--u));
  margin-top: calc(96 * var(--u));
  padding-top: calc(20 * var(--u));
  border-top: 1px solid var(--line);
}
.footer__base .link { color: var(--text-3); }
.top-short { display: none; }

@media (max-width: 1100px) {
  .footer { padding: calc(96 * var(--u)) 0 calc(120 * var(--u)); }
  .footer__mark { top: auto; bottom: 0; transform: translateY(36%); }
  .footer .g12 { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: calc(56 * var(--u)); }
  .footer__a { grid-column: 1 / -1; }
  .footer__b { grid-column: 1 / span 2; }
  .footer__c { grid-column: 3 / span 2; }
  .footer__blurb { margin-top: calc(12 * var(--u)); }
  .footer h4 { margin-bottom: calc(8 * var(--u)); }
  .footer__col .link { min-height: max(44px, calc(44 * var(--u))); }
  .footer__base { margin-top: calc(72 * var(--u)); padding-top: calc(16 * var(--u)); }
}
@media (max-width: 760px) {
  .footer { padding: calc(80 * var(--u)) 0 calc(88 * var(--u)); }
  .footer .g12 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: calc(48 * var(--u)); column-gap: calc(24 * var(--u)); }
  .footer__a { grid-column: 1 / -1; }
  .footer__b { grid-column: 1; }
  .footer__c { grid-column: 2; }
  .footer__blurb { margin-top: calc(10 * var(--u)); }
  .footer__base { margin-top: calc(56 * var(--u)); padding-top: calc(12 * var(--u)); flex-wrap: nowrap; }
  .top-long { display: none; }
  .top-short { display: inline; }
}

/* ---------- motion helpers ---------- */
/* hidden only once JS confirms it will reveal them */
.js .reveal { opacity: 0; transform: translateY(calc(12 * var(--u))); }
.js.reduced .reveal { transform: none; }

@keyframes breathe { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@keyframes blink { 50% { opacity: .25; } }
.breathe { animation: breathe 5s ease-in-out infinite; }
.rec { animation: blink 1.2s ease-in-out infinite; }

/* page transition: a diagonal black wipe */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: var(--void);
  clip-path: polygon(0 0, 0 0, 0 0, 0 0);
}
.wipe.is-covering { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

@media (prefers-reduced-motion: reduce) {
  .breathe, .rec, .beam, .pool, .ember, .fall { animation: none !important; }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
