/* ── FONTS ─────────────────────────────────────────────── */
@font-face {
  font-family: "TheSeasons";
  src: url("The.Seasons/The Seasons Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TheSeasons";
  src: url("The.Seasons/The Seasons Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TheSeasons";
  src: url("The.Seasons/The Seasons Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant";
  src: url("Cormorant_Garamond (1)/CormorantGaramond-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("Cormorant_Garamond (1)/CormorantGaramond-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("Cormorant_Garamond (1)/CormorantGaramond-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("Cormorant_Garamond (1)/CormorantGaramond-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("Cormorant_Garamond (1)/CormorantGaramond-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ── VARIABLES ──────────────────────────────────────────── */
:root {
  --bg-cream: #f5f1ea;
  --bg-paper: #ffffff;
  --bg-dark: #2b2b2b;
  --text-primary: #2b2b2b;
  --text-muted: #7a7060;
  --border-soft: rgba(43, 43, 43, 0.14);
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 48px;
  --space-xxl: 72px;
  --text-on-dark: var(--bg-paper);
  --text-on-dark-muted: rgba(255, 255, 255, 0.68);
  --motion-fast: 220ms;
  --motion-base: 320ms;
  --motion-slow: 380ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-envelope: 0 16px 28px rgba(43, 43, 43, 0.1);
  --shadow-hover: 0 20px 50px rgba(43, 43, 43, 0.24);
  --shadow: 0 12px 40px rgba(43, 43, 43, 0.18);
  --invite-ratio: 0.708;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ───────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
}

html.flow-open,
body.flow-open {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: "Cormorant", Georgia, serif;
  color: var(--text-primary);
  background: var(--bg-cream);
  -webkit-text-size-adjust: 100%;
}

/* ── TYPOGRAPHY SYSTEM ──────────────────────────────────── */
.type-display {
  font-family: "TheSeasons", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.type-headline {
  font-family: "TheSeasons", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.06;
}

.type-body {
  font-family: "Cormorant", Georgia, serif;
  font-weight: 400;
  line-height: 1.22;
}

.type-meta {
  font-family: "TheSeasons", serif;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── BUTTON SYSTEM ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: var(--space-s) var(--space-l);
  font-family: "TheSeasons", serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--motion-fast) ease,
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.btn:focus-visible {
  outline: 2px solid var(--border-soft);
  outline-offset: 3px;
}

.btn-primary,
.btn-secondary,
.btn-form {
  background: var(--bg-dark);
  color: var(--bg-paper);
}

.btn-primary {
  min-width: min(100%, 280px);
  box-shadow: 0 10px 24px rgba(43, 43, 43, 0.14);
}

.btn-secondary {
  min-width: min(100%, 236px);
  opacity: 0.94;
}

.btn-form {
  width: 100%;
  padding: var(--space-m) var(--space-l);
  letter-spacing: 0.22em;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-form:hover {
  opacity: 1;
}

main {
  min-height: 100svh;
}

body.flow-open main {
  min-height: auto;
}

main > section + section {
  margin-top: 0;
}

#saveDateStart {
  margin-top: 0;
}

/* ── HERO SECTION ───────────────────────────────────────── */
.hero {
  height: 100svh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

body.flow-open .hero {
  min-height: calc(100svh - var(--space-xxl));
  height: auto;
  overflow: visible;
  padding-bottom: var(--space-m);
}

.hero::before {
  display: none;
}

/* ── HERO SCREEN (page 1) ───────────────────────────────── */
.hero-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m);
  text-align: center;
  position: relative;
  z-index: 1;
  transition: opacity var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
}

.hero-title {
  font-size: clamp(1.15rem, 4.5vw, 1.7rem);
  line-height: 1.1;
  color: var(--text-primary);
}

.envelope-trigger {
  width: min(520px, 78vw);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform var(--motion-fast) ease;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.env-closed-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(43, 43, 43, 0.12));
}

.hero-sub {
  font-family: "Cormorant", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.85rem, 3.2vw, 1rem);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

@media (hover: hover) and (pointer: fine) {
  .envelope-trigger:hover {
    transform: scale(1.03);
  }
}

.envelope-trigger:focus-visible {
  outline: 2px solid var(--border-soft);
  outline-offset: 4px;
}

/* ── INVITATION REVEAL (page 2) ─────────────────────────── */
.invitation-reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-xl) var(--space-m) var(--space-l);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--motion-ease);
  overflow: hidden;
}

/* ── BACK BUTTON ────────────────────────────────────────── */
.back-btn {
  position: absolute;
  top: var(--space-m);
  left: var(--space-m);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Cormorant", Georgia, serif;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: var(--space-xs) var(--space-s);
  z-index: 10;
  transition: color var(--motion-fast) ease;
  line-height: 1;
}

.back-btn:hover {
  color: var(--text-primary);
}

.back-btn:focus-visible {
  outline: 2px solid var(--border-soft);
  outline-offset: 3px;
}

/* ── INNER WRAPPER ──────────────────────────────────────── */
.inv-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  width: 100%;
  height: calc(100svh - var(--space-xxl));
  padding: 0 0 var(--space-xs);
}

/* ── INVITATION CARD ────────────────────────────────────── */
.card-wrap {
  position: relative;
  width: min(90vw, 520px, calc((100svh - 168px) * var(--invite-ratio)));
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-slow) var(--motion-ease) 80ms, transform var(--motion-slow) var(--motion-ease) 80ms;
  transform-origin: center top;
}

.paper-shell {
  position: relative;
  width: 100%;
  aspect-ratio: var(--invite-ratio);
  container-type: inline-size;
}

.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 10px 24px rgba(43, 43, 43, 0.08));
}

