/* ── 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: 180ms;
  --motion-base: 200ms;
  --motion-slow: 220ms;
  --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 {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

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

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

.hero:not(.is-revealed) ~ .countdown-section,
.hero:not(.is-revealed) ~ .paper-flow-surface,
.hero:not(.is-revealed) ~ .footer-section {
  display: none;
}

.hero.is-revealed:not(.is-program-open) ~ .countdown-section,
.hero.is-revealed:not(.is-program-open) ~ .paper-flow-surface,
.hero.is-revealed:not(.is-program-open) ~ .footer-section {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.hero.is-program-open ~ .countdown-section,
.hero.is-program-open ~ .paper-flow-surface,
.hero.is-program-open ~ .footer-section {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* ── 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: 100%;
}

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

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

#saveDateStart {
  margin-top: 0;
}

/* ── HERO SECTION ───────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--space-xl) var(--space-m) var(--space-l);
}

body.flow-open .hero {
  padding-bottom: var(--space-l);
}

.hero.is-program-open {
  padding-bottom: 0;
}

.hero::before {
  display: none;
}

/* ── HERO SCREEN (page 1) ───────────────────────────────── */
.hero-screen {
  width: min(100%, 760px);
  min-height: calc(100svh - (var(--space-xl) + var(--space-l)));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  padding: var(--space-m) 0;
  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: relative;
  width: min(100%, 980px);
  margin: 0 auto;
  display: none;
  justify-items: center;
  align-content: start;
  row-gap: var(--space-m);
  padding: var(--space-s) 0 var(--space-l);
}

.invitation-reveal.show-program {
  row-gap: var(--space-xs);
  padding-bottom: 0;
}

.hero.is-revealed .invitation-reveal {
  display: grid;
}

/* ── BACK BUTTON ────────────────────────────────────────── */
.back-btn,
.program-back-btn {
  position: static;
  justify-self: start;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Cormorant", Georgia, serif;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 0;
  transition: color var(--motion-fast) ease;
  line-height: 1;
}

.program-back-btn {
  position: static;
  justify-self: start;
  margin-top: 0;
}

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

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

/* ── INNER WRAPPER ──────────────────────────────────────── */
.inv-inner {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
  width: 100%;
  min-height: 0;
  padding: 0;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  max-height: none;
  overflow: visible;
}

