/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #2b2b2b;
  --ink-soft: #555555;
  --cream: #faf8f5;
  --cream-alt: #f2ede6;
  --line: #e2dcd3;
  --accent: #9c8468;
  --accent-dark: #7a6650;
  --white: #ffffff;
  --radius: 2px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  /* 400 rather than the thin 300 so text stays readable over the topo map. */
  font-weight: 400;
}

/* The map lives on its own fixed layer rather than a fixed body background:
   iOS ignores background-attachment: fixed and stretches the image over the
   whole page height. 100lvh keeps it from resizing as mobile toolbars hide. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(250,248,245,0.5), rgba(250,248,245,0.6)),
    url('images/twin-lakes-topo.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

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

/* Visible focus ring for keyboard users (mouse/touch clicks don't show it). */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 640px;
}

.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  background: transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.btn-outline:hover { background: var(--accent); color: var(--white); }

.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--ink);
  /* Taller tap area without changing the header height. */
  padding: 6px 0;
  margin: -6px 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { border-color: var(--accent); }

.nav-cta {
  border: 1px solid var(--ink) !important;
  padding: 8px 18px !important;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--ink); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  /* 44px tap target; negative margins keep the header the same height. */
  margin: -6px -11px -6px 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* Hamburger turns into an X while the menu is open. */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  margin-top: 65px;
  scroll-margin-top: 65px;
  min-height: 85vh;
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  align-items: stretch;
}
.hero-photo {
  width: 100%;
  height: 100%;
  min-height: 85vh;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
  /* Lets the names size themselves to this column (cqi units below). */
  container-type: inline-size;
}

.eyebrow, .section-eyebrow {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 18px;
}

.parent-block {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto;
}
.parent-block.parent-top { margin-bottom: 28px; }
.parent-block.parent-bottom { margin: 28px auto 40px; }

.hero h1 {
  font-size: clamp(48px, 9vw, 96px);
  /* Scale to the text column so "Quinn + Luke" always stays on one line. */
  font-size: clamp(34px, 14.5cqi, 96px);
  white-space: nowrap;
  line-height: 1;
  margin-bottom: 20px;
}
.hero .amp {
  color: var(--accent);
  padding: 0 8px;
}

.hero-date {
  font-size: 21px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}
.hero-date span { white-space: nowrap; }

.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--accent-dark);
  animation: cue-bob 2.4s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
}
.section-alt {
  background: linear-gradient(rgba(242,237,230,0.82), rgba(242,237,230,0.82));
}
.section h2 {
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 48px;
  text-align: center;
}
.section-eyebrow { text-align: center; }
.section h2.heading-one-line {
  white-space: nowrap;
  font-size: min(40px, calc((100vw - 72px) / 14));
}

/* ---------- Details ---------- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.details-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
  margin: 0 auto;
}
.details-grid.one-col {
  grid-template-columns: 1fr;
  max-width: 340px;
  margin: 0 auto;
}
.details-cta {
  text-align: center;
  margin-top: 48px;
}
.detail-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.detail-card > p:last-of-type { margin-bottom: 22px; }
.detail-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.detail-time {
  color: var(--accent-dark);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.detail-card p { color: var(--ink-soft); margin-bottom: 14px; }
.detail-card a { font-size: 13px; letter-spacing: 0.05em; }

/* Event details card above the Save the Date email form */
.event-card { margin-top: 40px; }
.event-card h3 { font-size: 22px; }