/* ── FLOWER ─────────────────────────────────────────────── */
.card-flower {
  position: absolute;
  left: 65.8%;
  top: 44%;
  width: 24%;
  height: auto;
  aspect-ratio: 226 / 559;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.95;
}

/* ── CARD TEXT OVERLAY ──────────────────────────────────── */
.card-text {
  position: absolute;
  inset: 0;
  color: var(--text-primary);
  text-align: left;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
.ct-intro {
  position: absolute;
  top: 12%;
  left: 10.4%;
  width: 66%;
  font-family: "Cormorant", Georgia, serif;
  font-size: 3.42cqi;
  font-weight: 400;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.ct-statement {
  position: absolute;
  top: 24.9%;
  left: 10.4%;
  width: 74%;
  font-family: "Cormorant", Georgia, serif;
  font-size: 3.44cqi;
  font-weight: 400;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.16;
  letter-spacing: 0.01em;
}

.ct-names {
  position: absolute;
  top: 34.5%;
  left: 10.4%;
  width: 79%;
  font-family: "TheSeasons", serif;
  font-weight: 400;
  font-size: 7.8cqi;
  letter-spacing: 0.008em;
  line-height: 1.02;
  white-space: nowrap;
}

.ct-label {
  font-family: "TheSeasons", serif;
  font-size: 3.02cqi;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.ct-parents-block {
  position: absolute;
  top: 47%;
  left: 10.4%;
  width: 56%;
}

.ct-parents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 4.2cqi;
  row-gap: 0;
  align-items: start;
  margin-top: 0.82cqi;
  text-align: left;
}

.ct-parent-col p {
  font-family: "Cormorant", Georgia, serif;
  font-size: 4.18cqi;
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
  margin: 0;
}

.ct-nasi-block {
  position: absolute;
  top: 62%;
  left: 10.4%;
  width: 56%;
}

.ct-nasi {
  font-family: "Cormorant", Georgia, serif;
  font-size: 4.08cqi;
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
  margin-top: 0.7cqi;
}

.ct-date-block {
  position: absolute;
  top: 75%;
  left: 10.4%;
  width: 73%;
}

.ct-date {
  font-family: "TheSeasons", serif;
  font-weight: 700;
  font-size: 5.56cqi;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.02;
}

.ct-tagline {
  font-family: "Cormorant", Georgia, serif;
  font-size: 4.5cqi;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.16;
  margin-top: 0.8cqi;
}

/* ── DETALII BUTTON ─────────────────────────────────────── */
.detalii-btn {
  margin-top: var(--space-xs);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--motion-base) var(--motion-ease) 140ms,
    transform var(--motion-base) var(--motion-ease) 140ms,
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.detalii-btn:hover {
  opacity: 1;
}

/* ── STATE: REVEALED ────────────────────────────────────── */
.hero.is-revealed .hero-screen {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.hero.is-revealed .invitation-reveal {
  opacity: 1;
  pointer-events: auto;
}

.hero.is-revealed .card-wrap {
  opacity: 1;
  transform: translateY(0);
}

.hero.is-revealed .detalii-btn {
  opacity: 1;
  transform: translateY(0);
}

.program-view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-xl) var(--space-m) var(--space-l);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--motion-ease);
}

