/* ===========================================================
   Wedding website template — generated by builder/build.py
   Colours and fonts are injected into :root at build time.
   =========================================================== */

:root {
  --bg: #faf7f0;
  --bg-alt: #f2ede2;
  --bg-deep: #e2dacb;
  --primary: #1c2d4a;
  --primary-dark: #111e33;
  --primary-light: #3d5276;
  --secondary: #a88a5c;
  --secondary-dark: #86693f;
  --secondary-light: #cdb68e;
  --text: #1e2635;
  --text-light: #5a6271;
  --white: #fffdf9;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-names: 'Great Vibes', 'Cormorant Garamond', cursive;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover { color: var(--secondary-dark); }

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

ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Ornamental divider ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
  color: var(--secondary);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: var(--secondary-light);
}

.divider span {
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--primary);
  border-radius: 2px;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  padding: 1.2rem 3rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--bg-deep);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.logo .amp {
  color: var(--secondary);
  font-style: italic;
}

.main-nav ul {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.main-nav a {
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  border-color: var(--secondary);
}

.main-nav a.nav-rsvp {
  background: var(--primary);
  color: var(--white);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
}

.main-nav a.nav-rsvp:hover {
  background: var(--secondary-dark);
  border-color: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, var(--bg-alt) 0%, var(--bg) 65%);
}

.hero-monogram {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--secondary-dark);
  margin-bottom: 1.2rem;
}

.hero h1 {
  margin-bottom: 0.3em;
}

.hero .tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-light);
  margin-bottom: 1.6rem;
}

.hero .event-line {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero .event-line strong {
  color: var(--primary);
}

.hero-photo {
  max-width: 600px;
  margin: 0 auto 1rem;
  padding: 10px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(40, 32, 30, 0.18);
}

.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 2rem 0 2.5rem;
}

.countdown .count-block {
  background: var(--white);
  border: 1px solid var(--bg-deep);
  border-radius: 4px;
  min-width: 90px;
  padding: 1rem 0.6rem;
  box-shadow: 0 4px 14px rgba(40, 32, 30, 0.06);
}

.countdown .count-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary);
  display: block;
}

.countdown .count-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
}

/* ---------- Cards / grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--bg-deep);
  border-radius: 4px;
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(40, 32, 30, 0.08);
}

.card .card-icon {
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card .card-meta {
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

/* ---------- Timeline (schedule / our story) ---------- */
.timeline {
  max-width: 640px;
  margin: 2.5rem auto 0;
  border-left: 2px solid var(--secondary-light);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.42rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
}

.timeline-time {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--secondary-dark);
  font-size: 1rem;
  margin-bottom: 0.2rem;
  display: block;
}

/* ---------- Info strip ---------- */
.info-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--primary);
  color: var(--bg);
}

.info-strip .info-item .info-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary-light);
  margin-bottom: 0.3rem;
}

.info-strip .info-item .info-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

/* ---------- Placeholder callouts (for user to fill in) ---------- */
.todo-note {
  display: inline-block;
  background: var(--bg-deep);
  color: var(--primary-dark);
  border: 1px dashed var(--secondary);
  border-radius: 3px;
  padding: 0.15rem 0.6rem;
  font-size: 0.85em;
  font-style: italic;
}

/* ---------- RSVP ---------- */
.rsvp-form-wrap {
  max-width: 720px;
  margin: 2.5rem auto 0;
  background: var(--white);
  border: 1px solid var(--bg-deep);
  border-radius: 6px;
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(40, 32, 30, 0.08);
}

.rsvp-form-wrap iframe {
  width: 100%;
  min-height: 1521px;
  border: none;
  display: block;
}

/* ---------- Gallery masonry ---------- */
.gallery-masonry {
  column-count: 2;
  column-gap: 0.9rem;
  margin-top: 2.5rem;
}

@media (min-width: 620px) {
  .gallery-masonry { column-count: 3; }
}

@media (min-width: 980px) {
  .gallery-masonry { column-count: 4; }
}

.gallery-masonry a {
  display: block;
  break-inside: avoid;
  margin-bottom: 0.9rem;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(40, 32, 30, 0.1);
}

.gallery-masonry img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.gallery-masonry a:hover img {
  transform: scale(1.03);
}

