/* ── SPiDR — Concept C: "Plotted" ──
   Influences: Observable, Posit, modern data tools.
   Subtle graph-paper texture, deep forest + warm gold.
   Inter Tight (body) + Instrument Serif italic (display) + JetBrains Mono (meta).
*/

:root {
  --paper:       #f7f5ef;
  --paper-2:     #ffffff;
  --paper-warm:  #f0ece0;
  --ink:         #16201c;
  --ink-2:       #41524a;
  --mute:        #86948c;
  --rule:        #d6d2c4;
  --rule-strong: #a8a08c;
  --accent:      #2e5e4e;   /* forest */
  --accent-d:    #20473b;
  --accent-2:    #c89a3a;   /* warm gold */
  --accent-2-d:  #a87d23;
  --accent-soft: #dfe7e1;
  --accent-warm: #f1e6c8;
  --danger:      #a4382b;

  --serif: "Instrument Serif", "Newsreader", Georgia, serif;
  --sans:  "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1240px;
  --pad-x: 48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg,  transparent 0 23px, rgba(168,160,140,.18) 23px 23.5px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(168,160,140,.18) 23px 23.5px),
    var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ─── Nav ─── */
nav.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 239, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
nav.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  color: var(--ink); letter-spacing: -0.005em;
}
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo-mark .mid { fill: var(--accent); }
.logo-mark .dot { fill: var(--accent-2); }
.logo-mark .ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.logo .tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 400;
  color: var(--mute); letter-spacing: 0.06em;
}
.nav-links {
  list-style: none; display: flex; gap: 28px; align-items: center;
}
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: var(--paper) !important;
  padding: 9px 16px; border-radius: 7px;
  font-size: 13px !important; font-weight: 500 !important;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-d); }
.nav-cta .arrow { color: var(--accent-2); }

/* ─── Sections ─── */
section { padding: 96px 0; position: relative; }
.section-label {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.section-label::before {
  content: ""; display: inline-block; width: 24px; height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08; letter-spacing: -0.028em;
  margin-bottom: 14px;
}
.section-title em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--accent);
  font-size: 1.12em; letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 16px; color: var(--ink-2);
  max-width: 620px; line-height: 1.65;
  margin-bottom: 48px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  padding: 13px 22px; border-radius: 8px;
  transition: background .15s, transform .12s, box-shadow .15s;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: var(--paper-2) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 16px -8px rgba(46,94,78,.5);
}
.btn-primary:hover { background: var(--accent-d); }
.btn-primary .arrow { color: var(--accent-2); }
.btn-outline {
  background: var(--paper-2); color: var(--ink) !important;
  border: 1px solid var(--rule);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost {
  background: transparent; color: var(--ink) !important;
  padding: 8px 0; border-radius: 0;
  border-bottom: 1.5px solid var(--ink);
}
.btn-ghost:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Page header (for inner pages) ─── */
.page-header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: 88px 0 72px;
  position: relative;
}
.page-header::after {
  /* hairline second border, like a printed page edge */
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -5px; height: 1px;
  background: var(--rule); opacity: .55;
}
.page-header .container {
  display: grid; grid-template-columns: 1fr auto; gap: 48px;
  align-items: end;
}
.page-header h1 {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.0; letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.page-header h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--accent);
  font-size: 1.18em; letter-spacing: -0.02em;
}
.page-header .lede {
  font-size: 17px; color: var(--ink-2);
  max-width: 560px; line-height: 1.6;
}
.page-header .meta {
  font-family: var(--mono); font-size: 11px; color: var(--mute);
  letter-spacing: 0.1em; text-transform: uppercase;
  text-align: right;
}
.page-header .meta strong {
  display: block; font-family: var(--serif); font-style: italic;
  font-weight: 400; color: var(--accent); font-size: 32px;
  letter-spacing: -0.01em; text-transform: none; margin-top: 6px;
}

/* ─── Footer ─── */
footer.site-footer {
  background: var(--ink); color: rgba(247, 245, 239, .65);
  padding: 56px 0 32px; font-size: 13px;
  border-top: 1px solid var(--rule);
  position: relative;
}
footer.site-footer .container {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  align-items: start;
}
footer.site-footer .brand .logo { color: var(--paper); }
footer.site-footer .brand .logo .tag { color: rgba(247,245,239,.5); }
footer.site-footer .brand p {
  font-family: var(--serif); font-style: italic; font-size: 17px;
  color: rgba(247,245,239,.8); margin-top: 14px;
  max-width: 280px; line-height: 1.5;
}
footer.site-footer h4 {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 16px; font-weight: 500;
}
footer.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer.site-footer a { color: rgba(247,245,239,.7); transition: color .15s; }
footer.site-footer a:hover { color: var(--paper); }
footer.site-footer .colophon {
  grid-column: 1 / -1; border-top: 1px solid rgba(247,245,239,.1);
  padding-top: 24px; margin-top: 24px;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: rgba(247,245,239,.45); flex-wrap: wrap;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .8s cubic-bezier(.2,.7,.3,1) both; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  :root { --pad-x: 24px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  section { padding: 64px 0; }
  .page-header { padding: 64px 0 48px; }
  .page-header .container { grid-template-columns: 1fr; }
  .page-header .meta { text-align: left; }
  footer.site-footer .container { grid-template-columns: 1fr 1fr; }
  footer.site-footer .brand { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  footer.site-footer .container { grid-template-columns: 1fr; }
}
