/* ─────────────────────────────────────────
   APEX BIOME — Custom Theme
   Science-journal aesthetic, editorial premium
   Fonts: Cormorant Garamond + DM Sans
   Palette: deep forest, warm cream, muted gold
   ───────────────────────────────────────── */

:root {
  --bg:         #0e100f;
  --bg-surface: #131714;
  --bg-card:    #161b17;
  --green:      #1a3a2a;
  --green-mid:  #243d2e;
  --cream:      #f5f0e8;
  --cream-dim:  #b8b0a2;
  --cream-mute: #7a7369;
  --gold:       #c9a84c;
  --gold-dim:   #8a7033;
  --border:     rgba(201,168,76,0.12);
  --border-med: rgba(201,168,76,0.25);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,16,15,0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo {
  font-size: 1.1rem;
  color: var(--gold);
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.nav-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-mute);
  font-weight: 400;
}

/* ── Hero ── */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 2.5rem var(--space-lg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(26,58,42,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(201,168,76,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.hero-headline em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--cream-dim);
  max-width: 480px;
  line-height: 1.8;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.biomolecule {
  width: 100%;
  max-width: 380px;
  opacity: 0.9;
}

.biomolecule svg {
  width: 100%;
  height: auto;
  animation: slowRotate 40s linear infinite;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ── Section Commons ── */
.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.section-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 2rem;
}

.section-headline em {
  font-style: italic;
  color: var(--gold);
}

/* ── Philosophy ── */
.philosophy {
  padding: var(--space-xl) 2.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.philosophy-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.philosophy-body {
  max-width: 780px;
  margin-bottom: var(--space-lg);
}

.philosophy-body p {
  font-size: 1.05rem;
  color: var(--cream-dim);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.philosophy-body p em {
  font-style: italic;
  color: var(--cream);
}

.philosophy-body p:last-child { margin-bottom: 0; }

.stat-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--cream-mute);
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.stat-divider {
  width: 1px;
  background: var(--border-med);
  margin: 0 var(--space-md);
}

/* ── Principles ── */
.principles {
  padding: var(--space-xl) 2.5rem;
  border-bottom: 1px solid var(--border);
}

.principles-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.principles-headline {
  margin-bottom: var(--space-lg);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.principle-card {
  background: var(--bg);
  padding: var(--space-md) 2rem var(--space-md);
  transition: background 0.3s ease;
}

.principle-card:hover {
  background: var(--bg-card);
}

.principle-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--border-med);
  margin-bottom: 1rem;
  line-height: 1;
}

.principle-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.85rem;
  letter-spacing: 0.01em;
}

.principle-body {
  font-size: 0.88rem;
  color: var(--cream-mute);
  line-height: 1.75;
}

/* ── Approach ── */
.approach {
  padding: var(--space-xl) 2.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.approach-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.category-list {
  border-top: 1px solid var(--border);
  margin-top: var(--space-md);
}

.category-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.category-row:hover {
  background: rgba(201,168,76,0.03);
}

.category-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--cream);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.category-desc {
  font-size: 0.9rem;
  color: var(--cream-mute);
  line-height: 1.7;
  align-self: center;
  max-width: 540px;
}

/* ── Closing ── */
.closing {
  padding: var(--space-xl) 2.5rem;
  border-bottom: 1px solid var(--border);
}

.closing-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.closing-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.closing-sub {
  font-size: 1rem;
  color: var(--cream-mute);
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.closing-footer-line {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
}

.closing-rule {
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: var(--border-med);
}

.closing-meta {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-mute);
  white-space: nowrap;
}

/* ── Footer ── */
.footer {
  padding: var(--space-lg) 2.5rem var(--space-md);
  background: var(--bg);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-size: 1rem;
  color: var(--gold);
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
}

.footer-disclaimer {
  font-size: 0.72rem;
  color: var(--cream-mute);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.68rem;
  color: var(--cream-mute);
  opacity: 0.6;
}

/* ── Newsletter ── */
.newsletter {
  padding: var(--space-xl) 2.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.newsletter-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.newsletter-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.newsletter-headline em {
  font-style: italic;
  color: var(--gold);
}

.newsletter-sub {
  font-size: 0.95rem;
  color: var(--cream-dim);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto 1rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-med);
  border-right: none;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.75rem 1.25rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--cream-mute);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--gold-dim);
}

.newsletter-form button {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover:not(:disabled) {
  background: var(--cream);
  border-color: var(--cream);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-error {
  font-size: 0.82rem;
  color: #e07070;
  margin-bottom: 1rem;
  text-align: center;
}

.newsletter-success {
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.newsletter-success-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--cream);
  line-height: 1.6;
}

.newsletter-success-text em {
  color: var(--gold);
  font-style: italic;
}

.newsletter-disclaimer {
  font-size: 0.72rem;
  color: var(--cream-mute);
  letter-spacing: 0.05em;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-tagline { display: none; }

  .hero { padding: var(--space-lg) 1.5rem var(--space-md); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .hero-visual { order: -1; }
  .biomolecule { max-width: 260px; margin: 0 auto; }
  .hero-scroll-cue { display: none; }

  .philosophy, .principles, .approach, .closing { padding: var(--space-lg) 1.5rem; }

  .principle-grid { grid-template-columns: 1fr; }
  .stat-row { flex-direction: column; gap: 1.5rem; }
  .stat-divider { display: none; }

  .category-row { grid-template-columns: 1fr; gap: 0.5rem; }

  .closing-footer-line { flex-direction: column; gap: 0.75rem; }
  .closing-rule { display: none; }
}

/* ── Animations ── */
@media (prefers-reduced-motion: no-preference) {
  .biomolecule svg { animation: slowRotate 40s linear infinite; }
  .scroll-line { animation: scrollPulse 2s ease-in-out infinite; }
}
