/* Callie Loves Love design system tokens */
:root {
  --blush: #ECB0B6;
  --coral: #D26767;
  --rust: #9F4739;
  --rust-dark: #7E3529;
  --ink: #2E1C19;
  --ink-muted: #5E413C;
  --blush-50: #FBEAEC;
  --blush-200: #F2CDD1;
  --surface: #FFFFFF;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-sans: 'Figtree', system-ui, sans-serif;

  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); }
a:hover { color: var(--rust-dark); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tint { background: var(--blush-50); }
.section--blush { background: var(--blush); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rust); }
.section--blush .eyebrow { color: var(--ink); }
.lede { font-size: 20px; line-height: 1.55; color: var(--ink-muted); max-width: 560px; }
.muted { color: var(--ink-muted); }
.small { font-size: 15px; }
.h-display { font-size: clamp(44px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.02em; }
.h-section { font-size: clamp(34px, 4.4vw, 48px); max-width: 760px; }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--blush-200); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 54px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav .btn + .btn { margin-left: -12px; }
.nav a:not(.btn):hover { text-decoration: underline; }
.site-footer { background: var(--ink); color: var(--blush-50); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
.site-footer img { height: 68px; width: auto; }
.site-footer a { color: var(--blush-50); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: var(--radius-pill); font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn--primary { background: var(--rust); color: #fff; }
.btn--primary:hover { background: var(--rust-dark); color: #fff; }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--blush-50); color: var(--ink); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; min-height: 58px; font-size: 18px; }
.btn[disabled] { opacity: 0.7; cursor: wait; }

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 80px; }
.hero-copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 24px; }
.hero-photo { flex: 1 1 380px; display: flex; justify-content: center; }
.hero-photo img { width: 100%; max-width: 480px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; border-radius: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.progress { display: flex; flex-direction: column; gap: 10px; max-width: 480px; padding-top: 8px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress-amount { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.progress-track { height: 10px; background: var(--surface); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--rust); border-radius: var(--radius-pill); transition: width 0.8s ease; }

/* Story */
.story .wrap { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.story-side { flex: 1 1 380px; display: flex; flex-direction: column; gap: 24px; }
.story-body { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; font-size: 19px; line-height: 1.7; }
.quote { margin: 0; font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); line-height: 1.12; font-weight: 600; }

.story-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius-md); }
.read-more { font-weight: 600; font-size: 18px; }

/* Full story page */
.story-top { padding-top: 40px; padding-bottom: 56px; }
.photo-strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 max(24px, calc((100% - 1152px) / 2)) 12px; scroll-padding: 0 max(24px, calc((100% - 1152px) / 2)); scrollbar-width: thin; scrollbar-color: var(--coral) transparent; }
.photo-strip > * { flex: none; width: calc((min(100vw, 1200px) - 112px) / 5); max-width: none; aspect-ratio: 4 / 5; border-radius: 20px; scroll-snap-align: start; }
.photo-strip img { height: auto; object-fit: cover; object-position: 50% 35%; }
.photo-strip .placeholder { background: var(--blush-50); }
.story-title { gap: 16px; padding-top: 40px; }
@media (max-width: 760px) {
  .photo-strip > * { width: 72vw; }
}
.story-full { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; font-size: 20px; line-height: 1.75; }
.story-beat { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.2; color: var(--rust); }
.story-close { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin-top: 16px; }

/* Cards, grids */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border-radius: var(--radius-md); padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.card h3 { font-size: 28px; }
.card p { font-size: 18px; line-height: 1.65; color: var(--ink-muted); }
.logo-row { height: 96px; display: flex; align-items: center; }
.logo-row img { max-height: 96px; width: auto; }
.logo-row img.wide { height: 60px; }
.year-one { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.year-one img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.raised-note { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; text-align: center; font-size: 20px; color: var(--ink-muted); }
.raised-note strong { font-family: var(--font-display); font-size: 44px; line-height: 1.1; color: var(--coral); }
.stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.stat { flex: 1 1 220px; background: var(--surface); border-radius: 20px; padding: 24px 28px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--font-display); font-size: 40px; line-height: 1.1; color: var(--coral); }

/* Race day */
.info { border: 1.5px solid var(--blush-200); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.info .label { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; color: var(--rust); }
.info .big { font-size: 22px; font-weight: 600; }
.route { background: var(--blush-50); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.route-head h3 { font-size: 32px; }
.route-head span { font-weight: 600; color: var(--rust); }
.route-map { aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--blush-200); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 15px; z-index: 0; isolation: isolate; }
.route-map.leaflet-container { display: block; font-family: var(--font-sans); }
.route-map .leaflet-control-attribution { font-size: 11px; background: rgba(255,255,255,0.8); }
.route-map .leaflet-control-attribution a { color: var(--ink-muted); }
.route-map .leaflet-control-zoom a { color: var(--rust); }
.route-heart { background: none; border: 0; }
/* Soften the street map so the rust route stands out */
.route-map .leaflet-tile-pane { filter: grayscale(0.85) sepia(0.15) brightness(1.04) contrast(0.92); }
.schedule { border-top: 1.5px solid var(--blush-200); margin-top: 48px; }
.schedule div { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 18px 0; border-bottom: 1.5px solid var(--blush-200); font-size: 18px; }
.schedule b { width: 120px; }

/* Placeholders (remove as real photos arrive) */
.placeholder { background: var(--blush-200); border: 2px dashed var(--coral); border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 15px; text-align: center; padding: 16px; }
.ratio-1 { aspect-ratio: 1 / 1; }
.ratio-wide { aspect-ratio: 16 / 10; background: var(--surface); }

/* Shirt */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split > * { flex: 1 1 400px; }

/* Help band */
.band { background: var(--rust); }
.band h2 { color: #fff; margin-bottom: 40px; }
.help-card { background: var(--surface); border-radius: var(--radius-md); padding: 32px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; border: 0; text-align: left; font: inherit; cursor: pointer; }
.help-card:hover { color: var(--ink); background: var(--blush-50); }
.help-card strong { font-family: var(--font-display); font-size: 28px; }
.help-card span { color: var(--ink-muted); line-height: 1.55; }
.help-card em { font-style: normal; font-weight: 600; color: var(--rust); }

/* FAQ */
.faq { max-width: 860px; }
.faq details { padding: 22px 0; border-bottom: 1.5px solid var(--blush-200); }
.faq details:first-of-type { border-top: 1.5px solid var(--blush-200); }
.faq summary { font-size: 20px; font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 12px; color: var(--ink-muted); line-height: 1.65; }

/* Forms (register and donate) */
.form-page { background: var(--blush-50); }
.form-page .wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 56px; padding-bottom: 96px; }
.form-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 20px; border: 0; margin: 0; min-width: 0; }
.panel legend, .panel h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; padding: 0; }
.panel legend { float: left; width: 100%; margin-bottom: 4px; }
.panel legend + * { clear: both; }
.fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.field input, .field textarea { font: 400 16px var(--font-sans); color: var(--ink); height: 48px; border: 1.5px solid var(--coral); border-radius: var(--radius-sm); padding: 0 14px; background: var(--surface); }
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--blush); border-color: var(--rust); }
.choice-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 18px; border: 2px solid var(--blush-200); cursor: pointer; }
.choice-card strong { font-family: var(--font-display); font-size: 24px; }
.choice-card span { color: var(--ink-muted); }
.choice-card:has(input:checked) { border-color: var(--rust); background: var(--blush-50); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--rust); outline-offset: 3px; }
.sr-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills--grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.pill { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--coral); font-weight: 600; cursor: pointer; background: var(--surface); }
.pill:has(input:checked) { background: var(--rust); border-color: var(--rust); color: #fff; }
.pill:has(input:focus-visible) { outline: 3px solid var(--rust); outline-offset: 3px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.shirt-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.shirt-logo { width: 140px; height: 140px; border-radius: 16px; object-fit: cover; }
[hidden] { display: none !important; }

.summary { flex: 1 1 340px; min-width: 0; background: var(--surface); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.summary h2 { font-size: 24px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.line.muted { color: var(--ink-muted); }
.total { border-top: 1.5px solid var(--blush-200); padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total strong { font-family: var(--font-display); font-size: 34px; }
.giving { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--blush); border-radius: 14px; padding: 14px 16px; font-weight: 600; }
.giving span { display: flex; align-items: center; gap: 8px; }
.fee-box { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; background: var(--blush-50); border-radius: 14px; padding: 14px; cursor: pointer; }
.opt-in { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; }
.opt-in input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rust); flex: none; }
.fee-box input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rust); flex: none; }
.fine { font-size: 14px; color: var(--ink-muted); text-align: center; line-height: 1.5; }
.error { color: #A3261B; font-size: 15px; font-weight: 600; }

/* Donate page */
.donate-intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.donate-intro img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius-md); }
.donate-form { flex: 1 1 460px; min-width: 0; }

/* Thank-you */
.thanks { text-align: center; max-width: 640px; margin: 0 auto; padding: 96px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.thanks img { width: 120px; height: auto; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero .wrap { padding-top: 40px; gap: 40px; }
  .card, .panel, .summary, .route { padding: 24px; }
  .route-map { aspect-ratio: 1 / 1; }
  .logo img { height: 40px; }
  .summary { position: static; }
}