/* ---------- Gallery password gate ---------- */
.gallery-gate-card {
  background: var(--white);
  border: 1px solid var(--bg-deep);
  border-radius: 6px;
  padding: 2rem 1.8rem;
  box-shadow: 0 8px 24px rgba(40, 32, 30, 0.08);
}

.gate-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.gate-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.3rem;
  border: 1px solid var(--bg-deep);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
}

.gate-input:focus {
  outline: none;
  border-color: var(--secondary);
}

.gate-error {
  color: var(--primary);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  max-width: 760px;
  margin: 2.5rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--bg-deep);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.2rem 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question .faq-icon {
  color: var(--secondary);
  font-size: 1.3rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding-bottom: 1.2rem;
  color: var(--text-light);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: var(--bg);
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.footer-monogram {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.footer-note {
  color: var(--bg-deep);
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.4rem;
  }

  .nav-toggle {
    display: flex;
  }
}


/* ===========================================================
   Template additions
   =========================================================== */
.hero h1.names { font-family: var(--font-names); }
.hero .names-amp { color: var(--secondary); font-style: italic; }

.card-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card .card-icon { display: flex; justify-content: center; }
a.card { color: inherit; }
.card p.muted, .muted { color: var(--text-light); }

.intro { max-width: 640px; margin: 0 auto; text-align: center; color: var(--text-light); }
.page-hero { padding-bottom: 2rem; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }

.map-wrap { padding: 0; overflow: hidden; }
.map-wrap iframe { min-height: 400px; }
.venue-address { margin-top: 1.5rem; color: var(--text-light); }

.notes { white-space: pre-line; }

/* On-site RSVP form */
.rsvp-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--bg-deep);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  box-shadow: 0 8px 24px rgba(40, 32, 30, 0.08);
}
.rsvp-card .field { margin-bottom: 1.1rem; }
.rsvp-card label, .rsvp-card .label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; }
.rsvp-card input[type="text"], .rsvp-card input[type="email"], .rsvp-card input[type="tel"],
.rsvp-card input[type="number"], .rsvp-card select, .rsvp-card textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--bg-deep);
  border-radius: 3px;
  background: var(--bg);
  font: inherit;
  color: var(--text);
}
.rsvp-card textarea { min-height: 90px; resize: vertical; }
.rsvp-card input:focus, .rsvp-card select:focus, .rsvp-card textarea:focus { outline: 2px solid var(--secondary-light); outline-offset: 1px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.choice-row label { font-weight: 400; display: flex; gap: 0.45rem; align-items: center; cursor: pointer; }
.choice-row input { accent-color: var(--primary); }
.rsvp-status { margin-top: 1rem; text-align: center; font-weight: 700; }
.rsvp-status.ok { color: var(--secondary); }
.rsvp-status.err { color: var(--primary); }
.rsvp-help { text-align: center; margin-top: 2rem; color: var(--text-light); }
.rsvp-form-wrap:not(.map-wrap) iframe { min-height: 1500px; }

.gallery-masonry a { cursor: zoom-in; }

/* ===========================================================
   Sections (shared by multi-page and one-page layouts)
   =========================================================== */
.center { text-align: center; }
.section-title.center { margin-bottom: 2rem; }
.page-body { padding-top: 0; }
.block + .block { margin-top: 3.5rem; }
html { scroll-padding-top: 80px; }

/* One-page layout */
.one-sec { padding: clamp(4rem, 8vw, 6rem) 0; }
.one-sec-alt { background: var(--bg-alt); }
.sec-head { text-align: center; margin-bottom: 2.5rem; padding: 0 1.5rem; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0; }
.sec-head .divider { margin: 1.2rem 0 1.6rem; }
.sec-head .intro { margin-top: 0; }
.one-page .main-nav a.active { color: var(--primary); }

/* Gentle scroll reveals (only when JS is running and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .home-hero > * { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .home-hero > :nth-child(2) { animation-delay: 0.12s; }
  .js .home-hero > :nth-child(3) { animation-delay: 0.24s; }
  .js .home-hero > :nth-child(4) { animation-delay: 0.36s; }
  .js .home-hero > :nth-child(n+5) { animation-delay: 0.48s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ===========================================================
   Opening animations (index page only, once per visit)
   =========================================================== */
.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, var(--bg) 0%, var(--bg-alt) 70%, var(--bg-deep) 100%);
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.opening.done { opacity: 0; visibility: hidden; }
.opening-seen .opening { display: none; }
.opening-active { overflow: hidden; }
.opening-skip {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  background: none;
  border: 0;
  color: var(--text-light);
  font: 400 0.8rem var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.6rem;
}
.opening-skip:hover { color: var(--primary); }

