/* ==========================================================================
   WOMEN'S LIFE — Editorial campaign styles
   1. Fonts  2. Tokens  3. Base  4. Utilities  5. Buttons  6. Header
   7. Hero & status  8. Sections  9. Donation  10. Final & footer
   11. Simple pages  12. Responsive
   ========================================================================== */

/* 1. FONTS — self-hosted, SIL Open Font License (see assets/fonts) */
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* 2. TOKENS */
:root {
  --paper: #FFFFFF;
  --stone: #F4F0EA;
  --stone-2: #E9E3DA;
  --ink: #1E1A1A;
  --ink-2: #4A4343;       /* 9.4:1 on white, 8.3:1 on stone */
  --line: #DCD4CA;
  --burgundy: #762D45;
  --burgundy-dark: #5C2235;
  --burgundy-tint: #F6ECEE;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-body: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-h1: clamp(2.4rem, 1.55rem + 3.6vw, 4.6rem);
  --fs-h2: clamp(1.9rem, 1.45rem + 1.9vw, 3rem);
  --fs-h3: clamp(1.2rem, 1.12rem + .35vw, 1.4rem);

  --container: 1240px;
  --gutter: clamp(1.25rem, .7rem + 2.4vw, 3rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --header-h: 68px;
  --radius: 4px;
}

/* 3. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-body)/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -.022em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--burgundy-dark); }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; }
::selection { background: var(--burgundy); color: #fff; }

/* 4. UTILITIES */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 300; padding: .75rem 1rem; background: var(--ink); color: #fff; }
.skip-link:focus { top: 1rem; }
.label { margin-bottom: 1.1rem; font: 600 .8125rem/1.3 var(--sans); letter-spacing: .04em; color: var(--burgundy); }
.label-light { color: #F1D7DD; }
.kicker { margin-bottom: 1.4rem; font: 500 .9375rem/1.45 var(--sans); color: var(--burgundy); max-width: 36rem; }
.muted { color: var(--ink-2); }
.caption { margin-top: .75rem; font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }

/* Placeholders: unmistakable, so missing information is never mistaken for real content */
.ph {
  padding: .05em .4em; border: 1px dashed var(--burgundy); border-radius: 3px;
  background: var(--burgundy-tint); color: var(--burgundy-dark);
  font: 500 .86em/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.ph-dark { background: rgba(255,255,255,.06); border-color: rgba(241,215,221,.55); color: #F1D7DD; }

/* 5. BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.5rem; border: 1.5px solid transparent; border-radius: var(--radius);
  font: 600 .875rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-lg { min-height: 54px; padding: .95rem 1.75rem; }
.btn-block { width: 100%; }
.btn[disabled] { background: #8A7B7F; color: #fff; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* 6. HEADER */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(255,255,255,.96); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-header.is-scrolled { border-color: var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(255,255,255,.88); backdrop-filter: blur(10px); } }
.header-inner { display: flex; align-items: center; gap: 2rem; height: 100%; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; flex: none; color: var(--ink); text-decoration: none; font: 600 1.06rem/1 var(--serif); letter-spacing: .16em; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.wordmark-mark { width: 22px; height: 22px; fill: var(--burgundy); }
.wordmark-light, .wordmark-light:hover { color: #fff; }
.wordmark-light .wordmark-mark { fill: #E6B3BE; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(1.25rem, .5rem + 1.5vw, 2.25rem); }
.site-nav a { display: block; padding: .4rem 0; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500; border-bottom: 1.5px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="true"] { border-color: var(--burgundy); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.btn-header { min-height: 42px; padding: .6rem 1.15rem; font-size: .8125rem; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.nav-toggle-bars { position: relative; display: block; width: 22px; height: 10px; margin: auto; }
.nav-toggle-bars span { position: absolute; left: 0; width: 100%; height: 1.75px; background: currentColor; transition: transform .2s ease, top .2s ease; }
.nav-toggle-bars span:first-child { top: 0; }
.nav-toggle-bars span:last-child { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { top: 4px; transform: rotate(-45deg); }

/* 7. HERO & STATUS */
.hero {
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); align-items: end; gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
  padding-left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
}
.hero-text { padding-bottom: clamp(2rem, 1rem + 4vw, 5rem); }
.hero-lead { margin-top: 1.6rem; max-width: 34rem; font-size: var(--fs-lead); color: var(--ink-2); }
.hero .btn-row { margin-top: 2.25rem; }
.hero .btn-lg { padding-inline: 1.4rem; }
.hero-media img { width: 100%; height: auto; aspect-ratio: 5 / 4; max-height: 82vh; object-fit: cover; object-position: 50% 40%; background: var(--stone-2); }
.hero-media .caption { padding-right: var(--gutter); }
.hero-caption { margin-top: 1rem; max-width: 34rem; font: 400 1.125rem/1.55 var(--serif); color: var(--ink); }
.hero-media-cta { margin-top: 1.25rem; }


/* 8. SECTIONS */
.section { padding-block: var(--section); }
.section-rule { border-top: 1px solid var(--line); }
.split-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 1rem + 4vw, 6rem); align-items: end; margin-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.split-head-text { font-size: var(--fs-lead); }
.split-head-text .muted { font-size: var(--fs-body); }

.needs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem clamp(1.5rem, 1rem + 2vw, 3.5rem); }
.need { padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.need h3 { margin-bottom: .7rem; }
.need p { color: var(--ink-2); }

.photo-pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 1rem + 2vw, 3rem); align-items: start; margin-top: clamp(4rem, 3rem + 4vw, 7rem); }
.photo-pair figure:last-child { margin-top: clamp(3rem, 2rem + 6vw, 9rem); }
.photo-pair img { width: 100%; object-fit: cover; background: var(--stone-2); }
.photo-pair figure:first-child img { aspect-ratio: 3 / 2; }
.photo-pair figure:last-child img { aspect-ratio: 4 / 3; }
.figure-cta { margin-top: 1.5rem; }

.cta-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; margin-top: clamp(3.5rem, 2.5rem + 3vw, 6rem); padding-top: 1.75rem; border-top: 1px solid var(--line); }
.cta-line p { margin: 0; max-width: 40rem; font: 400 clamp(1.15rem, 1.05rem + .45vw, 1.4rem)/1.4 var(--serif); }

.help-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 1rem + 5vw, 7rem); }
.help-intro h2 { margin-bottom: 1.4rem; }
.help-intro p:not(.label) { color: var(--ink); }
.help-intro .muted { margin-top: 1.25rem; font-size: .9375rem; color: var(--ink-2); }
.help-media { margin-top: 2.5rem; }
.help-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--stone-2); }
@media (min-width: 961px) { .help-intro { position: sticky; top: calc(var(--header-h) + 2.5rem); align-self: start; } }
.help-list { counter-reset: help; border-bottom: 1px solid var(--line); align-self: start; }
.help-list li { counter-increment: help; display: grid; grid-template-columns: 3rem minmax(0, 13rem) minmax(0, 1fr); gap: .5rem 1.5rem; align-items: baseline; padding-block: 1.75rem; border-top: 1px solid var(--line); }
.help-list li::before { content: counter(help, decimal-leading-zero); font: 500 .875rem/1 var(--sans); color: var(--burgundy); font-variant-numeric: tabular-nums; }
.help-list p { margin: 0; color: var(--ink-2); }
.help-cta { grid-column: 2; }