/* Tappable addresses: open the location in maps */
.detail-card a.map-link {
  font-size: inherit;
  letter-spacing: normal;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.detail-card a.map-link:hover { color: var(--accent-dark); }

/* "Add to calendar" links */
.cal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 6px;
  margin-top: auto; /* sits at the bottom so side-by-side cards line up */
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cal-label {
  width: 100%;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.detail-card .cal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(156, 132, 104, 0.45);
  text-underline-offset: 4px;
}
.detail-card .cal-links a:hover { text-decoration-color: var(--accent-dark); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(156, 132, 104, 0.5);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--cream);
  transform: translate(-50%, -50%);
  z-index: 1;
}
.timeline-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.timeline-item:nth-child(even) .timeline-photo { order: 2; }
.timeline-item:nth-child(even) .timeline-content { order: 1; }
/* Bold and dark so it stays legible directly on the topo map. */
.timeline-blurb {
  font-size: 15px;
  line-height: 1.75;
  font-weight: 600;
  color: var(--ink);
}
.timeline-sign {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
}
.timeline-date {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 22px;
  margin-bottom: 10px;
}
.timeline-caption {
  font-family: var(--sans);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Registry ---------- */
.registry-copy {
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.story-copy {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.story-copy p { margin-bottom: 20px; }

/* Light backing behind the intro letter so the topo map doesn't run through it. */
.story-copy {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  padding: 36px 40px;
}
@media (max-width: 800px) {
  .story-copy { padding: 26px 22px; }
}
.party-copy { line-height: 1.75; }
.story-sign {
  display: block;
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}
/* Equal-width buttons that stay on one row, even on small phones. */
.registry-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 480px;
  margin: 0 auto;
}
.registry-links .btn {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

/* ---------- RSVP ---------- */
.rsvp-copy {
  color: var(--ink-soft);
  margin-bottom: 36px;
  text-align: center;
}
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label,
.fieldset-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fieldset-hint {
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink-soft);
  margin-top: -4px;
}
input, select, textarea {
  font-family: var(--sans);
  /* 16px minimum: anything smaller makes iPhones zoom in when you tap the field. */
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 132, 104, 0.2);
}
.radio-group {
  display: flex;
  column-gap: 28px;
  flex-wrap: wrap;
}
/* .form-row prefix so this wins over the small uppercase .form-row label style */
.form-row .radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 16px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  cursor: pointer;
}
/* Custom checkbox to match the site (the default one is tiny and grey). */
.radio-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--white);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.radio-option input[type="checkbox"]::before {
  content: '';
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translateY(-2px) rotate(-45deg);
  opacity: 0;
}
.radio-option input[type="checkbox"]:checked {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.radio-option input[type="checkbox"]:checked::before { opacity: 1; }
.radio-option input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.form-status {
  font-size: 14px;
  color: var(--accent-dark);
  min-height: 20px;
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 24px;
  text-align: center;
  background: var(--ink);
  color: var(--cream);
}
.site-footer p { font-family: var(--serif); font-size: 18px; }
.footer-sub {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(250,248,245,0.6);
  margin-top: 8px;
}
.footer-link {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 4px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(250,248,245,0.4);
  text-underline-offset: 5px;
}
.footer-link:hover { text-decoration-color: var(--cream); }

/* ---------- Responsive ---------- */
/* Hero stacks (photo on top) up through tablet widths; side by side the photo
   became a thin strip on iPads. */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { height: 50vh; min-height: 340px; }
  .hero-inner { padding: 40px 24px 32px; }
}

@media (max-width: 800px) {
  /* scroll-margin: menu links land the heading well clear of the fixed header */
  .section { padding: 72px 0; scroll-margin-top: 40px; }
  .section h2 { margin-bottom: 36px; }

  .details-grid,
  .details-grid.two-col,
  .details-grid.one-col { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 8px; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-left: 28px;
    margin-bottom: 48px;
  }
  .timeline-item::before { left: 8px; }
  .timeline-item:nth-child(even) .timeline-photo,
  .timeline-item:nth-child(even) .timeline-content {
    order: initial;
    text-align: left;
  }
  .hero-date { font-size: 18px; }
  .story-copy { font-size: 17px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
}

@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .radio-group { flex-direction: column; gap: 0; }
}

/* Small phones: put the place on its own line instead of leaving a dangling dot. */
@media (max-width: 480px) {
  .hero-date-sep { display: none; }
  .hero-date-place { display: block; }
}
@media (max-width: 400px) {
  .registry-links { gap: 10px; }
  .registry-links .btn { padding-left: 4px; padding-right: 4px; letter-spacing: 0.08em; }
}
