/* ============================================
   EVOLVING LONGEVITY — Design System
   Deep Charcoal + Chrome/Silver + Warm Gold
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette */
  --bg-deep: #0A0A0A;
  --bg-card: #111111;
  --bg-elevated: #1A1A1A;
  --bg-surface: #141414;
  
  /* Chrome / Silver */
  --chrome-light: #E8E8E8;
  --chrome-mid: #B0B0B0;
  --chrome-dark: #707070;
  --chrome-gradient: linear-gradient(135deg, #E8E8E8 0%, #B0B0B0 40%, #707070 70%, #E8E8E8 100%);
  --chrome-text: linear-gradient(135deg, #FFFFFF 0%, #C0C0C0 50%, #FFFFFF 100%);
  --chrome-shine: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  
  /* Warm Gold */
  --gold: #D4A853;
  --gold-light: #E8C97A;
  --gold-dim: #A07D3A;
  --gold-glow: rgba(212, 168, 83, 0.15);
  --gold-gradient: linear-gradient(135deg, #E8C97A 0%, #D4A853 40%, #A07D3A 70%, #D4A853 100%);
  
  /* Text */
  --text-primary: #E8E8E8;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-dim: #444444;
  
  /* Status */
  --green: #4ADE80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --yellow: #FACC15;
  --red: #F87171;
  --blue: #60A5FA;
  --purple: #A78BFA;
  --cyan: #22D3EE;
  
  /* Borders */
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --border-gold: rgba(212, 168, 83, 0.3);
  
  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  
  /* Layout */
  --max-width: 1100px;
  --content-width: 760px;
}

/* ============ RESET & BASE ============ */

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  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;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

::selection {
  background: var(--gold);
  color: var(--bg-deep);
}

/* ============ LAYOUT ============ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(20px, 4vw, 48px);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-mark {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-glow);
}

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

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  font-size: 12px !important;
  padding: 8px 20px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  color: var(--gold) !important;
  transition: all 0.3s !important;
}

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ============ HERO ============ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 64px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

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

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold-gradient);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
  max-width: 700px;
}

.hero-title em {
  font-style: italic;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  background: var(--chrome-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============ SECTION STYLING ============ */

section {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
  margin: 0;
  border: none;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  line-height: 1.2;
}

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

/* ============ CARDS ============ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Chrome shine sweep on hover */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0;
  width: 100%;
  background: var(--chrome-shine);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover::after {
  left: 100%;
}

.card-gold {
  border-color: var(--border-gold);
}

.card-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold-gradient);
}

/* ============ STAT BLOCKS ============ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.stat-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--stat-accent, var(--chrome-mid));
}

.stat-block .stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-block .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  background: var(--chrome-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-block .stat-sub {
  font-size: 11px;
  color: var(--stat-accent, var(--text-muted));
  font-weight: 500;
  margin-top: 2px;
}

/* Accent variations */
.stat-block[data-accent="gold"] { --stat-accent: var(--gold); }
.stat-block[data-accent="green"] { --stat-accent: var(--green); }
.stat-block[data-accent="blue"] { --stat-accent: var(--blue); }
.stat-block[data-accent="purple"] { --stat-accent: var(--purple); }
.stat-block[data-accent="cyan"] { --stat-accent: var(--cyan); }
.stat-block[data-accent="red"] { --stat-accent: var(--red); }
.stat-block[data-accent="yellow"] { --stat-accent: var(--yellow); }

/* ============ ARTICLE CARDS ============ */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.article-card-image {
  width: 100%;
  height: 200px;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.article-card-image .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--gold);
  padding: 4px 10px;
  border-radius: 3px;
}

.article-card-body {
  padding: 24px;
}

.article-card-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 8px;
}

.article-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.article-card-meta .read-time {
  color: var(--gold-dim);
}

/* ============ CREDENTIAL BAR ============ */

.credential-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.credential-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold-gradient);
}

.credential-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.credential-item .cred-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.credential-item .cred-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ DASHBOARD SECTION ============ */

.dashboard-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.dashboard-tab {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.dashboard-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.dashboard-tab.active {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}

/* ============ PROGRESS BARS ============ */

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.progress-label {
  width: 110px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 1s ease;
}

.progress-bar-fill.red { background: var(--red); }
.progress-bar-fill.gold { background: var(--gold); }

.progress-value {
  width: 70px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

.progress-value.red { color: var(--red); }

/* ============ ARTICLE CONTENT ============ */

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 120px;
}

.article-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.article-content .article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content blockquote {
  border-left: 2px solid var(--gold);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 14px;
}

.article-content th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border-gold);
  background: var(--bg-surface);
}

.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-content td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

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

.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: var(--space-2xl);
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

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

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* ============ CTA SECTION ============ */

.cta-section {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  margin-bottom: var(--space-md);
}

.cta-input-group {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: var(--space-lg) auto 0;
}

.cta-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.cta-input:focus { border-color: var(--gold-dim); }

.cta-input::placeholder { color: var(--text-dim); }

.btn-gold {
  padding: 12px 28px;
  background: var(--gold);
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-outline {
  padding: 12px 28px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

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

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.fade-up {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.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; }

.chrome-shimmer {
  background: linear-gradient(90deg, var(--chrome-dark) 0%, var(--chrome-light) 50%, var(--chrome-dark) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: rgba(10, 10, 10, 0.98);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  
  .hero-stats { gap: var(--space-lg); }
  .hero-stat-value { font-size: 22px; }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .credential-bar {
    justify-content: center;
    text-align: center;
  }
  
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; gap: 8px; }
  
  .cta-input-group { flex-direction: column; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 32px; }
}
