/* OldSpark — shared blueprint/workshop design system */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&family=Marcellus&display=swap');

/* ─── Tokens (defaults; tweaks override via inline style on <html>) ──────── */
:root {
  /* Blueprint palette (default) */
  --paper: #f1e9d6;
  --paper-2: #ede4cd;
  --paper-3: #e6dcc0;
  --ink: #1a1410;
  --ink-2: #2c241c;
  --ink-soft: #574a3c;
  --ink-faint: rgba(26, 20, 16, 0.42);
  --line: rgba(26, 20, 16, 0.18);
  --line-strong: rgba(26, 20, 16, 0.55);
  --accent: #8a3a1c;       /* oxide red */
  --accent-2: #6b4423;     /* sepia */
  --highlight: #c9a44a;    /* brass */

  --grid-spacing: 32px;
  --grid-color: rgba(26, 20, 16, 0.07);

  /* Type */
  --font-display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "Spectral", Georgia, serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --font-caps: "Marcellus", "Cormorant Garamond", Georgia, serif;

  --measure: 64ch;
  --radius: 2px;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper texture + blueprint grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-spacing) var(--grid-spacing);
  opacity: 0.85;
  mask-image: radial-gradient(ellipse at center, black 0%, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, black 60%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(0,0,0,0.04), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(0,0,0,0.05), transparent 45%),
    repeating-radial-gradient(circle at 50% 50%, rgba(89,69,40,0.025) 0, rgba(89,69,40,0.025) 1px, transparent 1px, transparent 3px);
}

main, header, footer, section { position: relative; z-index: 1; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 4.5vw, 64px); }
h3 { font-size: clamp(24px, 2.4vw, 34px); }
h4 { font-size: 22px; letter-spacing: 0; }

p { margin: 0; }

.lede {
  font-family: var(--font-body);
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--line-strong);
}

.eyebrow.no-rule::before { display: none; }

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

.caps {
  font-family: var(--font-caps);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Layout primitives ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section--tight { padding: 72px 0; }

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

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
  position: relative;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn--accent:hover { box-shadow: 3px 3px 0 var(--accent); }

.btn .arrow {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  position: relative;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

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

.card .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.card .corner.tl { top: -1px; left: -1px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.card .corner.tr { top: -1px; right: -1px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.card .corner.bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.card .corner.br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--ink); border-right: 1px solid var(--ink); }

/* Registration crosshair marks — for hero/section corners */
.crosshair {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 2;
}
.crosshair::before, .crosshair::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}
.crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-0.5px); }
.crosshair::after { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-0.5px); }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 24px;
}

.nav-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-mark .dot {
  width: 8px; height: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.nav-mark.is-active .dot { background: var(--ink); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 120ms ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-switch {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}
.nav-switch a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink-soft);
  border-radius: 999px;
}
.nav-switch a.active {
  background: var(--ink);
  color: var(--paper);
}

/* ─── Tech labels & spec sheets ──────────────────────────────────────────── */
.spec-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--ink-soft); letter-spacing: 0.1em; text-transform: uppercase; }
.spec-row .v { color: var(--ink); font-weight: 500; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line-strong);
  padding: 64px 0 32px;
  margin-top: 80px;
  background: var(--paper-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.flex { display: flex; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 14px 24px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}