.program-back-btn {
  position: absolute;
  top: var(--space-m);
  left: var(--space-m);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Cormorant", Georgia, serif;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: var(--space-xs) var(--space-s);
  z-index: 10;
  transition: color var(--motion-fast) ease;
  line-height: 1;
}

.program-back-btn:hover {
  color: var(--text-primary);
}

.program-back-btn:focus-visible {
  outline: 2px solid var(--border-soft);
  outline-offset: 3px;
}

.program-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(100svh - (var(--space-xl) + var(--space-xxl)));
  padding: 0 0 var(--space-m);
  gap: var(--space-m);
}

.program-card-wrap {
  position: relative;
  width: min(90vw, 520px, calc((100svh - 168px) * var(--invite-ratio)));
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-slow) var(--motion-ease) 80ms, transform var(--motion-slow) var(--motion-ease) 80ms;
  transform-origin: center top;
}

.program-paper-shell {
  position: relative;
  width: 100%;
  aspect-ratio: var(--invite-ratio);
  container-type: inline-size;
}

.program-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 10px 24px rgba(43, 43, 43, 0.08));
}

.program-card-text {
  position: absolute;
  inset: 0;
  color: var(--text-primary);
}

.invitation-reveal.show-program .inv-inner {
  opacity: 0;
  pointer-events: none;
}

.invitation-reveal.show-program .program-view {
  opacity: 1;
  pointer-events: auto;
}

.invitation-reveal.show-program .program-card-wrap {
  opacity: 1;
  transform: translateY(0);
}

/* ── PROGRAM KICKER (title) ─────────────────────────────── */
.program-kicker {
  position: absolute;
  top: 15%;
  left: 13%;
  width: 74%;
  text-align: center;
  font-size: 4.7cqi;
  line-height: 1.04;
}

.program-flower {
  position: absolute;
  left: 65.8%;
  top: 45.8%;
  width: 24%;
  height: auto;
  opacity: 0.94;
  pointer-events: none;
  aspect-ratio: 226 / 559;
  object-fit: contain;
}

.program-timeline {
  list-style: none;
  position: absolute;
  inset: 20.3% 14.2% 19.9% 6.2%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  transform: translateX(-3.2%);
}

.program-event {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 0.82fr 0.88fr;
  align-items: center;
  column-gap: 1.35cqi;
}

.program-event-copy {
  display: grid;
  gap: 0.12cqi;
  justify-items: end;
  text-align: right;
}

.program-save-btn {
  margin-top: var(--space-xs);
}

.program-save-btn:hover {
  opacity: 1;
}

.program-actions {
  display: grid;
  justify-items: center;
  gap: 0;
  flex-shrink: 0;
}

.program-time {
  font-size: 3.9cqi;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin: 0;
}

.program-title {
  font-family: "Cormorant", Georgia, serif;
  font-size: 3.48cqi;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  line-height: 1.02;
  margin: 0;
}

.program-icon {
  width: 100%;
  max-width: 8.8cqi;
  justify-self: center;
  height: auto;
  opacity: 0.9;
}

.program-icon[src$="church.svg"] {
  max-width: 8.9cqi;
  shape-rendering: geometricPrecision;
}

