/* ==========================================================================
   Matched2Married — styles.css
   Goal: one stylesheet that reads clean, stays consistent, and doesn’t turn
   into a junk drawer as we add pages.
   --------------------------------------------------------------------------
   Structure:
   1) Design tokens (colors, fonts)
   2) Base / resets
   3) Global layout + shared components
   4) Page modules (Home, RSVP, Honeymoon Fund, Our Story)
   5) Animations + accessibility
   ========================================================================== */


/* ==========================================================================
   1) DESIGN TOKENS
   ========================================================================== */

:root {
  /* Palette (wedding vibe) */
  --eucalyptus: #5c7f71;
  --dark-green: #1f3a34;
  --cedar-rose: #aa5a5a;
  --terracotta: #c7683b;
  --burgundy: #6b1f36;
  --paprika: #b34028;
  --gold: #d8b36f;

  /* Neutrals */
  --bg-base: #0b1412;
  --text-main: #fdfaf6;
  --text-muted: #e4ddd2;

  /* Overlays (used on top of photos) */
  --bg-overlay: rgba(7, 16, 14, 0.72);

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radii */
  --radius-card: 24px;
  --radius-pill: 999px;
  --radius-field: 14px;

  /* Borders */
  --border-gold-soft: rgba(216, 179, 111, 0.25);
  --border-gold: rgba(216, 179, 111, 0.55);

  /* Shadows */
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.45);
}


/* ==========================================================================
   2) BASE / RESET
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-base);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}


/* ==========================================================================
   3) GLOBAL LAYOUT + SHARED COMPONENTS
   ========================================================================== */

/* Shared page shell (used by Home, RSVP, Honeymoon Fund, etc.) */
.page {
  min-height: 100vh;
  width: 100%;
  isolation: isolate;

  /* Default hero photo background */
  background-image:
    linear-gradient(135deg, rgba(31, 58, 52, 0.5), rgba(107, 31, 54, 0.25)),
    url("../images/engagement-main-min.JPG");
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
}

/* Soft vignette + gold glow over the background */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(216, 179, 111, 0.35), transparent 60%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
  mix-blend-mode: multiply;
  z-index: -1;
}

/* Inner wrapper so content sits centered and clears the fixed nav */
.page-inner {
  width: 100%;
  min-height: 100vh;
  padding: 6.25rem 1.5rem 2rem; /* leaves room for fixed nav */
  display: flex;
  justify-content: center;
}

/* Home-only: centered, no scrolling */
.page-inner--center {
  align-items: center;
  padding-top: 5.5rem;
  padding-bottom: 3rem;
}

/* Main glass card used across pages */
.hero-content {
  position: relative;
  width: 100%;
  max-width: 820px;

  text-align: center;
  display: flex;
  flex-direction: column;

  backdrop-filter: blur(10px);
  background: linear-gradient(
    135deg,
    rgba(107, 31, 54, 0.78),
    rgba(199, 104, 59, 0.78)
  );

  border-radius: var(--radius-card);
  padding: 2rem 1.75rem 2.5rem;
  border: 1px solid rgba(216, 179, 111, 0.4);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, 0.02);

  /* Nice entrance for first paint */
  animation: card-fade-in 900ms ease-out forwards;
  opacity: 0;
  transform: translateY(18px);
}

@keyframes card-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Headlines and small labels */
h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.names-highlight {
  color: var(--gold);
  letter-spacing: 0.04em;
}

.hero-brand {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.hero-date span {
  opacity: 0.9;
}

.subhead {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 42rem;
  margin: 0.25rem auto 1.5rem;
}

/* Simple dividers used across pages */
.divider {
  height: 1px;
  background: rgba(216, 179, 111, 0.25);
  border: 0;
  margin: 1.25rem 0 1.5rem;
}

.footer-divider {
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

/* Footer pill stays down at the bottom when content is short */
.hero-footer {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  font-size: 0.75rem;
  color: rgba(237, 229, 215, 0.88);
  opacity: 0.9;

  margin-top: auto;
  padding-top: 1.5rem;
}

/* Pills (used for footer, little badges, etc.) */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;

  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(237, 229, 215, 0.4);

  background: radial-gradient(
    circle at top left,
    rgba(199, 104, 59, 0.55),
    rgba(107, 31, 54, 0.85)
  );

  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 auto;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 179, 111, 0.9);
}

