/* ==========================================================================
   SAVE THE DATE — stylesheet
   --------------------------------------------------------------------------
   Everything you are likely to change is in the two EDIT blocks below.
   Change a colour once here and it updates everywhere on the page.
   ========================================================================== */

/* ------------------------------------------------------------------
   EDIT COLOURS
   Replace the hex codes to re-theme the whole website.
   ------------------------------------------------------------------ */
:root {
  --ivory: #fbf8f3;        /* page background */
  --warm-white: #ffffff;   /* cards, panels */
  --champagne: #efe3d0;    /* soft bands and borders */
  --dusty-rose: #c1877f;   /* romantic accent */
  --sage: #8a9a82;         /* secondary accent */
  --taupe: #6d6459;        /* body text */
  --gold: #a9863f;         /* small gold details, links */
  --ink: #3a352f;          /* headings — darkest tone */

  /* ----------------------------------------------------------------
     EDIT FONTS
     Change the font names here after swapping the <link> in index.html.
     ---------------------------------------------------------------- */
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  /* Layout knobs — usually no need to change these */
  --max-width: 1140px;
  --section-space: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 2px;
}

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

html {
  scroll-behavior: smooth;      /* smooth scrolling for anchor links */
  scroll-padding-top: 5.5rem;   /* keeps headings clear of the sticky nav */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--taupe);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  letter-spacing: 0.01em;
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0 0 1.05rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  transition: color 0.25s ease, border-color 0.25s ease;
}

a:hover {
  color: var(--dusty-rose);
  border-color: var(--dusty-rose);
}

/* Visible keyboard focus everywhere — important for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--dusty-rose);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

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

.section__head {
  max-width: 44rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

/* Small letterspaced label above headings */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.9rem;
}

.lede {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

/* Thin gold hairline divider */
.rule {
  width: 68px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.6rem 0;
}

.rule--center {
  margin-left: auto;
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--warm-white);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--champagne);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, transform 0.25s ease;
}

.btn--solid {
  background-color: var(--ink);
  color: var(--ivory);
}

.btn--solid:hover {
  background-color: var(--dusty-rose);
  color: var(--warm-white);
  transform: translateY(-2px);
}

.btn--outline {
  border-color: var(--taupe);
  color: var(--ink);
}

.btn--outline:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
  transform: translateY(-2px);
}

/* ==========================================================================
   STICKY NAVIGATION
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: color-mix(in srgb, var(--ivory) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--champagne);
  background-color: color-mix(in srgb, var(--ivory) 97%, transparent);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem clamp(1.25rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__mark {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  border: 0;
}

.nav__mark:hover {
  color: var(--dusty-rose);
}

.nav__menu {
  display: flex;
  gap: clamp(1.1rem, 2.4vw, 2.2rem);
}

.nav__menu a {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  border: 0;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.nav__menu a:hover,
.nav__menu a.is-active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* Mobile menu button (hidden on desktop) */
.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 0;
  padding: 0.4rem 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 1px;
  background-color: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle-bar + .nav__toggle-bar {
  margin-top: -6px;
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Soft ivory veil keeps text readable on any photo (accessible contrast) */
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ivory) 72%, transparent),
    color-mix(in srgb, var(--ivory) 58%, transparent) 45%,
    color-mix(in srgb, var(--ivory) 86%, transparent)
  );
}

.hero__content {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1.25rem, 5vw, 2.5rem);
}

.hero__content .rule {
  margin-left: auto;
  margin-right: auto;
}

.hero__names {
  font-size: clamp(2.9rem, 10vw, 6.2rem);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero__names span {
  display: block;
  font-style: italic;
  font-size: 0.42em;
  color: var(--dusty-rose);
  margin: 0.15em 0;
}

.hero__date {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.hero__place {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 2.4rem;
}

/* ==========================================================================
   2. WELCOME
   ========================================================================== */
.welcome__grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.welcome__figure {
  margin: 0;
  position: relative;
}

.welcome__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Thin gold frame offset behind the photo */
.welcome__figure::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  z-index: -1;
}

.signature {
  margin-top: 1.6rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--dusty-rose);
}

/* ==========================================================================
   3. COUNTDOWN
   ========================================================================== */
.countdown {
  background-color: var(--champagne);
  text-align: center;
}

.countdown__grid {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 2rem);
}