.trust-head { max-width: 860px; margin-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }

/* 9. DONATION */
.donate { padding-block: var(--section); background: var(--burgundy); color: #fff; }
.donate-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem clamp(2rem, 1rem + 5vw, 7rem); align-items: start; }
.donate h2 { color: #fff; }
.donate h2:focus { outline: none; }
.donate-intro > p { margin-top: 1.4rem; font-size: var(--fs-lead); color: rgba(255,255,255,.88); }
.donate-facts { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.22); }
.donate-facts li { padding-block: .85rem; border-bottom: 1px solid rgba(255,255,255,.22); font-size: .9375rem; color: rgba(255,255,255,.92); }
.donate-facts a { color: #fff; }

.donate-card { padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); background: var(--paper); color: var(--ink); border-radius: var(--radius); }
.donation-form { display: grid; gap: 1.5rem; }
.preview-notice { display: grid; gap: .25rem; padding: 1rem 1.1rem; border: 1.5px solid #B9862F; border-radius: var(--radius); background: #FFF7E8; color: #4A3510; font-size: .9rem; line-height: 1.5; }
.preview-notice[hidden] { display: none; }
.preview-notice strong { font-size: .95rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field[hidden], .summary[hidden], .donate-hint[hidden] { display: none; }
.field-label { display: block; margin-bottom: .7rem; padding: 0; font: 600 .8125rem/1.3 var(--sans); letter-spacing: .04em; color: var(--ink); }

.amounts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem .6rem; padding-top: .5rem; }
.amounts input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.amounts label {
  grid-column: span 2; position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; padding: .6rem .4rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent; user-select: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.amounts label:nth-of-type(4), .amounts label:nth-of-type(5) { grid-column: span 3; }
.amt-value { font: 600 1.2rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.amt-tag { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); padding: .28rem .5rem; border: 2px solid var(--paper); border-radius: 999px; background: var(--burgundy); color: #fff; font: 600 .625rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.amounts label.is-recommended { border-color: var(--burgundy); background: var(--burgundy-tint); }
.amounts label:hover { border-color: var(--ink); }
.amounts label.is-recommended:hover { border-color: var(--burgundy-dark); }
.amounts label:active { transform: scale(.98); }
.amounts input:checked + label { background: var(--burgundy); border-color: var(--burgundy); color: #fff; box-shadow: 0 6px 18px -8px rgba(118, 45, 69, .7); }
.amounts input:checked + label .amt-tag { background: var(--ink); }
.amounts input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }


.summary { padding: 1.1rem 1.2rem; background: var(--stone); border-radius: var(--radius); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: .3rem; font-size: .9375rem; }
.summary-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.summary-selected { align-items: baseline; font-size: 1.05rem; }
.summary-selected span:last-child { font-size: 1.35rem; }
.summary-note { margin: .7rem 0 0; font-size: .8125rem; color: var(--ink-2); }
.form-status { padding: .9rem 1rem; border-radius: var(--radius); font-size: .9rem; }
.form-status[hidden] { display: none; }
.form-status.is-info { background: var(--stone); }
.form-status.is-error { background: #FDECEA; color: #8A1C14; }
.donate-hint { margin: -.8rem 0 0; font-size: .875rem; color: var(--ink-2); text-align: center; }
.provider-line { margin: 0; font-size: .8125rem; color: var(--ink-2); text-align: center; }

@media (min-width: 1100px) {
  .amounts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .amounts label, .amounts label:nth-of-type(4), .amounts label:nth-of-type(5) { grid-column: auto; }
}

/* 10. FINAL & FOOTER */
.final { padding-bottom: var(--section); }
.final-media img { width: 100%; height: min(72vh, 720px); min-height: 300px; object-fit: cover; object-position: 50% 45%; background: var(--stone-2); }
.final-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 1.5rem clamp(2rem, 1rem + 5vw, 7rem); margin-top: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: start; }
.final-grid p { margin-bottom: 2rem; font-size: var(--fs-lead); color: var(--ink-2); }

.site-footer { padding-top: clamp(3.5rem, 3rem + 2vw, 5rem); background: var(--ink); color: rgba(255,255,255,.78); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.footer-about p { margin-top: 1.2rem; max-width: 26rem; }
.footer-col h2 { margin-bottom: 1rem; font: 600 .8125rem/1.3 var(--sans); letter-spacing: .04em; color: #fff; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 3.5rem; padding-block: 1.5rem 2rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .8125rem; }
.footer-bottom p { margin: 0; }

/* 11. SIMPLE PAGES (privacy, terms, thank you) */
.page { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.page .container { max-width: 780px; }
.page h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.2rem); margin-bottom: 1.4rem; }
.page h2 { font-size: 1.5rem; margin: 2.4rem 0 .8rem; }
.page p { color: var(--ink-2); }
.draft-note { padding: 1rem 1.1rem; border: 1.5px solid #B9862F; background: #FFF7E8; color: #4A3510; border-radius: var(--radius); font-size: .9375rem; }
.simple-footer { padding-top: 0; }
.simple-footer .footer-bottom { margin-top: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.simple-footer .footer-bottom a { color: rgba(255,255,255,.82); }

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 12. RESPONSIVE */
@media (max-width: 1080px) {
  .needs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-list li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .help-list li p { grid-column: 2; }
}

@media (max-width: 960px) {
  :root { --header-h: 62px; }
  .nav-toggle { display: grid; place-items: center; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; padding: .5rem var(--gutter) 1.5rem;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(30,26,26,.08);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 1rem 0; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .site-nav a:hover, .site-nav a[aria-current="true"] { border-color: var(--line); color: var(--burgundy); }

  .hero { grid-template-columns: 1fr; padding-left: 0; gap: 0; }
  .hero-text { padding: 0 var(--gutter) 2.5rem; }
  .hero-media img { aspect-ratio: 4 / 3; max-height: none; object-position: 50% 35%; }
  .hero-media .caption { padding-inline: var(--gutter); }
  .hero-caption { font-size: 1.0625rem; }
  .hero-media-cta { display: flex; margin-inline: var(--gutter); }
  .split-head, .help-grid, .donate-grid, .final-grid { grid-template-columns: 1fr; }
  .help-cta { grid-column: 1; }
}

@media (max-width: 700px) {
  .hide-xs { display: none; }
  .wordmark { font-size: .98rem; letter-spacing: .12em; }
  .btn-header { padding-inline: 1rem; }
  .btn-row { flex-direction: column; }
  .btn-row .btn, .cta-line .btn, .help-cta .btn, .final-grid .btn { width: 100%; }
  .needs { grid-template-columns: 1fr; gap: 2.25rem; }
  .photo-pair { grid-template-columns: 1fr; margin-inline: calc(var(--gutter) * -1); }
  .photo-pair figure:last-child { margin-top: 0; }
  .photo-pair .caption { padding-inline: var(--gutter); }
  .photo-pair { row-gap: 3rem; }
  .photo-pair .figure-cta { display: flex; margin-inline: var(--gutter); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 380px) {
  .wordmark-mark { display: none; }
  .amt-value { font-size: 1.1rem; }
}
