/* ============================================================
   jacobian.news : the ∂ poster
   Display: Fraunces  ·  Body: Archivo  ·  Mono: IBM Plex Mono
   All color in OKLCH. Orange is the surface, not the trim.
   ============================================================ */

/* ---------- tokens ---------- */

:root {
  /* brand orange, chroma eased off the lightness extremes */
  --orange:        oklch(67.5% 0.205 40);
  --orange-hi:     oklch(72% 0.205 47);
  --orange-deep:   oklch(58% 0.185 37);
  --orange-shadow: oklch(34% 0.09 38);

  /* light scheme (the drench default) */
  --paper:         oklch(96.5% 0.013 65);
  --paper-hi:      oklch(98.4% 0.008 75);
  --paper-tint:    oklch(93.2% 0.024 60);
  --ink:           oklch(24% 0.03 48);
  --ink-soft:      oklch(43% 0.028 48);
  --line:          oklch(84% 0.024 55);
  --accent-text:   oklch(51% 0.165 41);   /* burnt orange, AA on paper */

  --drench-a:      oklch(64.5% 0.2 38);
  --drench-b:      oklch(71% 0.208 46);
  --drench-ink:    oklch(20.5% 0.042 44); /* espresso, AA on orange */
  --drench-ink-2:  oklch(25% 0.055 42);
  --drench-white:  oklch(98.5% 0.009 70); /* display sizes only */
  --drench-line:   oklch(56% 0.16 39);

  --footer-bg:     oklch(21% 0.026 45);
  --footer-ink:    oklch(88% 0.025 60);
  --footer-soft:   oklch(70% 0.035 52);

  --shot-shadow:   14px 18px 0 oklch(34% 0.09 38 / 0.42);
  --shot-shadow-sm: 8px 10px 0 oklch(34% 0.09 38 / 0.42);
  --card-shadow:   10px 12px 0 oklch(34% 0.06 45 / 0.14);
  --bezel:         oklch(30% 0.02 45);

  --font-display: "Fraunces", "STIX Two Text", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --measure: 66ch;

  color-scheme: light;
}


/* ---------- reset-ish ---------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
p { margin: 0 0 1rem; }
ul, ol, dl { margin: 0; }

a { color: inherit; }

::selection { background: var(--orange); color: oklch(20% 0.04 44); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 99;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus { left: 0.5rem; }

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}
.drench :focus-visible { outline-color: var(--drench-ink); }

/* ---------- type helpers ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prose { max-width: var(--measure); }
.prose a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }

/* ---------- the drench ---------- */

.drench {
  position: relative;
  background:
    radial-gradient(120% 90% at 15% 0%, var(--drench-b), transparent 60%),
    linear-gradient(155deg, var(--drench-a) 20%, var(--drench-b) 78%, var(--drench-a));
  color: var(--drench-ink);
  overflow: clip;
}
/* subtle grain so the wall of orange is never flat fill */
.drench::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  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='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.drench > * { position: relative; z-index: 1; }

/* ---------- header ---------- */

.site-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--drench-line);
}
.site-head .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.site-head .brand img {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 22%;
}
.site-head nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
}
.site-head nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-head nav a:hover,
.site-head nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}
.theme-toggle {
  appearance: none;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle:hover { background: oklch(50% 0.1 42 / 0.16); }

@media (max-width: 720px) {
  .site-head { flex-wrap: wrap; row-gap: 0.6rem; }
  .site-head nav { margin-left: 0; flex-wrap: wrap; }
  .site-head .brand span { display: none; } /* icon carries it on tiny screens */
}
/* ---------- hero poster ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1.25rem, 4vw, 3rem) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: 1480px;
  margin-inline: auto;
}

/* the giant ghost ∂ behind everything */
.hero-partial {
  position: absolute;
  top: -0.28em;
  right: -0.12em;
  z-index: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20rem, 46vw, 46rem);
  line-height: 1;
  color: oklch(from var(--drench-white) l c h / 0.14);
  user-select: none;
  pointer-events: none;
}

.hero-copy { padding-bottom: clamp(3rem, 6vw, 6rem); }

.hero-kicker {
  color: var(--drench-ink-2);
  margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

.wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 640;
  font-size: clamp(4.25rem, 12.5vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--drench-white);
  margin: 0 0 clamp(1.25rem, 3vw, 2rem) -0.04em;
}
.wordmark .dee { font-style: italic; font-weight: 560; }

