/* ====== bază ====== */
:root {
  --primary: #c8442f;
  --primary-dark: #9e3222;
  --accent: #f2b544;
  --ink: #4a3524;
  --ink-soft: #7a6650;
  --paper: #fdf6e9;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(120, 80, 30, 0.14);
  --script: "Great Vibes", cursive;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Mulish", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #b9b4ac;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }
body.intro-locked { overflow: hidden; }

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

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* tipografie */
.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
}
.script--md { font-size: clamp(2rem, 6vw, 2.6rem); margin: 0; }
.script--sm { font-size: 1.7rem; margin: 0; }
/* numele are exact aceeași caligrafie, culoare și mărime ca textul dinaintea lui */
.script--name { font-size: 1em; margin-left: 0.12em; }

.serif {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: var(--ink);
  margin: 0;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.45em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
}

/* textura de hârtie (grain SVG inline) */
.page {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.43 0 0 0 0 0.40 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ====== intro (borcanul de miere care se deschide) ====== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #cfe6f2 0%, #f6e9cf 46%, #fdf6e9 100%);
  transition: opacity 0.6s ease;
  /* întregul ecran deschide invitația, nu doar borcanul */
  cursor: pointer;
}
.intro.is-done { opacity: 0; pointer-events: none; }

/* fundalul introului = același cer ca al invitației, pentru trecere continuă */
.intro__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.intro__scene {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 4vh;
}

/* ilustrația de lângă borcan */
.intro__character {
  width: min(34vw, 170px);
  margin-right: -6%;
  margin-bottom: -2%;
  filter: drop-shadow(0 10px 14px rgba(110, 70, 20, 0.28));
  /* "backwards", nu "both": dacă animațiile nu rulează, ilustrația rămâne vizibilă */
  animation: intro-char-in 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) 0.15s backwards;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

@keyframes intro-char-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* borcanul — elementul pe care se apasă */
.intro__pot {
  position: relative;
  width: min(52vw, 260px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 14px 18px rgba(120, 75, 15, 0.32));
  transition: transform 0.3s ease;
  animation: intro-pot-in 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}
.intro__pot svg { width: 100%; height: auto; display: block; overflow: visible; }
.intro__pot:hover { transform: translateY(-4px) scale(1.03); }
.intro__pot:focus-visible { outline: 3px solid var(--primary); outline-offset: 10px; border-radius: 18px; }

@keyframes intro-pot-in {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.pot__label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.12em;
  fill: #8a5216;
  text-anchor: middle;
}

/* capacul se ridică, se rotește și zboară în lateral */
.pot__lid {
  transform-origin: 120px 78px;
  transition: transform 0.75s cubic-bezier(0.3, -0.4, 0.4, 1), opacity 0.4s ease 0.4s;
}
.intro.is-opening .pot__lid {
  transform: translate(52px, -190px) rotate(46deg);
  opacity: 0;
}

/* borcanul tresare când se deschide */
.intro.is-opening .intro__pot {
  animation: pot-shake 0.5s ease;
}
@keyframes pot-shake {
  0%, 100% { transform: none; }
  25% { transform: translateY(4px) scale(0.98); }
  60% { transform: translateY(-6px) scale(1.03); }
}

/* stropi de miere care sar din borcan */
.intro__drop {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 16px;
  height: 20px;
  margin: -10px 0 0 -8px;
  border-radius: 52% 48% 44% 56% / 62% 60% 40% 38%;
  background: radial-gradient(circle at 34% 28%, #ffe3a2, #eda92c 72%);
  opacity: 0;
  pointer-events: none;
}
.intro__drop--1 { --dx: -132px; --dy: -104px; --r: -25deg; }
.intro__drop--2 { --dx: 128px; --dy: -122px; --r: 30deg; }
.intro__drop--3 { --dx: -168px; --dy: 26px; --r: -50deg; }
.intro__drop--4 { --dx: 160px; --dy: 12px; --r: 42deg; }
.intro__drop--5 { --dx: 8px; --dy: -156px; --r: 12deg; }
.intro.is-opening .intro__drop { animation: drop-fly 0.85s cubic-bezier(0.25, 0.7, 0.4, 1) 0.06s forwards; }

@keyframes drop-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.5) rotate(0deg); }
  55% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.15) rotate(var(--r)); }
}

