/* ==========================================================================
   Tlde Technologies — design system
   Editorial, restrained, engineering-led. No gradients, no stock imagery.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img,svg,video { display: block; max-width: 100%; height: auto; }
input,button,textarea,select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
h1,h2,h3,h4 { text-wrap: balance; }
p { text-wrap: pretty; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink:        #1D1D1F;
  --ink-2:      #424245;
  --ink-3:      #6E6E73;
  --paper:      #FFFFFF;
  --paper-2:    #F5F5F7;
  --paper-3:    #E8E8ED;
  --line:       #D2D2D7;
  --line-2:     #C7C7CC;
  --accent:     #0C7A6B;
  --accent-ink: #095F53;
  --accent-bg:  #E4F2EF;
  --on-accent:  #FFFFFF;

  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --step-0:  clamp(1rem, 0.96rem + 0.19vw, 1.12rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.34vw, 1.4rem);
  --step-2:  clamp(1.41rem, 1.29rem + 0.58vw, 1.78rem);
  --step-3:  clamp(1.69rem, 1.49rem + 0.97vw, 2.25rem);
  --step-4:  clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
  --step-5:  clamp(2.44rem, 1.94rem + 2.44vw, 3.75rem);
  --step-6:  clamp(2.9rem, 1.9rem + 5vw, 6.5rem);

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(5rem, 10vw, 9.5rem);
  --maxw: 1220px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 980px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.05), 0 16px 40px rgba(0,0,0,.11);
  --ease: cubic-bezier(.215,.61,.355,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #F5F5F7;
    --ink-2:      #A1A1A6;
    --ink-3:      #86868B;
    --paper:      #000000;
    --paper-2:    #101012;
    --paper-3:    #1D1D1F;
    --line:       #2A2A2E;
    --line-2:     #3A3A3E;
    --accent:     #35C3AC;
    --accent-ink: #57D5C0;
    --accent-bg:  #0E2521;
    --on-accent:  #05201C;
  }
}

:root[data-theme="dark"] {
  --ink:        #F5F5F7;
  --ink-2:      #A1A1A6;
  --ink-3:      #86868B;
  --paper:      #000000;
  --paper-2:    #101012;
  --paper-3:    #1D1D1F;
  --line:       #2A2A2E;
  --line-2:     #3A3A3E;
  --accent:     #35C3AC;
  --accent-ink: #57D5C0;
  --accent-bg:  #0E2521;
  --on-accent:  #05201C;
}

/* --- Base ----------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "cv05", "cv11";
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 780px; }
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); }
.section--rule { border-top: 1px solid var(--line); }

/* --- Type utilities ------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: var(--line-2);
  flex: none;
}
.eyebrow--plain::before { display: none; }
.eyebrow a { display: inline-flex; align-items: center; min-height: 24px; }

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.03;
}
.h1 { font-size: var(--step-6); }
.h2 { font-size: var(--step-4); line-height: 1.08; }
.h3 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.022em; }
.h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.015em; }

.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--ink-3); }
.body-2 { color: var(--ink-2); max-width: 66ch; }
.small { font-size: var(--step--1); }
.stack { display: grid; gap: 1.1rem; }
.stack-sm { display: grid; gap: 0.7rem; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.85em 1.6em;
  font-size: var(--step--1);
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: scale(1.03); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-ink); }
.btn svg { flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em; min-height: 24px;
  font-size: var(--step--1); font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease, gap .18s ease;
}
.link-arrow:hover { border-bottom-color: currentColor; gap: 0.7em; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; height: 68px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  text-decoration: none; flex: none;
}
.brand__mark {
  font-family: var(--font-display);
  font-size: 1.24rem; font-weight: 600; letter-spacing: -0.04em;
  color: var(--ink);
}
/* Wordmark: "Tlde" with the tilde floating above the l, matching the logo.
   Positioned rather than a combining glyph, so it cannot misrender as "Tide". */
