/* =========================================================
   Perry Family Reunion 2026
   Stylesheet (cleaned + organized)
   Vibe: Warm heritage / scrapbook, modern readability
   ========================================================= */

/* ---------------------------------------------------------
   1) Theme tokens + base reset
   --------------------------------------------------------- */

:root {
  /* Backgrounds */
  --bg: #fefaf5; /* warm cream */
  --bg-alt: #fff7ed; /* warm light peach */

  /* Text */
  --text: #111827; /* near-black ink */
  --muted: #525a67; /* soft ink for paragraphs */

  /* Accents */
  --accent: #166534; /* deep green */
  --accent-strong: #14532d;
  --accent-soft: #e4f3e6;

  --accent-warm: #c2410c; /* warm rust */
  --accent-warm-soft: #fff7ed;

  /* Surfaces */
  --card-bg: #ffffff;
  --card-border: #e5e7eb;

  /* Layout + shape */
  --shell-width: 960px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.12);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Heritage highlight (“parchment”) */
  --parchment: #fff1dd;
  --parchment-border: rgba(194, 65, 12, 0.22);

  /* Typography */
  --serif: "Source Serif 4", ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

/* Links */
a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-warm);
}

/* ---------------------------------------------------------
   2) Shell / container
   --------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------------------------------------------------------
   3) Header & navigation
   --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(
    to right,
    rgba(22, 101, 52, 0.96),
    rgba(194, 65, 12, 0.95)
  );
  color: #f9fafb;
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand__title {
  font-weight: 700;
  font-size: 1.2rem;
}

.brand__subtitle {
  font-size: 0.9rem;
  line-height: 1.25;
  opacity: 0.9;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* single source of spacing */
}

.nav a {
  position: relative;
  font-size: 0.92rem;
  text-decoration: none;
  color: #f9fafb;
  padding: 0.3rem 0.2rem;
  transition: color 0.15s ease, transform 0.05s ease;
}

.nav a:hover {
  color: #fefce8;
  transform: translateY(-1px);
}

/* CTA link */
.nav__cta {
  margin-left: 1.25rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background-color: var(--accent-warm);
  color: #fff7ed;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

.nav__cta:hover {
  background-color: #b45309;
  color: #fff7ed;
}

/* CTA current page */
.nav__cta[aria-current="page"] {
  background-color: #f97316;
  color: #fff7ed;
  border-color: rgba(15, 23, 42, 0.25);
}

/* Optional underline style */
.nav__link--active {
  color: #fefce8;
  font-weight: 600;
}

.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background-color: #facc15;
  border-radius: 999px;
}

/* Mobile nav toggle button */
.nav-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #f9fafb;
}

/* Focus styles (accessibility) */
.nav a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 3px;
}

/* ---------------------------------------------------------
   4) Typography (heritage starter mode)
--------------------------------------------------------- */

.brand__title,
.hero__title,
.section__title,
.card__title {
  font-family: var(--serif);
  letter-spacing: 0.01em;
}

.section__title {
  text-align: center;
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.section__intro {
  max-width: 44rem;
  margin: 0 auto var(--space-lg);
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card__body,
.card__list {
  color: var(--muted);
  font-size: 1rem;
}

/* ---------------------------------------------------------
   5) Hero
   --------------------------------------------------------- */

.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: radial-gradient(circle at top left, #ecfdf5, transparent 60%),
    radial-gradient(circle at bottom right, #fff7ed, transparent 55%),
    linear-gradient(to bottom, #fdfaf6, #fff7ed);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: var(--space-lg);
  align-items: start;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent-strong);
  margin-bottom: var(--space-xs);
}

.hero__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.9rem, 2.7vw, 2.5rem);
  line-height: 1.2;
}

.hero__body {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.hero__card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, #fee2e2 0, transparent 50%);
  opacity: 0.6;
  pointer-events: none;
}

.hero__card-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  position: relative;
}

.hero__list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
}

.hero__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  position: relative;
}

/* ---------------------------------------------------------
   6) Sections
   --------------------------------------------------------- */

.section {
  padding: var(--space-xl) 0;
}

/* Heritage “paper” alt background (single source of truth) */
.section--alt {
  background: radial-gradient(
      circle at top left,
      rgba(22, 101, 52, 0.06),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(194, 65, 12, 0.06),
      transparent 55%
    ),
    linear-gradient(to bottom, #fdfaf6, var(--bg-alt));
}

/* ---------------------------------------------------------
   7) Buttons
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background-color: var(--accent);
  color: #ecfdf5;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.05s ease;
}

.btn:hover {
  background-color: var(--accent-strong);
  box-shadow: 0 8px 24px rgba(20, 83, 45, 0.35);
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn--outline:hover {
  background-color: var(--accent-soft);
  box-shadow: none;
  transform: none;
}

/* ---------------------------------------------------------
   8) Grid
   --------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------------------------------------------------------
   9) Cards & callouts
   --------------------------------------------------------- */

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  padding: var(--space-md);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}

