/* ============================================================
   Jazzy Wellness Vibes, design system
   Concept: "the print ebook, unbound", cream paper, cocoa ink,
   Didot-style display italics, flat phase-colour blocks,
   ghost numerals, hairline rules. No cards, no gradients.
   ============================================================ */

:root {
  --cream: #FAF3E7;
  --ink: #2B211B;
  --cocoa: #261D18;
  --ink-soft: rgba(43, 33, 27, .64);
  --cream-soft: rgba(250, 243, 231, .78);
  --cream-dim: rgba(250, 243, 231, .55);
  --hair: rgba(43, 33, 27, .22);
  --hair-light: rgba(250, 243, 231, .28);

  --berry: #A13A45;   --berry-deep: #822C37;  --berry-bright: #C4515D;
  --olive: #66763F;   --olive-deep: #57663A;  --olive-bright: #8CA05A;
  --gold:  #B27E24;   --gold-deep:  #845C15;  --gold-bright:  #D9A03D;
  --plum:  #7A5175;   --plum-deep:  #5F3F5A;  --plum-bright:  #A2729B;

  /* pastel surfaces (Jaz's brighter palette): ink text on these, deep colours for headings only */
  --berry-pastel: #F6DDD8; --olive-pastel: #EBEFD3;
  --gold-pastel: #FCEDC2;  --plum-pastel: #EFE0ED;

  --serif: "Bodoni Moda", "Didot", "Playfair Display", serif;
  --sans: "Mulish", "Avenir Next", "Helvetica Neue", sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --measure: 62ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Cap Bodoni Moda's optical size, at large sizes the display cut's
     hairline strokes become too thin to read. Inherits everywhere. */
  font-variation-settings: "opsz" 13;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--gold-bright); color: var(--cocoa); }

/* ---------- focus ----------
   One global keyboard focus ring. Berry on cream (5.94:1) and cream on
   cocoa (14.25:1), so it stays visible on both surfaces. Mouse users are
   unaffected because this is :focus-visible, not :focus. */
:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 3px;
  border-radius: 1px;
}
.dark :focus-visible,
.phase-bg :focus-visible,
.site-foot :focus-visible,
.reader-bar :focus-visible,
.chapnav :focus-visible,
.foot-ig :focus-visible { outline-color: var(--cream); }
.btn:focus-visible, .capture button:focus-visible { outline-offset: 4px; }

/* ---------- type ---------- */

.serif { font-family: var(--serif); font-weight: 400; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.04; }

.h-display { font-size: clamp(36px, 4.6vw, 66px); letter-spacing: -.01em; }
.h-xl { font-size: clamp(34px, 5vw, 60px); }
.h-lg { font-size: clamp(26px, 3.4vw, 40px); }
.h-md { font-size: clamp(21px, 2.4vw, 28px); }

.it { font-style: italic; }

.kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 18px;
}
.kicker.dim { color: var(--ink-soft); }
.kicker.light { color: var(--cream-dim); }

.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; max-width: var(--measure); }
.dim { color: var(--ink-soft); }
.light-txt { color: var(--cream-soft); }
.light-txt b, .light-txt strong { color: var(--cream); }

/* Dot-separated items (kickers, name lists). Each item carries its dot in
   the gap to its left; the row starts one gap further left and that strip is
   clipped, so a wrapped line never starts or ends on a stray dot. */
.dotlist { display: flex; flex-wrap: wrap; margin-left: -1.5em; clip-path: inset(-.5em -.5em -.5em 1.5em); }
.dotlist > * { position: relative; margin-left: 1.5em; white-space: nowrap; }
.dotlist > *::before {
  content: "·"; position: absolute; left: -1.5em; width: 1.5em; text-align: center;
  color: var(--dot, currentColor);
}

.fatrule { height: 5px; width: 64px; background: var(--gold-bright); border: 0; margin: 0 0 28px; }

.phase-strip { display: flex; height: 6px; width: 120px; margin-bottom: 28px; }
.phase-strip i { flex: 1; }
.phase-strip i:nth-child(1) { background: var(--berry-bright); }
.phase-strip i:nth-child(2) { background: var(--olive-bright); }
.phase-strip i:nth-child(3) { background: var(--gold-bright); }
.phase-strip i:nth-child(4) { background: var(--plum-bright); }

