/* ============================================================
   RETHEME HERE — every colour and font on the site lives in
   this block. Change these values and nothing else.
   Palette is pulled from the beach photos: sand, foam,
   charcoal, ocean slate.
   ============================================================ */
:root {
  --foam: #ffffff;        /* base background, like the save-the-date card */
  --sand: #f2efe9;        /* light sand — alternating sections */
  --sand-deep: #e7e1d5;   /* deeper sand — borders, lines */
  --ink: #2f3237;         /* charcoal, slightly blue like the wet rocks */
  --ink-soft: #5c6067;    /* softer text */
  --ocean: #6d7f92;       /* slate blue pulled from the sea */
  --font-script: "Great Vibes", cursive;
  --font-sans: "Montserrat", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--foam);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.8;
}

img { max-width: 100%; height: auto; }

a { color: var(--ocean); }

/* --- Type helpers ------------------------------------------- */
.script {
  font-family: var(--font-script);
  font-weight: 400;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- Sticky nav ---------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.6rem;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--foam) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sand-deep);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover { color: var(--ocean); }

section, header, .interlude {
  scroll-margin-top: 4rem;
}

/* --- Hero ----------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* top margin pulls hero behind the sticky nav's space */
  margin-top: -3.2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* couple sits low in KE_1 — keep them in frame */
  object-position: center 65%;
}

/* soft scrim so white text stays readable on the sky */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgb(47 50 55 / 0.25) 0%,
    rgb(47 50 55 / 0.05) 45%,
    rgb(47 50 55 / 0.45) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 1.5rem;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.35);
}

.hero-inner .eyebrow { color: #fff; opacity: 0.9; }

.hero h1 {
  font-size: clamp(3.4rem, 11vw, 6.5rem);
  margin: 1rem 0 0.5rem;
  line-height: 1.1;
  font-weight: 400;
}

.hero .amp { opacity: 0.85; }

.hero-date {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0.5rem 0 0;
}

.tagline {
  font-size: 1.9rem;
  margin: 0.4rem 0 2rem;
  opacity: 0.95;
}

.button {
  display: inline-block;
  padding: 0.75rem 2.6rem;
  border: 1px solid #fff;
  color: #fff;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.button:hover {
  background: #fff;
  color: var(--ink);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  bottom: 1.2rem;
  left: 50%;
  translate: -50% 0;
  color: #fff;
  font-size: 1.8rem;
  text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* --- Content sections ----------------------------------------- */
.content {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

h2 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 1.8rem;
}

/* --- Schedule --------------------------------------------------- */
.schedule { margin: 0; }

.schedule div {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--sand-deep);
}

.schedule dt {
  min-width: 4rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ocean);
}

.schedule dd { margin: 0; }

/* --- Iframes ----------------------------------------------------- */
.map-wrap iframe,
.form-wrap iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

.form-wrap iframe { height: 640px; }

/* --- RSVP placeholder box ----------------------------------------- */
.rsvp-placeholder {
  border: 1px dashed var(--ocean);
  padding: 2.6rem 1.5rem;
  text-align: center;
}

.rsvp-placeholder .script {
  font-size: 1.9rem;
  color: var(--ocean);
  margin: 0;
}

/* --- FAQ ------------------------------------------------------------ */
.faq dt {
  font-weight: 500;
  margin-top: 1.3rem;
}

.faq dd { margin: 0.2rem 0 0; }

/* --- Interludes: full-bleed photo moments ---------------------------- */
.interlude {
  position: relative;
  margin: 0;
  height: 92svh;
  overflow: hidden;
  background: var(--sand);
}

.interlude > img {
  width: 100%;
  height: 116%;              /* overscan gives the parallax room to move */
  object-fit: cover;
  object-position: center 30%;
}

.interlude figcaption {
  position: absolute;
  inset: auto 0 2.2rem;
  text-align: center;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  text-shadow: 0 2px 16px rgb(0 0 0 / 0.45);
}

/* --- Trio: three-up echo of the save-the-date card ------------------- */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  height: auto;
  padding: 0.6rem;
  background: var(--foam);
}

.trio figure {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.trio img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 3;
}

.trio .num {
  position: absolute;
  left: 50%;
  bottom: 8%;
  translate: -50% 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgb(0 0 0 / 0.4);
}

/* --- Album ------------------------------------------------------------- */
.album-intro { padding-bottom: 1.5rem; }

.album {
  columns: 16rem;
  column-gap: 0.5rem;
  padding: 0 0.5rem 0.5rem;
}

.album img {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* --- Footer -------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  background: var(--sand);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.foot-names {
  font-size: 2.6rem;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

/* ============================================================
   Scroll-driven animation (pure CSS, no JS).
   Older browsers simply get a static page.
   ============================================================ */
@supports (animation-timeline: view()) {

  /* content fades up as it enters the viewport */
  .content, .trio figure {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }

  /* interlude photos drift slowly upward (parallax) */
  .interlude:not(.trio) > img {
    animation: drift both linear;
    animation-timeline: view();
  }

  /* captions ease in late */
  .interlude figcaption {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 40% entry 90%;
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(2.2rem); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes drift {
    from { transform: translateY(0); }
    to   { transform: translateY(-12%); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
  .content, .trio figure, .interlude > img, .interlude figcaption {
    animation: none !important;
  }
}

/* --- Small screens --------------------------------------------------------- */
@media (max-width: 40rem) {
  .site-nav { gap: 0.2rem 1rem; font-size: 0.66rem; }
  .interlude { height: 70svh; }
  .trio { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; padding: 0.35rem; }
  .album { columns: 2; }
}
