/* ============================================================
   Paige & Austin Wedding Website
   Elegant, classic, calm. One serif family throughout
   (Cormorant Garamond for display, EB Garamond for text) so
   nothing clashes. Warm cream paper with an espresso accent.

   EDIT COLORS: change the values in :root below to recolor
   the whole site.
   ============================================================ */

:root {
  --cream:  #f4efe6;   /* page background — warm paper */
  --paper:  #faf7f0;   /* card / alternating background */
  --ink:    #25221e;   /* main text */
  --muted:  #7c746a;   /* secondary text */
  --accent: #4a3527;   /* dark espresso brown — accents */
  --line:   #ddd4c5;   /* hairline borders */

  --serif:  'Cormorant Garamond', Georgia, serif;
  --body:   'EB Garamond', Georgia, serif;

  --maxw: 1060px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.76rem;
  padding: 1em 2.6em;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.2rem;
  background: var(--cream);
  transition: box-shadow 0.35s ease, padding 0.35s ease;
}
.nav.is-scrolled {
  background: var(--cream);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.85rem 2.2rem;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}

.nav__links { display: flex; align-items: center; gap: 2.1rem; }
.nav__links a {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.2s ease;
}
.nav__links a:hover { opacity: 0.55; }
.nav__cta { border: 1px solid var(--ink); padding: 0.6em 1.5em; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Hero (split: photo + text panel) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.hero__photo {
  overflow: hidden;
  background: var(--paper);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  /* a portrait photo fills the column; cover crops only the edges.
     object-position keeps the couple's faces in frame. */
  object-fit: cover;
  object-position: 50% 30%;
}
.hero__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--cream);
  padding: 7rem 2.5rem 5rem;
}
.hero__inner { max-width: 460px; }

.hero__eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero__names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.hero__names .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0.04em;
}
.hero__invite {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.9rem;
}
.hero__divider {
  width: 56px;
  height: 1px;
  background: var(--accent);
  margin: 1.6rem auto;
}
.hero__date {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.hero__venue {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.7rem;
}
.hero__flourish {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted);
  margin: 1.6rem 0 2rem;
}

/* On tablets and phones the photo becomes a full-bleed background
   with the text overlaid on top of a soft dark scrim. */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 100vh;
    position: relative;
  }
  .hero__photo {
    position: absolute;
    inset: 0;
  }
  .hero__photo img { object-position: 50% 28%; }
  .hero__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(37, 34, 30, 0.35), rgba(37, 34, 30, 0.62));
  }
  .hero__panel {
    position: relative;
    z-index: 1;
    background: transparent;
    padding: 7rem 1.6rem 5rem;
  }
  .hero__eyebrow,
  .hero__names,
  .hero__names .amp,
  .hero__date { color: var(--cream); }
  .hero__invite,
  .hero__venue,
  .hero__flourish { color: rgba(244, 239, 230, 0.88); }
  .hero__divider { background: rgba(244, 239, 230, 0.7); }
  .hero .btn {
    border-color: var(--cream);
    color: var(--cream);
  }
  .hero .btn:hover {
    background: var(--cream);
    color: var(--ink);
  }
}

