/* ============================================
   Cellenium — Shared Styles
   ============================================ */

:root {
  --bg: #0b0d0a;
  --bg-elev: #12150f;
  --bg-elev-2: #181b14;
  --line: #1e221a;
  --line-bright: #2c3126;
  --ink: #ecebe3;
  --ink-dim: #8d9082;
  --ink-faint: #565a4f;
  --accent: #d4ff3f;
  --accent-warm: #ff8a3d;
  --accent-cool: #87b8e8;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

/* Background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Subtle grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 13, 10, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.logo-mark {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.5px;
}
.logo-mark span { background: var(--accent); opacity: 0.35; }
.logo-mark span:nth-child(1),
.logo-mark span:nth-child(5),
.logo-mark span:nth-child(9) { opacity: 1; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 13px;
}
.nav-links a {
  color: var(--ink-dim);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--bg);
  background: var(--accent);
  padding: 9px 16px;
  transition: transform 0.15s, box-shadow 0.2s;
  font-weight: 500;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 24px 32px;
    gap: 18px;
  }
  .nav-links.open a { color: var(--ink); }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 22px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px var(--accent);
}
.btn-primary .arrow { transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 13px;
  transition: color 0.2s;
  padding: 14px 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.btn-secondary:hover { color: var(--ink); }
.btn-secondary .play {
  width: 28px; height: 28px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 18px;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   PAGE HEADER (non-home pages)
   ============================================ */

.page-header {
  padding: 180px 0 80px;
  border-bottom: 1px solid var(--line);
}

.page-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.page-header .eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.page-header h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 18ch;
}
.page-header h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.page-header .lede {
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 56ch;
  line-height: 1.7;
}

/* ============================================
   SECTIONS
   ============================================ */

.section { padding: 140px 0; }
.section-sm { padding: 80px 0; }

.section-header { margin-bottom: 80px; max-width: 720px; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.section-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--ink-dim); }

.section-desc { color: var(--ink-dim); font-size: 15px; max-width: 56ch; }

/* ============================================
   FOOTER
   ============================================ */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  margin-top: 80px;
}

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

.footer-grid-slim {
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-brand p {
  color: var(--ink-dim);
  font-size: 13px;
  margin-top: 18px;
  max-width: 32ch;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
  font-weight: 400;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  color: var(--ink-dim);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social { display: flex; gap: 16px; }
.footer-social a {
  color: var(--ink-faint);
  transition: color 0.2s;
  display: inline-flex;
}
.footer-social a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes faultPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes blink { 50% { opacity: 0; } }

.fade-up { opacity: 0; animation: fadeUp 0.9s ease forwards; }
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }
.fade-up-d5 { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
