/* ==========================================================
   Jordan & Melissa – wedding invite
   Mobile-first: base styles target phones, media queries
   at the bottom scale up for tablets and desktops.
   ========================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette (from the colour board) */
  --plum:      #7b5c8c;
  --plum-deep: #5e4470;
  --lavender:  #c9bedf;
  --lavender-soft: #ebe5f3;
  --sage:      #a8ad8f;
  --sage-deep: #6f7a5e;
  --blush:     #f6d6d2;
  --blush-soft:#fbeeec;
  --cream:     #fdf8f1;
  --gold:      #c3a26a;

  /* Text */
  --ink:       #3d3245;
  --ink-soft:  #6e6475;

  /* Type */
  --font-script: "Great Vibes", cursive;
  --font-serif:  "Cormorant Garamond", Georgia, serif;
  --font-sans:   "Montserrat", system-ui, sans-serif;

  /* Spacing & shape */
  --gutter: 1.25rem;
  --section-pad: 4.5rem;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(94, 68, 112, .25);
  --max: 68rem;
  --header-h: 3.75rem;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-variant-numeric: lining-nums;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--plum-deep);
}

p { margin: 0 0 1rem; }

a { color: inherit; }

.script { font-family: var(--font-script); font-weight: 400; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--plum); color: #fff; padding: .5rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

/* ---------- 3. Reusable bits ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: .75rem;
}

.lead {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 2.5rem;
  color: var(--ink-soft);
}

.center { text-align: center; }

.divider {
  width: 9rem; height: 14px; margin: 1.1rem auto 0;
  background:
    radial-gradient(circle, var(--gold) 3px, transparent 3.5px) center / 14px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left center / 42% 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center / 42% 1px no-repeat;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--plum);
  border: 1px solid var(--plum);
  border-radius: 999px;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover { background: var(--plum-deep); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

.btn--ghost { background: transparent; color: var(--plum); }
.btn--ghost:hover { background: var(--plum); color: #fff; }

.btn--full { width: 100%; }

.link {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--plum);
  border-bottom: 1px solid var(--lavender);
  padding-bottom: 2px;
}
.link:hover { border-color: var(--plum); }

/* Eucalyptus sprigs */
.sprig { position: absolute; color: var(--sage); pointer-events: none; }

/* ---------- 4. Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  background: rgba(253, 248, 241, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(123, 92, 140, .12);
}

.monogram {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--plum-deep);
}
.monogram span { font-family: var(--font-script); color: var(--sage-deep); margin: 0 .1em; }

.nav-toggle {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block; width: 22px; height: 1.5px;
  background: var(--plum-deep);
  transition: transform .3s, opacity .3s;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before,
.nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after  { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 auto;
  background: var(--cream);
  box-shadow: var(--shadow);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .35s ease;
}
.site-nav.is-open { clip-path: inset(0 0 0 0); }

.site-nav ul { list-style: none; margin: 0; padding: .5rem 0 1.5rem; text-align: center; }
.site-nav a {
  display: block; padding: .8rem;
  font-family: var(--font-serif); font-size: 1.35rem;
  text-decoration: none; color: var(--plum-deep);
}
.site-nav .nav-cta { color: var(--plum); font-weight: 600; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 5rem;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.9), transparent 65%),
    linear-gradient(180deg, var(--lavender-soft) 0%, var(--cream) 55%, var(--blush-soft) 100%);
}

/* Fairy lights – a nod to the save the date */
.hero__lights {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(195,162,106,.55) 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(255,255,255,.95) 1px, transparent 2px),
    radial-gradient(circle, rgba(195,162,106,.35) 1px, transparent 2px);
  background-size: 90px 70px, 130px 110px, 60px 85px;
  background-position: 0 0, 40px 25px, 20px 50px;
  animation: twinkle 6s ease-in-out infinite alternate;
  opacity: .8;
}
@keyframes twinkle {
  from { opacity: .45; }
  to   { opacity: .95; }
}

