/* =========================================================
   Maria & Bailey — sage garden + cream lace
   colors: light green, butter yellow, white, cream, orangey-red
   ========================================================= */

:root {
  --sage:      #bccbaa;   /* light green (key) */
  --sage-2:    #a9bb93;
  --pine:      #46583a;   /* deep green ink */
  --pine-deep: #33422a;
  --cream:     #f4efe1;   /* linen panel */
  --white:     #fbf9f2;   /* page */
  --butter:    #f4e6a6;   /* butter yellow */
  --butter-soft:#f8efc6;
  --coral:     #d76a4a;   /* orangey red accent */
  --ink:       #3c4632;   /* body text */
  --ink-soft:  #5a664b;

  --script: 'Pinyon Script', cursive;              /* calligraphy names */
  --serif:  'Cormorant Garamond', Georgia, serif;  /* letterpress + body */

  --dur: 220ms;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* coral squiggle flourish */
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='12' viewBox='0 0 64 12'%3E%3Cpath d='M2 6 q6 -6 12 0 t12 0 t12 0 t12 0 t12 0' fill='none' stroke='%23d76a4a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + .35vw, 1.28rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; }

.script-heading { font-family: var(--script); color: var(--pine); line-height: 1.15; font-size: clamp(2.8rem, 2rem + 4vw, 4.4rem); }
.script-heading__sub {
  display: block; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); color: var(--ink-soft); margin-top: .1em;
  text-transform: none; letter-spacing: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif); font-weight: 600;
  text-transform: uppercase; letter-spacing: .2em; font-size: .82rem;
  text-decoration: none;
  padding: .95em 2.2em;
  border: 1.5px solid var(--pine);
  border-radius: 2px;
  background: transparent; color: var(--pine);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--primary:hover { background: var(--pine); color: var(--cream); }
.btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* =========================================================
   CARTOUCHE — scalloped lace panel (SVG drawn by app.js)
   ========================================================= */
.cartouche {
  position: relative; width: 100%; max-width: 540px; min-height: 660px;
  display: grid; place-items: center;
  padding: clamp(3rem, 8vw, 4.5rem) clamp(2.2rem, 9vw, 4rem);
}
.cartouche > .cartouche-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; }
.cartouche__content { position: relative; z-index: 1; text-align: center; color: var(--pine); }

.cartouche__kicker { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); }
.cartouche__label { margin: .1rem 0 .3rem; font-family: var(--serif); text-transform: uppercase; letter-spacing: .34em; font-size: 1rem; color: var(--pine); }
.cartouche__for { margin: 0 0 .2rem; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); }
.cartouche__names { display: block; }
.cartouche__name { display: block; font-family: var(--script); font-size: clamp(3.4rem, 2.4rem + 6vw, 5.6rem); line-height: 1.02; color: var(--pine); }
.cartouche__and { display: block; font-family: var(--serif); font-style: italic; text-transform: uppercase; letter-spacing: .2em; font-size: 1rem; color: var(--ink-soft); margin: .1em 0; }
.cartouche__date { margin: 1rem 0 .6rem; font-family: var(--serif); text-transform: uppercase; letter-spacing: .22em; font-size: 1.05rem; line-height: 1.7; color: var(--pine); }
.cartouche__place { margin: 0; font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: .2em; font-size: 1.05rem; color: var(--pine); }
.cartouche__follow { margin: .5rem 0 0; font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--ink-soft); }

/* =========================================================
   NAV
   ========================================================= */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--sage-2); }
.nav__inner { max-width: 1120px; margin: 0 auto; padding: .6rem clamp(1rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand__names { font-family: var(--script); font-size: 2rem; color: var(--pine); }
.brand__amp { color: var(--coral); }
.brand__date { font-family: var(--serif); font-size: .64rem; text-transform: uppercase; letter-spacing: .26em; color: var(--ink-soft); margin-top: .35em; padding-left: .2em; }
.nav__menu { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav__menu a { font-family: var(--serif); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; text-decoration: none; color: var(--pine); padding: .3em 0; position: relative; transition: color var(--dur) var(--ease); }
.nav__menu a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--coral); transition: width var(--dur) var(--ease); }
.nav__menu a:hover { color: var(--pine-deep); }
.nav__menu a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--pine); transition: var(--dur); }

/* =========================================================
   HERO — sage field, cream lace panel
   ========================================================= */
.hero { display: grid; place-items: center; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 5vw, 2.5rem); background: var(--sage); }

