/*
Title: site.css — The site's single stylesheet
Description: Warm-remembrance design system in the family's "Velvet
  Mandarin" palette: warm paper, burnt mandarin orange (primary accent),
  royal purple (secondary), amber highlight. Type is Sacramento script
  for the wordmark and hero title, Source Serif 4 for headings, and
  Inter for body text. Covers layout, hero, cards, buttons, forms, and
  admin tables.
Changelog: 2026-08-21: Initial implementation (Phase 1, Task 3)
2026-08-22: Fix header wordmark/nav contrast on ivory subpages (the
  Phase 1 header text was near-white everywhere, invisible off the
  hero); add site-nav, memory-card, and gallery-grid styles for the
  gated /remember page (Phase 2, Task 1)
2026-08-22: Add .slideshow, .slide-layer, .slide-photo, .slide-story,
  and .slideshow-hint styles for the full-screen ceremony slideshow
  (Phase 2, Task 2)
2026-08-22: Add .section.flush-bottom utility class so remember.html
  can zero out the section's bottom padding without an inline style,
  which the site's CSP (style-src with no unsafe-inline) was silently
  blocking (Phase 2, final-review fix wave, Finding 1)
2026-08-22: Split the hero: .hero is now a pure photo-collage strip
  (height locked to the collage's 2.4:1 ratio so cover never crops
  vertically) and the title text moves to a new solid-plum .hero-title
  block below it, so the words can never overlap the photos
2026-08-22: Strengthen the hero's top scrim (0.6 -> 0.25 -> 0 over the
  top quarter) so the overlaid header nav stays readable against the
  white polaroid frames near the top of the collage
2026-08-22: Center the hero banner (eyebrow/title/tagline) to match the
  approved previews; add .joyful emphasis class (bold accent orange)
2026-08-22: New identity, chosen by the family from previews: Velvet
  Mandarin palette (from the "Possible Fonts and Colors" PDF, adapted),
  Sacramento script wordmark + hero title, Source Serif 4 headings,
  Inter body, pill buttons, amber link underlines, and a hand-drawn
  squiggle underline (static SVG) replacing the hairline under section
  headings
2026-08-22: New family-provided lede collage ("Katie Celebration of
  Life.png") is on a white ground, so the hero flips to a light
  treatment: 2:1 ratio contract, white background, white top scrim,
  and the header nav keeps its dark ink over the hero instead of
  switching to light
2026-08-22: Family wants the purple back: the lede collage was
  re-staged onto a --plum-deep ground (photos re-framed as white
  polaroids programmatically), so the hero returns to the dark
  treatment — plum base, dark top scrim, light nav text — keeping
  the 2:1 ratio contract
2026-08-22: Add .upload-progress styles (track, fill, note) for the
  photo upload progress bar driven by upload_progress.js
2026-08-22: h3 subheadings colored --plum-deep (family request)
*/

:root {
  --paper: #fdf8f2;
  --card: #fffdf9;
  --ink: #241b33;
  --ink-soft: #61586f;
  --accent: #ea580c;      /* burnt mandarin — Katie's favorite color, Velvet Mandarin */
  --accent-deep: #c2410c;
  --highlight: #fdba74;   /* soft amber — link underlines, hero eyebrow */
  --plum: #5b21b6;        /* royal purple — her second favorite, Velvet Mandarin */
  --plum-deep: #47188f;   /* royal purple; hero + .hero-title ground — must match the collage's flat background */
  --hairline: #ecdfd0;
  --script: "Sacramento", "Snell Roundhand", cursive;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Source Serif runs larger than the old Cormorant, so sizes come down a step. */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.5rem); margin: 0; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.125rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.5rem; color: var(--plum-deep); }