/* ── INVITATION CARD ────────────────────────────────────── */
.card-wrap {
  position: relative;
  width: min(90vw, 520px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
  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(6px);
  transition:
    opacity var(--motion-base) var(--motion-ease),
    transform var(--motion-base) var(--motion-ease),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

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

/* ── STATE: REVEALED ────────────────────────────────────── */
.hero.is-revealed .hero-screen {
  display: none;
}

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

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

.program-view {
  position: relative;
  display: none;
  width: 100%;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.invitation-reveal.show-program .program-view {
  display: grid;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  padding-bottom: 0;
}

.program-view-shell {
  width: 100%;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  align-content: start;
  row-gap: var(--space-s);
}

.program-inner {
  display: grid;
  justify-items: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  gap: 0;
}

.program-card-wrap {
  position: relative;
  width: min(94vw, 620px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
  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));
  pointer-events: none;
}

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

.invitation-reveal.show-program .inv-inner {
  display: none;
}

.invitation-reveal.show-program > .back-btn {
  display: none;
}

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

/* ── PROGRAM KICKER (title) ─────────────────────────────── */
.program-kicker {
  position: absolute;
  top: 14.8%;
  left: 50%;
  transform: translateX(-50%);
  width: 76.4%;
  text-align: center;
  font-size: 5.22cqi;
  letter-spacing: 0.012em;
  line-height: 1.02;
}

.program-timeline {
  --program-text-column: 25.8cqi;
  --program-icon-column: 8.9cqi;
  --program-column-gap: 1.9cqi;
  --program-block-height: 10.2cqi;
  --program-block-gap: 2.8cqi;
  --program-stack-gap: 0.42cqi;
  --program-venue-line: 4.55cqi;
  --program-location-line: 2.05cqi;
  list-style: none;
  position: absolute;
  inset: 24.45% 11.2% auto 11.2%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(4, max-content);
  row-gap: var(--program-block-gap);
}

.program-event {
  display: grid;
  grid-template-columns: var(--program-text-column) var(--program-icon-column) var(--program-text-column);
  justify-content: center;
  min-height: var(--program-block-height);
  align-items: center;
  column-gap: var(--program-column-gap);
}

.program-event:first-child {
  margin-top: 0.55cqi;
}

.program-event:nth-child(2) {
  column-gap: calc(var(--program-column-gap) + 0.75cqi);
  margin-top: 3.65cqi;
}

.program-event:nth-child(3) {
  column-gap: calc(var(--program-column-gap) - 0.15cqi);
  margin-top: -1.35cqi;
}

.program-event:nth-child(4) {
  column-gap: calc(var(--program-column-gap) - 0.25cqi);
  margin-top: -0.45cqi;
}

.program-event-copy {
  grid-column: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, var(--program-venue-line)) minmax(0, var(--program-location-line));
  align-content: center;
  row-gap: var(--program-stack-gap);
  justify-self: stretch;
  justify-items: end;
  width: 100%;
  text-align: right;
}

.program-event-copy > * {
  margin: 0;
}

.program-event:nth-child(even) .program-event-copy {
  grid-column: 3;
  justify-items: start;
  text-align: left;
}

.program-event:nth-child(3) .program-event-copy {
  margin-top: 3.2cqi;
}

.program-event:nth-child(4) .program-event-copy {
  margin-top: 3.35cqi;
}

.program-event:first-child .program-event-copy {
  justify-self: end;
}

.program-event:nth-child(-n + 2) .program-event-copy {
  width: calc(var(--program-text-column) + 6.1cqi);
  grid-template-rows: auto auto minmax(0, 4.1cqi) minmax(0, 1.7cqi);
}

.program-event:nth-child(even) .program-event-copy .program-map-link {
  justify-self: start;
}

.program-event:nth-child(odd) .program-event-copy .program-map-link {
  justify-self: end;
}

.program-event:nth-child(even) .program-map-placeholder {
  grid-column: 1;
}

.program-event:nth-child(odd) .program-map-placeholder {
  grid-column: 3;
}

.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-family: "Cormorant", Georgia, serif;
  font-size: 4.02cqi;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--text-primary);
  line-height: 0.95;
}

.program-title {
  font-family: "Cormorant", Georgia, serif;
  font-size: 3.22cqi;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  line-height: 1.05;
  white-space: nowrap;
  text-wrap: nowrap;
}

.program-venue {
  font-family: "Cormorant", Georgia, serif;
  font-size: 2.86cqi;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--text-primary);
  max-width: 100%;
  white-space: normal;
  text-wrap: balance;
}

.program-event:nth-child(-n + 2) .program-venue {
  width: max-content;
  max-width: none;
  font-size: 2.78cqi;
  letter-spacing: 0.006em;
  white-space: nowrap;
}

.program-icon {
  grid-column: 2;
  display: block;
  width: 8.9cqi;
  height: 8.9cqi;
  justify-self: center;
  align-self: center;
  object-fit: contain;
  object-position: center;
  opacity: 0.92;
}

.program-event:nth-child(2) .program-icon {
  align-self: center;
  margin-top: -11.35cqi;
  opacity: 1;
}

.program-event:nth-child(3) .program-icon {
  margin-top: -0.7cqi;
}

.program-event:nth-child(4) .program-icon {
  align-self: center;
  margin-top: -12.7cqi;
  opacity: 1;
}

.program-icon[src$="church.svg"],
.program-icon[src$="church-svgrepo-com.svg"],
.program-icon[src$="church-svgrepo-com (1).svg"],
.program-icon[src$="church-illustration-4-svgrepo-com.svg"] {
  opacity: 0.82;
  filter: brightness(1.08) contrast(0.9);
  transform: scaleX(-1);
  transform-origin: center;
}

.program-map-link {
  display: inline-block;
  color: var(--text-primary);
  font-family: "TheSeasons", serif;
  font-size: 2.34cqi;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration-line: underline;
  text-decoration-thickness: 0.05em;
  text-decoration-color: rgba(43, 43, 43, 0.34);
  text-underline-offset: 0.18em;
  padding-bottom: 0.14cqi;
  opacity: 0.9;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
  transition:
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    text-decoration-color var(--motion-fast) ease,
    letter-spacing var(--motion-fast) ease;
}

.program-map-link:hover,
.program-map-link:focus-visible {
  color: var(--text-primary);
  opacity: 1;
  letter-spacing: 0.12em;
  text-decoration-color: rgba(43, 43, 43, 0.62);
}