/* Nav (fixed, glassy) */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;

  padding: 0.85rem 1rem;
  display: flex;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(216, 179, 111, 0.25);

  background: rgba(11, 20, 18, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.nav-brand {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(253, 250, 246, 0.9);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);

  color: rgba(253, 250, 246, 0.92);
  border: 1px solid transparent;
}

.nav-links a:hover {
  border-color: rgba(216, 179, 111, 0.35);
  background: rgba(107, 31, 54, 0.22);
}

.nav-links a.active {
  border-color: rgba(216, 179, 111, 0.5);
  background: rgba(199, 104, 59, 0.22);
}

/* ==========================================================================
   NAV (Responsive hamburger + drawer)
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: center;
}

/* keep your existing .nav-inner styles, but this ensures it stays tight */
.nav-inner {
  position: relative;
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(216, 179, 111, 0.25);
  background: rgba(11, 20, 18, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* Nav brand logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-logo {
  height: 50px;               /* desktop */
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Slightly smaller on mobile */
@media (max-width: 820px) {
  .nav-logo {
    height: 24px;
  }
}


/* Hamburger button */
.nav-toggle {
  display: none; /* mobile only */
  border: 1px solid rgba(216, 179, 111, 0.25);
  background: rgba(11, 20, 18, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.nav-toggle:hover {
  border-color: rgba(216, 179, 111, 0.45);
  background: rgba(107, 31, 54, 0.18);
}

/* 3-bar icon */
.nav-toggle-icon {
  display: grid;
  gap: 4px;
  width: 22px;
}

.nav-toggle-icon span {
  height: 2px;
  border-radius: 999px;
  background: rgba(253, 250, 246, 0.92);
  transition: transform 180ms ease, opacity 180ms ease;
}

/* Drawer overlay (scrim) */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

/* Drawer (drops down under the nav pill) */
.nav-drawer {
  position: fixed;
  top: 4.4rem; /* sits just under the nav pill */
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0 1rem;
}

/* Drawer card */
.nav-drawer-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;

  border-radius: 22px;
  border: 1px solid rgba(216, 179, 111, 0.25);
  background: rgba(11, 20, 18, 0.58);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

  padding: 0.6rem;
  display: grid;
  gap: 0.25rem;

  /* smooth entrance */
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-drawer-inner a {
  display: block;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;

  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;

  border: 1px solid transparent;
  color: rgba(253, 250, 246, 0.92);
}

.nav-drawer-inner a:hover {
  border-color: rgba(216, 179, 111, 0.35);
  background: rgba(107, 31, 54, 0.22);
}

.nav-drawer-inner a.active {
  border-color: rgba(216, 179, 111, 0.55);
  background: rgba(199, 104, 59, 0.22);
}

/* When open: animate in */
.nav.is-open .nav-drawer-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Hamburger morph into an X */
.nav.is-open .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav.is-open .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile rules */
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}



/* ==========================================================================
   4) PAGE MODULES
   ========================================================================== */

/* --------------------------------------------------------------------------
   HOME (Countdown)
   -------------------------------------------------------------------------- */

.countdown {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

@keyframes countdown-pulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.time-box {
  min-width: 72px;
  border-radius: 18px;
  padding: 0.7rem 0.75rem;

  background: radial-gradient(
    circle at top,
    rgba(216, 179, 111, 0.26),
    rgba(107, 31, 54, 0.85)
  );

  border: 1px solid rgba(216, 179, 111, 0.55);
  box-shadow: var(--shadow-soft);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;

  animation: countdown-pulse 2200ms ease-in-out infinite;
}

.time-box:nth-child(2) {
  animation-delay: 0.18s;
}

.time-box:nth-child(3) {
  animation-delay: 0.36s;
}

.time-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.time-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.hero-subcopy {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* Home page: intentionally no scroll */
.home-body {
  overflow: hidden;
}

/* Home: quick links in the footer */
.home-links a {
  text-decoration: none;
}

.home-links a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(216, 179, 111, 0.55);
}


/* --------------------------------------------------------------------------
   RSVP (Forms + status)
   -------------------------------------------------------------------------- */

.form {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.field-row {
  display: grid;
  gap: 0.85rem;
}

.field-row.two {
  /* single-column by default, flips to 2-column at tablet+ */
}

label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253, 250, 246, 0.88);
  display: block;
  margin-bottom: 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-field);
  border: 1px solid var(--border-gold-soft);

  background: rgba(11, 20, 18, 0.35);
  color: var(--text-main);

  padding: 0.8rem 0.9rem;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(216, 179, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(216, 179, 111, 0.12);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

/* Generic helper copy under fields */
.helper {
  font-size: 0.9rem;
  color: rgba(228, 221, 210, 0.92);
  opacity: 0.95;
  line-height: 1.55;
}

.note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(228, 221, 210, 0.9);
  opacity: 0.95;
}

/* Buttons (shared) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  border-radius: var(--radius-pill);
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-gold);

  background: radial-gradient(
    circle at top left,
    rgba(199, 104, 59, 0.55),
    rgba(107, 31, 54, 0.85)
  );

  color: rgba(253, 250, 246, 0.95);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.06);
}

.button-secondary {
  /* used on honeymoon fund page and anywhere we want a quieter button */
  background: radial-gradient(
    circle at top left,
    rgba(199, 104, 59, 0.25),
    rgba(11, 20, 18, 0.2)
  );
  border: 1px solid rgba(216, 179, 111, 0.35);
}

/* Modern radio chips (yes/no attend) */
.chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-gold-soft);
  background: rgba(11, 20, 18, 0.25);

  cursor: pointer;
  user-select: none;

  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  font-size: 0.78rem;
  color: rgba(253, 250, 246, 0.92);
}

.chip:hover {
  border-color: rgba(216, 179, 111, 0.45);
  background: rgba(107, 31, 54, 0.18);
  transform: translateY(-1px);
}

.chip input {
  appearance: none;
  width: 16px;
  height: 16px;

  border-radius: var(--radius-pill);
  border: 1px solid rgba(216, 179, 111, 0.5);
  background: rgba(11, 20, 18, 0.25);

  padding: 0;
  margin: 0;
  position: relative;
}

.chip input:checked {
  background: rgba(216, 179, 111, 0.25);
  box-shadow: 0 0 0 3px rgba(216, 179, 111, 0.12);
  border-color: rgba(216, 179, 111, 0.75);
}

.chip input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 179, 111, 0.75);
}

