/* ============================================================
   MILC — Maternal-Infant Leadership Consulting
   Shared stylesheet. Built from Brand Identity Guidelines v1.0
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  /* Primary palette */
  --plum:        #4A1942;
  --plum-deep:   #38122F;   /* hover / deeper plum */
  --cream:       #F5EFE0;
  --ivory:       #FAF6EE;
  --rose:        #C4848A;
  --sage:        #A8B5A2;
  --gold:        #C9A84C;
  --gold-soft:   #D9C083;

  /* Text */
  --ink:         #2A2A2A;
  --ink-soft:    #55514F;
  --on-plum:     #F5EFE0;
  --on-plum-dim: #D9CBD3;

  /* Fonts */
  --serif: "Cormorant Garamond", Georgia, serif;
  --serif-accent: "Cormorant Infant", Georgia, serif;
  --sans: "Nunito", system-ui, -apple-system, sans-serif;

  /* Spacing (8px base) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s7: 56px; --s8: 64px;
  --s10: 80px; --s12: 96px; --s16: 128px;

  --maxw: 1280px;
  --pad: 64px;

  --rule-rose: 1px solid var(--rose);
  --rule-gold: 1px solid var(--gold);
  --border-soft: 1px solid rgba(74,25,66,.16);

  /* Tonal variety (all within the warm family) */
  --blush: #F1E4E2;   /* soft rose-tinted cream */
  --sage-soft: #E9ECE4; /* soft sage-tinted */
  --plum-tint: #EFE6E9; /* faintest plum wash */

  /* Organic geometry */
  --r-soft: 24px;
  --r-card: 26px;
  --r-blob: 46% 54% 56% 44% / 54% 48% 52% 46%;
  --r-leaf: 8px 60px 8px 60px;
  --shadow-card: 0 2px 4px rgba(74,25,66,.04), 0 22px 48px -28px rgba(74,25,66,.34);
  --shadow-soft: 0 18px 50px -30px rgba(74,25,66,.4);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- Typography ---- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.1; }
.display {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--plum); margin: 0 0 var(--s4);
}
h1, .h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.5rem); line-height: 1.12; color: var(--plum);
  margin: 0 0 var(--s3);
}
h2, .h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 2.8vw, 2rem); color: var(--plum); line-height: 1.14;
  margin: 0 0 var(--s3);
}
h3, .h3 {
  font-family: var(--sans); font-weight: 700;
  font-size: 1.25rem; letter-spacing: .005em; color: var(--plum);
}
p { margin: 0 0 var(--s2); max-width: 68ch; text-wrap: pretty; }
.lead {
  font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft);
  font-weight: 400;
}
.eyebrow {
  font-family: var(--sans); font-weight: 700;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--rose); margin: 0 0 var(--s2);
}
.eyebrow.on-plum { color: var(--gold-soft); }
.quote {
  font-family: var(--serif-accent); font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.35;
  color: var(--plum); font-weight: 500;
}
.caption { font-size: .8rem; font-weight: 300; color: var(--ink-soft); }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); position: relative; z-index: 3; }
.section { padding-block: var(--s16); position: relative; }
.section--tight { padding-block: var(--s10); }
.bg-cream { background: var(--cream); }
.bg-ivory { background: var(--ivory); }
.bg-blush { background: var(--blush); }
.bg-sage  { background: var(--sage-soft); }
.bg-plum  { background: var(--plum); color: var(--on-plum); }
.bg-plum h1, .bg-plum h2, .bg-plum .display { color: var(--on-plum); }
.bg-plum p { color: var(--on-plum-dim); }

/* ---- Organic flow: wave dividers injected by JS ---- */
.sec-wave { display: block; }
.has-blob { overflow: clip; }