/* ---------- Intro ---------- */
.intro {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 5.5rem 2rem;
}
.intro__inner { max-width: 640px; margin: 0 auto; }
.intro__inner p {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6.5rem 2rem;
}
.section--alt {
  max-width: none;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--alt > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.section__head { text-align: center; margin-bottom: 3.8rem; }
.section__eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.section__rule {
  display: block;
  width: 54px;
  height: 1px;
  background: var(--accent);
  margin: 1.2rem auto 0;
}
.section__lead {
  max-width: 560px;
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.2rem;
}

/* ---------- Timeline ---------- */
.timeline { max-width: 620px; margin: 0 auto; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 108px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.event { display: flex; gap: 2.2rem; padding: 1.6rem 0; }
.event__time {
  flex: 0 0 88px;
  text-align: right;
  font-family: var(--serif);
  font-size: 1.45rem;
  padding-top: 0.15rem;
}
.event__body { position: relative; padding-left: 1.7rem; }
.event__body::before {
  content: "";
  position: absolute;
  left: -5px; top: 0.75rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.event h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.2;
}
.event__place {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.event__body p:last-child { color: var(--muted); }

/* ---------- Venue banner ---------- */
.venue-banner {
  position: relative;
  height: clamp(340px, 58vh, 560px);
  overflow: hidden;
}
.venue-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* desktop frames the wide property panorama; phones reframe below */
  object-position: 50% 50%;
}
.venue-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(37, 34, 30, 0.28), rgba(37, 34, 30, 0.52));
}
.venue-banner__overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cream);
  padding: 2rem;
}
.venue-banner__eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.74rem;
  margin-bottom: 0.8rem;
}
.venue-banner__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.5vw, 3.5rem);
  line-height: 1.12;
}
.venue-banner__sub {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-top: 0.8rem;
  color: rgba(244, 239, 230, 0.9);
}
/* phones show the square carriage-house photo — reframe to the building */
@media (max-width: 860px) {
  .venue-banner img { object-position: 50% 34%; }
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 2.4rem;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 0.7rem;
}
.card p { color: var(--muted); margin-bottom: 0.9rem; }
.card a {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  text-decoration: none;
}
.card a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__q {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  text-align: left;
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq__icon {
  font-family: var(--body);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq__item.is-open .faq__icon { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq__a p { color: var(--muted); padding: 0 0 1.4rem; }

/* ---------- RSVP form ---------- */
.rsvp-form { max-width: 600px; margin: 0 auto; }

/* the hidden attribute must win over .btn's display: inline-block */
[hidden] { display: none !important; }

.field { margin-bottom: 1.9rem; border: 0; min-width: 0; }
.field > label,
.field > legend {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  padding: 0;
}
.field__hint {
  display: block;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin: -0.2rem 0 0.6rem;
}
.field__opt { color: var(--muted); font-style: italic; font-size: 0.95rem; }

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.78em 0.9em;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s ease;
}
.rsvp-form textarea { resize: vertical; line-height: 1.5; }
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* dropdown chevron (accent-colored) */
.rsvp-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%234a3527' stroke-width='1.5' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95em center;
  background-size: 0.72em;
  padding-right: 2.5em;
  cursor: pointer;
}

/* radio / checkbox rows */
.choice { display: flex; flex-direction: column; gap: 0.65rem; }
.radio,
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.5;
}
.check { margin-bottom: 1.9rem; }
.radio input,
.check input {
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.26em;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* one bordered block per person in the party */
.rsvp-people { margin-bottom: 1.9rem; }
.rsvp-people:empty { margin-bottom: 0; }
.person {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.6rem 1.5rem;
  margin-bottom: 1.2rem;
}
.person:last-child { margin-bottom: 0; }
.person__num {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.person .field { margin-bottom: 1.3rem; }
.person .field:last-child { margin-bottom: 0; }

.rsvp-form__submit {
  margin-top: 0.4rem;
  cursor: pointer;
  font-family: var(--body);
}
.rsvp-form__submit:disabled { opacity: 0.5; cursor: default; }
.rsvp-form__submit:disabled:hover { background: transparent; color: var(--ink); }

.rsvp-form__error {
  color: #9a3b2f;
  font-size: 0.98rem;
  margin-bottom: 1.2rem;
}

/* success message shown in place of the form */
.rsvp-thanks { max-width: 520px; margin: 0 auto; text-align: center; }
.rsvp-thanks__mark { color: var(--accent); font-size: 1.9rem; }
.rsvp-thanks h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.3rem;
  line-height: 1.2;
  margin: 0.3rem 0 0.6rem;
}
.rsvp-thanks p { color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 4.5rem 2rem;
}
.footer__names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.8rem;
  line-height: 1;
}
.footer__names .amp { font-style: italic; font-weight: 400; }
.footer__date {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #a89f92;
  margin: 0.7rem 0 1.4rem;
}
.footer__contact a { color: var(--cream); }

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  body { font-size: 17px; }

  .nav { padding: 1rem 1.4rem; }
  .nav.is-scrolled { padding: 0.8rem 1.4rem; }
  .nav__toggle { display: flex; z-index: 60; }

  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    background: var(--cream);
    box-shadow: -4px 0 28px rgba(0, 0, 0, 0.14);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 0.95rem; }

  .nav.is-menu-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.is-menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-menu-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .section { padding: 4.8rem 1.5rem; }
  .section__head { margin-bottom: 2.6rem; }

  .intro__inner p { font-size: 1.4rem; }

  .timeline::before { left: 72px; }
  .event { gap: 1.1rem; }
  .event__time { flex-basis: 60px; font-size: 1.2rem; }

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

  .footer__names { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
}
