/* =========================================================
   Support Chris Mormile — styles
   Order: 1. Tokens  2. Base  3. Components  4. Sections
   ========================================================= */


/* ---------- 1. Tokens ---------- */

:root {
  /* Colors: use only these */
  --navy: #0F2A4A;         /* headings, accents, CTA band */
  --navy-deep: #0A1E36;    /* footer */
  --ink: #1A2436;          /* body text */
  --muted: #5B6472;        /* secondary text on white or cream */
  --gold: #E3A93C;         /* fills only: buttons, dots, highlight bar */
  --gold-ink: #22303F;     /* text on gold buttons */
  --gold-text: #8A5A0B;    /* eyebrow text on white or cream */
  --on-navy: #C9D3E0;      /* secondary text and links on navy */
  --cream: #FAF5EC;        /* alternating section background */
  --line: #E4DACA;         /* borders, dividers */
  --white: #FFFFFF;
  --header-bg: rgb(255 255 255 / 0.86);                     /* translucent white */
  --hero-shadow: 0 30px 60px -30px rgb(15 42 74 / 0.45);    /* navy, hero photo only */
  --toast-edge: rgb(255 255 255 / 0.3);                     /* keeps the toast visible over the navy band */

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --size-h1: clamp(2.5rem, 1.878rem + 2.652vw, 4rem);           /* 40 → 64px */
  --size-h2: clamp(1.875rem, 1.513rem + 1.547vw, 2.75rem);      /* 30 → 44px */
  --size-lede: clamp(1.1875rem, 1.136rem + 0.221vw, 1.3125rem); /* 19 → 21px */
  --size-body: clamp(1.125rem, 1.099rem + 0.11vw, 1.1875rem);   /* 18 → 19px */
  --size-highlight: clamp(1.5rem, 1.293rem + 0.884vw, 2rem);    /* 24 → 32px */

  /* Layout */
  --container: 1160px;
  --reading: 680px;
  --gutter: 20px;
  --header-h: 64px;
  --section-pad: clamp(4.5rem, 3.464rem + 4.42vw, 7rem);        /* 72 → 112px */
  --radius-photo: 20px;
  --radius-card: 18px;
  --radius-pill: 999px;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}


/* ---------- 2. Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, ul, dl, dd {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 560;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  text-wrap: balance;
}

h1 {
  font-size: var(--size-h1);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--size-h2);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.cta-band :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}


/* ---------- 3. Components ---------- */

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

/* Eyebrow label (hero and story only) */
.eyebrow {
  margin-bottom: 16px;
  color: var(--gold-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font: 700 1.0625rem/1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-secondary {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-light {
  border-color: var(--white);
  color: var(--white);
}

@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-1px); }
  .btn-secondary:hover { background: var(--navy); color: var(--white); }
  .btn-light:hover { background: var(--white); color: var(--navy); }
}

.btn-sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 1rem;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Section heading (sections without an eyebrow) */
.section {
  padding-block: var(--section-pad);
}

.section-cream {
  background: var(--cream);
}

.section-title {
  max-width: 22ch;
  margin-bottom: clamp(2rem, 1.586rem + 1.768vw, 3rem);
}

/* Toast: announced to screen readers through role="status" */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 12px 22px;
  border: 1px solid var(--toast-edge);
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}


/* ---------- 4. Sections ---------- */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 560;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Hero */
.hero {
  padding-block: 24px var(--section-pad);
  background: var(--cream);
}

.hero-inner {
  display: grid;
  gap: 32px;
}

.hero-media {
  order: -1;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: var(--radius-photo);
  box-shadow: var(--hero-shadow);
}

.hero-text {
  max-width: 640px;
}

.lede {
  margin-top: 24px;
  color: var(--muted);
  font-size: var(--size-lede);
  line-height: 1.55;
  text-wrap: balance;
}

.hero .btn-row {
  margin-top: 32px;
}

.microcopy {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 960px) {
  .hero {
    padding-top: 72px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: 80px;
  }

  .hero-media {
    order: 0;
  }

  .hero-media img {
    aspect-ratio: 4 / 5;
  }
}

/* Chris's story: a 680px reading column; the photo pair breaks out to 1000px.
   Below 960px the column stays left-aligned so it lines up with the photos. */
.story > * {
  max-width: var(--reading);
}

@media (min-width: 960px) {
  .story > * { margin-inline: auto; }
}

.story h2 + p {
  margin-top: 32px;
}

.story > p + p {
  margin-top: 1.25em;
}

.story .photo-pair {
  display: grid;
  gap: 16px;
  max-width: 1000px;
  margin-block: 48px;
}

.photo-pair img {
  width: 100%;
  border-radius: var(--radius-photo);
}

.photo-pair figcaption {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .story .photo-pair {
    grid-template-columns: 1fr 1fr;
    margin-block: 64px;
  }

  .photo-pair figcaption {
    grid-column: 1 / -1;
  }
}

.story .highlight {
  margin-block: 48px;
  padding-left: 24px;
  border-left: 4px solid var(--gold);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: var(--size-highlight);
  font-style: italic;
  font-weight: 450;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  line-height: 1.3;
}

/* Where your donation goes */
.cards {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}

/* Each card spans 3 rows of a shared subgrid, so text lines up across a row even when a title wraps */
.card {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--white);
}

.dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--gold);
}

.card h3 {
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

/* Surrounded by love */
.love-grid {
  display: grid;
  gap: 16px;
}

.love-grid img {
  width: 100%;
  border-radius: var(--radius-photo);
}

@media (min-width: 960px) {
  .love-grid {
    grid-template-columns: 2fr 1fr;
  }

  .love-grid .love-main {
    grid-row: span 2;
    height: 100%;
    object-fit: cover;
  }
}

/* Fundraiser event */
.event {
  padding-block: clamp(3.5rem, 2.878rem + 2.652vw, 5rem);  /* 56 → 80px */
}

.event-card {
  max-width: 640px;
  margin-inline: auto;
  padding: 40px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  text-align: center;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.event-card h2 {
  margin-top: 24px;
}

.event-card p:not([class]) {
  margin-top: 16px;
}

.event-help {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Used by the live event version (commented out in index.html) */
.event-details {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.event-details dt {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-details dd {
  color: var(--navy);
  font-weight: 600;
}

.event-card .btn {
  margin-top: 32px;
}

@media (min-width: 640px) {
  .event-card { padding: 56px 48px; }
}

/* Closing call to action */
.cta-band {
  padding-block: var(--section-pad);
  background: var(--navy);
}

.cta-band h2 {
  color: var(--white);
}

.cta-thanks {
  margin-top: 16px;
  color: var(--on-navy);
  font-size: var(--size-lede);
  line-height: 1.55;
}

.cta-band .btn-row {
  margin-top: 32px;
}

.qr {
  display: none;
}

@media (min-width: 960px) {
  .cta-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 64px;
  }

  .qr {
    display: block;
    width: 180px;
    text-align: center;
  }

  .qr img {
    width: 180px;
    height: 180px;
    padding: 16px;
    border-radius: var(--radius-card);
    background: var(--white);
  }

  .qr figcaption {
    margin-top: 12px;
    color: var(--on-navy);
    font-size: 0.875rem;
    line-height: 1.4;
    text-wrap: balance;
  }
}

/* Footer */
.site-footer {
  padding-block: 32px;
  background: var(--navy-deep);
  color: var(--on-navy);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