/* mierea se revarsă și umple ecranul, apoi se face trecerea la invitație */
.intro__glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 130px;
  height: 130px;
  margin: -65px 0 0 -65px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe6a6 0%, #f5c35c 45%, #e5a52c 100%);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}
.intro.is-flooding .intro__glow {
  transform: scale(32);
  opacity: 1;
  transition: transform 0.95s cubic-bezier(0.45, 0, 0.5, 1), opacity 0.3s ease;
}
.intro.is-flooding .intro__character { transform: translateY(30px); opacity: 0; }

.intro__hint {
  position: absolute;
  z-index: 3;
  bottom: 7vh;
  left: 50%;
  transform: translateX(-50%);
  max-width: 88vw;
  text-align: center;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7a5522;
  background: rgba(255, 250, 238, 0.82);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 4px 14px rgba(110, 70, 20, 0.14);
  animation: hint-pulse 2.4s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
.intro.is-opening .intro__hint { opacity: 0; animation: none; }

@keyframes hint-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

/* ====== pagina ====== */
.page {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(30, 30, 25, 0.35);
  overflow: hidden;
}

.section {
  position: relative;
  padding: clamp(3.2rem, 9vw, 5rem) clamp(1.2rem, 6vw, 2.6rem);
  text-align: center;
}

/* apariție la scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ====== hero ====== */
.hero {
  position: relative;
  min-height: min(92vh, 780px);
  display: grid;
  place-items: center;
}

/* cu ilustrația de personaje: medalionul ocupă spațiul rămas, ilustrația stă jos —
   niciodată suprapuse, indiferent de înălțimea ecranului */
.hero--with-characters { grid-template-rows: 1fr auto; }

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__badge {
  position: relative;
  z-index: 2;
  width: min(72vw, 340px, 46vh);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.32);
  animation: badge-in 1.4s ease 0.4s both;
}

.hero__characters {
  position: relative;
  z-index: 3;
  width: min(96%, 560px);
  max-height: 52vh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 16px rgba(110, 70, 20, 0.3));
  animation: chars-in 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) 0.75s both;
}

@keyframes chars-in {
  from { opacity: 0; transform: translateY(16%); }
  to { opacity: 1; transform: none; }
}

@keyframes badge-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: none; }
}

.hero__badge .script {
  font-size: clamp(2.6rem, 9vw, 3.4rem);
  margin: 0;
}

.hero__date {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.05rem, 3.5vw, 1.3rem);
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin: 0;
}

/* ====== welcome ====== */
.welcome__photo-ring {
  position: relative;
  width: min(78vw, 380px);
  margin: 0 auto 2rem;
  padding: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, #fdeccb, transparent 58%),
    radial-gradient(circle at 75% 80%, #fbe0d6, transparent 58%),
    #fff;
  box-shadow: var(--shadow), 0 0 0 6px rgba(242, 181, 68, 0.28);
}
.welcome__photo-ring img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

/* cele trei texte de bun venit — aceeași caligrafie, culoare și mărime */
.welcome__line1,
.welcome__line2 {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(1.8rem, 6.4vw, 2.35rem);
  line-height: 1.32;
  color: var(--primary);
  max-width: 22ch;
  margin-inline: auto;
  text-wrap: balance;
}
/* atenție: scurtătura "margin" trebuie să păstreze "auto" pe orizontală,
   altfel blocul îngustat de max-width rămâne lipit la stânga */
.welcome__line1 { margin: 0 auto; }
.welcome__line2 { margin: 0.5rem auto 0; }

/* ====== countdown ====== */
.countdown__text p {
  max-width: 46ch;
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 2.2rem 0 2.6rem;
}

.count-cell {
  background: var(--card);
  border-radius: 14px;
  padding: 0.9rem 0.3rem 0.7rem;
  box-shadow: var(--shadow);
}

.count-cell__num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.count-cell__label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.countdown__photo {
  margin: 0 auto;
  max-width: 420px;
  background: #fff;
  padding: 12px 12px 40px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.countdown__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ilustrație decupată: fără ramă, fără fundal */
.countdown__photo--plain {
  max-width: 190px;
  background: none;
  padding: 0;
  box-shadow: none;
  transform: none;
}
.countdown__photo--plain img {
  aspect-ratio: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(110, 70, 20, 0.24));
  animation: float 6s ease-in-out infinite;
}

/* baloane decorative — sub conținut, colorate din tema JSON (--accent) */
.countdown > *:not(.balloon) {
  position: relative;
  z-index: 1;
}
.balloon {
  position: absolute;
  width: 74px;
  height: 92px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 48%),
    var(--accent);
  border-radius: 50% 50% 48% 52% / 56% 56% 44% 44%;
  opacity: 0.85;
  pointer-events: none;
  animation: float 5.5s ease-in-out infinite;
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 99%;
  width: 2px;
  height: 70px;
  background: rgba(140, 100, 60, 0.42);
  border-radius: 2px;
}
/* balonul roșu iconic + unul de culoarea mierii */
.balloon--left {
  left: -12px;
  top: 6%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 48%),
    var(--primary);
}
.balloon--right { right: -8px; top: 48%; animation-delay: -2.7s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ====== deadline ====== */
.deadline { position: relative; }

.deadline__image {
  width: min(42vw, 190px);
  margin: 2rem auto 0;
  filter: drop-shadow(0 8px 12px rgba(110, 70, 20, 0.22));
}

/* data pe un singur rând, într-o etichetă centrată — un singur stil, nu trei */
.deadline__date {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.34em;
  margin-top: 1.6rem;
  padding: 0.72rem 1.9rem;
  border-radius: 999px;
  background: #fffaf0;
  border: 2px solid rgba(242, 181, 68, 0.6);
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  letter-spacing: 0.02em;
  color: var(--primary-dark);
}

/* ====== schedule / timeline ====== */
/* fagure discret pe fundal — doar forme, generat inline */
.schedule {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23d9a441' fill-opacity='0.16' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34L25 30.6V17.9l-11.01-6.35L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81V33.5zM15 0v7.5L27.99 15H28v-2.31l-11-6.34V0h-2zm0 49v-8l12.99-7.5H28v2.31l-11 6.34V49h-2z'/%3E%3C/svg%3E");
}

.schedule > * {
  position: relative;
  z-index: 1;
}

.schedule__sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}