.hero-claim {
  font-family: var(--font-display);
  font-weight: 460;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: 1.4rem;
}
.hero-sub {
  max-width: 46ch;
  font-size: 1.0625rem;
  color: var(--drench-ink-2);
  margin-bottom: 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.6rem;
  border-radius: 0.35rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary {
  background: var(--drench-ink);
  color: oklch(96% 0.02 60);
  box-shadow: 7px 8px 0 oklch(30% 0.08 40 / 0.45);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 11px 0 oklch(30% 0.08 40 / 0.5);
}
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 3px 4px 0 oklch(30% 0.08 40 / 0.45); }
.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  color: inherit;
}
.btn-ghost:hover { text-decoration-thickness: 3px; }


/* ---------- screenshot objects ---------- */

.shot {
  --tilt: 0deg;
  border-radius: clamp(1.4rem, 5.5cqw, 2.6rem);
  border: 3px solid var(--bezel);
  background: var(--bezel);
  box-shadow: var(--shot-shadow);
  transform: rotate(var(--tilt));
  overflow: hidden;
  aspect-ratio: 1206 / 2622;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

.hero-collage {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 100 / 104;
  min-height: 380px;
  z-index: 1;
}
.hero-collage .shot { position: absolute; width: 52%; }
.shot-a { --tilt: -4deg; left: 0; top: 7%; z-index: 3; }
.shot-b { --tilt: 2.5deg; left: 40%; top: 0; z-index: 2; }
.shot-c { --tilt: -1.5deg; left: 76%; top: 16%; z-index: 1; } /* breaks the grid edge */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-partial { font-size: clamp(14rem, 55vw, 24rem); top: -0.1em; }
  .hero-collage { aspect-ratio: 100 / 92; min-height: 0; margin-inline: -0.5rem; }
  .hero-collage .shot { width: 54%; }
  .shot-c { left: 78%; }
}

/* feed ticker strip along the hero's bottom edge */
.feed-strip {
  border-top: 1px solid var(--drench-line);
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  color: var(--drench-ink-2);
}
.feed-strip span { white-space: nowrap; }
.feed-strip .dee-sep { font-family: var(--font-display); font-style: italic; text-transform: none; }

/* ---------- calm sections ---------- */

main { display: block; }

.section {
  padding: clamp(3.5rem, 8vw, 7.5rem) clamp(1.25rem, 4vw, 3rem);
}
.section-tint { background: var(--paper-tint); }
.section-inner { max-width: 1200px; margin-inline: auto; }

.section-kicker {
  color: var(--accent-text);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.section-title .dee { font-style: italic; color: var(--accent-text); }

/* feature rows: editorial, alternating */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1200px;
  margin-inline: auto;
}
.feature + .feature { margin-top: clamp(4rem, 9vw, 8rem); }
.feature-flip .feature-media { order: -1; }

.feature-media {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1rem 0.5rem;
}
.feature-media .shot {
  width: min(78%, 300px);
  box-shadow: var(--shot-shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.feature-media .shot:hover {
  transform: rotate(var(--tilt)) translateY(-6px);
}
.feature-media.pair .shot { width: min(48%, 250px); }
.feature-media.pair .shot:first-child { --tilt: -3deg; margin-top: 2.5rem; }
.feature-media.pair .shot:last-child { --tilt: 2deg; }

.feature h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin-bottom: 1rem;
  max-width: 18ch;
}
.feature .mono-tag {
  display: inline-block;
  color: var(--accent-text);
  margin-bottom: 0.9rem;
}
.feature p { color: var(--ink-soft); max-width: 52ch; }
.feature p strong { color: var(--ink); font-weight: 600; }

@media (max-width: 820px) {
  .feature, .feature-flip { grid-template-columns: 1fr; }
  .feature-flip .feature-media { order: 0; }
  .feature-media .shot { width: min(72%, 280px); }
}

/* ---------- spec sheet ---------- */

.spec {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.spec-list { border-top: 2px solid var(--ink); }
.spec-list > div {
  display: grid;
  grid-template-columns: minmax(9.5rem, 14rem) 1fr;
  gap: 0.35rem 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding-top: 0.2rem;
}
.spec-list dd { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.spec-list dd strong { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .spec { grid-template-columns: 1fr; }
  .spec-list > div { grid-template-columns: 1fr; }
}

/* ---------- closing CTA ---------- */

.closer {
  text-align: center;
  padding: clamp(4.5rem, 10vw, 9rem) clamp(1.25rem, 4vw, 3rem);
}
.closer .closer-partial {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 540;
  font-size: clamp(5rem, 11vw, 9rem);
  line-height: 1;
  color: var(--drench-white);
  display: block;
  margin-bottom: 1rem;
}
.closer h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--drench-white);
  margin-bottom: 1.25rem;
}
.closer p {
  color: var(--drench-ink-2);
  max-width: 44ch;
  margin: 0 auto 2.25rem;
}
.closer .cta-row { justify-content: center; }
.closer .mono-note {
  display: block;
  margin-top: 2rem;
  color: var(--drench-ink-2);
}

/* ---------- footer ---------- */

.site-foot {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
}
.foot-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 3rem;
  align-items: start;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.foot-brand img { width: 1.7rem; height: 1.7rem; border-radius: 22%; }
.foot-tag { color: var(--footer-soft); font-size: 0.92rem; max-width: 44ch; }
.foot-math {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--footer-soft);
}
.foot-nav { display: grid; gap: 0.55rem; text-align: right; }
.foot-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--footer-ink);
}
.foot-nav a:hover { color: oklch(74% 0.17 45); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) {
  .foot-inner { grid-template-columns: 1fr; }
  .foot-nav { text-align: left; }
}

