/*
 * EndoAge Atlas — welcome page styles
 * Translated from VoltAgent awesome-design-md / Stripe DESIGN.md (cached at
 *   2_shinyapp/_design_templates/_cache/stripe/DESIGN.md)
 *
 * Stripe is proprietary about its sohne-var typeface; we use Inter Variable
 * (Google Fonts) with feature-settings that approximate the geometric ss01
 * stylistic set, and keep weight 300 as the signature for headings and body.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Stripe palette */
  --color-bg:           #ffffff;
  --color-surface:      #ffffff;
  --color-surface-soft: #f6f9fc;
  --color-heading:      #061b31; /* deep navy, not black */
  --color-label:        #273951; /* dark slate */
  --color-body:         #64748d; /* slate */
  --color-border:       #e5edf5; /* soft blue */
  --color-border-soft:  #d6d9fc;
  --color-accent:       #533afd; /* Stripe purple */
  --color-accent-hover: #4434d4;
  --color-accent-soft:  #b9b9f9;
  --color-brand-dark:   #1c1e54; /* deep indigo, footer/dark sections */
  --color-ruby:         #ea2261;
  --color-magenta:      #f96bee;
  --color-success:      #15be53;
  --color-success-text: #108c3d;

  /* Shadows — Stripe's blue-tinted multi-layer system */
  --shadow-ambient:  rgba(23,23,23,0.06) 0px 3px 6px;
  --shadow-standard: rgba(23,23,23,0.08) 0px 15px 35px 0px;
  --shadow-elevated: rgba(50,50,93,0.25) 0px 30px 45px -30px,
                     rgba(0,0,0,0.10)    0px 18px 36px -18px;
  --shadow-deep:     rgba(3,3,39,0.25)   0px 14px 21px -14px,
                     rgba(0,0,0,0.10)    0px 8px 17px -8px;

  /* Spacing */
  --content-max: 1080px;
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont,
               system-ui, sans-serif;
  font-feature-settings: 'cv01','cv02','cv11','ss01';
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 400;
  transition: color 120ms ease;
}
a:hover { color: var(--color-accent-hover); }

h1, h2, h3, h4 {
  color: var(--color-heading);
  font-weight: 300;
  margin: 0 0 0.4em 0;
  letter-spacing: -0.01em;
}

code, .mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Source Code Pro', ui-monospace, monospace;
  font-weight: 500;
  font-size: 0.92em;
  color: var(--color-label);
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Top navbar
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-weight: 500;
  color: var(--color-heading);
  font-size: 16px;
  letter-spacing: -0.005em;
}
.brand-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-right: 10px;
  transform: translateY(-1px);
}
.nav-links { margin-left: auto; display: flex; gap: 22px; }
.nav-links a {
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 400;
}
.nav-links a:hover { color: var(--color-accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 96px 32px 56px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(83,58,253,0.08);
  border: 1px solid var(--color-border-soft);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 300;
  max-width: 820px;
  margin-bottom: 24px;
}
.hero-sub {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-body);
  font-weight: 300;
  margin-bottom: 36px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 400;
  font-size: 15px;
  border: 1px solid var(--color-accent);
  transition: background 120ms ease, transform 120ms ease;
}
.hero-cta:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}
.hero-cta .arrow { transition: transform 120ms ease; }
.hero-cta:hover .arrow { transform: translateX(2px); }
.hero-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 10px 18px;
  border: 1px solid var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-sm);
  font-weight: 400;
  font-size: 15px;
  transition: background 120ms ease;
}
.hero-cta-ghost:hover {
  background: rgba(83,58,253,0.05);
  color: var(--color-accent);
}

/* ============================================================
   Stat strip
   ============================================================ */
.stats {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 22px;
  box-shadow: var(--shadow-ambient);
}
.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 300;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum','ss01';
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--color-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 400;
}

/* ============================================================
   Section
   ============================================================ */
section { padding: 56px 0; }
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}
.section-eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section h2 {
  font-size: 32px;
  line-height: 1.10;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  max-width: 720px;
}
.section-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-body);
  max-width: 720px;
  margin-bottom: 40px;
}

/* ============================================================
   Tissue grid
   ============================================================ */
.tissues {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tcard {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
  text-decoration: none;
  color: inherit;
}
.tcard:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}
.tcard-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f6f9fc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.tcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tcard-thumb-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--color-body);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.tcard-body { padding: 18px 18px 16px; }
.tcard-tissue {
  display: block;
  font-size: 18px;
  font-weight: 400;
  color: var(--color-heading);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.tcard-meta {
  font-size: 13px;
  color: var(--color-body);
  font-feature-settings: 'tnum','ss01';
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tcard-meta span {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 8px;
}
.tcard-link {
  display: flex; align-items: center; gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-accent);
  font-weight: 400;
}
.tcard-link .arrow { transition: transform 120ms ease; }
.tcard:hover .tcard-link .arrow { transform: translateX(2px); }

/* ============================================================
   Methods / "What's inside"
   ============================================================ */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mcard {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.mcard-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(83,58,253,0.08);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 400;
}
.mcard h3 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--color-heading);
  letter-spacing: -0.01em;
}
.mcard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-body);
}

/* ============================================================
   Dark citation section
   ============================================================ */
.dark-section {
  background: var(--color-brand-dark);
  color: rgba(255,255,255,0.86);
  margin-top: 64px;
}
.dark-section .section-inner { padding: 64px 32px; }
.dark-section .section-eyebrow { color: var(--color-magenta); }
.dark-section h2 { color: #ffffff; }
.dark-section .section-lead { color: rgba(255,255,255,0.72); }
.cite-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Source Code Pro', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.86);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.authors {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  margin-top: 24px;
}
.author {
  font-size: 14px;
  color: rgba(255,255,255,0.86);
}
.author-name {
  display: block;
  color: #ffffff;
  font-weight: 400;
  margin-bottom: 2px;
}
.author-aff {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

footer.foot {
  background: var(--color-brand-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  padding: 22px 32px;
  text-align: center;
}
footer.foot a {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}
footer.foot a:hover { color: #ffffff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .tissues { grid-template-columns: repeat(2, 1fr); }
  .methods-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 24px 40px; }
  .hero h1 { font-size: 40px; letter-spacing: -0.02em; }
  .section-inner, .nav-inner { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 540px) {
  .tissues { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
}