.timeline {
  position: relative;
  margin-top: 3rem;
  text-align: initial;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d8d2c6;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: start;
  margin-bottom: 3rem;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__icon {
  grid-column: 2;
  justify-self: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.timeline__icon svg { width: 28px; height: 28px; }

.timeline__body { padding-top: 0.2rem; }
.timeline__item:nth-child(odd) .timeline__body {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}
.timeline__item:nth-child(even) .timeline__body {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
}

.timeline__datetime {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.timeline__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--primary);
  margin: 0 0 0.8rem;
}

.timeline__venue {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.timeline__address {
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.timeline__link-row { margin-top: 0.5rem; }

.timeline__map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.timeline__map:hover { border-bottom-color: var(--primary); }
.timeline__map svg { width: 15px; height: 15px; }

/* ====== rsvp ====== */
.rsvp { background: linear-gradient(180deg, transparent, rgba(242, 181, 68, 0.16)); }

.rsvp__sub { color: var(--ink-soft); margin: 0.7rem 0 0; }

.rsvp__card {
  margin: 2.4rem auto 0;
  max-width: 520px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 5vw, 2.2rem);
  text-align: left;
}

.stepper-block {
  border: 0;
  padding: 0;
  margin: 0 0 1.4rem;
}

.stepper-block__label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 0;
  margin-bottom: 0.7rem;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stepper__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d9d3c8;
  background: #fff;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.stepper__btn:hover { background: #f2efe9; border-color: var(--primary); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }

.stepper__value {
  min-width: 2ch;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
}

.people-list { display: grid; gap: 0.9rem; margin-bottom: 1.4rem; }

.person-card {
  background: #f8f7f3;
  border: 1px solid #eceade;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.person-card.is-invalid {
  border-color: #c0574f;
  box-shadow: 0 0 0 3px rgba(192, 87, 79, 0.14);
}

.person-card__tag {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

/* ====== alegeri de meniu (pastile exclusive) ====== */
.choice {
  border: 0;
  padding: 0;
  margin: 1rem 0 0;
}

.choice__label {
  padding: 0;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.choice__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.choice__opt { display: inline-flex; }

/* inputul rămâne accesibil tastaturii, dar invizibil — pastila e eticheta */
.choice__opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice__opt span {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid #ddd6ca;
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.choice__opt span:hover { border-color: var(--primary); color: var(--ink); }

.choice__opt input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.choice__opt input:focus-visible + span {
  outline: 3px solid rgba(200, 68, 47, 0.35);
  outline-offset: 2px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  border: 1px solid #ddd6ca;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 114, 104, 0.15);
}
.field input.is-invalid { border-color: #c0574f; }
.field textarea { resize: vertical; }

.rsvp__error {
  color: #a63d35;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

.rsvp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.btn--primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(46, 90, 81, 0.35);
}
.btn--primary:hover { background: var(--primary-dark); }

.btn--ghost {
  background: #fff;
  border: 1px solid #d9d3c8;
  color: var(--ink-soft);
}
.btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ====== mesajul de final (ecran complet) ====== */
.rsvp__thanks {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.2rem;
  max-width: none;
  margin: 0;
  padding: 2rem clamp(1.2rem, 6vw, 3rem);
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  overflow: hidden;
  /* același cer ca la deschidere — invitația se închide cum s-a deschis */
  background: linear-gradient(180deg, #cfe6f2 0%, #f6e9cf 46%, #fdf6e9 100%);
}
.rsvp__thanks p:last-of-type {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0.8rem 0 0;
  max-width: 30ch;
  text-wrap: balance;
}

.thanks__back {
  margin-top: 2.2rem;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(122, 85, 34, 0.35);
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.7);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a5522;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.thanks__back:hover { background: #fffaf0; border-color: var(--primary); }

.rsvp__thanks.is-celebrating {
  animation: thanks-pop 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.25) backwards;
}
@keyframes thanks-pop {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to { opacity: 1; transform: none; }
}

.thanks__image {
  width: min(46vw, 210px);
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 10px 16px rgba(110, 70, 20, 0.26));
}
.rsvp__thanks.is-celebrating .thanks__image {
  animation: thanks-bob 2.4s ease-in-out 0.7s infinite;
}
@keyframes thanks-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

/* explozia de picături — punctul de plecare e centrul cardului */
.thanks__burst {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.thanks__drop {
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 19px;
  margin: -10px 0 0 -7px;
  border-radius: 52% 48% 44% 56% / 62% 60% 40% 38%;
  background: radial-gradient(circle at 34% 28%, #ffe3a2, #eda92c 72%);
  opacity: 0;
  animation: thanks-fly 1.5s cubic-bezier(0.2, 0.7, 0.35, 1) backwards;
}
.thanks__drop--red {
  background: radial-gradient(circle at 34% 28%, #f0a294, var(--primary) 72%);
}

@keyframes thanks-fly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.35) rotate(0deg); }
  18% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.05) rotate(var(--r)); }
}

/* ====== footer ====== */
.footer {
  padding: 3rem 1rem 3.5rem;
  text-align: center;
}

/* mesajul de final: rânduri echilibrate, fără cuvinte orfane */
.footer p {
  max-width: 26ch;
  margin-inline: auto;
  text-wrap: balance;
  line-height: 1.45;
}

.footer__image {
  width: min(34vw, 150px);
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 8px 12px rgba(110, 70, 20, 0.22));
  animation: float 5s ease-in-out infinite;
}

/* ====== muzică ====== */
.music {
  position: fixed;
  /* pe ecrane late stă în marginea liberă, lângă coloana invitației (max 640px);
     pe mobil rămâne în colț, deasupra conținutului */
  right: max(14px, calc(50% - 388px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 60; /* peste ecranul de final, ca să poți opri muzica oricând */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(158, 50, 34, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(110, 70, 20, 0.32);
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, background 0.18s ease;
}
.music:hover { background: var(--primary-dark); transform: scale(1.06); }
.music:active { transform: scale(0.95); }
.music:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.music svg { width: 23px; height: 23px; }

@media (min-width: 700px) {
  .music { width: 52px; height: 52px; }
  .music svg { width: 26px; height: 26px; }
}
.music .music__waves { display: none; }
.music.is-playing .music__waves { display: block; }
.music.is-playing .music__cross { display: none; }

/* ====== responsive ====== */
@media (max-width: 560px) {
  .timeline::before { left: 28px; }
  .timeline__item { grid-template-columns: 56px 1fr; }
  .timeline__icon { grid-column: 1; width: 46px; height: 46px; }
  .timeline__icon svg { width: 23px; height: 23px; }
  .timeline__item:nth-child(odd) .timeline__body,
  .timeline__item:nth-child(even) .timeline__body {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding-left: 1rem;
  }
  .countdown__grid { gap: 0.45rem; }
  .rsvp__actions { flex-direction: column; }
  .rsvp__actions .btn { justify-content: center; }
}

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