/* ---------- subpages ---------- */

.page-mast {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
}
.page-mast-inner { max-width: 1200px; margin-inline: auto; position: relative; }
.page-mast .page-partial {
  position: absolute;
  right: -0.05em;
  top: 50%;
  translate: 0 -54%;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(8rem, 20vw, 16rem);
  line-height: 1;
  color: oklch(from var(--drench-white) l c h / 0.16);
  pointer-events: none;
  user-select: none;
}
.page-mast .mono { color: var(--drench-ink-2); margin-bottom: 0.9rem; display: block; }
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--drench-white);
  margin: 0;
}
.page-lede {
  margin-top: 1.25rem;
  max-width: 52ch;
  color: var(--drench-ink);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.page-body {
  padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem);
}
.page-body-inner { max-width: 1200px; margin-inline: auto; }

.article {
  max-width: var(--measure);
}
.article h2 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.9rem;
}
.article h2:first-child { margin-top: 0; }
.article p, .article li { color: var(--ink-soft); }
.article li { margin-bottom: 0.5rem; }
.article ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.article strong { color: var(--ink); font-weight: 600; }
.article a { color: var(--accent-text); text-underline-offset: 3px; }
.article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-tint);
  padding: 0.12em 0.4em;
  border-radius: 0.3rem;
}

.fact-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  margin: 0 0 2.25rem;
  text-transform: uppercase;
}

/* FAQ */
.faq { max-width: var(--measure); border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.25rem;
  line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "∂";
  font-style: italic;
  color: var(--accent-text);
  flex-shrink: 0;
  transition: rotate 0.3s var(--ease);
}
.faq details[open] summary::before { rotate: 180deg; }
.faq details p { color: var(--ink-soft); padding: 0 0 1.25rem 2rem; max-width: 58ch; }
.faq details p:last-child { margin-bottom: 0; }

/* changelog */
.log { max-width: 58rem; }
.log-entry {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: 1rem 3rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
}
.log-entry + .log-entry { margin-top: 3.5rem; }
.log-meta { position: sticky; top: 1rem; align-self: start; }
.log-version {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.log-date, .log-build {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.3rem;
}
.log-body h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 1.6rem 0 0.6rem;
}
.log-body h3:first-child { margin-top: 0.2rem; }
.log-body ul { list-style: none; padding: 0; }
.log-body li {
  color: var(--ink-soft);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  max-width: var(--measure);
}
.log-body li strong { color: var(--ink); font-weight: 600; }
@media (max-width: 700px) {
  .log-entry { grid-template-columns: 1fr; }
  .log-meta { position: static; }
}

/* ---------- motion: one orchestrated load moment ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    animation: rise 0.9s var(--ease) both;
    animation-delay: calc(var(--d, 0) * 90ms);
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hero-collage .shot, .settle {
    opacity: 0;
    animation: settle 1.1s var(--ease) both;
    animation-delay: calc(200ms + var(--d, 0) * 130ms);
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(64px) rotate(0deg) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) rotate(var(--tilt)) scale(1); }
  }
  .hero-partial {
    opacity: 0;
    animation: ghost 1.4s var(--ease) 0.15s both;
  }
  @keyframes ghost {
    from { opacity: 0; transform: translateY(0.06em); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