/* ---- Floating decorative motifs ---- */
.blob {
  position: absolute; border-radius: var(--r-blob); pointer-events: none;
  z-index: 1; filter: blur(2px); opacity: .5;
}
.blob-rose { background: radial-gradient(circle at 35% 30%, rgba(196,132,138,.5), rgba(196,132,138,0) 70%); }
.blob-gold { background: radial-gradient(circle at 35% 30%, rgba(201,168,76,.42), rgba(201,168,76,0) 70%); }
.blob-sage { background: radial-gradient(circle at 35% 30%, rgba(168,181,162,.5), rgba(168,181,162,0) 70%); }
.blob-cream { background: radial-gradient(circle at 35% 30%, rgba(245,239,224,.5), rgba(245,239,224,0) 70%); }
.center { text-align: center; }
.center p { margin-inline: auto; }

/* ---- Decorative rules ---- */
.rule { border: 0; border-top: var(--rule-rose); margin: var(--s4) 0; }
.rule-gold { border: 0; border-top: var(--rule-gold); }
.rule-short { width: 56px; border: 0; border-top: 2px solid var(--gold); margin: 0 0 var(--s4); }
.center .rule-short { margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-family: var(--sans); font-weight: 700; font-size: .9rem;
  letter-spacing: .02em; padding: 15px 30px; border: 1px solid transparent;
  border-radius: 999px;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease;
  white-space: nowrap;
}
.btn-primary { box-shadow: 0 14px 30px -14px rgba(74,25,66,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(74,25,66,.6); }
.btn-on-plum:hover { transform: translateY(-2px); }
.btn-primary { background: var(--plum); color: var(--cream); }
.btn-primary:hover { background: var(--plum-deep); }
.btn-on-plum { background: var(--cream); color: var(--plum); }
.btn-on-plum:hover { background: var(--gold); color: var(--plum); }
.btn-ghost { background: transparent; color: var(--plum); border-color: rgba(74,25,66,.3); }
.btn-ghost:hover { border-color: var(--plum); background: var(--plum); color: var(--cream); }
.btn-ghost.on-plum { color: var(--cream); border-color: rgba(245,239,224,.4); }
.btn-ghost.on-plum:hover { background: var(--cream); color: var(--plum); border-color: var(--cream); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* text link with gold underline on hover */
.tlink {
  color: var(--plum); font-weight: 700; font-size: .9rem; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: border-color .25s ease, color .2s ease;
}
.tlink:hover { border-color: var(--gold); }
.tlink .arrow { transition: transform .25s ease; }
.tlink:hover .arrow { transform: translateX(4px); }
.tlink.on-plum { color: var(--cream); }

/* ---- Chips / labels ---- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip {
  font-family: var(--sans); font-weight: 700; font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 8px 16px; border: 1px solid var(--gold); border-radius: 999px;
  color: var(--plum); background: rgba(201,168,76,.08);
}
.chip.on-plum { color: var(--gold-soft); border-color: rgba(201,168,76,.6); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--plum); color: var(--on-plum);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  height: 76px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand .milc-seal { width: 46px; height: 46px; flex: none; }
.nav-brand .lockup { display: flex; flex-direction: column; line-height: 1; }
.nav-brand .lockup .mark {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  letter-spacing: .04em; color: var(--cream);
}
.nav-brand .lockup .sub {
  font-family: var(--sans); font-weight: 600; font-size: .54rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft);
  margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: var(--s5); }
.nav-links a {
  font-family: var(--sans); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; color: var(--on-plum); padding: 6px 0;
  border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease;
}
.nav-links a:hover { border-color: var(--gold); }
.nav-links a.active { border-color: var(--rose); }
/* CTA button inside nav must win over generic link colour */
.nav-links a.btn-on-plum { color: var(--plum); border-color: transparent; }
.nav-links a.btn-on-plum:hover { color: var(--plum); background: var(--gold); border-color: transparent; }
.nav-cta { margin-left: var(--s2); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--cream); margin: 5px 0; transition: .25s; }

/* ============================================================
   SEAL
   ============================================================ */
.milc-seal { display: inline-flex; align-items: center; justify-content: center; }
.milc-seal__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.milc-seal .ring-text {
  font-family: var(--sans); font-weight: 700; letter-spacing: .15em;
  fill: var(--seal-ink); text-transform: uppercase;
}
.milc-seal .mark-text {
  font-family: var(--serif); font-weight: 700; fill: var(--seal-ink);
}
.milc-seal .accent { fill: var(--seal-accent); }
.milc-seal .stroke-ink { stroke: var(--seal-ink); fill: none; }
.milc-seal .fill-ink { fill: var(--seal-ink); }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s10);
  align-items: center;
}

