/* ═══════════════════════════════════════════════════════════════
   GENESIS GENOME — Design System (Brand Bible V2 Compliant)
   genome.myday7.com
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  --navy: #0A1628;
  --deep-navy: #0F1D35;
  --mid-blue: #1A3A5C;
  --teal-start: #1A5276;
  --teal-mid: #2E86C1;
  --teal-end: #1ABC9C;
  --teal-light: #48C9B0;
  --vermillion: #D94825;
  --byzantium: #702963;
  --gold: #D4A740;
  --gold-light: #E8C36A;
  --cream: #FAF8F4;
  --warm: #F5F0E8;
  --text: #2A2A2A;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;
  --space-4xl: 120px;
  --space-5xl: 160px;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-nav: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--navy);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.12;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h4 { font-size: 1.5rem; }

p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 68ch;
}

.label, .category-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--gold);
}

blockquote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  border-left: 3px solid var(--gold);
  padding-left: var(--space-md);
  margin: var(--space-xl) 0;
}

/* ─── Genesis Wordmark ──────────────────────────────────────── */
.genesis-word {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 2.6rem;
  background: linear-gradient(135deg, var(--teal-start), var(--teal-mid), var(--teal-end), var(--teal-light));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: genesis-gradient 6s ease infinite;
}

.genesis-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--vermillion);
  filter: brightness(1.15);
}

@keyframes genesis-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 167, 64, 0.2);
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  padding: var(--space-xs) var(--space-xl);
  background: rgba(10, 22, 40, 0.95);
  box-shadow: var(--shadow-nav);
  border-bottom-color: rgba(212, 167, 64, 0.4);
}

.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-brand .genesis-word { font-size: 1.6rem; }
.nav-brand .genesis-tagline { font-size: 0.68rem; letter-spacing: 2.5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover { color: #fff; }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
  padding: clamp(80px, 12vw, 160px) var(--space-xl);
  position: relative;
}

.section-dark {
  background: var(--navy);
  color: #fff;
}

.section-dark p { color: rgba(255, 255, 255, 0.8); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-cream { background: var(--cream); color: var(--text); }
.section-warm { background: var(--warm); color: var(--text); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-title { margin-bottom: 16px; }

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 56px;
  max-width: 60ch;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(26, 82, 118, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(26, 188, 156, 0.04) 0%, transparent 50%);
  animation: hero-glow 20s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.05); }
}

.hero-content { position: relative; z-index: 2; }

.hero h1 { color: #fff; margin-bottom: var(--space-sm); }

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-3xl);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  max-width: 900px;
}

.hero-stat { text-align: center; padding: var(--space-md); }
.hero-stat .stat-number { display: block; margin-bottom: 4px; }

.hero-stat .stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card-light {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-title {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.card-description {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-link {
  display: block;
  height: 100%;
}

.card-gene-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal-end);
  margin-top: var(--space-sm);
  letter-spacing: 1px;
}

/* ─── Tables ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  margin: var(--space-xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.section-dark table {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.section-dark th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.section-dark td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
}

.section-dark tr:last-child td { border-bottom: none; }

.section-cream table, .section-warm table {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.section-cream th, .section-warm th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid-blue);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
}

.section-cream td, .section-warm td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.section-cream tr:last-child td,
.section-warm tr:last-child td { border-bottom: none; }

td.highlight { color: var(--gold); font-weight: 500; }
td.genesis-col { color: var(--teal-end); font-weight: 500; }

/* ─── Callout Boxes ─────────────────────────────────────────── */
.callout {
  border-radius: 14px;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  border-left: 4px solid;
  box-shadow: var(--shadow-card);
}

.callout-gold {
  background: linear-gradient(135deg, rgba(212, 167, 64, 0.08) 0%, rgba(212, 167, 64, 0.02) 100%);
  border-left-color: var(--gold);
}

.callout-vermillion {
  background: linear-gradient(135deg, rgba(217, 72, 37, 0.08) 0%, rgba(217, 72, 37, 0.02) 100%);
  border-left-color: var(--vermillion);
}

.callout-blue {
  background: linear-gradient(135deg, rgba(46, 134, 193, 0.08) 0%, rgba(46, 134, 193, 0.02) 100%);
  border-left-color: var(--teal-mid);
}

.callout-green {
  background: linear-gradient(135deg, rgba(26, 188, 156, 0.08) 0%, rgba(26, 188, 156, 0.02) 100%);
  border-left-color: var(--teal-end);
}

/* ─── Gold Divider ──────────────────────────────────────────── */
.divider-gold {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: var(--space-xl) 0;
  border: none;
}

.divider-gold-center { margin-left: auto; margin-right: auto; }

.tier-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  width: 100%;
}

/* ─── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }
.reveal-delay-8 { transition-delay: 0.8s; }

.reveal-fade { opacity: 0; transition: opacity 1s var(--ease-out); }
.reveal-fade.visible { opacity: 1; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ─── Side Dot Navigation ───────────────────────────────────── */
.side-dots {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.side-dot:hover {
  background: rgba(212, 167, 64, 0.5);
  border-color: var(--gold);
  transform: scale(1.3);
}

.side-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.2);
}

.side-dot::before {
  content: attr(data-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.side-dot:hover::before { opacity: 1; }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand { margin-bottom: var(--space-lg); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
}

/* ─── Utility Classes ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-gold { color: var(--gold); }
.text-teal { color: var(--teal-end); }
.text-vermillion { color: var(--vermillion); filter: brightness(1.15); }
.text-muted { opacity: 0.6; }
.text-white { color: #fff; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.max-w-narrow { max-width: 680px; }
.max-w-medium { max-width: 860px; }
.max-w-wide { max-width: 1200px; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .side-dots { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.98);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid rgba(212, 167, 64, 0.2);
  }

  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-3xl) var(--space-md); }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .hero { padding: var(--space-3xl) var(--space-sm); }
  .hero-subtitle { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
  .nav { padding: var(--space-xs) var(--space-sm); }
}

/* ─── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .genesis-word { animation: none; }
  .hero::before { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