/* ---------- layout ---------- */

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.dark { background: var(--cocoa); color: var(--cream); }
.dark .kicker.dim { color: var(--cream-dim); }
.hairline-top { border-top: 1px solid var(--hair); }
.dark .hairline-top { border-top-color: var(--hair-light); }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hair);
}
.site-head .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.wordmark {
  font-family: var(--serif); font-size: 21px; text-decoration: none;
  letter-spacing: .01em; line-height: 1;
}
.wordmark .it { color: var(--berry); }
.wordmark small {
  display: block; font-family: var(--sans); font-weight: 700;
  font-size: 9px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 5px;
}
.site-nav { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; }
.site-nav a {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.on { border-bottom-color: var(--berry); }
.site-nav a.cta {
  border: 1.5px solid var(--ink); padding: 10px 18px;
}
.site-nav a.cta:hover { background: var(--ink); color: var(--cream); border-bottom-color: transparent; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--hair);
    flex-direction: column; align-items: flex-start;
    padding: 18px var(--pad) 26px; gap: 16px;
  }
  .site-nav.open { display: flex; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  text-decoration: none; padding: 16px 30px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--cream); cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); }
.btn.berry { background: var(--berry); border-color: var(--berry); }
.btn.berry:hover { background: transparent; color: var(--berry); }
.btn.on-dark { background: var(--cream); border-color: var(--cream); color: var(--cocoa); }
.btn.on-dark:hover { background: transparent; color: var(--cream); }
.btn.ghost.on-dark { background: transparent; color: var(--cream); }
.btn.ghost.on-dark:hover { background: var(--cream); color: var(--cocoa); }

/* ---------- ghost numerals ---------- */

.ghost-num {
  font-family: var(--serif); line-height: .8; pointer-events: none;
  position: absolute; z-index: 0; opacity: .14;
}

/* ---------- forms / email capture ---------- */

.capture { max-width: 560px; }
.capture form { display: flex; border: 1.5px solid var(--ink); }
.dark .capture form, .phase-bg .capture form { border-color: var(--cream); }
.capture input[type=email] {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--sans); font-size: 15px; padding: 16px 18px; color: inherit;
}
.capture input[type=email]::placeholder { color: var(--ink-soft); }
.dark .capture input[type=email]::placeholder,
.phase-bg .capture input[type=email]::placeholder { color: var(--cream-dim); }
.capture button {
  border: 0; background: var(--ink); color: var(--cream); cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: .22em; text-transform: uppercase; padding: 16px 26px;
}
.dark .capture button, .phase-bg .capture button { background: var(--cream); color: var(--cocoa); }
.capture .note { font-size: 12.5px; margin-top: 12px; color: var(--ink-soft); }
.dark .capture .note, .phase-bg .capture .note { color: var(--cream-dim); }
.capture .msg { margin-top: 14px; font-size: 14.5px; font-weight: 700; display: none; }
.capture .msg.show { display: block; }

@media (max-width: 520px) {
  .capture form { flex-direction: column; border: 0; gap: 10px; }
  .capture input[type=email] { border: 1.5px solid var(--ink); }
  .dark .capture input[type=email], .phase-bg .capture input[type=email] { border-color: var(--cream); }
}

/* ---------- affiliate links ---------- */

a.aff { text-decoration-color: var(--gold); text-underline-offset: 3px; }
a.aff::after { content: "*"; color: var(--gold-deep); font-weight: 700; margin-left: 1px; }
.dark a.aff::after { color: var(--gold-bright); }

.aff-note {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  padding: 14px 0; font-size: 13px; color: var(--ink-soft); margin: 30px 0;
}
.article > .aff-note:first-child { margin-top: 0; }
.aff-note a { color: inherit; }

/* ---------- instagram ---------- */

.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.ig-grid a { display: block; position: relative; aspect-ratio: 1; overflow: hidden; }
.ig-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .35s ease; }
.ig-grid a:hover img { transform: scale(1.04); opacity: .88; }
@media (max-width: 700px) { .ig-grid { grid-template-columns: repeat(3, 1fr); } }