.program-map-link {
  color: var(--text-primary);
  font-family: "TheSeasons", serif;
  font-size: 2.6cqi;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  justify-self: center;
  transition: color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.program-map-link:hover {
  color: var(--text-primary);
  opacity: 0.72;
}

.program-map-placeholder {
  width: 100%;
  min-width: 8cqi;
  visibility: hidden;
}

.program-closing {
  position: absolute;
  left: 15.5%;
  right: 15.5%;
  bottom: 10.8%;
  text-align: center;
  font-size: 2.9cqi;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.18;
  color: var(--text-primary);
}

.map-btn {
  border-radius: 0;
  border: none;
  background: transparent;
  font-family: "TheSeasons", serif;
  font-size: 1.42cqi;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  transition: color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.map-btn:hover {
  color: var(--text-primary);
  opacity: 0.72;
}

.save-date-section,
.rsvp-teaser-section,
.rsvp-form-section,
.closing-section {
  background: transparent;
  padding: var(--space-xxl) var(--space-m);
}

.countdown-section {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-xl) var(--space-m);
}

.countdown-shell,
.save-date-shell,
.rsvp-teaser-shell,
.closing-shell,
.footer-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.countdown-reveal,
.save-date-reveal,
.rsvp-reveal,
.closing-reveal,
.footer-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--motion-slow) var(--motion-ease), transform var(--motion-slow) var(--motion-ease);
}

.countdown-reveal.is-visible,
.save-date-reveal.is-visible,
.rsvp-reveal.is-visible,
.closing-reveal.is-visible,
.footer-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.countdown-eyebrow {
  font-family: "TheSeasons", serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-s);
}

.countdown-title,
.save-date-title,
.rsvp-title,
.closing-title {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.countdown-title {
  color: var(--text-on-dark);
  font-size: clamp(38px, 5.8vw, 58px);
  letter-spacing: 0.02em;
  line-height: 0.98;
  text-transform: none;
}

.countdown-subtitle {
  margin-top: var(--space-s);
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(19px, 2.6vw, 24px);
  font-style: italic;
  color: var(--text-on-dark);
}

.countdown-grid {
  margin-top: var(--space-l);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-m);
}

.countdown-item {
  padding: var(--space-s) var(--space-xs) var(--space-xs);
}

.countdown-value {
  display: block;
  font-size: clamp(34px, 6.4vw, 52px);
  line-height: 1;
  color: var(--text-on-dark);
}

.countdown-label {
  display: block;
  margin-top: var(--space-xs);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.save-date-text,
.rsvp-subtitle,
.closing-text {
  width: min(100%, 620px);
  margin: var(--space-m) auto 0;
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(20px, 2.8vw, 26px);
  font-style: italic;
  line-height: 1.22;
  color: var(--text-muted);
}

.rsvp-teaser-section {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-l);
}

.rsvp-teaser-shell {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
}

.rsvp-envelope-wrap {
  position: relative;
  width: min(520px, 78vw);
  margin: calc(var(--space-xl) * -1) auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.rsvp-envelope-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 600px;
  filter: drop-shadow(0 12px 26px rgba(43, 43, 43, 0.08));
}

.rsvp-envelope-text {
  position: absolute;
  top: 41.2%;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.rsvp-envelope-line {
  font-family: "Cormorant", Georgia, serif;
  font-style: normal;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.12;
  color: var(--text-primary);
}

.rsvp-envelope-date {
  margin-top: var(--space-xs);
  font-family: "TheSeasons", serif;
  font-size: 20px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--text-primary);
}

.rsvp-actions {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
  transform: translateY(calc((var(--space-xl) + var(--space-xs)) * -1));
}

.rsvp-scroll-btn,
.rsvp-submit-btn {
  min-width: min(100%, 260px);
}

.rsvp-scroll-btn {
  margin-top: 0;
}

.rsvp-teaser-note {
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(15px, 1.8vw, 18px);
  font-style: italic;
  line-height: 1.1;
  color: var(--text-muted);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  transform: translateY(calc(var(--space-m) * -1));
}

.rsvp-form-section {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
  background: transparent;
}

.rsvp-form-section[hidden] {
  display: none;
}

.rsvp-form-shell {
  width: min(100%, 820px);
  margin: 0 auto;
}

.rsvp-card {
  background: var(--bg-paper);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: var(--space-xl) var(--space-l);
  max-width: 440px;
  margin: 0 auto;
  transition: max-width var(--motion-base) var(--motion-ease), padding var(--motion-base) var(--motion-ease);
}

