/* =========================================================
   Austin & Anastasiia  -  Classic & Elegant
   Palette: ivory / warm ink / sage / soft gold
   ========================================================= */

:root {
  --ivory: #f7f3ec;
  --cream: #fbf8f2;
  --ink: #33302b;
  --ink-soft: #6b655c;
  --sage: #7e8c75;
  --sage-deep: #586350;
  --gold: #b79a5b;
  --gold-bright: #e3c372;
  --line: rgba(51, 48, 43, 0.14);

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Tangerine', 'Snell Roundhand', cursive;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --maxw: 1140px;
  --nav-h: 74px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--sage); color: var(--cream); }

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

a { color: inherit; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Shared type ---------- */
.section__label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 400;
  color: var(--sage-deep);
  margin: 0 0 14px;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.01em;
}
.ornament { display: block; width: 200px; max-width: 62%; height: 34px; margin: 22px auto 0; color: var(--gold); }
.ornament--light { color: var(--gold); opacity: 0.92; }
.section__head { text-align: center; margin-bottom: 64px; }

.link {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--sage-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
  display: inline-block;
  transition: color 0.25s, border-color 0.25s;
}
.link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
  padding: 16px 38px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.28s, color 0.28s, border-color 0.28s, transform 0.2s;
}
.btn--primary { background: var(--sage); color: var(--cream); }
.btn--primary:hover { background: var(--sage-deep); }
.btn--outline { background: transparent; color: var(--sage-deep); border-color: var(--sage); }
.btn--outline:hover { background: var(--sage); color: var(--cream); }
.btn:active { transform: translateY(1px); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Photo + placeholder ---------- */
.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e7e2d6, #d8ddcf 60%, #cdd4c2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__hint {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sage-deep); text-align: center; padding: 20px;
}
.photo__hint small { font-size: 11px; letter-spacing: 0.08em; opacity: 0.7; text-transform: none; }
.photo--missing img { display: none; }
.photo--missing .photo__hint { display: flex; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
  padding: 10px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav__brand {
  font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: 0.18em;
  text-decoration: none; color: var(--cream); transition: color 0.35s;
}
.nav__brand span { color: var(--gold-bright); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em; font-size: 12.5px;
  text-decoration: none; color: var(--cream); opacity: 0.92; transition: color 0.25s, opacity 0.25s;
}
.nav__links a:hover { opacity: 1; color: var(--gold); }
.nav__cta { border: 1px solid rgba(255,255,255,0.55); padding: 9px 20px; border-radius: 2px; }
.nav__toggle { display: none; }

/* nav once scrolled */
.nav--solid { background: var(--cream); box-shadow: 0 1px 0 var(--line); padding: 0; }
.nav--solid .nav__brand { color: var(--ink); }
.nav--solid .nav__brand span { color: var(--gold); }
.nav--solid .nav__links a { color: var(--ink); opacity: 0.85; }
.nav--solid .nav__links a:hover { color: var(--sage-deep); }
.nav--solid .nav__cta { border-color: var(--sage); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--cream); padding: var(--nav-h) 20px 40px;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(40,38,33,0.42) 0%, rgba(40,38,33,0.28) 45%, rgba(40,38,33,0.5) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero .photo--missing .photo__hint { z-index: 2; color: var(--cream); }
.hero__eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.4em; font-size: 13px;
  margin: 0 0 10px; opacity: 0.95;
}
.hero__names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(82px, 17vw, 188px); line-height: 0.82; margin: 6px 0 18px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero__names span { font-size: 0.62em; color: var(--gold-bright); text-shadow: 0 2px 16px rgba(40, 38, 33, 0.5); }
.hero__meta { font-size: clamp(22px, 3.4vw, 30px); letter-spacing: 0.04em; margin: 0; }
.hero__place {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.3em; font-size: 13px;
  margin: 8px 0 0; opacity: 0.92;
}

