/* ==========================================================================
   nadvsnmn.com — Longevity Lab design system
   ========================================================================== */

:root {
  /* Palette */
  --bg: #0A0E1A;
  --bg-lift: #12172A;
  --bg-lift-2: #1A2038;
  --border: #1F2542;
  --border-strong: #2A3255;
  --text: #E8ECF5;
  --text-muted: #8B93A8;
  --text-dim: #5A627A;
  --mint: #00E5A0;
  --cyan: #4EE1FF;
  --warn: #FFC857;
  --danger: #FF6B6B;

  /* Type */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Max widths */
  --w-tight: 720px;
  --w-content: 960px;
  --w-wide: 1200px;
  --w-full: 1400px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a { color: var(--cyan); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--mint); }

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

h1 { font-size: clamp(2.75rem, 6vw, 5.5rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; font-weight: 500; }

p { margin-bottom: var(--sp-4); color: var(--text); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--mint);
  margin-bottom: var(--sp-4);
  display: inline-block;
}
.eyebrow.cyan { color: var(--cyan); }
.eyebrow.muted { color: var(--text-muted); }

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
}

.mono { font-family: var(--font-mono); font-size: 0.9em; }

.vs {
  font-family: var(--font-mono);
  font-size: 0.65em;
  color: var(--cyan);
  text-transform: lowercase;
  font-weight: 500;
  padding: 0 0.35em;
  vertical-align: 0.15em;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.container.tight { max-width: var(--w-tight); }
.container.content { max-width: var(--w-content); }
.container.full { max-width: var(--w-full); }

.section { padding: var(--sp-9) 0; }
.section.tight { padding: var(--sp-8) 0; }
.section.hero { padding: 0; }

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }
.brand .vs { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: var(--sp-6);
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--mint);
  color: var(--bg) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
}
.nav-cta:hover { background: var(--cyan); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-lift);
    padding: var(--sp-5);
    gap: var(--sp-4);
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  padding: var(--sp-9) 0 var(--sp-8);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero-vials.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 20%, rgba(10, 14, 26, 0.7) 65%, var(--bg) 100%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.4) 0%, transparent 40%, rgba(10, 14, 26, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.hero h1 {
  margin-bottom: var(--sp-5);
  font-style: italic;
  font-weight: 300;
}

.hero h1 .accent-mint {
  color: var(--mint);
  font-style: normal;
  font-weight: 500;
}
.hero h1 .accent-cyan {
  color: var(--cyan);
  font-style: normal;
  font-weight: 500;
}
.hero h1 .vs {
  font-family: var(--font-mono);
  font-size: 0.35em;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 400;
  vertical-align: 0.75em;
  padding: 0 0.5em;
  letter-spacing: 0.2em;
}

.hero .lede {
  margin: 0 auto var(--sp-6);
  max-width: 620px;
  font-size: 1.2rem;
  color: var(--text);
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  letter-spacing: 0.005em;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--mint);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--cyan);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.btn-arrow::after {
  content: '→';
  font-family: var(--font-mono);
  transition: transform 0.15s ease;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   Data strip (under hero)
   ========================================================================== */

.data-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-lift);
  padding: var(--sp-6) 0;
}

.data-strip .grid-4 {
  gap: var(--sp-5);
}

.stat {
  text-align: center;
  padding: var(--sp-3);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--mint);
  line-height: 1;
  margin-bottom: var(--sp-2);
  display: block;
}

.stat-num.cyan { color: var(--cyan); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ==========================================================================
   Section headers
   ========================================================================== */

.section-head {
  margin-bottom: var(--sp-8);
  max-width: 720px;
}

.section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-head h2 {
  margin-bottom: var(--sp-4);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img img { transform: scale(1.03); }

.card-body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: var(--sp-3);
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: var(--sp-3);
  line-height: 1.2;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--sp-4);
  flex: 1;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.card-link::after { content: ' →'; transition: margin 0.15s ease; }
.card-link:hover::after { margin-left: 4px; }

/* ==========================================================================
   Format grid (special layout for /formats/)
   ========================================================================== */

.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.format-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-lift);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-6);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.format-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  z-index: 0;
  transition: transform 0.5s ease;
}

.format-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 26, 0.95) 100%);
  z-index: 1;
}

.format-card > * { position: relative; z-index: 2; }

.format-card:hover { border-color: var(--mint); transform: translateY(-3px); color: var(--text); }
.format-card:hover::before { transform: scale(1.05); }

.format-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: var(--sp-2);
}

.format-card h3 {
  font-size: 1.6rem;
  margin-bottom: var(--sp-3);
  font-weight: 500;
}

.format-card p {
  font-size: 0.92rem;
  color: rgba(232, 236, 245, 0.8);
  margin-bottom: 0;
}

.fc-oral::before { background-image: url('/images/oral-hero.jpg'); }
.fc-sublingual::before { background-image: url('/images/sublingual-hero.jpg'); }
.fc-iv::before { background-image: url('/images/iv-hero.jpg'); }
.fc-injectable::before { background-image: url('/images/injectable-hero.jpg'); }
.fc-nasal::before { background-image: url('/images/nasal-hero.jpg'); }
.fc-patch::before { background: linear-gradient(135deg, #12172A 0%, #1A2038 100%); }

/* ==========================================================================
   Comparison table (vs section)
   ========================================================================== */

.vs-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-6);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-lift);
}

.vs-side {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}

.vs-side.mint {
  border-right: 1px solid var(--border);
}

.vs-side.mint h3 { color: var(--mint); }
.vs-side.cyan h3 { color: var(--cyan); }

.vs-side h3 {
  font-size: 2rem;
  margin-bottom: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 500;
}

.vs-side .subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}

.vs-side dl { margin-top: auto; }
.vs-side dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: var(--sp-1);
}
.vs-side dd {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px dashed var(--border);
}
.vs-side dd:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  padding: 0 var(--sp-4);
}

@media (max-width: 768px) {
  .vs-block { grid-template-columns: 1fr; }
  .vs-side.mint { border-right: none; border-bottom: 1px solid var(--border); }
  .vs-divider { padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
}

/* ==========================================================================
   Content prose (for aux pages like about, privacy, terms)
   ========================================================================== */

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

.prose h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: var(--sp-5); }
.prose h2 { margin-top: var(--sp-8); margin-bottom: var(--sp-4); }
.prose h3 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.prose p { margin-bottom: var(--sp-4); font-size: 1.05rem; }
.prose ul, .prose ol { margin: 0 0 var(--sp-4) var(--sp-5); }
.prose li { margin-bottom: var(--sp-2); }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(78, 225, 255, 0.3); }
.prose a:hover { color: var(--mint); border-color: var(--mint); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--mint);
  padding: var(--sp-3) var(--sp-5);
  margin: var(--sp-5) 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-lift);
  border-radius: 0 6px 6px 0;
}

/* ==========================================================================
   Disclaimer / notice
   ========================================================================== */

.notice {
  background: var(--bg-lift);
  border-left: 3px solid var(--warn);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: var(--sp-5) 0;
}
.notice strong { color: var(--warn); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 0 var(--sp-6);
  margin-top: auto;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: var(--sp-3); }
.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--sp-2); }
.footer-col a {
  color: var(--text);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--mint); }

.footer-bottom {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-bottom .disclaimer {
  color: var(--text-dim);
  max-width: 780px;
  line-height: 1.5;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-mint { color: var(--mint); }
.text-cyan { color: var(--cyan); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 2px;
}