.program-copy-spacer {
  display: block;
  width: 100%;
  min-height: var(--program-location-line);
}

.program-venue-placeholder {
  display: block;
  width: 100%;
  min-height: var(--program-venue-line);
}

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

.program-closing {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 76.4%;
  bottom: 11.9%;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.9cqi;
  line-height: 1.24;
  color: var(--text-primary);
}

.program-closing-kicker {
  font-family: "TheSeasons", serif;
  font-size: 3.74cqi;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  justify-self: center;
  text-align: center;
}

.program-closing-label {
  display: grid;
  justify-items: center;
  width: fit-content;
  max-width: none;
  margin: 0 auto;
  font-family: "Cormorant", Georgia, serif;
  font-size: 2.68cqi;
  font-weight: 500;
  letter-spacing: 0.006em;
  text-transform: none;
  line-height: 1.2;
  opacity: 0.92;
  justify-self: center;
  text-align: center;
  gap: 0.12cqi;
}

.program-closing-line {
  display: block;
  width: max-content;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.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-color: transparent;
  padding: var(--space-xl) var(--space-m);
}

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

.paper-flow-surface {
  background: transparent;
}

.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(8px);
  transition: opacity var(--motion-base) ease, transform var(--motion-base) 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 {
  --teaser-flow-shift: 48px;
  --teaser-envelope-overhang: 108px;
  --teaser-envelope-actions-space: calc(var(--space-l) + 4px);
  --teaser-action-gap: var(--space-s);
  --teaser-note-space: calc(var(--space-xl) + 6px);
  width: min(100%, 560px);
  margin-top: calc(var(--teaser-flow-shift) * -1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.rsvp-envelope-wrap {
  position: relative;
  width: min(460px, 72vw);
  margin: 0 auto calc(var(--teaser-envelope-overhang) * -1);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.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: 42.4%;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

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

.rsvp-envelope-date {
  margin-top: 14px;
  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(--teaser-action-gap);
  margin-top: var(--teaser-envelope-actions-space);
  position: relative;
  z-index: 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.16;
  color: var(--text-muted);
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--teaser-note-space);
}

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

.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 {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  padding-top: calc(var(--space-l) + 2px);
  margin-bottom: var(--space-l);
}

.rsvp-close-btn {
  position: absolute;
  top: 2px;
  right: 0;
  border: none;
  background: transparent;
  font-family: "Cormorant", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.rsvp-close-btn:hover,
.rsvp-close-btn:focus-visible {
  color: var(--text-primary);
  opacity: 1;
}

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

.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[data-toggle-group="guest_menu"],
.rsvp-toggle[data-toggle-group="partner_menu"],
.rsvp-toggle[data-toggle-group^="child_menu_"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.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[data-toggle-group="guest_menu"] .rsvp-toggle-btn,
.rsvp-toggle[data-toggle-group="partner_menu"] .rsvp-toggle-btn,
.rsvp-toggle[data-toggle-group^="child_menu_"] .rsvp-toggle-btn {
  width: 100%;
}

.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 {
    row-gap: var(--space-s);
    padding: var(--space-xs) 0 var(--space-m);
  }

  .inv-inner {
    gap: var(--space-s);
    padding: 0;
  }

  .card-wrap {
    width: min(92vw, 390px);
  }

  .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 {
    padding: 0 0 var(--space-xs);
  }

  .program-view-shell {
    width: 100%;
    row-gap: var(--space-xs);
  }

  .program-back-btn {
    justify-self: start;
  }

  .program-inner {
    min-height: 0;
    gap: 0;
    padding: 0;
  }

  .program-card-wrap {
    width: min(97vw, 420px);
  }

  .program-kicker {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 77.4%;
    font-size: 5.3cqi;
  }

  .program-timeline {
    --program-text-column: 25.9cqi;
    --program-icon-column: 8.6cqi;
    --program-column-gap: 1.55cqi;
    --program-block-height: 10.6cqi;
    --program-block-gap: 2.55cqi;
    --program-stack-gap: 0.42cqi;
    --program-venue-line: 4.95cqi;
    --program-location-line: 2.4cqi;
    inset: 24.85% 10.8% auto 10.8%;
  }

  .program-event-copy {
    row-gap: var(--program-stack-gap);
  }

  .program-event:first-child {
    margin-top: 0.7cqi;
  }

  .program-event:nth-child(2) {
    column-gap: calc(var(--program-column-gap) + 0.6cqi);
    margin-top: 3.8cqi;
  }

  .program-event:nth-child(3) {
    column-gap: calc(var(--program-column-gap) - 0.1cqi);
    margin-top: -1.45cqi;
  }

  .program-event:nth-child(4) {
    column-gap: calc(var(--program-column-gap) - 0.2cqi);
    margin-top: -0.4cqi;
  }

  .program-event:nth-child(3) .program-event-copy {
    margin-top: 3.3cqi;
  }

  .program-event:nth-child(4) .program-event-copy {
    margin-top: 3.55cqi;
  }

  .program-event:first-child .program-event-copy {
    justify-self: end;
  }

  .program-event:nth-child(-n + 2) .program-event-copy {
    width: calc(var(--program-text-column) + 6.4cqi);
    grid-template-rows: auto auto minmax(0, 4.5cqi) minmax(0, 2.05cqi);
  }

  .program-time {
    font-size: 4.18cqi;
    letter-spacing: 0.065em;
  }

  .program-title {
    font-size: 3.28cqi;
    line-height: 1.07;
  }

  .program-venue {
    font-size: 2.94cqi;
    line-height: 1.06;
  }

  .program-event:nth-child(-n + 2) .program-venue {
    font-size: 2.56cqi;
  }

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

  .program-event:nth-child(2) .program-icon {
    margin-top: -12.05cqi;
    opacity: 1;
  }

  .program-event:nth-child(3) .program-icon {
    margin-top: -0.8cqi;
  }

  .program-event:nth-child(4) .program-icon {
    margin-top: -13.45cqi;
    opacity: 1;
  }

  .program-icon[src$="church.svg"],
  .program-icon[src$="church-svgrepo-com.svg"],
  .program-icon[src$="church-svgrepo-com (1).svg"],
  .program-icon[src$="church-illustration-4-svgrepo-com.svg"] {
    opacity: 0.82;
    filter: brightness(1.08) contrast(0.9);
    transform: scaleX(-1);
    transform-origin: center;
  }

  .program-map-link {
    font-size: 2.54cqi;
    letter-spacing: 0.11em;
    padding-bottom: 0.16cqi;
  }

  .program-closing {
    bottom: 11.2%;
    left: 50%;
    transform: translateX(-50%);
    width: 77.4%;
    gap: 0.98cqi;
  }

  .program-closing-kicker {
    font-size: 3.62cqi;
  }

  .program-closing-label {
    width: fit-content;
    max-width: none;
    font-size: 2.68cqi;
    line-height: 1.22;
    gap: 0.16cqi;
  }

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

  .countdown-section {
    padding: var(--space-m) var(--space-m) 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 {
    padding-bottom: var(--space-m);
  }

  .hero.is-program-open {
    padding-bottom: 6px;
  }

  .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-s);
    margin-top: var(--teaser-envelope-actions-space);
  }

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

  .rsvp-envelope-wrap {
    width: min(78vw, 320px);
    margin: 0 auto calc(var(--teaser-envelope-overhang) * -1);
  }

  .rsvp-envelope-text {
    top: 42.1%;
    width: 56%;
    gap: 0;
  }

  .rsvp-envelope-line {
    font-size: 12px;
    line-height: 1.01;
  }

  .rsvp-envelope-date {
    margin-top: 10px;
    font-size: 14px;
  }

  .rsvp-teaser-note {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.14;
  }

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

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

  .rsvp-teaser-shell {
    --teaser-flow-shift: 54px;
    --teaser-envelope-overhang: 54px;
    --teaser-envelope-actions-space: var(--space-s);
    --teaser-action-gap: var(--space-s);
    --teaser-note-space: calc(var(--space-l) + 8px);
    width: min(100%, 360px);
  }

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

  .rsvp-card-head {
    padding-top: calc(var(--space-l) + 8px);
  }

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

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

  .rsvp-toggle[data-toggle-group="guest_menu"],
  .rsvp-toggle[data-toggle-group="partner_menu"],
  .rsvp-toggle[data-toggle-group^="child_menu_"] {
    grid-template-columns: 1fr;
  }

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

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

@media (min-width: 681px) {
  .card-wrap {
    width: min(88vw, 520px);
  }

  .program-card-wrap {
    width: min(84vw, 620px);
  }

  .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;
  }
}