/* --- Envelope --- */
.env-stage { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.env {
  position: relative;
  width: min(84vw, 460px);
  aspect-ratio: 3 / 2;
  perspective: 1400px;
  margin-top: 18vh;
}
.env-back, .env-front, .env-flap { position: absolute; left: 0; right: 0; }
.env-back {
  inset: 0;
  background: var(--primary-dark);
  border-radius: 6px;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
}
.env-letter {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 5%;
  height: 92%;
  z-index: 2;
  background: var(--white);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  outline: 1px solid var(--bg-deep);
  outline-offset: -10px;
  transition: transform 1.2s cubic-bezier(0.2, 0.75, 0.2, 1) 0.55s;
}
.env-small { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-light); margin: 0 0 0.4rem; }
.env-names { font-family: var(--font-names); font-size: clamp(1.7rem, 6vw, 2.5rem); color: var(--primary); line-height: 1.15; margin: 0 0 0.4rem; }
.env-names .amp { color: var(--secondary); font-style: italic; }
.env-date { font-family: var(--font-heading); font-style: italic; color: var(--text-light); margin: 0; }
.env-front {
  inset: 0;
  z-index: 3;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  top: 0;
  height: 62%;
  z-index: 4;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.75s cubic-bezier(0.5, 0, 0.3, 1), z-index 0s linear 0.38s;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 5;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
  font: italic 600 1.05rem var(--font-heading);
  background: radial-gradient(circle at 35% 30%, var(--secondary-light), var(--secondary) 55%, var(--secondary-dark) 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(255, 255, 255, 0.12), inset 0 0 0 7px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, opacity 0.4s ease;
  animation: seal-pulse 2.4s ease-in-out infinite;
}
.env-seal span { font-size: 0.75em; margin: 0 0.08em; }
.env-seal:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
@keyframes seal-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.env-hint { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-light); margin: 0; transition: opacity 0.3s; }

.opening.open .env-seal { opacity: 0; transform: scale(0.6); animation: none; pointer-events: none; }
.opening.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.opening.open .env-letter { transform: translateY(-62%); }
.opening.open .env-hint { opacity: 0; }

/* --- Monogram --- */
.mono-stage { text-align: center; padding: 0 1.5rem; }
.mono-letters {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 12vw, 6rem);
  color: var(--primary);
  margin: 0;
  letter-spacing: 0.04em;
  animation: mono-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.mono-letters span { color: var(--secondary); font-style: italic; font-size: 0.7em; margin: 0 0.12em; }
.mono-line {
  display: block;
  height: 1px;
  width: 160px;
  margin: 1.2rem auto;
  background: var(--secondary);
  transform-origin: center;
  animation: line-draw 1.1s ease 0.7s both;
}
.mono-names { font-family: var(--font-names); font-size: clamp(1.6rem, 5vw, 2.3rem); color: var(--primary); margin: 0 0 0.3rem; animation: fade-up 1s ease 1.2s both; }
.mono-names .amp { color: var(--secondary); font-style: italic; }
.mono-date { font-family: var(--font-heading); font-style: italic; color: var(--text-light); margin: 0; animation: fade-up 1s ease 1.5s both; }
@keyframes mono-in { from { opacity: 0; transform: scale(0.92); letter-spacing: 0.3em; } to { opacity: 1; transform: none; } }
@keyframes line-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  .env { margin-top: 22vh; }
  .env-seal { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}

/* Countdown: keep all four boxes on one row on phones */
@media (max-width: 520px) {
  .countdown { gap: 0.5rem; flex-wrap: nowrap; }
  .countdown .count-block { min-width: 0; flex: 1 1 0; max-width: 78px; padding: 0.8rem 0.2rem; }
  .countdown .count-number { font-size: 1.6rem; }
  .countdown .count-label { font-size: 0.6rem; letter-spacing: 0.04em; }
}

