/* ═══════════════════════════════════════════════════════════════
   THE COMPLEXION CODEX — shared styles
   Editorial sibling to buraun.co. Light, magazine-like, refined.
   Palette: espresso #1C1007 · gold #C9A96E · walnut #8B5E3C
            cream #F5EFE6 · paper #FAF7F2 · burgundy #612D34
            heading #3A2A1E · body #5C4636 · tint #F1E9DC
   Fonts: Cormorant Garamond (display) / DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --espresso: #1C1007;
  --gold: #C9A96E;
  --walnut: #8B5E3C;
  --cream: #F5EFE6;
  --paper: #FAF7F2;
  --burgundy: #612D34;
  --heading: #3A2A1E;
  --body: #5C4636;
  --tint: #F1E9DC;
  --hairline: #E4D9C4;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--body);
  font-family: 'DM Sans', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Header / masthead ─────────────────────────────────────────── */
.masthead {
  background: var(--espresso);
  padding: 28px 32px;
  text-align: center;
  position: relative;
}
.masthead a.brandmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.35em;
  color: var(--cream);
  text-decoration: none;
  display: inline-block;
  padding-left: 0.35em; /* optical balance for letter-spacing */
}
.masthead .codexline {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}
.masthead .backlink {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.masthead .backlink:hover { opacity: 1; }

/* ── Layout containers ─────────────────────────────────────────── */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ── Index hero ────────────────────────────────────────────────── */
.codex-hero {
  text-align: center;
  padding: 90px 28px 60px;
}
.codex-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.codex-hero .tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 3vw, 24px);
  color: var(--walnut);
  margin-top: 18px;
}
.codex-hero .intro {
  max-width: 560px;
  margin: 28px auto 0;
  font-size: 16px;
  color: var(--body);
}
.rule-gold {
  width: 48px; height: 1px;
  background: var(--gold);
  margin: 36px auto;
  border: none;
}

/* ── Article list ──────────────────────────────────────────────── */
.article-list {
  padding: 20px 0 100px;
  display: grid;
  gap: 0;
}
.article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
  transition: padding-left 0.35s ease;
}
.article-card:last-child { border-bottom: 1px solid var(--hairline); }
.article-card:hover { padding-left: 12px; }
.article-card .kicker {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.article-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.12;
  color: var(--heading);
  margin: 12px 0 14px;
}
.article-card p {
  font-size: 15px;
  color: var(--body);
  max-width: 620px;
}
.article-card .readmore {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--walnut);
  font-weight: 500;
}

/* ── Article (post) page ───────────────────────────────────────── */
.post {
  padding: 70px 0 40px;
}
.post .kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  text-align: center;
}
.post h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  color: var(--heading);
  text-align: center;
  margin: 18px auto 0;
  max-width: 16ch;
  letter-spacing: -0.01em;
}
.post .standfirst {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(19px, 3vw, 25px);
  line-height: 1.4;
  color: var(--walnut);
  text-align: center;
  max-width: 30ch;
  margin: 24px auto 0;
}
.post .meta {
  text-align: center;
  margin-top: 26px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--body);
  opacity: 0.6;
}

.post-body {
  padding: 50px 0 90px;
  font-size: 17px;
  color: var(--body);
}
.post-body p { margin-bottom: 26px; }
.post-body h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  color: var(--heading);
  margin: 46px 0 18px;
}
.post-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 40px 0 4px;
}
.post-body strong { color: var(--heading); font-weight: 500; }
.post-body em { font-style: italic; }

/* the myth label + reframe pattern */
.myth {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 22px;
  margin: 38px 0 26px;
}
.myth .label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}
.myth .claim {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 3.4vw, 27px);
  line-height: 1.3;
  color: var(--heading);
}

/* pull quote */
.pull {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(23px, 4vw, 32px);
  line-height: 1.3;
  color: var(--burgundy);
  text-align: center;
  margin: 46px auto;
  max-width: 26ch;
}

/* closing note / brand tie-in */
.codex-note {
  background: var(--tint);
  border-radius: 8px;
  padding: 30px 32px;
  margin: 50px 0 0;
  font-size: 15px;
  color: var(--body);
}
.codex-note .note-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--walnut);
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}
.codex-note a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer ────────────────────────────────────────────────────── */
.codex-footer {
  background: var(--espresso);
  color: var(--cream);
  text-align: center;
  padding: 54px 28px 60px;
}
.codex-footer .fmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  letter-spacing: 0.3em;
  color: var(--cream);
  padding-left: 0.3em;
}
.codex-footer .ftag {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 8px;
}
.codex-footer .flinks {
  margin-top: 26px;
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
}
.codex-footer .flinks a {
  color: var(--cream);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.codex-footer .flinks a:hover { opacity: 1; }
.codex-footer .fcta {
  display: inline-block;
  margin-top: 32px;
  background: var(--gold);
  color: var(--espresso);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 30px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}
.codex-footer .fcta:hover { background: var(--cream); }
.codex-footer .fine {
  margin-top: 34px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--cream);
  opacity: 0.4;
}

/* ── Page-load reveal ──────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: rise 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.30s; }
.reveal.d4 { animation-delay: 0.42s; }

@media (max-width: 560px) {
  .masthead .backlink { display: none; }
  .codex-hero { padding-top: 64px; }
  .post { padding-top: 48px; }
}