.countdown__grid li {
  background-color: color-mix(in srgb, var(--warm-white) 72%, transparent);
  padding: clamp(1.1rem, 3vw, 2rem) 0.5rem;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}

.countdown__num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
}

.countdown__done {
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
}

/* ==========================================================================
   4 & 7. CARD GRIDS (details, travel)
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.card {
  background-color: var(--warm-white);
  border: 1px solid var(--champagne);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -28px color-mix(in srgb, var(--taupe) 60%, transparent);
}

.card h3 {
  font-size: 0.76rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.9rem;
}

.card__lead {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.card--action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  background-color: color-mix(in srgb, var(--sage) 12%, var(--warm-white));
}

.card--action .btn {
  margin-top: auto;
}

/* ==========================================================================
   5. OUR STORY TIMELINE
   ========================================================================== */
.story {
  background-color: color-mix(in srgb, var(--champagne) 34%, var(--ivory));
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.timeline__item {
  position: relative;
  padding-top: 2.4rem;
  border-top: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}

/* Small gold dot on the timeline */
.timeline__item::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--gold);
}

.timeline__year {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--dusty-rose);
  margin-bottom: 0.6rem;
}

.timeline__item h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   6. GALLERY
   ========================================================================== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 1.6vw, 1.1rem);
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  background-color: var(--champagne);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__item--large img {
  aspect-ratio: 1 / 1;
}

/* ==========================================================================
   7. TRAVEL
   ========================================================================== */
.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

.travel__cta {
  margin-top: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

/* ==========================================================================
   8. CONTACT
   ========================================================================== */
.contact {
  text-align: center;
  background-color: var(--champagne);
}

.contact .wrap {
  max-width: 42rem;
}

.contact__links {
  margin-top: 1.8rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.contact__dot {
  margin: 0 0.75rem;
  color: var(--gold);
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.footer {
  background-color: var(--ink);
  color: color-mix(in srgb, var(--ivory) 88%, transparent);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.footer__names {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ivory);
  margin-bottom: 0.6rem;
}

.footer__date {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.footer__hash {
  margin-top: 1.4rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: color-mix(in srgb, var(--champagne) 90%, transparent);
}

/* ==========================================================================
   SUBTLE SCROLL ANIMATION
   Elements with class "reveal" fade and rise into view (see script.js).
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* If JavaScript is unavailable, show everything */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   RESPONSIVE — tablet
   ========================================================================== */
@media (max-width: 960px) {
  .cards,
  .cards--3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .welcome__grid {
    grid-template-columns: 1fr;
    max-width: 34rem;
  }

  .welcome__figure::after {
    inset: 12px -12px -12px 12px;
  }
}

/* ==========================================================================
   RESPONSIVE — mobile
   ========================================================================== */
@media (max-width: 720px) {
  .nav__toggle {
    display: inline-flex;
  }

  /* Menu becomes a drop-down panel, opened by the Menu button */
  .nav__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background-color: var(--ivory);
    border-bottom: 1px solid var(--champagne);
    padding: 0.5rem clamp(1.25rem, 5vw, 2.5rem) 1.25rem;
    display: none;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__menu a {
    padding: 0.85rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--champagne) 70%, transparent);
  }

  .nav__inner {
    position: relative;
  }

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

  .cards,
  .cards--3,
  .timeline {
    grid-template-columns: 1fr;
  }

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

  .gallery__item--large {
    grid-column: span 2;
    grid-row: auto;
  }

  .hero {
    min-height: 78vh;
  }
}

/* ==========================================================================
   REDUCED MOTION — respects the visitor's system setting
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .nav,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ==========================================================================
   RSVP FORM
   Colours all come from the variables at the top of this file.
   ========================================================================== */
.rsvp {
  background: var(--champagne);
}

.rsvp__lede {
  margin-inline: auto;
}

.rsvp__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
  max-width: 720px;
  margin: 2.5rem auto 0;
  background: var(--warm-white);
  padding: 2rem;
  border: 1px solid rgba(169, 134, 63, 0.28);
}

.rsvp__form .field--wide,
.rsvp__actions {
  grid-column: 1 / -1;
}

.rsvp__form label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 0.4rem;
}

.rsvp__form input,
.rsvp__form select,
.rsvp__form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid rgba(109, 100, 89, 0.3);
  border-radius: 2px;
  padding: 0.7rem 0.75rem;
}

.rsvp__form textarea {
  resize: vertical;
}

