/* ─────────────────────────────────────────────────────────────
   Cozy River Studios — Editorial Design System
   Set in Fraunces & JetBrains Mono.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:        #EFE7D5;
  --paper-deep:   #E5DBC4;
  --paper-warm:   #F4ECDB;
  --ink:          #1A1814;
  --ink-soft:     #3A3530;
  --rust:         #B5432F;
  --rust-deep:    #963525;
  --moss:         #4F6043;
  --gold:         #C2933C;
  --mute:         #847D6E;
  --line:         rgba(26,24,20,0.14);
  --line-strong:  rgba(26,24,20,0.32);

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Paper grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* Subtle vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(60,40,20,0.12) 100%);
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--rust); color: var(--paper); }

img, svg { max-width: 100%; }

/* ───────── Skip link ───────── */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; font-family: var(--mono); font-size: 12px;
  z-index: 999;
}
.skip:focus { left: 16px; top: 16px; }

/* ───────── Type system ───────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.eyebrow-tick { display: inline-flex; align-items: center; gap: 0.6em; }
.eyebrow-tick::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink-soft);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 460;
  letter-spacing: -0.018em;
  margin: 0;
  font-variation-settings: "opsz" 96, "SOFT" 50, "WONK" 1;
}

.display {
  font-size: clamp(46px, 7.4vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.028em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--rust);
  font-weight: 380;
}

.section-title {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 96, "SOFT" 60, "WONK" 1;
  font-weight: 440;
}
.section-title em {
  font-style: italic;
  color: var(--rust);
  font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1;
}

.lede {
  font-size: 19.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38em;
}

.mono { font-family: var(--mono); }

/* ───────── Layout ───────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) { .wrap { padding: 0 22px; } }

.rule { height: 1px; background: var(--line); width: 100%; }

/* ───────── Navigation ───────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; }
.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 460;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 24, "SOFT" 50, "WONK" 1;
}
.brand-name em {
  font-style: italic;
  color: var(--rust);
  font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 1;
}
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 8px 18px;
  position: relative;
  transition: color .22s ease;
}
.nav-links a:hover { color: var(--rust); }
.nav-links a + a::before {
  content: "·";
  position: absolute;
  left: -2px; top: 50%; transform: translateY(-50%);
  color: var(--line-strong);
}
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 2px;
  height: 1px;
  background: var(--rust);
}
.nav-mail {
  margin-left: 14px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: all .25s ease;
}
.nav-mail:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

.nav-burger {
  display: none;
  background: none; border: 0;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.nav-burger span {
  width: 22px; height: 1.5px; background: var(--ink);
  display: block; position: relative;
}
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0;
  width: 22px; height: 1.5px; background: var(--ink);
}
.nav-burger span::before { top: -7px; }
.nav-burger span::after  { top: 7px;  }

@media (max-width: 880px) {
  .nav-links, .nav-mail { display: none; }
  .nav-burger { display: inline-flex; }
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 18px 32px 24px;
  background: var(--paper);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ───────── Issue banner ───────── */
.issue-banner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 64px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.issue-banner span:nth-child(2) { display: none; }
@media (min-width: 720px) { .issue-banner span:nth-child(2) { display: inline; } }

/* ───────── Footer ───────── */
footer {
  padding: 80px 0 36px;
  border-top: 1px solid var(--line);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
  font-weight: 500;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid li a {
  font-size: 16px;
  color: var(--ink-soft);
  transition: color .25s ease;
}
.foot-grid li a:hover { color: var(--rust); }
.foot-brand p {
  margin: 16px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 28em;
  font-style: italic;
  font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 1;
}
.colophon {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ───────── Reveal on scroll ───────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