.card--center {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.card__body {
  margin: 0 0 0.7rem;
  line-height: 1.65;
}

.card__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.callout {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(22, 101, 52, 0.2);
  background: linear-gradient(
    135deg,
    rgba(22, 101, 52, 0.06),
    rgba(194, 65, 12, 0.06)
  );
}

.callout__title {
  margin: 0 0 0.5rem;
}

.callout__body {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

/* Badge (deadline / important note) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--parchment);
  border: 1px solid var(--parchment-border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  vertical-align: middle;
}

/* ---------------------------------------------------------
   10) Form embeds
   --------------------------------------------------------- */

.form-embed {
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.form-embed iframe {
  width: 100%;
  display: block;
  height: clamp(720px, 85vh, 1100px);
  border: 0;
}

/* ---------------------------------------------------------
   11) Page-specific accents
   --------------------------------------------------------- */

/* Our Story: decorative band on top of alt section */
.our-story-page .section--alt {
  position: relative;
}

.our-story-page .section--alt::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(22, 101, 52, 0.35) 0 16px,
    rgba(194, 65, 12, 0.28) 16px 32px
  );
  opacity: 0.8;
  pointer-events: none;
}

/* In Loving Memory page */
.in-memory-page .section--alt {
  background: radial-gradient(circle at top, #fff7ed, transparent 55%),
    radial-gradient(circle at bottom, #ecfdf5, transparent 55%),
    linear-gradient(180deg, #fdfaf6, #fff7ed);
}

.in-memory-page .section__title {
  letter-spacing: 0.04em;
}

.in-memory-page .card--memory {
  position: relative;
  border-left: 4px solid var(--accent-warm);
  overflow: hidden;
}

.in-memory-page .card--memory::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(194, 65, 12, 0.06),
    transparent 55%
  );
  pointer-events: none;
}

.in-memory-page .card--memory .card__title {
  position: relative;
  color: var(--accent-strong);
}

.in-memory-page .card--memory .card__body {
  position: relative;
}

.card--memory-highlight {
  margin-top: 2rem;
  border-left-width: 6px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  background: radial-gradient(
    circle at top left,
    rgba(250, 250, 249, 0.98),
    rgba(255, 247, 237, 0.92)
  );
}

.card--memory-highlight .card__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.card--memory-highlight .card__title::before {
  content: "★";
  font-size: 0.9rem;
  color: var(--accent-warm);
  opacity: 0.8;
}

.section__subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--accent-strong);
  margin: 2rem 0 1.25rem;
}

/* Family Tree tweaks */
.family-tree-grid .card__title {
  margin-bottom: 0.6rem;
}

.family-tree-grid .card__list {
  margin-bottom: 0.5rem;
}

/* Family Roots page */
.family-roots-page .family-branch {
  margin-bottom: var(--space-xl);
}

.family-roots-page .family-branch > .card__list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.5rem;
  border-left: 3px solid rgba(22, 101, 52, 0.18);
  padding-inline-start: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.family-roots-page .family-branch > .card__list li {
  position: relative;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.family-roots-page .family-branch > .card__list li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.6;
}

.family-roots-page .family-nav {
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.9rem;
  text-align: right;
  color: var(--muted);
}

.family-roots-page .family-nav a {
  text-decoration: none;
  color: var(--accent-strong);
}

.family-roots-page .family-nav a:hover,
.family-roots-page .family-nav a:focus {
  text-decoration: underline;
  color: var(--accent-warm);
}

.family-roots-page .family-branch p {
  max-width: 48rem;
}

.family-roots-page .section--alt {
  position: relative;
}

.family-roots-page .section--alt::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(22, 101, 52, 0.35) 0 16px,
    rgba(194, 65, 12, 0.28) 16px 32px
  );
  opacity: 0.8;
  pointer-events: none;
}

/* RSVP page accent underline */
.rsvp-page .page-header .section__title::after,
.rsvp-page .section__title::after {
  background: linear-gradient(to right, var(--accent-warm), var(--accent));
}

/* ---------------------------------------------------------
   12) Footer
   --------------------------------------------------------- */

.site-footer {
  padding: var(--space-md) 0 var(--space-lg);
  background: radial-gradient(circle at top, #14532d, #0b1120);
  color: #e5e7eb;
  margin-top: var(--space-lg);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__text {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------
   13) Skip link (accessibility)
   --------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #ffffff;
  color: var(--accent-strong);
  border-radius: 999px;
  border: 1px solid var(--card-border);
  transform: translateY(-150%);
  transition: transform 0.15s ease;
  z-index: 50;
  font-size: 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------------------------------------------------------
   14) Page headers (optional helper class)
   --------------------------------------------------------- */

.page-header {
  position: relative;
  padding-top: calc(var(--space-xl) * 1.05);
  padding-bottom: var(--space-lg);
}

.page-header .section__title {
  position: relative;
}

.page-header .section__title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent-warm));
  opacity: 0.85;
}

.page-header .section__intro {
  margin-bottom: var(--space-md);
}

/* ---------------------------------------------------------
   15) Responsive
   --------------------------------------------------------- */

@media (max-width: 800px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--two,
  .grid--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: linear-gradient(
      to bottom,
      rgba(22, 101, 52, 0.98),
      rgba(194, 65, 12, 0.96)
    );
    padding: 0.75rem 1rem 1rem;
  }

  .nav--open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 0.45rem 0.3rem;
  }

  .card {
    padding: 1rem 1.1rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2.25rem 0;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .card__body {
    font-size: 0.98rem;
  }

  .form-embed iframe {
    height: clamp(680px, 78vh, 950px);
  }
}