.brand__mark { font-variant-ligatures: none; }
.brand__l {
  font-style: normal;
  position: relative;
  display: inline-block;
  padding-inline: 0.02em;
}
.brand__l::before {
  content: "~";
  position: absolute;
  left: 50%; top: -0.34em;
  transform: translateX(-50%) scaleX(1.35);
  font-size: 0.8em; line-height: 1; font-weight: 700;
  color: var(--accent);
  pointer-events: none;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.1vw, 1.8rem); }
.nav a {
  font-size: 0.88rem; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 24px;
  transition: color .16s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.header__actions { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.nav-toggle {
  display: none; padding: 0.5rem; margin-right: -0.5rem; color: var(--ink);
  min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    max-height: calc(100dvh - 68px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .header__actions .btn { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
}
.hero h1 { margin-block: 1.4rem 1.6rem; max-width: 15ch; }
.hero h1 .accent { color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero__facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.fact { padding-block: 1.05rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: baseline; }
.fact__k { font-family: var(--font-mono); font-size: 0.71rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.fact__v { font-size: var(--step--1); color: var(--ink); }

/* --- Centered hero + spec row (Apple-tier product page) ------------------- */
.hero--center { text-align: center; padding-block: clamp(4.5rem, 11vw, 9rem) clamp(3rem, 6vw, 5rem); }
.hero--center .eyebrow { justify-content: center; }
.hero--center h1 { margin-block: 1.5rem 1.6rem; max-width: 18ch; margin-inline: auto; }
.hero__sub {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.6rem);
  line-height: 1.4; letter-spacing: -0.018em;
  color: var(--ink-2); max-width: 34ch; margin-inline: auto;
}
.hero--center .hero__actions { justify-content: center; margin-top: 2.4rem; }
/* Inner pages: same centred treatment, one step down in scale */
.hero__title { font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.6rem); max-width: 20ch; margin-inline: auto; }
.hero--center .hero__title { margin-block: 1.4rem 1.5rem; }
.hero__sub--wide { max-width: 52ch; font-size: clamp(1.05rem, .95rem + 0.5vw, 1.35rem); }

/* --- WebGL stage ---------------------------------------------------------- */
.stage {
  position: relative;
  height: clamp(330px, 40vw, 540px);
  margin-block: clamp(1rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  /* Fade the field into the page rather than cutting it off at a hard edge. */
  -webkit-mask-image: radial-gradient(120% 100% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 100% at 50% 50%, #000 55%, transparent 100%);
}
.stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.stage canvas.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .stage canvas { transition: none; }
}

.specs { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.specs__grid { display: grid; gap: clamp(.9rem, 1.6vw, 1.25rem); }
@media (min-width: 560px) { .specs__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .specs__grid { grid-template-columns: repeat(4, 1fr); } }
.spec {
  background: var(--paper-2); border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem; display: grid; gap: 0.5rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.spec:hover { transform: translateY(-4px) scale(1.012); box-shadow: var(--shadow-hover); }
.spec__k {
  font-family: var(--font-mono); font-size: 0.71rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.spec__v {
  font-family: var(--font-display); font-size: var(--step-2);
  font-weight: 500; letter-spacing: -0.028em; line-height: 1.1; color: var(--ink);
}

/* --- Section headers ------------------------------------------------------ */
.sec-head { display: grid; gap: 1.1rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
@media (min-width: 900px) {
  .sec-head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 3rem; align-items: end; }
  .sec-head--split .sec-head__aside { padding-bottom: 0.35rem; }
}
.sec-head h2 { max-width: 20ch; }

/* --- Portfolio bento ------------------------------------------------------ */
.portfolio { display: grid; gap: clamp(.9rem, 1.6vw, 1.35rem); }
@media (min-width: 760px) { .portfolio { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  background: var(--paper-2); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: flex; flex-direction: column; gap: 0.85rem;
  text-decoration: none; color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.section--tint .pcard { background: var(--paper); }
.pcard:hover { transform: translateY(-4px) scale(1.012); box-shadow: var(--shadow-hover); }
@media (min-width: 760px) { .pcard--feature { grid-column: 1 / -1; } }

.pcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.pcard__cat {
  font-family: var(--font-mono); font-size: 0.71rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.pcard__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink); transition: color .2s var(--ease);
}
.pcard--feature .pcard__name { font-size: var(--step-4); }
.pcard:hover .pcard__name { color: var(--accent); }
.pcard__summary { color: var(--ink-2); font-size: var(--step--1); line-height: 1.6; }
.pcard--feature .pcard__summary { font-size: var(--step-0); max-width: 62ch; }
.pcard__foot {
  margin-top: auto; padding-top: .5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.pcard__url {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--ink-3); overflow-wrap: anywhere;
}
.pcard__go { color: var(--ink-3); transition: color .2s var(--ease), transform .2s var(--ease); flex: none; }
.pcard:hover .pcard__go { color: var(--accent); transform: translateX(3px); }

.tag {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  padding: 0.3em 0.8em;
  white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

/* --- Card grids ----------------------------------------------------------- */
.grid { display: grid; gap: clamp(.9rem, 1.6vw, 1.35rem); }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.cell {
  background: var(--paper-2); border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: grid; gap: 0.7rem; align-content: start;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.section--tint .cell { background: var(--paper); }
.cell:hover { transform: translateY(-4px) scale(1.012); box-shadow: var(--shadow-hover); }
.cell__k { font-family: var(--font-mono); font-size: 0.71rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.cell h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; letter-spacing: -0.018em; line-height: 1.25; }
.cell p { color: var(--ink-2); font-size: var(--step--1); line-height: 1.65; }

/* --- Ecosystem surfaces (Tilde ID) ---------------------------------------- */
.surfaces { display: grid; gap: clamp(.9rem, 1.6vw, 1.25rem); }
@media (min-width: 620px) { .surfaces { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .surfaces { grid-template-columns: repeat(4, 1fr); } }
.surface {
  background: var(--paper); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  display: grid; gap: 0.42rem; align-content: start;
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.section--tint .surface { background: var(--paper); }
.surface:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-hover); }
.surface__role {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.surface__name {
  font-family: var(--font-display); font-size: var(--step-2);
  font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; color: var(--ink);
}
.surface__logo { height: 1.9rem; width: auto; margin-block: .1rem .15rem; }
.surface p { font-size: var(--step--1); color: var(--ink-2); line-height: 1.55; }
.surface__link {
  min-height: 24px;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.04em; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35em;
  margin-top: 0.15rem; overflow-wrap: anywhere;
}
.surface__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.surface__stage {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 0.2rem;
}

.chips { display: grid; gap: .6rem; list-style: none; padding: 0; }
@media (min-width: 540px) { .chips { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .chips { grid-template-columns: repeat(4, 1fr); } }
.chip {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem;
  display: grid; gap: 0.22rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.section--tint .chip { background: var(--paper); }
.chip:hover { transform: translateY(-2px); border-color: var(--line-2); }
.chip__name {
  font-family: var(--font-display); font-size: var(--step-0);
  font-weight: 500; letter-spacing: -0.018em; color: var(--ink);
}
.chip p { font-size: 0.8rem; color: var(--ink-3); line-height: 1.45; }

/* --- Numbered steps ------------------------------------------------------- */
.steps { display: grid; gap: 0; }
.step {
  display: grid; gap: 0.6rem 2.5rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 840px) { .step { grid-template-columns: 4rem minmax(0, 20rem) minmax(0, 1fr); align-items: start; } }
.step__n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); padding-top: 0.35em; }
.step h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; letter-spacing: -0.018em; }
.step p { color: var(--ink-2); max-width: 60ch; }

/* --- Statement ------------------------------------------------------------ */
.statement {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-3); line-height: 1.28; letter-spacing: -0.025em;
  max-width: 26ch;
}
.statement em { font-style: normal; color: var(--accent); }

/* --- Prose (blog + long form) --------------------------------------------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; letter-spacing: -0.022em; line-height: 1.2; margin-top: 2.4em; color: var(--ink); }
.prose h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; letter-spacing: -0.016em; margin-top: 2em; color: var(--ink); }
.prose p, .prose li { color: var(--ink-2); line-height: 1.72; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.5em; }
.prose blockquote {
  border-left: 2px solid var(--accent); padding-left: 1.3em;
  font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.015em; color: var(--ink);
}
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-3); padding: 0.15em 0.4em; border-radius: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }

/* --- Checklist ------------------------------------------------------------ */
.checks { display: grid; gap: 0.85rem; list-style: none; padding: 0; }
.checks li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.8rem; align-items: start; color: var(--ink-2); font-size: var(--step--1); line-height: 1.6; }
.checks li::before {
  content: ""; margin-top: 0.55em;
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--accent);
}

/* --- Post list ------------------------------------------------------------ */
.posts { border-top: 1px solid var(--line); }
.post-row {
  display: grid; gap: 0.5rem 2.5rem;
  padding-block: 1.85rem; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
@media (min-width: 780px) { .post-row { grid-template-columns: 9rem minmax(0, 1fr); align-items: baseline; } }
.post-row time { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-3); }
.post-row h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; letter-spacing: -0.018em; line-height: 1.3; transition: color .16s ease; }
.post-row:hover h3 { color: var(--accent); }
.post-row p { color: var(--ink-3); font-size: var(--step--1); margin-top: 0.35rem; max-width: 62ch; }

/* --- CTA band ------------------------------------------------------------- */
.cta { background: var(--ink); }
.cta .eyebrow { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.cta .eyebrow::before { background: color-mix(in srgb, var(--paper) 32%, transparent); }
.cta h2 { color: var(--paper); }
.cta p { color: color-mix(in srgb, var(--paper) 74%, transparent); }
.cta .btn--primary { background: var(--paper); color: var(--ink); }
.cta .btn--primary:hover { background: var(--accent); color: #fff; }
.cta .btn--ghost { border-color: color-mix(in srgb, var(--paper) 32%, transparent); color: var(--paper); }
.cta .btn--ghost:hover { border-color: var(--paper); background: color-mix(in srgb, var(--paper) 10%, transparent); }
.cta__grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 900px) { .cta__grid { grid-template-columns: minmax(0, 1fr) auto; gap: 4rem; } }

/* --- Form ----------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-family: var(--font-mono); font-size: 0.71rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 0.75rem 0.9rem; font-size: var(--step--1); width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.field textarea { resize: vertical; min-height: 8rem; }

/* File input: the default control ignores the padding used on text fields. */
.field input[type="file"] { padding: 0.55rem 0.6rem; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-size: var(--step--1); font-weight: 500;
  margin-right: 0.9rem; padding: 0.45em 1em;
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  background: var(--paper-2); color: var(--ink); cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.field input[type="file"]::file-selector-button:hover {
  border-color: var(--ink); background: var(--paper-3);
}

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .footer__grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.footer__col h3 { font-family: var(--font-mono); font-size: 0.71rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.85rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.15rem; }
.footer__col a {
  font-size: var(--step--1); color: var(--ink-2); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 24px;
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: var(--step--1); color: var(--ink-3);
}

/* --- Focus + motion ------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.7rem 1.1rem; border-radius: var(--radius);
  text-decoration: none; font-size: var(--step--1);
}
.skip:focus { top: 0.75rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
/* Stagger only grid children, per the skill's stagger-list spec */
.reveal.is-in.grid > *,
.reveal.is-in.surfaces > *,
.reveal.is-in.chips > * { animation: rise .45s var(--ease) backwards; }
.reveal.is-in > *:nth-child(2) { animation-delay: .06s; }
.reveal.is-in > *:nth-child(3) { animation-delay: .12s; }
.reveal.is-in > *:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