.rsvp-card-head {
  text-align: center;
  margin-bottom: var(--space-l);
}

.rsvp-form {
  display: grid;
  gap: var(--space-l);
}

.rsvp-form[hidden] {
  display: none !important;
}

.rsvp-field {
  display: grid;
  gap: var(--space-s);
}

.rsvp-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.rsvp-input {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-family: "Cormorant", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  padding: var(--space-m);
  background: var(--bg-paper);
  width: 100%;
  color: var(--text-primary);
}

.rsvp-input:focus {
  outline: none;
  border-color: var(--text-muted);
  background: var(--bg-paper);
}

.rsvp-textarea {
  min-height: 120px;
  resize: vertical;
}

.rsvp-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.rsvp-toggle-btn {
  border-radius: 10px;
  background: var(--bg-paper);
  border: 1px solid var(--bg-dark);
  color: var(--text-primary);
  font-family: "Cormorant", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  padding: var(--space-m);
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}

.rsvp-toggle-btn.is-selected {
  background: var(--bg-dark);
  color: var(--bg-paper);
}

.rsvp-panel {
  display: grid;
  gap: var(--space-m);
}

.rsvp-panel[hidden] {
  display: none;
}

.rsvp-subpanel {
  padding-top: var(--space-xs);
}

.rsvp-children-list {
  display: grid;
  gap: var(--space-m);
}

.rsvp-child-card {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-paper);
  padding: var(--space-m);
  display: grid;
  gap: var(--space-s);
}

.rsvp-child-title {
  font-family: "TheSeasons", serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rsvp-success {
  text-align: center;
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(28px, 3.6vw, 36px);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.18;
  max-width: 340px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-xs) var(--space-s);
}

.rsvp-success[hidden] {
  display: none !important;
}

.rsvp-card-inner.is-success > :not(.rsvp-success) {
  display: none !important;
}

.rsvp-card-inner.is-success {
  display: grid;
  place-items: center;
}

.rsvp-form-section.is-complete .rsvp-card {
  max-width: 360px;
  padding: var(--space-xl) var(--space-l);
}

.rsvp-form-section.is-complete .rsvp-card-head {
  display: none;
}

.rsvp-form-section.is-complete .rsvp-success {
  padding: var(--space-s) 0;
}

.closing-section {
  padding: 0;
  min-height: 0;
}

.closing-text-simple {
  max-width: 560px;
  margin-top: 0;
}

.footer-section {
  background: var(--bg-dark);
  padding: var(--space-s) var(--space-m);
}

.footer-shell {
  position: relative;
  width: 100%;
  min-height: 18px;
}

.footer-main {
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(34px, 5vw, 48px);
  font-style: italic;
  line-height: 1.08;
  color: var(--text-on-dark);
}

.footer-sub {
  margin-top: var(--space-s);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.footer-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: "TheSeasons", serif;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  text-decoration: none;
}

