/* ============================================================
   G&D Pharma — Peptide Research Education
   Shared stylesheet. Editorial, gold-on-ivory, serif display.
   ============================================================ */

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

:root {
  --gold:        #b8902f;
  --gold-bright: #d4af37;
  --gold-deep:   #8a6d22;
  --ink:         #16140f;
  --ink-soft:    #3a362d;
  --ivory:       #f7f4ec;
  --ivory-deep:  #efe9da;
  --paper:       #fffdf8;
  --line:        #e0d8c4;
  --rule:        #cdbf9d;
  --shadow:      rgba(22,20,15,0.08);
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Outfit', system-ui, sans-serif;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: radial-gradient(var(--line) 0.5px, transparent 0.5px);
  background-size: 22px 22px;
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,236,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 28px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand .bt { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.5px; line-height: 1; }
.brand .bs { display: block; font-size: 0.62rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-deep); font-weight: 500; margin-top: 3px; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.85rem;
  letter-spacing: 0.4px; font-weight: 400; transition: color 0.2s;
  position: relative; padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-deep); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%;
  height: 1.5px; background: var(--gold);
}
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(212,175,55,0.10), transparent 70%);
}
.hero .eyebrow {
  font-size: 0.72rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 500; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05;
  letter-spacing: -0.5px; margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--gold-deep); }
