/* shared.css — design tokens and components shared across all Lethe pages */

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

:root {
  --bg:       #080b0f;
  --bg2:      #0d1118;
  --bg3:      #111820;
  --border:   #1e2a38;
  --border2:  #253040;
  --dim:      #2e4055;
  --muted:    #4a6480;
  --subtle:   #6b8aaa;
  --body:     #8fafc8;
  --bright:   #c4daf0;
  --white:    #e8f2fa;
  --accent:   #3d9be9;
  --accent2:  #1a6fb5;
  --glow:     rgba(61,155,233,0.12);
  --glow2:    rgba(61,155,233,0.04);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

nav.scrolled {
  border-color: var(--border);
  background: rgba(8,11,15,0.9);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: 'Cormorant', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.nav-logo-mark::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent2);
  padding: 8px 18px;
  border-radius: 2px;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--glow); }

/* ── PAGE HEADER ── */
.page-header {
  position: relative;
  z-index: 1;
  padding: 120px 48px 64px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.page-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

h1 {
  font-family: 'Cormorant', serif;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 300;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h1 em { font-style: italic; color: var(--accent); }

.page-lead {
  font-family: 'Cormorant', serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--subtle);
  max-width: 640px;
  line-height: 1.5;
}

/* ── TYPOGRAPHY ── */
h2 {
  font-family: 'Cormorant', serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 em { font-style: italic; color: var(--accent); }

h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

h4 {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

p {
  font-family: 'Cormorant', serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--subtle);
  line-height: 1.65;
  margin-bottom: 16px;
}

p:last-child { margin-bottom: 0; }

/* ── CODE ── */
code, pre {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  background: var(--bg3);
  color: var(--bright);
}

code {
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--border);
  font-size: 12px;
}

pre {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow-x: auto;
  line-height: 1.7;
  margin-bottom: 24px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
}

.code-comment { color: var(--dim); }
.code-key     { color: var(--accent); }
.code-val     { color: var(--bright); }
.code-fn      { color: #7dd3fc; }
.code-str     { color: #86efac; }
.code-num     { color: #fbbf24; }

/* ── SECTION TAG ── */
.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-tag::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent);
}

/* ── BUTTONS ── */
.btn-primary {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 12px 28px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: #5aaef0; transform: translateY(-1px); }

.btn-secondary {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bright);
  background: transparent;
  border: 1px solid var(--border2);
  padding: 12px 28px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-secondary:hover { border-color: var(--subtle); color: var(--white); transform: translateY(-1px); }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: 'Cormorant', serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--subtle);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--subtle); }

.footer-note {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .page-header { padding: 100px 24px 48px; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