.ig-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px var(--pad); max-width: 1240px; margin: 0 auto;
}
.ig-bar .handle {
  font-family: var(--serif); font-style: italic; font-size: 19px;
  color: var(--cream); text-decoration: none;
}
.ig-bar .handle:hover { text-decoration: underline; text-underline-offset: 4px; }
.ig-bar .cap { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; color: var(--cream-dim); }
.foot-ig { background: var(--cocoa); border-bottom: 1px solid var(--hair-light); }

/* discount code chip */
.code-chip {
  display: inline-block; border: 1px solid var(--gold-deep); color: var(--gold-deep);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  padding: 5px 10px; margin-bottom: 14px;
}

/* ---------- footer ---------- */

.site-foot { background: var(--cocoa); color: var(--cream); }
.site-foot .cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; padding: clamp(52px, 7vw, 88px) 0 40px;
}
.site-foot h4 {
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cream-dim); margin-bottom: 16px; font-weight: 700;
}
.site-foot ul { list-style: none; }
.site-foot li { margin-bottom: 10px; }
.site-foot a { color: var(--cream-soft); text-decoration: none; font-size: 14.5px; }
.site-foot a:hover { color: var(--cream); text-decoration: underline; }
.site-foot .legal {
  border-top: 1px solid var(--hair-light); padding: 22px 0 34px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-dim);
}
.site-foot .legal a { font-size: inherit; color: inherit; }
@media (max-width: 720px) { .site-foot .cols { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- phase colour helpers ---------- */

.phase-bg { color: var(--cream); }

/* ---------- shared section head ---------- */

.shead {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 14px;
}
.shead::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }
.dark .shead::after, .phase-bg .shead::after { border-top-color: var(--hair-light); }

/* ---------- journal articles ---------- */

.article-head { border-bottom: 1px solid var(--hair); padding: clamp(44px, 6vw, 80px) 0 clamp(34px, 5vw, 60px); }
/* starts on the same left edge as the .article column below (720px wide,
   centred), but the title may run wider to the right */
.article-head .wrap { max-width: none; padding-left: max(var(--pad), calc(50% - 360px + var(--pad))); }
.article-head .cat { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; color: var(--berry); margin-bottom: 16px; }
.article-head h1 { font-size: clamp(34px, 5vw, 58px); max-width: 20ch; text-wrap: balance; }
.article-head .byline { margin-top: 22px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }

.article { max-width: 720px; margin: 0 auto; padding-top: clamp(34px, 5vw, 70px); padding-bottom: clamp(40px, 6vw, 70px); }
.article > p, .article > ul, .article > ol { margin-bottom: 20px; }
.article > p { max-width: var(--measure); }
.article .opener { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.6; }
.article h2 { font-size: clamp(24px, 3vw, 32px); margin: 40px 0 14px; }
.article h3 { font-size: 19px; font-family: var(--sans); font-weight: 700; margin: 30px 0 10px; }
.article ul { list-style: none; }
.article ul li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.article ul li::before { content: "–"; position: absolute; left: 0; color: var(--gold-deep); }
.article ol { padding-left: 22px; }
.article ol li { margin-bottom: 8px; }
.article img { margin: 34px 0; }
.article blockquote {
  font-family: var(--serif); font-style: italic; font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.4; border-left: 4px solid var(--gold-bright); padding-left: 24px; margin: 36px 0;
}
.article .cta-box { border: 1.5px solid var(--ink); padding: clamp(26px, 4vw, 40px); margin: 40px 0; }
.article .cta-box h3 { margin-top: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }

.article .tip-box {
  background: var(--gold-pastel); color: var(--ink);
  padding: clamp(24px, 3.4vw, 34px); margin: 36px 0;
}
.article .tip-box .lbl {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  font-weight: 700; color: var(--ink); display: block; margin-bottom: 12px;
}
.article .tip-box p { color: var(--ink); margin: 0; }
.article .tip-box b, .article .tip-box strong { color: var(--ink); }
.article .tip-box ul { margin-top: 10px; }
.article .tip-box ul li { color: var(--ink); }
.article .tip-box ul li::before { color: var(--gold-deep); }
.article .tip-box ul li b { color: var(--ink); }

.post-tail { border-top: 1px solid var(--hair); padding: 26px 0 0; margin-top: 46px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-tail a { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; text-decoration: none; }
.post-tail a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- reveal on scroll ---------- */

.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