/* =========================================================
   WELCOME
   ========================================================= */
.welcome { max-width: 1120px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem); }
.welcome__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.welcome__text p { color: var(--ink); max-width: 44ch; }
.welcome__note { font-size: 1.05em; }
.welcome__note strong {
  color: var(--coral); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; font-size: 1.15em;
}
.welcome__text .btn { margin-top: 1.3rem; }
.sprig { width: 64px; height: 12px; background: var(--squiggle) left center / contain no-repeat; margin: .7rem 0 1.3rem; }

.welcome__media { position: relative; }
/* clean matted frame (shared by welcome + gallery) */
.welcome__photo, .gallery__photo {
  margin: 0; aspect-ratio: 4 / 5; position: relative;
  background: var(--white);
  padding: 10px;
  border: 1px solid var(--sage-2);
  box-shadow: 0 12px 30px -16px rgba(70, 88, 58, .4);
}
.welcome__photo img, .gallery__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; display: block; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { max-width: 1000px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 7vw, 5rem); }
.gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 4vw, 2.6rem); align-items: start; }
/* match the photos' true 2:3 ratio so no one gets cropped */
.gallery__photo { aspect-ratio: 2 / 3; }
.gallery__photo img { object-position: 50% 50%; }

/* =========================================================
   COUNTDOWN — sage band
   ========================================================= */
.countdown { background: var(--sage); border-top: 1px solid var(--sage-2); border-bottom: 1px solid var(--sage-2); padding: clamp(2.4rem, 5vw, 3.4rem) 1.25rem; text-align: center; }
.countdown__clock { display: flex; align-items: baseline; justify-content: center; gap: clamp(.6rem, 2vw, 1.4rem); color: var(--pine); }
.cd { display: flex; flex-direction: column; align-items: center; min-width: 3.4rem; }
.cd b { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.cd small { font-family: var(--serif); text-transform: uppercase; letter-spacing: .2em; font-size: .68rem; color: var(--ink-soft); margin-top: .4rem; }
.cd__sep { font-family: var(--serif); font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); color: var(--coral); align-self: flex-start; margin-top: .1em; }
.countdown__label { font-family: var(--serif); text-transform: uppercase; letter-spacing: .22em; font-size: .82rem; color: var(--pine); margin: 1.1rem 0 0; }
.countdown__script { font-family: var(--script); text-transform: none; letter-spacing: 0; font-size: 1.9rem; color: var(--coral); vertical-align: -.15em; }

/* =========================================================
   SECTION TITLE  (coral squiggle flourishes)
   ========================================================= */
.section-title { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin: 0 auto clamp(2rem, 4vw, 3rem); padding: 0 1.25rem; }
.section-title h2 { font-family: var(--serif); font-weight: 500; text-transform: uppercase; letter-spacing: .26em; font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); color: var(--pine); text-align: center; }
.section-title__flourish { width: clamp(40px, 8vw, 64px); height: 12px; background: var(--squiggle) center / contain no-repeat; }

/* =========================================================
   WHAT TO EXPECT
   ========================================================= */
.expect { background: var(--cream); border-top: 1px solid var(--sage-2); border-bottom: 1px solid var(--sage-2); padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.expect__grid { list-style: none; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); max-width: 1000px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.expect__item { text-align: center; padding: 1rem .5rem; }
.expect__icon { width: 42px; height: 42px; margin: 0 auto .9rem; fill: none; stroke: var(--pine); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.expect__icon--fill { fill: var(--pine); stroke: none; }
.expect__item h3 { font-family: var(--serif); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 1.1rem; color: var(--pine); margin-bottom: .5rem; }
.expect__item p { font-size: 1.08rem; color: var(--ink); margin: 0; max-width: 32ch; margin-inline: auto; }

/* =========================================================
   QUESTIONNAIRE
   ========================================================= */
.quiz { max-width: 720px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 2rem); }
.quiz__intro { text-align: center; color: var(--ink); margin: -1rem auto 2.4rem; max-width: 46ch; }
.quiz__intro strong { color: var(--coral); }

.quiz__form { display: grid; gap: 1.7rem; }
.field { display: grid; gap: .55rem; border: 0; padding: 0; margin: 0; }
.field > label, .field legend { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; color: var(--pine); padding: 0; }
.req { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: .78em; color: var(--coral); letter-spacing: .04em; }

/* make the name field read as the clear first step */
.field--name { background: var(--butter-soft); border: 1px solid var(--sage-2); border-radius: 6px; padding: 1rem 1.1rem; }
.field--name input[type="text"] { border-bottom-color: var(--pine); }
.field--name input[type="text"]::placeholder { color: var(--ink-soft); font-style: italic; }

.field input[type="text"] { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--sage-2); border-radius: 0; padding: .35em .1em; width: 100%; transition: border-color var(--dur) var(--ease); }
.field textarea { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); background: var(--cream); border: 1px solid var(--sage-2); border-radius: 4px; padding: .55em .8em; width: 100%; resize: vertical; transition: border-color var(--dur) var(--ease); }
.field input[type="text"]::placeholder, .field textarea::placeholder { color: var(--ink-soft); }
.field input[type="text"]:focus, .field textarea:focus { outline: none; border-color: var(--coral); }
#q-transport-other { margin-top: .3rem; }