/* --- Shared: the invitation text revealed behind doors / curtains --- */
.opening-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1s ease 0.6s, transform 1.4s ease 0.6s;
}
.opening.open .opening-reveal { opacity: 1; transform: none; }
.opening-reveal .env-names { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.doors-mono { font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: 0.04em; }
.doors-mono span { font-style: italic; font-size: 0.75em; margin: 0 0.12em; color: var(--secondary-light); }

/* --- Doors --- */
.opening-doors { perspective: 1800px; overflow: hidden; }
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.2%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  transition: transform 1.6s cubic-bezier(0.6, 0, 0.25, 1);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.25);
}
.door::before, .door::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  border: 1px solid var(--secondary-light);
  opacity: 0.55;
}
.door::before { top: 7%; height: 38%; }
.door::after { top: 51%; bottom: 7%; }
.door-l { left: 0; transform-origin: left center; }
.door-r { right: 0; transform-origin: right center; }
.door-handle {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 64px;
  margin-top: -32px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--secondary-dark), var(--secondary-light), var(--secondary));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.door-l .door-handle { right: 18px; }
.door-r .door-handle { left: 18px; }
.doors-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--secondary-light);
  background: var(--primary-dark);
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.5s ease;
  font: inherit;
}
.doors-hint, .curtain-label .hint { font: 400 0.68rem var(--font-body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--secondary-light); }
.doors-center:focus-visible { outline: 2px solid var(--secondary-light); outline-offset: 4px; }
.opening-doors .opening-skip { z-index: 4; color: var(--bg-deep); }
.opening-doors.open .doors-center { opacity: 0; pointer-events: none; }
.opening-doors.open .door-l { transform: rotateY(-108deg); }
.opening-doors.open .door-r { transform: rotateY(108deg); }
.opening-doors.open .opening-skip { color: var(--text-light); }

/* --- Curtain --- */
.opening-curtain { overflow: hidden; }
.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3)),
    repeating-linear-gradient(90deg, var(--primary-dark) 0, var(--primary) 2.2%, var(--primary-light) 3.6%, var(--primary) 5%, var(--primary-dark) 7.4%);
  transition: transform 1.9s cubic-bezier(0.55, 0, 0.2, 1);
}
.curtain-l { left: 0; transform-origin: left center; }
.curtain-r { right: 0; transform-origin: right center; }
.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9vh;
  min-height: 50px;
  z-index: 2;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  border-bottom: 3px solid var(--secondary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 1.2s ease 1.2s;
}
.curtain-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  color: var(--white);
  text-align: center;
  transition: opacity 0.6s ease;
}
.opening-curtain .opening-skip { z-index: 4; color: var(--bg-deep); }
.opening-curtain.open .curtain-label { opacity: 0; }
.opening-curtain.open .curtain-l, .opening-curtain.open .curtain-r { transform: scaleX(0.08); }
.opening-curtain.open .curtain-valance { transform: translateY(-110%); }
.opening-curtain.open .opening-skip { color: var(--text-light); }

/* --- Save-the-date card flip --- */
.flip { width: min(78vw, 360px); aspect-ratio: 5 / 7; perspective: 1400px; animation: fade-up 0.9s ease both; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1.3s cubic-bezier(0.45, 0, 0.2, 1); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.4rem;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
}
.flip-front { background: linear-gradient(160deg, var(--primary), var(--primary-dark)); color: var(--white); outline: 1px solid var(--secondary-light); outline-offset: -12px; cursor: pointer; }
.flip-back { background: var(--white); transform: rotateY(180deg); outline: 1px solid var(--bg-deep); outline-offset: -12px; }
.flip-small { font: 400 0.72rem var(--font-body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--secondary-light); margin: 0; }
.flip-mono { font-family: var(--font-heading); font-size: clamp(3rem, 12vw, 4.4rem); margin: 1rem 0; line-height: 1; }
.flip-mono span { font-style: italic; font-size: 0.6em; color: var(--secondary-light); margin: 0 0.1em; }
.flip-place { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--text-light); }
.opening-card.open .flip-inner { transform: rotateY(180deg); }

/* ===========================================================
   Home photo options
   =========================================================== */
.hero-full {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-dark);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
}
.hero-full h1, .hero-full .tagline, .hero-full .event-line, .hero-full .event-line strong { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero-full .names-amp { color: var(--secondary-light); }
.hero-full .count-block { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(4px); box-shadow: none; }
.hero-full .count-number { color: #fff; }
.hero-full .count-label { color: rgba(255, 255, 255, 0.85); }
.hero-full .btn { background: #fff; color: var(--primary); border-color: #fff; }
.hero-full .btn:hover { background: var(--secondary-light); border-color: var(--secondary-light); }

.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 620px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }

.demo-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