/* Guest list block (for party size > 1) */
#guestNamesBlock {
  margin-top: 1rem;
}

.guest-fields {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

/* Status messages (hidden until used) */
.status {
  display: none;
  border-radius: var(--radius-field);
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(216, 179, 111, 0.22);
  background: rgba(11, 20, 18, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);

  font-size: 0.9rem;
  color: rgba(228, 221, 210, 0.92);
  opacity: 0.95;
}

.status.is-success {
  display: block;
  border-color: rgba(216, 179, 111, 0.55);
  background: radial-gradient(
    circle at top left,
    rgba(92, 127, 113, 0.38),
    rgba(11, 20, 18, 0.25)
  );
  color: rgba(253, 250, 246, 0.98);
  animation: fade-in 300ms ease-out;
}

.status.is-error {
  display: block;
  border-color: rgba(170, 90, 90, 0.55);
  background: radial-gradient(
    circle at top left,
    rgba(170, 90, 90, 0.3),
    rgba(11, 20, 18, 0.25)
  );
  color: rgba(253, 250, 246, 0.98);
}

.status.is-info {
  display: block;
  border-color: rgba(216, 179, 111, 0.3);
  background: rgba(11, 20, 18, 0.28);
  color: rgba(228, 221, 210, 0.95);
}

/* Spam trap (hidden input for bots) */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Utility */
.hidden {
  display: none !important;
}

/* RSVP (and any page that needs a little extra footer breathing room) */
.hero-footer--spaced {
  margin-top: 1.25rem;
}


/* --------------------------------------------------------------------------
   HONEYMOON FUND (QR + copy)
   -------------------------------------------------------------------------- */

.qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.qr-card {
  border: 1px solid rgba(216, 179, 111, 0.35);
  background: radial-gradient(
    circle at top,
    rgba(216, 179, 111, 0.18),
    rgba(11, 20, 18, 0.35)
  );
  border-radius: 18px;
  padding: 1rem;

  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  outline: none;

  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
}

.qr-card::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  background: radial-gradient(circle at top, rgba(216, 179, 111, 0.35), transparent 60%);
  opacity: 0;
  filter: blur(10px);
  transition: opacity 220ms ease;
  pointer-events: none;
}

.qr-card:hover,
.qr-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 179, 111, 0.6);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.qr-card:hover::after,
.qr-card:focus-visible::after {
  opacity: 1;
  animation: qr-glow 1400ms ease-in-out infinite;
}

.qr-img {
  width: 220px;
  height: auto;
  display: block;
}

