/* ============================================================
   The Peptide Addict — Dark, premium, institutional
   Bloomberg terminal meets Examine.com
   ============================================================ */

:root {
  --bg:             #0D0D0D;
  --bg-elevated:    #141418;
  --bg-card:        #16161A;
  --border:         rgba(232, 230, 225, 0.08);
  --border-strong:  rgba(232, 230, 225, 0.15);

  --text:           #E8E6E1;
  --text-muted:     #9A9793;
  --text-dim:       #6B6864;

  --accent:         #4A9E8E;
  --accent-dim:     rgba(74, 158, 142, 0.15);
  --accent-border:  rgba(74, 158, 142, 0.3);

  --warn:           #D4AA5A;
  --danger:         #C85A5A;

  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif:     'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --max-w:          720px;
  --max-w-wide:     1100px;
}

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

html {
  background: var(--bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 158, 142, 0.3);
  transition: border-color 140ms ease, color 140ms ease;
}
a:hover {
  color: #6BB8A8;
  border-bottom-color: var(--accent);
}
a.plain { border: none; }
a.plain:hover { border: none; color: #6BB8A8; }

/* ── Typography ─────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: 40px; line-height: 1.15; margin-bottom: 16px; }
h2 { font-size: 28px; line-height: 1.25; margin: 48px 0 16px; }
h3 { font-size: 22px; line-height: 1.3; margin: 32px 0 12px; }
h4 { font-size: 18px; line-height: 1.35; margin: 24px 0 10px; font-family: var(--font-sans); font-weight: 600; }

p { margin-bottom: 20px; }
p + h2, ul + h2, ol + h2, blockquote + h2 { margin-top: 48px; }

ul, ol { margin: 0 0 20px 0; padding-left: 24px; }
li { margin-bottom: 6px; }
li p { margin-bottom: 8px; }

strong { color: var(--text); font-weight: 600; }
em { font-style: italic; color: var(--text); }

blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ── Header / nav ───────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  border: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--text-muted);
  border: none;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--accent); }

/* ── Layout wrappers ────────────────────────────────────── */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 96px 24px 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero__brand {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 12px;
}
.hero__subhead {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 24px;
}
.hero__tagline {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}
.hero__cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  border-radius: 4px;
  border: none;
  letter-spacing: 0.01em;
  transition: background 140ms ease, transform 140ms ease;
}
.hero__cta:hover {
  background: #5DB0A0;
  color: var(--bg);
  border: none;
  transform: translateY(-1px);
}

/* ── Page header (article title) ────────────────────────── */

.page-header {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-header__kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.page-header h1 {
  font-size: 44px;
  line-height: 1.12;
  margin-bottom: 16px;
}
.page-header__dek {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 620px;
}

article {
  padding-bottom: 80px;
}

/* ── Scorecard ──────────────────────────────────────────── */

.scorecard {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 28px 32px;
  margin: 40px 0;
}
.scorecard__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.scorecard__badge {
  padding: 2px 8px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.scorecard__row {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.scorecard__row:last-child { border-bottom: none; }

.scorecard__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.scorecard__bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  height: 8px;
}
.scorecard__cell {
  background: var(--bg-elevated);
  border-radius: 1px;
}
.scorecard__cell.filled { background: var(--accent); }
.scorecard__cell.filled.warn { background: var(--warn); }
.scorecard__cell.filled.danger { background: var(--danger); }

.scorecard__value {
  font-size: 12px;
  color: var(--text);
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Article grid (home page) ───────────────────────────── */

.section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin: 80px 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 28px 24px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.card a { border: none; color: var(--text); }
.card a:hover { color: var(--accent); border: none; }

.card__kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.card__title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}
.card__dek {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Newsletter block ───────────────────────────────────── */

.newsletter {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 40px 32px;
  margin: 64px 0;
  text-align: center;
}
.newsletter__title {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 10px;
}
.newsletter__dek {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.newsletter__form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter__input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 140ms ease;
}
.newsletter__input:focus {
  border-color: var(--accent);
}
.newsletter__btn {
  padding: 12px 22px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 140ms ease;
}
.newsletter__btn:hover {
  background: #5DB0A0;
}
.newsletter__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscribe-error {
  margin-top: 14px;
  font-size: 13px;
  color: var(--danger);
}
.subscribe-success {
  padding: 12px 0 4px;
}
.subscribe-success__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.subscribe-success__body {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 0;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 56px;
  margin-top: 80px;
}
.site-footer__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.site-footer__brand {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.site-footer__tag {
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 16px;
}
.site-footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
}
.site-footer__links a {
  color: var(--text-muted);
  border: none;
}
.site-footer__links a:hover { color: var(--text); }
.site-footer__copy {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 20px;
}

/* ── Utility ────────────────────────────────────────────── */

.kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}

.callout {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 32px 0;
  border-radius: 0 4px 4px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .hero { padding: 64px 24px 48px; }
  .hero__brand { font-size: 44px; }
  .hero__subhead { font-size: 18px; }
  .hero__tagline { font-size: 16px; }
  .page-header { padding: 40px 0 24px; }
  .page-header h1 { font-size: 32px; }
  .page-header__dek { font-size: 17px; }
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-nav { gap: 16px; font-size: 13px; }
  .scorecard { padding: 20px 20px; }
  .scorecard__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .scorecard__value { text-align: left; }
  .newsletter__form { flex-direction: column; }
}