.hero p.lead {
  max-width: 640px; margin: 0 auto; font-size: 1.12rem;
  color: var(--ink-soft); font-weight: 300;
}
.gold-rule {
  width: 80px; height: 2px; margin: 30px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Research banner ---------- */
.research-banner {
  background: var(--ink); color: var(--ivory);
  font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase;
  text-align: center; padding: 10px 20px; font-weight: 400;
}
.research-banner strong { color: var(--gold-bright); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 500; margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.5px;
}
h2, h3 { font-family: var(--display); }

/* ---------- Compound grid (index) ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.ccard {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  padding: 30px 28px; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative; overflow: hidden;
}
.ccard::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.ccard:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); border-color: var(--rule); }
.ccard:hover::before { transform: scaleX(1); }
.ccard .tag {
  display: inline-block; font-size: 0.62rem; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 600; padding: 4px 10px;
  border-radius: 2px; margin-bottom: 16px;
}
.ccard h3 { font-size: 1.6rem; font-weight: 600; margin-bottom: 6px; }
.ccard .sub { font-size: 0.8rem; color: var(--gold-deep); letter-spacing: 0.5px; margin-bottom: 14px; font-weight: 400; }
.ccard p { font-size: 0.92rem; color: var(--ink-soft); }
.ccard .arrow { margin-top: 18px; font-size: 0.82rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-deep); font-weight: 500; }

/* status tag colours */
.tag.approved   { background: #e8f0e4; color: #3f6b34; }
.tag.trials     { background: #fdf2dd; color: #98701a; }
.tag.research   { background: #f3e7e3; color: #9a5240; }
.tag.cosmetic   { background: #e6eef2; color: #3c6478; }
.tag.supplement { background: #ece8f0; color: #5e5078; }

/* ---------- Compound detail page ---------- */
.detail-hero {
  padding: 60px 0 40px; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 50% 90% at 50% 0%, rgba(212,175,55,0.10), transparent 70%);
}
.detail-hero .breadcrumb { font-size: 0.78rem; letter-spacing: 0.5px; color: var(--ink-soft); margin-bottom: 22px; }
.detail-hero .breadcrumb a { color: var(--gold-deep); text-decoration: none; }
.detail-hero .breadcrumb a:hover { text-decoration: underline; }
.detail-hero h1 { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 600; letter-spacing: -0.5px; line-height: 1.05; }
.detail-hero .latin { font-style: italic; color: var(--gold-deep); font-size: 1.1rem; margin-top: 8px; font-family: var(--display); }

.statusbar { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.statusbar .pill {
  font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
  padding: 7px 14px; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--paper); font-weight: 500;
}
.statusbar .pill b { color: var(--gold-deep); }

.content { display: grid; grid-template-columns: 1fr 300px; gap: 56px; padding: 56px 0; }
@media (max-width: 860px) { .content { grid-template-columns: 1fr; } }

.prose h2 { font-size: 1.9rem; font-weight: 600; margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.3rem; font-weight: 600; margin: 28px 0 10px; color: var(--ink); }
.prose p { margin-bottom: 16px; color: var(--ink-soft); }
.prose ul { margin: 0 0 18px 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 500; }

/* stat callouts */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; margin: 28px 0; }
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-top: 3px solid var(--gold); padding: 22px 20px; text-align: center;
}
.stat .n { font-family: var(--display); font-size: 2.5rem; font-weight: 700; color: var(--gold-deep); line-height: 1; }
.stat .l { font-size: 0.78rem; color: var(--ink-soft); margin-top: 8px; letter-spacing: 0.3px; }

/* evidence strength meter */
.evidence-box {
  background: var(--paper); border: 1px solid var(--line); padding: 22px 24px; margin: 24px 0;
}
.evidence-box .row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.evidence-box .row:last-child { margin-bottom: 0; }
.evidence-box .lbl { width: 130px; font-size: 0.82rem; color: var(--ink-soft); flex-shrink: 0; }
.meter { flex: 1; height: 8px; background: var(--ivory-deep); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }
.evidence-box .val { width: 70px; text-align: right; font-size: 0.78rem; color: var(--gold-deep); font-weight: 500; }

/* callout / warning */
.callout {
  border-left: 3px solid var(--gold); background: var(--ivory-deep);
  padding: 18px 22px; margin: 24px 0; font-size: 0.95rem;
}
.callout.warn { border-left-color: #b9542f; background: #f7ece6; }
.callout .ct { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; font-family: var(--body); letter-spacing: 0.3px; }

/* sidebar */
.aside { position: sticky; top: 90px; align-self: start; }
.aside .panel { background: var(--paper); border: 1px solid var(--line); padding: 24px; margin-bottom: 22px; }
.aside .panel h4 {
  font-family: var(--body); font-size: 0.72rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; font-weight: 600;
}
.aside dl { font-size: 0.88rem; }
.aside dt { color: var(--ink-soft); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.6px; margin-top: 12px; }
.aside dt:first-child { margin-top: 0; }
.aside dd { color: var(--ink); font-weight: 400; }

/* references */
.refs { padding: 40px 0 0; border-top: 1px solid var(--line); }
.refs h3 { font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; font-family: var(--body); font-weight: 600; color: var(--gold-deep); margin-bottom: 16px; }
.refs ol { margin-left: 20px; font-size: 0.82rem; color: var(--ink-soft); }
.refs li { margin-bottom: 9px; }
.refs a { color: var(--gold-deep); word-break: break-word; }

/* prev/next nav */
.pn { display: flex; justify-content: space-between; gap: 16px; padding: 30px 0; border-top: 1px solid var(--line); margin-top: 20px; }
.pn a { text-decoration: none; color: var(--ink); font-size: 0.9rem; max-width: 48%; }
.pn a span { display: block; font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px; }
.pn a:hover { color: var(--gold-deep); }
.pn a.next { text-align: right; margin-left: auto; }

/* ---------- Generic prose page (about, safety, feedback) ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 56px 0; }
.page h2 { font-size: 2rem; margin: 36px 0 14px; font-weight: 600; }
.page h2:first-child { margin-top: 0; }
.page h3 { font-size: 1.3rem; margin: 24px 0 10px; font-weight: 600; }
.page p { margin-bottom: 16px; color: var(--ink-soft); }
.page ul { margin: 0 0 18px 22px; color: var(--ink-soft); }
.page li { margin-bottom: 8px; }
.page strong { color: var(--ink); font-weight: 500; }

/* form embed slot */
.form-slot {
  background: var(--paper); border: 1px dashed var(--rule);
  padding: 40px; text-align: center; margin: 30px 0; border-radius: 4px;
}
.form-slot iframe { width: 100%; min-height: 700px; border: none; }
.form-slot .placeholder { color: var(--ink-soft); }
.form-slot .placeholder code { background: var(--ivory-deep); padding: 2px 8px; border-radius: 3px; font-size: 0.85rem; color: var(--gold-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--ivory-deep);
  padding: 50px 0 30px; margin-top: 40px; position: relative; z-index: 1;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-grid .fbrand { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--paper); margin-bottom: 12px; }
.footer-grid p { font-size: 0.88rem; color: #b3ab97; }
.footer-grid h5 { font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 14px; font-family: var(--body); font-weight: 600; }
.footer-grid a { display: block; color: #cfc7b2; text-decoration: none; font-size: 0.88rem; margin-bottom: 8px; transition: color 0.2s; }
.footer-grid a:hover { color: var(--gold-bright); }
.footer-bottom { border-top: 1px solid #322e25; padding-top: 22px; font-size: 0.76rem; color: #8a836f; }
.footer-bottom .disc { margin-bottom: 10px; line-height: 1.6; }
.footer-bottom strong { color: var(--gold-bright); }

@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--ivory);
    border-bottom: 1px solid var(--line); padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 28px; width: 100%; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .content { gap: 32px; }
}