/* Helpers used on Honeymoon Fund (keeps HTML clean) */
.helper--centered {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}

.helper--tight {
  margin-bottom: 0.9rem;
}

/* Status spacing for this page (optional, but keeps it consistent) */
#fundStatus {
  margin-top: 0.9rem;
}

/* --------------------------------------------------------------------------
   OUR STORY (Scroll-snap chapters)
   -------------------------------------------------------------------------- */

.story-body {
  background: var(--bg-base);
  overflow: hidden; /* the story container handles scrolling */
}

.story {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

/* Each chapter */
.story-section {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;

  display: flex;
  align-items: center;

  padding: 6.5rem 1.25rem 2.25rem; /* top accounts for nav */
  isolation: isolate;

  /* critical: prevents background bleed between sections */
  overflow: hidden;
  background: var(--bg-base);
}

/* Blurred background photo behind each chapter */
.story-bg {
  position: absolute;
  inset: -30px; /* gives blur room so it never clips */
  background-size: cover;
  background-position: center;

  transform: scale(1.12);
  filter: blur(14px) saturate(1.08);
  opacity: 0.65;

  z-index: -2;
}

/* Color + vignette overlay (keeps text readable without murdering the photo) */
.story-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top, rgba(216, 179, 111, 0.22), transparent 65%),
    linear-gradient(135deg, rgba(31, 58, 52, 0.42), rgba(107, 31, 54, 0.28)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55));
}

.story-content {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.story-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.story-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
}

.story-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.story-card {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(107, 31, 54, 0.78), rgba(199, 104, 59, 0.55));
  border-radius: var(--radius-card);
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid rgba(216, 179, 111, 0.35);
  box-shadow: var(--shadow-card);
}

.story-text {
  color: rgba(253, 250, 246, 0.93);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.story-em {
  color: var(--gold);
  font-weight: 600;
}

.story-quote {
  border-left: 2px solid rgba(216, 179, 111, 0.55);
  padding-left: 0.9rem;
  margin: 0.9rem 0 0.95rem;
}

.story-quote-line {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(253, 250, 246, 0.98);
}

.story-quote-attrib {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(228, 221, 210, 0.9);
}

.story-bigline {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.4;
  margin: 0.25rem 0 0.95rem;
  color: rgba(253, 250, 246, 0.96);
}

/* Foreground photo frame (uniform sizing across sections) */
.story-photo {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(216, 179, 111, 0.35);
  background: rgba(11, 20, 18, 0.25);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.story-photo img {
  width: 100%;
  height: 380px; /* desktop frame height */
  object-fit: cover;
  object-position: center; /* per-image override allowed inline */
  display: block;
}

.story-photo figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  color: rgba(228, 221, 210, 0.9);
  background: rgba(0, 0, 0, 0.35);
}

.story-scrollhint {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;

  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(228, 221, 210, 0.92);
  opacity: 0.9;
}

.story-scrollhint .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(216, 179, 111, 0.8);
  animation: story-dot 1400ms ease-in-out infinite;
}

.story-endpill {
  margin-top: 1.35rem;
}

/* Per-image crop adjustment (used when faces sit higher in frame) */
.story-photo--top img {
  object-position: center 20%;
}


/* ==========================================================================
   5) RESPONSIVE + MOTION
   ========================================================================== */

@media (min-width: 640px) {
  .hero-content {
    padding: 2.5rem 2.75rem 2.8rem;
  }

  .time-box {
    min-width: 88px;
    padding: 0.85rem 1rem;
  }

  .time-value {
    font-size: 1.9rem;
  }

  .hero-subcopy {
    font-size: 0.95rem;
  }

  .hero-footer {
    font-size: 0.8rem;
  }
}

@media (min-width: 720px) {
  .field-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-section {
    padding-top: 6.25rem;
    padding-bottom: 2.25rem;
  }

  .story-photo {
    order: -1; /* show photo first on mobile */
  }

  .story-photo img {
    height: 320px;
  }
}

@media (max-width: 520px) {
  .story-photo img {
    height: 260px;
  }
}

/* Slightly smaller QR on small screens */
@media (max-width: 480px) {
  .qr-img {
    width: 180px;
  }
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes qr-glow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes story-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.75;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Reduced motion: keep it classy for people who prefer it */
@media (prefers-reduced-motion: reduce) {
  .story {
    scroll-behavior: auto;
  }

  .story-scrollhint .dot {
    animation: none;
  }

  .time-box {
    animation: none;
  }
}
