/* The Peptide Review — editorial stylesheet */
:root {
  --ink: #121417;
  --ink-2: #1c1f24;
  --ink-3: #2a2e35;
  --ivory: #f6f2ea;
  --ivory-2: #ece6da;
  --paper: #fbf9f4;
  --gold: #c9a96e;
  --gold-2: #e9d5aa;
  --slate: #606872;
  --slate-2: #8a919a;
  --rule: rgba(18, 20, 23, 0.12);
  --rule-dark: rgba(246, 242, 234, 0.14);
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
p { margin: 0 0 1.2em; }

.wrap { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink-3);
}
.muted { color: var(--slate); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.gold-rule { width: 56px; height: 1px; background: var(--gold); margin: 1.4rem 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 242, 234, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 0.6rem;
}
.brand .mark {
  width: 28px; height: 28px; border: 1px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; color: var(--gold); font-family: var(--sans); font-weight: 700;
}
.nav { display: flex; gap: 2rem; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.nav a { padding: 0.4rem 0; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.9rem; font: inherit; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 760px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--ivory); flex-direction: column; gap: 0; padding: 0.5rem 1.5rem 1rem; border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; }
  .nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .nav-toggle { display: inline-block; }
}

/* ---------- Notice band ---------- */
.notice {
  background: var(--ink);
  color: var(--ivory-2);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.55rem 1rem;
}
.notice strong { color: var(--gold-2); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--ivory);
  overflow: hidden;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.78; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18,20,23,0.92) 0%, rgba(18,20,23,0.6) 45%, rgba(18,20,23,0.15) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(6rem, 14vw, 11rem) 0 clamp(4rem, 9vw, 7rem); }
.hero h1 { max-width: 14ch; color: var(--ivory); }
.hero .lede { color: rgba(246,242,234,0.78); max-width: 46ch; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--gold); color: var(--gold-2);
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--gold); color: var(--ink); }
.btn.dark { border-color: var(--ink); color: var(--ink); }
.btn.dark:hover { background: var(--ink); color: var(--ivory); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.section-head p { max-width: 52ch; margin: 0; }

.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.intro-grid img { border-radius: 4px; aspect-ratio: 3/2; object-fit: cover; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.pillar { background: var(--ivory); padding: 2.2rem 2rem; }
.pillar .num { font-family: var(--serif); font-size: 2.4rem; color: var(--gold); line-height: 1; margin-bottom: 1rem; }
.pillar h3 { font-size: 1.5rem; }
.pillar p { font-size: 0.98rem; color: var(--slate); margin: 0; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Article cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem 2rem; }
.card { display: flex; flex-direction: column; gap: 1rem; }
.card .thumb { overflow: hidden; border-radius: 4px; aspect-ratio: 3/2; background: var(--ink-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card h3 { font-size: 1.6rem; margin: 0.2rem 0 0.3rem; }
.card p { color: var(--slate); font-size: 0.98rem; margin: 0; }
.card .meta { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.card.feature { grid-column: span 3; display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.card.feature .thumb { aspect-ratio: 16/9; }
.card.feature h3 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } .card.feature { grid-column: span 2; grid-template-columns: 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } .card.feature { grid-column: span 1; } }

/* ---------- Dark band ---------- */
.band { background: var(--ink); color: var(--ivory); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding: clamp(4rem, 8vw, 7rem) 0; }
.band h2 { color: var(--ivory); }
.band p { color: rgba(246,242,234,0.72); }
.band img { border-radius: 4px; aspect-ratio: 3/2; object-fit: cover; }
@media (max-width: 860px) { .band .wrap { grid-template-columns: 1fr; } }

/* ---------- Article page ---------- */
.article-hero { background: var(--ink); color: var(--ivory); position: relative; overflow: hidden; }
.article-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.article-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,20,23,0.2), rgba(18,20,23,0.92)); }
.article-hero .wrap { position: relative; z-index: 1; padding: clamp(6rem, 12vw, 10rem) 0 3.5rem; }
.article-hero h1 { color: var(--ivory); max-width: 18ch; font-size: clamp(2.3rem, 5vw, 4rem); }
.article-hero .lede { color: rgba(246,242,234,0.78); max-width: 56ch; }
.article-hero .meta { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); margin-top: 1.5rem; }

.article { padding: clamp(3rem, 6vw, 5rem) 0; }
.article .wrap { display: grid; grid-template-columns: 220px minmax(0, var(--measure)); gap: 4rem; justify-content: center; }
.article aside { font-size: 0.86rem; color: var(--slate); position: sticky; top: 100px; align-self: start; }
.article aside .eyebrow { display: block; margin-bottom: 0.8rem; }
.article aside ol { list-style: none; margin: 0; padding: 0; }
.article aside li { padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.article aside li:last-child { border-bottom: 1px solid var(--rule); }
.article aside a:hover { color: var(--ink); }
@media (max-width: 860px) { .article .wrap { grid-template-columns: 1fr; } .article aside { position: static; } }

.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 2.6rem; }
.prose h3 { font-size: 1.35rem; margin-top: 2rem; }
.prose p { font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 2rem 0; padding: 1.4rem 1.8rem;
  border-left: 2px solid var(--gold);
  background: var(--paper);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink-3);
}
.prose .callout {
  margin: 2rem 0; padding: 1.4rem 1.6rem;
  border: 1px solid var(--rule); background: var(--paper); border-radius: 4px;
  font-size: 0.95rem;
}
.prose .callout .eyebrow { display: block; margin-bottom: 0.5rem; }
.prose figure { margin: 2.4rem 0; }
.prose figure img { border-radius: 4px; aspect-ratio: 3/2; object-fit: cover; }
.prose figcaption { font-size: 0.8rem; color: var(--slate); margin-top: 0.6rem; letter-spacing: 0.02em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 1.5rem 0 2rem; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.disclaimer {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--rule);
  font-size: 0.82rem; color: var(--slate);
}

.next { background: var(--ivory-2); padding: 3.5rem 0; }
.next .cards { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .next .cards { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal .wrap { max-width: 780px; padding: clamp(3rem, 6vw, 5rem) 0; }
.legal h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.legal p, .legal li { font-size: 0.98rem; }
.legal .updated { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: 2.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(246,242,234,0.7); font-size: 0.88rem; }
.site-footer .wrap { padding: 3.5rem 0 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.site-footer .brand { color: var(--ivory); margin-bottom: 1rem; }
.site-footer h4 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a:hover { color: var(--ivory); }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--rule-dark); padding-top: 1.5rem; font-size: 0.76rem; color: rgba(246,242,234,0.5); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