.countdown { display: flex; justify-content: center; gap: clamp(18px, 5vw, 46px); margin: 40px 0 38px; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; }
.countdown__unit span { font-family: var(--serif); font-size: clamp(34px, 6vw, 52px); font-weight: 500; line-height: 1; }
.countdown__unit label {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.22em; font-size: 11px;
  margin-top: 8px; opacity: 0.9;
}
.hero__btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.6); color: var(--cream); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hero__btn:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.24em; font-size: 11px;
  color: var(--cream); text-decoration: none; opacity: 0.85;
}
.hero__scroll::after { content: ""; display: block; width: 1px; height: 34px; background: var(--cream); margin: 10px auto 0; animation: scrollpulse 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes scrollpulse { 0%,100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Section base ---------- */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.story { background: var(--cream); }
.details { background: var(--ivory); }
.gallery { background: var(--cream); }
.travel { background: var(--ivory); }
.registry { background: var(--cream); text-align: center; }
.rsvp { background: var(--ivory); }
.faq { background: var(--cream); }

/* ---------- STORY (photo-forward) ---------- */
.story__intro { font-style: italic; font-size: clamp(20px, 2.6vw, 26px); color: #4a463f; max-width: 600px; margin: 18px auto 0; }
.story__feature { aspect-ratio: var(--ratio, 16/9); border: 1px solid var(--line); margin-bottom: 16px; }
.story__trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.story__trio .photo { aspect-ratio: var(--ratio, 1); border: 1px solid var(--line); }

/* ---------- BANNER ---------- */
.banner {
  position: relative; min-height: 60vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(40,38,33,0.4); z-index: 1; }
.banner .photo__hint { z-index: 2; color: var(--cream); }
.banner__quote {
  position: relative; z-index: 2; color: var(--cream); font-style: italic;
  font-size: clamp(26px, 4.2vw, 46px); max-width: 760px; padding: 0 28px; line-height: 1.35; margin: 0;
}

/* ---------- DETAILS ---------- */
.details__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.detail-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: 3px;
  padding: 44px 32px; text-align: center;
}
.detail-card__label { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.28em; font-size: 11px; color: var(--sage-deep); margin: 0 0 14px; }
.detail-card__big { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 0 0 6px; line-height: 1.2; }
.detail-card__sub { font-size: 18px; color: var(--ink-soft); margin: 0 0 14px; }

.timeline { max-width: 560px; margin: clamp(56px, 8vw, 90px) auto 0; }
.timeline__title { text-align: center; font-family: var(--serif); font-weight: 500; font-size: 32px; margin: 0 0 36px; }
.timeline__item {
  display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: none; }
.timeline__time { font-family: var(--sans); letter-spacing: 0.14em; font-size: 14px; color: var(--sage-deep); text-align: right; }
.timeline__desc { font-size: 24px; }

/* ---------- GALLERY ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery__item { aspect-ratio: 1; border: 1px solid var(--line); }
.gallery__item img { transition: transform 0.6s ease; }
.gallery__item:hover img { transform: scale(1.04); }

/* ---------- TRAVEL ---------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--cream); border: 1px solid var(--line); border-radius: 3px; padding: 40px 34px; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; margin: 0 0 16px; }
.card p { font-size: 18px; color: #4a463f; margin: 0 0 18px; }

/* ---------- REGISTRY ---------- */
.registry__lead { max-width: 620px; margin: 26px auto 34px; color: #4a463f; }
.registry__links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- RSVP ---------- */
.rsvp__lead { max-width: 600px; margin: 22px auto 0; color: #4a463f; font-size: 19px; }
.rsvp__card {
  max-width: 600px; margin: 52px auto 0; background: var(--cream);
  border: 1px solid var(--line); border-radius: 4px; padding: clamp(32px, 5vw, 54px);
  box-shadow: 0 18px 50px rgba(51,48,43,0.06);
}
.field { text-align: left; margin-bottom: 22px; }
.field__label { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; color: var(--sage-deep); margin-bottom: 9px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--serif); font-size: 19px; color: var(--ink);
  background: var(--ivory); border: 1px solid var(--line); border-radius: 3px;
  padding: 14px 16px; transition: border-color 0.25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sage); }
.field textarea { resize: vertical; min-height: 88px; }
.field__hint { font-family: var(--sans); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft); margin: 7px 0 0; text-transform: none; }

.rsvp__msg { font-family: var(--sans); font-size: 14px; margin: 16px 0 0; min-height: 20px; }
.rsvp__msg--err { color: #a4533f; }
.rsvp__msg--ok { color: var(--sage-deep); }

.rsvp__found { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.rsvp__sub { font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-deep); margin: 0 0 26px; }

.guest-row { border-top: 1px solid var(--line); padding: 22px 0; }
.guest-row__name { font-size: 23px; margin: 0 0 12px; }
.attend { display: flex; gap: 10px; flex-wrap: wrap; }
.attend button {
  flex: 1; min-width: 130px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 14px; background: var(--ivory); border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
  color: var(--ink-soft); transition: all 0.2s;
}
.attend button:hover { border-color: var(--sage); color: var(--ink); }
.attend button.is-yes { background: var(--sage); border-color: var(--sage); color: var(--cream); }
.attend button.is-no { background: #b9a99c; border-color: #b9a99c; color: var(--cream); }
.guest-meal { margin-top: 14px; }

.rsvp__actions { display: flex; gap: 14px; margin-top: 28px; align-items: center; }
.rsvp__back { background: none; border: none; cursor: pointer; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; color: var(--ink-soft); }
.rsvp__back:hover { color: var(--ink); }

.rsvp__done { text-align: center; }
.rsvp__done h3 { font-family: var(--script); font-size: 64px; line-height: 1; margin: 0 0 14px; color: var(--sage-deep); }
.rsvp__done p { color: #4a463f; }

.party-choice { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.party-choice button { font-family: var(--serif); font-size: 19px; text-align: left; padding: 16px 18px; background: var(--ivory); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; transition: border-color 0.2s; }
.party-choice button:hover { border-color: var(--sage); }

/* ---------- FAQ ---------- */
.faq__list { max-width: 760px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 22px 0; font-size: 24px; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--sans); color: var(--sage); font-size: 26px; font-weight: 300; transition: transform 0.25s; }
.faq__item[open] summary::after { content: "\2212"; }
.faq__item p { margin: 0 0 22px; color: #4a463f; font-size: 19px; }

/* ---------- FOOTER ---------- */
.footer { background: var(--sage-deep); color: var(--cream); text-align: center; padding: 80px 24px; }
.footer__names { font-family: var(--script); font-size: 76px; line-height: 0.9; margin: 0; }
.footer__names span { color: var(--gold-bright); }
.footer__date { font-family: var(--sans); letter-spacing: 0.24em; text-transform: uppercase; font-size: 13px; margin: 12px 0 0; opacity: 0.92; }
.footer__thanks { font-style: italic; font-size: 22px; margin: 26px 0 0; opacity: 0.95; }

/* =========================================================
   RESPONSIVE  -  these blocks intentionally come LAST so they
   win the cascade over the unconditional rules above.
   ========================================================= */
@media (max-width: 860px) {
  body { font-size: 19px; }

  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; background: none; border: none; cursor: pointer; z-index: 120;
  }
  .nav__toggle span { display: block; width: 24px; height: 2px; background: var(--cream); transition: background 0.3s, transform 0.3s, opacity 0.3s; }
  .nav--solid .nav__toggle span { background: var(--ink); }

  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: var(--sage-deep); transform: translateX(100%); visibility: hidden;
    transition: transform 0.4s ease, visibility 0s linear 0.4s;
  }
  .nav__links a { color: var(--cream); font-size: 16px; }
  .nav--solid .nav__links a { color: var(--cream); }
  .nav__cta { border-color: rgba(255,255,255,0.6); }

  body.nav-open .nav__links { transform: translateX(0); visibility: visible; transition: transform 0.4s ease, visibility 0s linear 0s; }
  body.nav-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .story__feature { aspect-ratio: 4/3; }

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

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .countdown { gap: 14px; }
  .timeline__item { grid-template-columns: 90px 1fr; gap: 14px; }
  .timeline__desc { font-size: 21px; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rsvp__card { padding: 28px 22px; }
}

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