/* SRDN — Engineered Minimalism design system */

:root {
  --bg: #f4f1ea;            /* warm off-white */
  --bg-alt: #ece8df;         /* slight contrast */
  --ink: #0e0e0c;            /* deep ink */
  --ink-2: #2a2a26;
  --muted: #6b6a63;
  --line: #d8d3c5;
  --line-2: #c5bfaf;
  --accent: oklch(0.78 0.18 145);   /* electric lime/green */
  --accent-deep: oklch(0.55 0.16 145);
  --warn: oklch(0.72 0.15 60);

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Inter Tight", -apple-system, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ===== Layout primitives ===== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.divider {
  border-top: 1px solid var(--line);
}

.rule-thick { border-top: 2px solid var(--ink); }

/* ===== Top nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 11px;
}
.brand-name { font-weight: 600; letter-spacing: 0.18em; }
.brand-sub { color: var(--muted); font-size: 11px; }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: 24px;
  font-size: 14px;
  font-family: var(--f-mono);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.nav-links a { position: relative; padding: 6px 0; color: var(--ink-2); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::before {
  content: "";
  position: absolute;
  left: -14px; top: 50%;
  width: 6px; height: 6px;
  background: var(--accent);
  transform: translateY(-50%);
}

.nav-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}
.nav-meta .dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: transform 120ms ease, background 160ms ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); box-shadow: 4px 4px 0 var(--accent); }
.btn .arr { font-family: var(--f-mono); }

/* ===== Section primitives ===== */
.section {
  padding: clamp(60px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}
.section-eyebrow .num { color: var(--ink); }
.section-eyebrow .bar {
  flex: 0 0 24px;
  height: 1px;
  background: var(--ink);
}

.h-display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.h-display em {
  font-style: italic;
  color: var(--accent-deep);
}
.h-section {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

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

/* ===== Reveal animation (CSS only) ===== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(.2,.6,.2,1) forwards;
}
.reveal.d1 { animation-delay: 80ms; }
.reveal.d2 { animation-delay: 180ms; }
.reveal.d3 { animation-delay: 280ms; }
.reveal.d4 { animation-delay: 380ms; }
.reveal.d5 { animation-delay: 480ms; }
.reveal.d6 { animation-delay: 580ms; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* IntersectionObserver-driven reveal */
.io-rise { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.io-rise.is-in { opacity: 1; transform: translateY(0); }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--bg);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 60%, transparent); margin-bottom: 18px; }
.footer ul { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.footer ul a { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.footer ul a:hover { color: var(--accent); }
.footer-brand { max-width: 320px; }
.footer-brand p { color: color-mix(in srgb, var(--bg) 60%, transparent); font-size: 14px; line-height: 1.55; margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 12px;
  color: color-mix(in srgb, var(--bg) 50%, transparent);
}

/* ===== Cards / tiles ===== */
.tile {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 28px;
  position: relative;
  transition: background 200ms ease, border-color 200ms ease;
}
.tile:hover { border-color: var(--ink); background: var(--bg-alt); }
.tile .tag {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ASCII corner ornaments */
.ascii-frame {
  position: relative;
}
.ascii-frame::before, .ascii-frame::after,
.ascii-frame > .corner-tr, .ascii-frame > .corner-br {
  content: "+";
  position: absolute;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}
.ascii-frame::before { top: -6px; left: -6px; }
.ascii-frame::after { bottom: -6px; left: -6px; }
.ascii-frame > .corner-tr { top: -6px; right: -6px; }
.ascii-frame > .corner-br { bottom: -6px; right: -6px; }

/* ===== Tweaks panel placement (we'll use the starter) ===== */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
}