/* ---- Cards ---- */
.card {
  background: rgba(255,255,255,.55); border: 1px solid rgba(74,25,66,.07);
  border-radius: var(--r-card); padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s2);
  box-shadow: var(--shadow-card);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover { border-color: rgba(201,168,76,.6); transform: translateY(-5px); box-shadow: 0 4px 6px rgba(74,25,66,.05), 0 30px 56px -30px rgba(74,25,66,.45); }
.card .num {
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
  color: var(--rose);
}
.card h3 { color: var(--plum); }
.card p { font-size: .96rem; color: var(--ink-soft); margin-bottom: 0; }
.card .card-foot { margin-top: auto; padding-top: var(--s2); }

/* ---- Image placeholder ---- */
.ph {
  position: relative; background-color: var(--ivory);
  background-image: repeating-linear-gradient(
    45deg, rgba(74,25,66,.05) 0, rgba(74,25,66,.05) 1px,
    transparent 1px, transparent 11px);
  border: 1px solid rgba(74,25,66,.16);
  border-radius: var(--r-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--plum); overflow: hidden;
}
/* organic blob / leaf shaped imagery */
.ph.blob-shape { border-radius: var(--r-blob); }
.ph.leaf-shape { border-radius: var(--r-leaf); }
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(74,25,66,.55); text-align: center; padding: 0 16px;
}
.ph.on-plum { background-color: rgba(255,255,255,.04); border-color: rgba(245,239,224,.2);
  background-image: repeating-linear-gradient(45deg, rgba(245,239,224,.06) 0, rgba(245,239,224,.06) 1px, transparent 1px, transparent 11px); }
.ph.on-plum::after { color: rgba(245,239,224,.6); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--plum-deep); color: var(--on-plum-dim); padding-block: var(--s10) var(--s6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s6); }
.footer .milc-seal { width: 88px; height: 88px; margin-bottom: var(--s3); }
.footer h4 {
  font-family: var(--sans); font-weight: 700; font-size: .72rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft);
  margin: 0 0 var(--s2);
}
.footer a { color: var(--on-plum-dim); font-size: .92rem; line-height: 2; transition: color .2s; }
.footer a:hover { color: var(--cream); }
.footer .tag {
  font-family: var(--serif-accent); font-style: italic; font-size: 1.15rem;
  color: var(--cream); margin-top: var(--s2);
}
.footer-bottom {
  margin-top: var(--s8); padding-top: var(--s4);
  border-top: 1px solid rgba(245,239,224,.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2);
  font-size: .78rem; color: rgba(245,239,224,.55);
}
.footer-bottom .badges { display: flex; gap: var(--s2); }

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-head { background: var(--plum); color: var(--on-plum); padding-block: var(--s10); position: relative; overflow: hidden; }
.page-head .eyebrow { color: var(--gold-soft); }
.page-head .display, .page-head h1 { color: var(--cream); }
.page-head p { color: var(--on-plum-dim); }
.page-head .seal-wm {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 360px; height: 360px; opacity: .08; color: var(--cream);
}

/* ============================================================
   ENTRANCE
   Content is always visible (robust across environments).
   .reveal is retained as a harmless hook for future use.
   ============================================================ */
.reveal { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  :root { --pad: 40px; }
  .split { grid-template-columns: 1fr; gap: var(--s6); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .page-head .seal-wm { display: none; }
}
@media (max-width: 760px) {
  :root { --pad: 24px; }
  .section { padding-block: var(--s10); }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 0; background: var(--plum-deep);
    padding: var(--s2) var(--pad); max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 420px; padding-block: var(--s3); }
  .nav-links a { width: 100%; padding: 12px 0; }
  .nav-cta { margin-left: 0; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s5); }
}