/* ── UTILITY ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── RESPONSIVE — tablet/mobile ─────────────────────────── */
@media (max-width: 680px) {
  main > section + section {
    margin-top: 0;
  }

  #saveDateStart {
    margin-top: 0;
  }

  .invitation-reveal {
    padding: var(--space-xl) var(--space-m) var(--space-l);
  }

  .inv-inner {
    height: calc(100svh - var(--space-xxl));
    gap: var(--space-m);
    padding: 0 0 var(--space-xs);
  }

  .card-wrap {
    width: min(92vw, 382px, calc((100svh - 150px) * var(--invite-ratio)));
  }

  .ct-intro {
    width: 67%;
    font-size: 3.5cqi;
  }

  .ct-statement {
    width: 75%;
  }

  .ct-names {
    width: 80%;
    font-size: 7.2cqi;
  }

  .ct-parents-block,
  .ct-nasi-block {
    width: 57%;
  }

  .ct-date-block {
    width: 75%;
  }

  .card-flower {
    left: 75.8%;
    top: 47.2%;
    width: 22%;
    height: auto;
    aspect-ratio: 226 / 559;
    object-fit: contain;
  }

  .detalii-btn {
    padding: var(--space-s) var(--space-l);
    font-size: 10px;
    margin-top: var(--space-xs);
  }

  .program-view {
    place-items: start center;
    padding: var(--space-l) var(--space-m) 0;
  }

  .program-inner {
    height: calc(100svh - (var(--space-xxl) + var(--space-xl)));
    align-content: start;
    gap: var(--space-s);
    padding: 0;
  }

  .program-card-wrap {
    width: min(91vw, 372px, calc((100svh - 210px) * var(--invite-ratio)));
  }

  .program-kicker {
    top: 15.3%;
    left: 12%;
    width: 76%;
    font-size: 4.9cqi;
  }

  .program-flower {
    left: 65.8%;
    top: 45.8%;
    width: 24%;
  }

  .program-timeline {
    inset: 20.7% 13.3% 20.3% 5.7%;
    transform: translateX(-3.6%);
  }

  .program-event {
    grid-template-columns: minmax(0, 1.42fr) 0.86fr 0.92fr;
    column-gap: 1.1cqi;
  }

  .program-time {
    font-size: 4.15cqi;
  }

  .program-title {
    font-size: 3.55cqi;
  }

  .program-icon {
    max-width: 8.6cqi;
  }

  .program-icon[src$="church.svg"] {
    max-width: 8.7cqi;
  }

  .program-map-link {
    font-size: 2.65cqi;
  }

  .program-closing {
    bottom: 11%;
    left: 14.8%;
    right: 14.8%;
    font-size: 2.88cqi;
  }

  .countdown-section,
  .rsvp-teaser-section,
  .rsvp-form-section,
  .closing-section,
  .footer-section {
    padding: var(--space-xxl) var(--space-m);
  }

  .countdown-section {
    padding: var(--space-xl) var(--space-m);
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-xs);
  }

  .countdown-value {
    font-size: clamp(28px, 7vw, 36px);
  }

  .countdown-title {
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1;
  }

  .countdown-label {
    margin-top: 4px;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  .countdown-item {
    padding: var(--space-xs) 4px 4px;
  }

  body.flow-open .hero {
    min-height: calc(100svh - (var(--space-xl) + var(--space-l)));
    padding-bottom: 0;
  }

  .env-closed-img,
  .card-img,
  .program-card-img,
  .rsvp-envelope-img {
    filter: drop-shadow(0 10px 24px rgba(43, 43, 43, 0.08));
  }

  .rsvp-actions {
    gap: var(--space-m);
    transform: translateY(calc(var(--space-m) * -1));
  }

  .rsvp-scroll-btn,
  .rsvp-submit-btn {
    width: 100%;
    letter-spacing: 0.2em;
  }

  .rsvp-envelope-wrap {
    width: min(84vw, 420px);
    margin-top: calc(var(--space-l) * -1);
  }

  .rsvp-envelope-text {
    top: 41%;
    width: 56%;
  }

  .rsvp-envelope-line {
    font-size: 14px;
    line-height: 1.02;
  }

  .rsvp-envelope-line + .rsvp-envelope-line {
    margin-top: -2px;
  }

  .rsvp-envelope-date {
    margin-top: 1px;
    font-size: 16px;
  }

  .rsvp-teaser-note {
    margin-top: 0;
    font-size: 15px;
    transform: translateY(calc(var(--space-xs) * -1));
  }

  .rsvp-teaser-section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .rsvp-card {
    padding: var(--space-xl) var(--space-l);
  }

  .rsvp-form-section.is-complete .rsvp-card {
    max-width: 320px;
    padding: var(--space-l);
  }

  .rsvp-toggle {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-section {
    padding: var(--space-s) var(--space-m);
  }

  .footer-credit {
    right: 0;
    bottom: 0;
    font-size: 7px;
  }
}

@media (min-width: 681px) {
  .card-wrap {
    width: min(88vw, 520px, calc((100svh - 168px) * var(--invite-ratio)));
  }

  .program-card-wrap {
    width: min(88vw, 520px, calc((100svh - 168px) * var(--invite-ratio)));
  }

  .detalii-btn {
    padding: var(--space-s) var(--space-l);
    font-size: 10px;
  }
}

/* ── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero.is-revealed .card-wrap,
  .hero.is-revealed .detalii-btn {
    opacity: 1;
    transform: none;
  }
}