a {
  color: var(--accent-deep);
  text-decoration-color: var(--highlight);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* Emphasis in the site's accent orange ("joyful colors" on the home page). */
.joyful { color: var(--accent-deep); font-weight: 700; }
.muted { color: var(--ink-soft); }

.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: 1.25rem 2rem;
  display: flex; align-items: baseline; justify-content: space-between;
}
.wordmark {
  font-family: var(--script); font-size: 1.75rem; line-height: 1;
  color: var(--accent-deep); text-decoration: none;
}
.site-nav { display: flex; gap: 1.1rem; }
.site-nav a { color: var(--accent-deep); text-decoration: none; font-size: 0.9375rem; }
.site-nav a:hover { text-decoration: underline; }
/* Pages that open with the hero photo need light-on-dark header text. */
body:has(.hero) .wordmark, body:has(.hero) .site-nav a { color: #fffdf9; }

.hero {
  /* Photo-collage strip. The title lives in .hero-title below, never on the
     photos. height >= width / 2 (the collage's aspect ratio) means
     background-size: cover can never crop vertically — the full collage is
     always visible and only the sides trim on narrow windows. The collage's
     ground is flat --plum-deep, so it merges seamlessly into .hero-title.
     The top gradient is a light scrim for the overlaid header nav. */
  height: max(38vh, calc(100vw / 2));
  background-color: var(--plum-deep); /* royal purple, the collage's ground */
  background-image:
    linear-gradient(to bottom, rgba(15, 15, 25, 0.55), rgba(15, 15, 25, 0.2) 12%, rgba(15, 15, 25, 0) 26%),
    url("/static/images/katie-landing.jpg");
  background-size: cover;
  background-position: center bottom;
}
.hero-title { background-color: var(--plum-deep); color: #fffdf9; text-align: center; }
.hero-inner { padding: 0 2rem 3.25rem; max-width: 62rem; margin: 0 auto; width: 100%; }
/* The name reads as a signature: the family's cursive pick, run large. */
.hero-title h1 { font-family: var(--script); font-weight: 400; font-size: clamp(3.25rem, 7vw, 5rem); }
.hero-eyebrow {
  color: var(--highlight); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.25em;
  font-size: 0.8125rem; margin: 0 0 0.5rem;
}
.hero-tagline { font-family: var(--serif); font-style: italic; font-size: 1.375rem; margin: 0.75rem 0 0; }

.section { max-width: 42rem; margin: 0 auto; padding: 3.25rem 2rem 0.5rem; }
.section:last-of-type { padding-bottom: 3rem; }
.section.narrow { max-width: 34rem; padding-top: 7rem; }
.section.flush-bottom { padding-bottom: 0; }
/* Hand-drawn squiggle underline (static SVG keeps it CSP-safe) — the site's
   one playful signature, replacing the old hairline rule. */
.section h2::after {
  content: ""; display: block; width: 10.5rem; max-width: 60%; height: 0.8rem;
  margin-top: 0.3rem;
  background: url("/static/images/squiggle.svg") no-repeat left center / contain;
}

.card-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 1.5rem;
}

.button {
  display: inline-block; padding: 0.7rem 1.7rem;
  background: var(--accent); color: #fffdf9;
  border: 2px solid var(--accent); border-radius: 999px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 10px rgba(36, 27, 51, 0.15);
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button-secondary { background: transparent; color: var(--plum); border-color: var(--plum); box-shadow: none; }
.button-secondary:hover { background: var(--plum); border-color: var(--plum); color: #fffdf9; }
.button.small { padding: 0.35rem 0.9rem; font-size: 0.875rem; }

form.stationery {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 2rem; margin-top: 1.5rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
form.stationery label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9375rem; color: var(--ink-soft); }
form.stationery input[type="text"],
form.stationery input[type="email"],
form.stationery input[type="tel"],
form.stationery input[type="number"],
form.stationery input[type="file"],
form.stationery textarea {
  font: inherit; color: var(--ink);
  padding: 0.55rem 0.7rem; border: 1px solid var(--hairline);
  border-radius: 4px; background: #fff;
}
form.stationery textarea { min-height: 11rem; resize: vertical; }
form.stationery fieldset { border: 1px solid var(--hairline); border-radius: 4px; padding: 0.9rem 1rem; margin: 0; }
form.stationery legend { padding: 0 0.4rem; color: var(--ink-soft); font-size: 0.9375rem; }
label.radio, label.check { flex-direction: row !important; align-items: baseline; gap: 0.55rem !important; color: var(--ink) !important; }
.field-error { color: #9c3a2e; font-size: 0.875rem; margin: 0.15rem 0 0; }

/* Photo-upload progress bar; upload_progress.js unhides it and drives
   the fill width while the multipart POST is in flight. */
.upload-progress { margin: 0.25rem 0 0; }
.upload-progress-track {
  height: 0.75rem; border-radius: 999px;
  background: var(--hairline); overflow: hidden;
}
.upload-progress-fill {
  height: 100%; width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}
.upload-progress-note { color: var(--ink-soft); font-size: 0.9375rem; margin: 0.5rem 0 0; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.inline-form { display: inline-block; margin-right: 0.4rem; }
.totals-row { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1rem 0; }
.total-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 6px; padding: 0.9rem 1.4rem; text-align: center; }
.total-card strong { display: block; font-family: var(--serif); font-size: 1.75rem; }
.pending-item { background: var(--card); border: 1px solid var(--hairline); border-radius: 6px; padding: 1.1rem 1.3rem; margin: 0.9rem 0; }
.pending-item blockquote { margin: 0.5rem 0; padding-left: 0.9rem; border-left: 3px solid var(--plum); font-family: var(--serif); font-size: 1.125rem; font-style: italic; }
.admin-thumb { max-width: 14rem; max-height: 10rem; border-radius: 4px; display: block; margin: 0.5rem 0; }

.site-footer { text-align: center; color: var(--ink-soft); padding: 2.5rem 1rem 2rem; font-size: 0.9375rem; }

.memory-card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 1.4rem 1.6rem; margin: 1rem 0;
}
.memory-card blockquote {
  margin: 0; padding-left: 0.9rem; border-left: 3px solid var(--plum);
  font-family: var(--serif); font-size: 1.1875rem; font-style: italic;
}
.memory-byline { color: var(--ink-soft); margin: 0.6rem 0 0; font-size: 0.9375rem; }

.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: 11rem; object-fit: cover; border-radius: 4px; display: block; }
.gallery-item figcaption { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 0.35rem; }

.slideshow { position: fixed; inset: 0; background: #14100f; z-index: 50; }
.slide-layer {
  position: absolute; inset: 0; padding: 3rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 1.5s ease;
}
.slide-layer.visible { opacity: 1; }
.slide-photo, .slide-story { display: flex; flex-direction: column; align-items: center; }
.slide-photo img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.slide-caption { color: #d8cfc6; font-size: 1rem; margin-top: 1rem; text-align: center; }
.slide-story blockquote {
  max-width: 46rem; margin: 0; border: 0; padding: 0; text-align: center;
  color: #fffdf9; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.5;
}
.slide-byline { color: #d8cfc6; margin-top: 1.5rem; font-size: 1.125rem; text-align: center; }
.slideshow-hint { position: absolute; bottom: 1rem; right: 1.4rem; color: #8a7f77; font-size: 0.8125rem; z-index: 51; }