.choices { display: grid; gap: .5rem; }
.choices--inline { grid-template-columns: repeat(4, auto); justify-content: start; gap: 1.6rem; }
.choices label { display: flex; align-items: center; gap: .65rem; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); cursor: pointer; }
.choice-note { font-size: .78em; font-style: italic; color: var(--ink-soft); }
.choices input[type="radio"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 1.5px solid var(--pine); border-radius: 50%; display: grid; place-content: center; cursor: pointer; }
.choices input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; transform: scale(0); transition: transform var(--dur) var(--ease); background: var(--coral); }
.choices input[type="radio"]:checked { border-color: var(--coral); }
.choices input[type="radio"]:checked::before { transform: scale(1); }
.choices input[type="radio"]:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.quiz__actions { text-align: center; margin-top: 1rem; }
.btn--submit:disabled { opacity: .6; cursor: progress; }
.quiz__status { font-family: var(--serif); font-size: 1rem; margin: 1rem 0 0; min-height: 1.2em; }
.quiz__status.is-error { color: #a1442e; }
.quiz__status.is-ok { color: var(--pine); }

/* =========================================================
   SHARE / QR — sage field, cream lace panel (bookends hero)
   ========================================================= */
.share { display: grid; place-items: center; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 5vw, 2.5rem); background: var(--sage); }
.cartouche--share { min-height: 640px; }
.share__title { font-family: var(--script); font-size: clamp(2.6rem, 1.8rem + 3vw, 3.8rem); color: var(--pine); margin: 0 0 .6rem; }
.share__lead { color: var(--ink); max-width: 30ch; margin: 0 auto 1.6rem; }
.share__qr { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.qr { padding: 12px; background: #fff; border-radius: 4px; border: 1px solid var(--pine); line-height: 0; }
.qr img, .qr canvas { border-radius: 2px; }
.share__url { display: inline-block; font-family: var(--serif); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 1.1rem; color: var(--pine); text-decoration: none; border-bottom: 1px solid var(--coral); padding-bottom: 2px; transition: color var(--dur) var(--ease); }
.share__url:hover { color: var(--coral); }
.share__thanks { color: var(--ink); font-style: italic; margin: 1.5rem 0 0; }

/* =========================================================
   FOOTER — deep green
   ========================================================= */
.footer { text-align: center; padding: clamp(2.6rem, 6vw, 4rem) 1.25rem; background: var(--pine-deep); color: var(--cream); }
.footer__names { font-family: var(--script); font-size: 2.8rem; margin: 0 0 .2rem; color: var(--cream); }
.footer__names span { color: var(--butter); }
.footer__date { font-family: var(--serif); text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; color: #cdd6bf; margin: 0 0 1.3rem; }
.footer__top { font-family: var(--serif); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; text-decoration: none; color: var(--cream); border-bottom: 1px solid var(--butter); padding-bottom: 3px; transition: color var(--dur) var(--ease); }
.footer__top:hover { color: var(--butter); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .welcome__grid { grid-template-columns: 1fr; }
  .welcome__media { order: -1; max-width: 400px; margin: 0 auto; width: 100%; }
  .expect__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--sage-2); padding: .5rem clamp(1rem, 4vw, 2.5rem) 1rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .nav__menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__menu a { padding: .8em 0; border-bottom: 1px solid var(--cream); }
  .nav__menu a::after { display: none; }
  .expect__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .choices--inline { gap: 1.2rem; }
  .cartouche { min-height: 580px; padding: clamp(3rem, 12vw, 4rem) clamp(1.8rem, 8vw, 3rem); }
  .cd { min-width: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