.rsvp__form input:focus-visible,
.rsvp__form select:focus-visible,
.rsvp__form textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.rsvp__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.2rem;
  justify-content: center;
  text-align: center;
}

.rsvp__actions .btn {
  border: 0;
  cursor: pointer;
}

.rsvp__error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dusty-rose);
}

.rsvp__thanks {
  max-width: 620px;
  margin: 2.5rem auto 0;
  text-align: center;
  background: var(--warm-white);
  border: 1px solid rgba(169, 134, 63, 0.28);
  padding: 2.4rem 2rem;
}

.rsvp__thanks h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  margin: 0.2rem 0 0.9rem;
}

@media (max-width: 640px) {
  .rsvp__form {
    grid-template-columns: 1fr;
    padding: 1.4rem;
  }
}

/* ==========================================================================
   THEME LAYOUTS
   --------------------------------------------------------------------------
   EDIT: the look of the whole website in one word. In index.html change
   <body data-theme="classic"> to one of:

     classic     centred, softly veiled hero photo (the original)
     editorial   left-aligned magazine style, square-cornered photos
     minimal     no hero photo, quiet type, lots of white space
     romantic    arched photos, larger italic names, rose accents

   The visual editor has a "Layout style" dropdown that does this for you.
   ========================================================================== */

/* --- Editorial ---------------------------------------------------------- */
[data-theme="editorial"] .hero {
  min-height: min(78vh, 700px);
  justify-content: flex-start;
  text-align: left;
}
[data-theme="editorial"] .hero__veil {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ivory) 92%, transparent),
    color-mix(in srgb, var(--ivory) 70%, transparent) 55%,
    color-mix(in srgb, var(--ivory) 30%, transparent)
  );
}
[data-theme="editorial"] .hero__content {
  max-width: 46rem;
  padding-left: clamp(1.25rem, 7vw, 5rem);
}
[data-theme="editorial"] .hero__content .rule,
[data-theme="editorial"] .section__head .rule {
  margin-left: 0;
  margin-right: 0;
}
[data-theme="editorial"] .hero__names span {
  display: inline-block;
  margin: 0 0.25em;
}
[data-theme="editorial"] .section__head {
  text-align: left;
  margin-left: 0;
}
[data-theme="editorial"] .card,
[data-theme="editorial"] .gallery__item,
[data-theme="editorial"] .gallery__item img,
[data-theme="editorial"] .welcome img,
[data-theme="editorial"] .rsvp__form {
  border-radius: 0;
}
[data-theme="editorial"] .timeline__year {
  color: var(--sage);
}

/* --- Minimal ------------------------------------------------------------ */
[data-theme="minimal"] .hero {
  min-height: min(70vh, 640px);
  background: var(--ivory);
}
[data-theme="minimal"] .hero__image {
  display: none;
}
[data-theme="minimal"] .hero__veil {
  background: none;
}
[data-theme="minimal"] .hero__names {
  font-size: clamp(2.4rem, 7.5vw, 4.6rem);
  letter-spacing: 0.06em;
}
[data-theme="minimal"] .countdown,
[data-theme="minimal"] .travel,
[data-theme="minimal"] .rsvp {
  background: var(--ivory);
}
[data-theme="minimal"] .card,
[data-theme="minimal"] .rsvp__form {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--taupe) 22%, transparent);
  box-shadow: none;
}
[data-theme="minimal"] .btn--solid {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

/* --- Romantic ----------------------------------------------------------- */
[data-theme="romantic"] .hero__names {
  font-style: italic;
  font-size: clamp(3.1rem, 11vw, 7rem);
}
[data-theme="romantic"] .hero__veil {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--champagne) 70%, transparent),
    color-mix(in srgb, var(--ivory) 62%, transparent) 50%,
    color-mix(in srgb, var(--ivory) 90%, transparent)
  );
}
[data-theme="romantic"] .gallery__item,
[data-theme="romantic"] .gallery__item img,
[data-theme="romantic"] .welcome img {
  border-radius: 50vw 50vw 8px 8px / 22vw 22vw 8px 8px;
}
[data-theme="romantic"] .card,
[data-theme="romantic"] .rsvp__form {
  border-radius: 1.4rem;
}
[data-theme="romantic"] .eyebrow,
[data-theme="romantic"] .timeline__year {
  color: var(--dusty-rose);
}
[data-theme="romantic"] .section__head h2 {
  font-style: italic;
}