.hero__content { position: relative; z-index: 1; max-width: 36rem; }

.hero__names {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(2.6rem, 13vw, 5.5rem);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  margin: .5rem 0 1rem;
}
.hero__names .amp {
  font-size: .75em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--sage-deep);
  margin: .1em 0 .05em;
}

.hero__invite {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.hero__date {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.75rem 0 .75rem;
  font-size: .78rem; font-weight: 500;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--plum);
}
.hero__date span:not(.hero__day) {
  padding: .4rem 0;
  border-top: 1px solid var(--lavender);
  border-bottom: 1px solid var(--lavender);
  min-width: 6.5rem;
}
.hero__day {
  font-family: var(--font-serif);
  font-size: 3.2rem; font-weight: 500;
  letter-spacing: 0; line-height: 1;
  color: var(--plum-deep);
}

.hero__place {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.sprig--tl { width: 110px; height: 200px; top: 2.5rem; left: -22px; transform: rotate(150deg); }
.sprig--tr { width: 95px;  height: 175px; top: 3rem;   right: -20px; transform: rotate(-150deg) scaleX(-1); }
.sprig--bl { width: 120px; height: 220px; bottom: -30px; left: -18px; transform: rotate(25deg); }
.sprig--br { width: 105px; height: 190px; bottom: -25px; right: -18px; transform: rotate(-25deg) scaleX(-1); }

.scroll-cue {
  position: absolute; bottom: 1.5rem; left: 50%;
  width: 1px; height: 2.75rem;
  background: linear-gradient(var(--plum), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: translate(-50%, -6px); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translate(-50%, 10px); opacity: 0; }
}

/* ---------- 6. Countdown ---------- */
.section--plum {
  background: linear-gradient(160deg, var(--plum) 0%, var(--plum-deep) 100%);
  color: #fff;
}

.countdown { text-align: center; padding: 3.5rem var(--gutter); }
.countdown__title { color: var(--lavender); font-size: 2.6rem; margin-bottom: 1.5rem; }

.countdown__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem;
  max-width: 28rem; margin: 0 auto;
}
.countdown__unit {
  padding: .9rem .25rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
}
.countdown__unit span {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.1rem; font-weight: 500; line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown__unit small {
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--lavender);
}
.countdown__done { font-family: var(--font-script); font-size: 2.2rem; margin: 1rem 0 0; }

/* ---------- 7. Sections ---------- */
.section {
  position: relative;
  padding: var(--section-pad) var(--gutter);
}
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section--narrow > * { max-width: 36rem; }

