/* ==========================================================================
   blackstickbrain — shared styles
   Aesthetic: warm-paper zine / ink. Calm, hand-drawn, editorial.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Spline+Sans:wght@400;500;600&display=swap');

:root {
  --paper:      #f2ece0;
  --paper-deep: #e8e0d0;
  --ink:        #1b1a18;
  --ink-soft:   #4a463f;
  --ink-faint:  #8a8375;
  --accent:     #c65b3f;   /* terracotta */
  --accent-ink: #a5462d;
  --line:       #d6cdba;
  --radius:     14px;
  --maxw:       1080px;
  --shadow:     0 18px 40px -22px rgba(27, 26, 24, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Spline Sans', system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(198, 91, 63, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(58, 90, 112, 0.08), transparent 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ---------- Header / nav ---------- */
.site-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 48px);
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand b { color: var(--accent-ink); font-weight: 600; }
.brand .dot { color: var(--accent); }

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.9rem;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
}

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }

.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.site-foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  margin-top: 90px;
  padding: 34px clamp(20px, 5vw, 48px);
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--accent-ink); }

/* ---------- Reveal animation ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.28s; }
.d4 { animation-delay: 0.40s; }
.d5 { animation-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
