/* ============ GUTSY — ELEVATED ============ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,200..900;1,9..144,200..900&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@300;400;500;600&family=Inter+Tight:wght@300;400;500;600;700&display=swap');

:root {
  /* CREAM editorial (default) */
  --bg: #f0ebe1;
  --bg-2: #e8e1d3;
  --ink: #0e1410;
  --ink-2: #1c2a22;
  --muted: #5d6b62;
  --line: rgba(14, 20, 16, 0.14);
  --line-2: rgba(14, 20, 16, 0.08);
  --accent: #1a3a2a;        /* deep forest */
  --accent-2: #2d5740;
  --accent-glow: #6ba27e;
  --warm: #c8b896;
  --paper: #faf6ec;
  --hi: #f7f2e6;
  --rev-bg: #0a0e0c;
  --rev-ink: #f0ebe1;
}

[data-theme="dark"] {
  --bg: #0a0e0c;
  --bg-2: #0f1512;
  --ink: #ecead8;
  --ink-2: #d4d3c0;
  --muted: #8a9189;
  --line: rgba(236, 234, 216, 0.12);
  --line-2: rgba(236, 234, 216, 0.06);
  --accent: #d4dfb7;
  --accent-2: #a8c194;
  --accent-glow: #c9e8a3;
  --warm: #6b5a3e;
  --paper: #131a16;
  --hi: #161e19;
  --rev-bg: #f0ebe1;
  --rev-ink: #0a0e0c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body { transition: background 0.6s ease, color 0.6s ease; }

/* film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: multiply;
  z-index: 9999;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.08; }

/* type system */
.serif { font-family: 'Fraunces', 'Instrument Serif', serif; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 50; letter-spacing: -0.02em; }
.serif-it { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: 'JetBrains Mono', monospace; font-weight: 400; letter-spacing: 0.04em; }
.cap { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.2em; font-size: 11px; font-weight: 500; }
.cap-lg { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; font-weight: 500; }

/* selection */
::selection { background: var(--accent); color: var(--bg); }

/* utility */
.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 720px) { .container { padding: 0 24px; } }

/* base section padding (each section can override) */
.sec { padding: 140px 0; position: relative; }
@media (max-width: 720px) { .sec { padding: 100px 0; } }

/* CountUp — used in StoryCompact + Story stats grids */
.countup {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.countup-num { display: inline-block; }
.countup-suffix {
  display: inline-block;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-left: 1px;
}
.countup-suffix.in { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .countup-suffix { opacity: 1; transform: none; transition: none; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.eyebrow .dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; display: inline-block; }

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

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover::after { transform: translateY(0); }
.btn .arr { transition: transform 0.4s; }
.btn:hover .arr { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost::after { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); }

/* scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal].in { opacity: 1; transform: none; }

/* marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  background: var(--bg);
  position: relative;
}
.marquee-track {
  display: inline-flex; gap: 40px;
  animation: scroll 40s linear infinite;
}
.marquee-track > span {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(11px, 0.95vw, 13px);
  letter-spacing: 0.01em;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.marquee-track > span em { font-style: italic; color: var(--accent); font-family: 'Instrument Serif', serif; }
.marquee-track > span::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* phone shell */
.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: #0a0a0a;
  padding: 8px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.2),
    0 30px 60px -20px rgba(0,0,0,0.35),
    0 60px 120px -30px rgba(0,0,0,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}
.phone::before {
  content: "";
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 88px; height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}

/* card */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
}

/* link underline */
.link {
  position: relative; display: inline-block;
  color: var(--ink);
  text-decoration: none;
}
.link::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.link:hover::after {
  transform: scaleX(0);
  transform-origin: left center;
}

/* hide scrollbar in horizontal sliders */
.no-bar::-webkit-scrollbar { display: none; }
.no-bar { scrollbar-width: none; }