.section--blush    { background: var(--blush-soft); }
.section--lavender { background: var(--lavender-soft); }
.section--sage     { background: #eef0e6; }

.section__head { text-align: center; margin-bottom: 2.75rem; }
.section__head h2 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.section__head h2 .script { color: var(--sage-deep); font-size: .9em; }

.subhead {
  font-size: 1.6rem; text-align: center;
  margin: 0 auto 1.5rem;
}

/* ---------- 8. Cards ---------- */
.cards { display: grid; gap: 1.25rem; margin-bottom: 2.5rem; }

.card {
  background: #fff;
  border: 1px solid rgba(201, 190, 223, .55);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.card__label {
  font-size: .7rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: .4rem;
}
.card__time {
  font-family: var(--font-serif);
  font-size: 2rem; color: var(--plum);
  margin-bottom: .25rem;
}
.card__title { font-size: 1.5rem; margin-bottom: .75rem; }
.card__meta  { font-size: .8rem; color: var(--sage-deep); letter-spacing: .05em; }
.card address { font-style: normal; color: var(--ink-soft); margin-bottom: 1.25rem; }

.card--event { border-top: 3px solid var(--lavender); }
.card--stay  { text-align: left; }

.map-placeholder {
  display: grid; place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  border: 1px dashed var(--lavender);
  background: repeating-linear-gradient(45deg, var(--lavender-soft), var(--lavender-soft) 12px, #fff 12px, #fff 24px);
  color: var(--ink-soft); font-size: .8rem; letter-spacing: .15em; text-transform: uppercase;
}

.swatches { list-style: none; display: flex; justify-content: center; gap: .5rem; padding: 0; margin: 1rem 0 0; }
.swatches li {
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(123,92,140,.2);
}

/* ---------- 9. Gallery ---------- */
/* Mobile: horizontal swipe with scroll-snap */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .75rem;
  margin-right: calc(var(--gutter) * -1) !important;
  padding-right: var(--gutter);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }

.gallery__item {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.7), transparent 55%),
    linear-gradient(135deg, var(--lavender), var(--blush));
  box-shadow: var(--shadow);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__item.is-missing { display: grid; place-items: center; }
.gallery__item.is-missing::after {
  content: "Photo";
  font-family: var(--font-script); font-size: 2rem; color: rgba(94,68,112,.45);
}

.hint {
  text-align: center; margin-top: .75rem;
  font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- 10. Details ---------- */
.timeline {
  list-style: none; padding: 0;
  max-width: 24rem !important;
  margin-bottom: 3rem !important;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; top: .6rem; bottom: .6rem; left: 5.1rem;
  width: 1px; background: var(--lavender);
}
.timeline li {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.5rem;
  align-items: center;
  padding: .55rem 0;
  position: relative;
}
.timeline li::before {
  content: ""; position: absolute; left: calc(5.1rem - 4px);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--plum);
}
.timeline time {
  font-family: var(--font-serif); font-size: 1.2rem;
  text-align: right; color: var(--plum);
}

.faq { max-width: 40rem !important; }
.faq details {
  border-bottom: 1px solid rgba(201, 190, 223, .7);
  padding: .25rem 0;
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 0;
  font-family: var(--font-serif); font-size: 1.2rem; color: var(--plum-deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-sans); font-size: 1.3rem; color: var(--sage-deep);
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: .5rem; }

/* ---------- 11. Gifts note ---------- */
.note {
  position: relative;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
  padding: 2.5rem 1.5rem 2rem;
  border: 1px solid var(--lavender);
  border-radius: var(--radius);
  background: #fff;
}
.note__sprig {
  position: absolute; width: 46px; height: 84px;
  top: -42px; left: 50%; transform: translateX(-50%) rotate(180deg);
  color: var(--sage);
}
.note__sign { font-style: normal; font-size: 2rem; color: var(--plum); margin: 1rem 0 0; }

/* ---------- 12. Forms ---------- */
.form { display: grid; gap: 1.25rem; text-align: left; }
.form.card { max-width: 34rem; padding: 2rem 1.35rem; }
.form--inline { max-width: 34rem; }

.field { display: grid; gap: .4rem; margin: 0; border: 0; padding: 0; min-width: 0; }

.field label,
.field legend {
  font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--plum-deep);
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 300; color: var(--ink-soft); }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;              /* 16px stops iOS from zooming on focus */
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(123, 92, 140, .25);
  border-radius: 10px;
  padding: .85rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(201, 190, 223, .55);
}
.field.is-invalid input,
.field.is-invalid select { border-color: #b4536a; }

/* Accept / decline as tappable pills */
.choice { gap: .6rem; }
.choice legend { margin-bottom: .6rem; }
.choice__option {
  position: relative; cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink);
}
.choice__option input { position: absolute; opacity: 0; }
.choice__option span {
  display: block; text-align: center;
  padding: .9rem 1rem;
  border: 1px solid rgba(123, 92, 140, .25);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--font-serif); font-size: 1.15rem;
  transition: background .2s, color .2s, border-color .2s;
}
.choice__option input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; }
.choice__option input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 3px; }

.attending-only { display: grid; gap: 1.25rem; }
.attending-only[hidden] { display: none; }

.form__status { margin: 0; text-align: center; font-size: .9rem; min-height: 1.4em; }
.form__status.is-success { color: var(--sage-deep); font-family: var(--font-serif); font-size: 1.2rem; font-style: italic; }
.form__status.is-error   { color: #b4536a; }

/* RSVP section */
.rsvp { overflow: hidden; background: linear-gradient(180deg, var(--cream), var(--blush-soft)); }
.sprig--rsvp-l { width: 90px; height: 165px; top: 1.5rem; left: -25px; transform: rotate(160deg); }
.sprig--rsvp-r { width: 90px; height: 165px; bottom: 1rem; right: -25px; transform: rotate(-20deg) scaleX(-1); }

/* ---------- 13. Footer ---------- */
.site-footer {
  text-align: center;
  padding: 3rem var(--gutter) 2.5rem;
  background: var(--plum-deep);
  color: var(--lavender);
  font-size: .8rem; letter-spacing: .25em;
}
.site-footer p { margin-bottom: .4rem; }
.site-footer__names { font-size: 2.4rem; letter-spacing: 0; color: #fff; }
.site-footer__contact { letter-spacing: .05em; opacity: .75; margin-top: 1rem; }

/* ---------- 14. Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================
   Larger screens
   ========================================================== */
@media (min-width: 40rem) {
  :root { --gutter: 2rem; --section-pad: 6rem; }

  .cards--two   { grid-template-columns: repeat(2, 1fr); }
  .form.card    { padding: 2.75rem 2.5rem; }
  .choice       { grid-template-columns: 1fr 1fr; }
  .choice legend { grid-column: 1 / -1; }

  .countdown__unit span { font-size: 2.8rem; }

  .gallery { grid-auto-columns: 45%; }

  .sprig--tl { width: 170px; height: 310px; }
  .sprig--tr { width: 150px; height: 275px; }
  .sprig--bl { width: 180px; height: 330px; }
  .sprig--br { width: 160px; height: 290px; }
}

@media (min-width: 60rem) {
  /* Desktop nav: inline links instead of the dropdown */
  .nav-toggle { display: none; }
  .site-nav { position: static; background: none; box-shadow: none; clip-path: none; }
  .site-nav ul { display: flex; gap: .25rem; padding: 0; }
  .site-nav a {
    font-family: var(--font-sans); font-size: .72rem; font-weight: 500;
    letter-spacing: .2em; text-transform: uppercase; padding: .5rem .8rem;
  }
  .site-nav .nav-cta {
    color: #fff; background: var(--plum); border-radius: 999px; padding: .5rem 1.2rem; margin-left: .5rem;
  }

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

  /* Gallery becomes a masonry-style grid */
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    margin-right: auto !important;
    padding-right: 0;
  }
  .gallery__item { aspect-ratio: 3 / 4; }
  .gallery__item--tall { grid-row: span 2; aspect-ratio: auto; }
  .gallery + .hint { display: none; }

  .form--inline {
    max-width: var(--max);
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
  .form--inline .form__status { grid-column: 1 / -1; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Layering tweaks ---------- */
.rsvp .form { position: relative; z-index: 1; }   /* keep sprigs behind the form */
#gifts .section__head { margin-bottom: 4rem; }    /* room for the sprig above the note */
#songs .section__head { margin-bottom: 4rem; }    /* room for the sprig above the form */
.card__small { margin: 1rem 0 0; }
.card__label--spaced { margin-top: 2rem; }
.card__email {
  font-family: var(--font-serif); font-size: 1.25rem;
  color: var(--plum); text-decoration: none; word-break: break-word;
}
.card__email:hover { text-decoration: underline; }

/* Google Maps embed */
.map {
  display: block; width: 100%; aspect-ratio: 4 / 3; height: auto;
  border: 0; border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
@media (min-width: 40rem) { .map { aspect-ratio: 16 / 9; } }