/* ============================================
   ANA MARIA & GABRIEL — invitație de nuntă
   paleta: crem hârtie + verde salvie + roșu ceară
   ============================================ */

:root {
  --paper: #f6f1e6;
  --paper-soft: #fbf8f1;
  --ink: #39423a;
  --muted: #78715f;
  --green: #44624a;
  --green-dark: #33503b;
  --sage: #cfdac7;
  --sage-deep: #a9bb9d;
  --wax: #a64832;
  --glow: #f3d9a6;
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.65);
  --gold: #c9a35f;
  --radius: 28px;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-body: "Manrope", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.intro-locked { overflow: hidden; height: 100dvh; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 24px; position: relative; }

/* ---------- fundal aurora ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(175deg, #f8f3e9 0%, var(--paper) 40%, #eef0e6 78%, #ecefe4 100%);
}
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  will-change: transform;
}
.a-sage { width: 44vw; height: 44vw; background: #d8e2cf; top: -14vw; right: -12vw; animation: drift1 28s ease-in-out infinite alternate; }
.a-cream { width: 38vw; height: 38vw; background: #f3e6cd; bottom: 2vh; left: -14vw; animation: drift2 34s ease-in-out infinite alternate; }
.a-blush { width: 30vw; height: 30vw; background: #f0ddd0; top: 44vh; left: 36vw; opacity: .45; animation: drift3 40s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-8vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(8vw, -8vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-6vw, 8vh) scale(1.2); } }

/* textura fină de hârtie peste tot */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- glass (liquid pe Chromium, blur fallback) ----------
   Stratul de sticlă stă pe ::before, SUB conținut — dacă backdrop-filter
   e direct pe card, Chrome aplică blur-ul și peste conținut când în card
   există un iframe/video (bug de compositing). */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  box-shadow:
    0 18px 40px -18px rgba(51, 80, 59, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: var(--glass-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  background-size: 110px 110px;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
html.has-liquid .glass-liquid::before { backdrop-filter: url(#lg-soft) blur(6px) saturate(150%); }
html.has-liquid .glass.glass-strong::before { backdrop-filter: url(#lg-strong) blur(3px) saturate(150%); }

/* bordura gradient (masca) */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(to top right, rgba(120, 130, 110, 0.55), rgba(255, 255, 255, 0.9));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* blob-ul care urmărește cursorul — vizibil doar prin sticlă */
.blob-clip { position: fixed; inset: 0; pointer-events: none; }
.cursor-blob {
  position: absolute; top: 0; left: 0; width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(68, 98, 74, 0.34) 0%, rgba(68, 98, 74, 0.14) 45%, rgba(68, 98, 74, 0) 70%);
  filter: blur(14px);
  opacity: 0; transition: opacity .6s ease;
  will-change: transform;
}
@media (hover: none) { .blob-clip { display: none; } }

/* ---------- tipografie ---------- */
.label {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--green);
}
.display {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500; line-height: 1.08;
  letter-spacing: 0.02em;
  margin: 10px 0 18px;
  color: var(--ink);
}
.script {
  font-family: var(--font-script); font-style: normal;
  color: var(--green); font-weight: 400;
}
.section-intro { max-width: 60ch; color: var(--muted); margin: 0 auto 46px; text-align: center; font-size: 18px; }
.center { text-align: center; }

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s, background .35s, color .35s;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green); color: #f6f3ea;
  box-shadow: 0 14px 30px -14px rgba(51, 80, 59, .65);
}
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,.5); color: var(--green-dark);
  box-shadow: inset 0 0 0 1.5px rgba(68, 98, 74, .45);
}
.btn-ghost:hover { background: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- intro video ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: #efe9db;
  cursor: pointer;
  transition: opacity 1.4s ease;
}
.intro-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  transition: transform 1.6s cubic-bezier(.4,.05,.3,1);
}
.intro-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(70% 60% at 50% 46%,
    rgba(255, 244, 214, .95) 0%, rgba(243, 217, 166, .55) 45%, rgba(243, 217, 166, 0) 75%);
  transition: opacity .9s ease;
}
.intro.intro-done { opacity: 0; pointer-events: none; }
.intro.intro-done .intro-video { transform: scale(1.12); }
.intro.intro-done .intro-glow, .intro.intro-playing.intro-done .intro-glow { opacity: 1; }
.intro-hint {
  position: absolute; left: 50%; bottom: clamp(36px, 8vh, 84px); transform: translateX(-50%);
  font-family: var(--font-serif); font-style: italic; font-size: clamp(17px, 4.4vw, 21px);
  letter-spacing: .04em; color: rgba(70, 85, 72, .92);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 12px 26px; border-radius: 999px;
  box-shadow: 0 10px 26px -12px rgba(60, 50, 30, .4), inset 0 1px 0 rgba(255,255,255,.7);
  white-space: nowrap;
  animation: hint-in 1s ease .8s both, hint-breathe 2.6s ease-in-out 2s infinite;
  transition: opacity .4s ease;
}
.intro.intro-playing .intro-hint { opacity: 0; animation: none; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hint-breathe { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ---------- hero (video în buclă, simplu, stil Heritage) ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 18px 90px;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 62%;
  z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(110% 80% at 50% 42%, rgba(248, 244, 235, .62), rgba(248, 244, 235, .30) 55%, rgba(248, 244, 235, .12) 80%),
    linear-gradient(180deg, rgba(248, 244, 235, .38) 0%, rgba(248, 244, 235, .12) 55%, rgba(248, 244, 235, .30) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}
.hero-names {
  font-family: var(--font-script); font-weight: 400;
  display: flex; flex-direction: column; align-items: center;
  color: var(--green-dark);
}
.hero-names .hn {
  font-size: clamp(52px, 11vw, 96px);
  line-height: 1.15;
}
.hero-names .amp {
  font-size: clamp(34px, 6.5vw, 56px);
  line-height: 1.1;
  margin: 2px 0;
  color: var(--green);
}
.hero-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 26px 0 30px;
}
.hero-divider i { display: block; width: clamp(64px, 12vw, 110px); height: 1px; background: rgba(51, 80, 59, .55); }
.hero-divider b { color: var(--gold); font-size: 13px; font-weight: 400; transform: translateY(-1px); }
.hero-date {
  font-family: var(--font-body); font-size: clamp(14px, 2.4vw, 17px); font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--green-dark);
  padding-left: .32em; /* compensăm ultimul letter-spacing ca să stea centrat */
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  color: var(--green-dark); opacity: .7; z-index: 2;
  animation: cue 2.2s ease-in-out infinite;
}
.scroll-cue svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes cue { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- program ---------- */
.program-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  max-width: 880px; margin: 0 auto 34px;
}
.program-card {
  padding: 38px 32px 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s;
}
.program-card:hover { transform: translateY(-6px); box-shadow: 0 30px 55px -22px rgba(51, 80, 59, .35), inset 0 1px 0 rgba(255,255,255,.6); }
.program-icon { color: var(--green); margin-bottom: 8px; }
.program-icon svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.program-card h3 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.program-time {
  font-family: var(--font-serif); font-size: clamp(44px, 6vw, 56px); font-weight: 500;
  line-height: 1.1; color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}
.program-place { font-size: 19px; font-weight: 600; margin-top: 4px; }
.program-addr { font-size: 15px; color: var(--muted); font-family: var(--font-body); font-weight: 500; margin-bottom: 16px; }
.map-embed {
  width: 100%; height: 190px; margin-top: auto;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 28px -14px rgba(51, 80, 59, .35), inset 0 0 0 1.5px rgba(68, 98, 74, .25);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- rsvp ---------- */
.rsvp-panel {
  max-width: 620px; margin: 0 auto;
  padding: clamp(30px, 5vw, 52px);
}
.rsvp-panel h2 { margin-bottom: 6px; }
.rsvp-lead { color: var(--muted); font-style: italic; margin-bottom: 28px; }
.form-row { margin-bottom: 18px; text-align: left; }
.form-row label {
  display: block; font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green);
  margin-bottom: 8px;
}
.form-row input[type="text"], .form-row textarea, .form-row select {
  width: 100%;
  font-family: var(--font-serif); font-size: 18px; color: var(--ink);
  background: rgba(255, 255, 255, .55);
  border: 1.5px solid rgba(68, 98, 74, .35);
  border-radius: 16px;
  padding: 13px 18px;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.form-row textarea { resize: vertical; min-height: 92px; }
.form-row input[type="text"]:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--green); background: #fff;
  box-shadow: 0 0 0 4px rgba(68, 98, 74, .12);
}
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2344624a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
  cursor: pointer;
}
.attend-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.attend-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.attend-toggle span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; color: var(--green-dark);
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 0 0 1.5px rgba(68, 98, 74, .35);
  transition: background .3s, color .3s, box-shadow .3s;
}
.attend-toggle input:checked + span {
  background: var(--green); color: #f6f3ea;
  box-shadow: 0 10px 24px -12px rgba(51, 80, 59, .6);
}
/* slider persoane — 6 cerculețe cu snap */
.pers-slider { padding: 4px 0 0; }
.pers-track-wrap { position: relative; height: 38px; }
.pers-dots {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px; pointer-events: none;
}
.pers-dots::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: 50%;
  height: 2px; transform: translateY(-50%);
  background: rgba(68, 98, 74, .28); border-radius: 2px;
}
.pers-dots i {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.pers-dots i::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 1.5px rgba(68, 98, 74, .45);
}
.pers-range {
  position: relative; z-index: 1;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 38px; margin: 0; padding: 0 4px;
  background: transparent; cursor: pointer;
}
.pers-range::-webkit-slider-runnable-track { height: 38px; background: transparent; }
.pers-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: 6px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #5d7d62, var(--green) 55%, var(--green-dark));
  border: 2px solid #fff;
  box-shadow: 0 5px 14px -4px rgba(51, 80, 59, .55);
  transition: transform .15s ease;
}
.pers-range:active::-webkit-slider-thumb { transform: scale(1.18); }
.pers-range::-moz-range-track { height: 38px; background: transparent; }
.pers-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green); border: 2px solid #fff;
  box-shadow: 0 5px 14px -4px rgba(51, 80, 59, .55);
}
.pers-range:focus, .pers-range:focus-visible { outline: none; }
.pers-nums { display: flex; justify-content: space-between; padding: 2px 4px 0; }
.pers-nums span {
  width: 26px; text-align: center;
  font-family: var(--font-serif); font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .2s, transform .2s, font-weight .2s;
}
.pers-nums span.on { color: var(--green-dark); font-weight: 600; transform: scale(1.35); }

.rsvp-form .btn-primary { width: 100%; font-size: 16px; padding: 16px 28px; margin-top: 6px; }
.rsvp-thanks { padding: 26px 0 10px; }
.thanks-script {
  font-family: var(--font-script); font-size: clamp(34px, 7vw, 46px);
  color: var(--green); margin-bottom: 14px;
}
.thanks-text { font-size: 19px; font-style: italic; color: var(--ink); max-width: 44ch; margin: 0 auto; }
.thanks-text .heart { color: var(--wax); font-style: normal; }
.rsvp-err {
  margin-top: 14px; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: #a04a32;
}
.rsvp-note { margin: 18px 0 0; font-size: 16px; font-style: italic; color: var(--muted); }
.rsvp-note a { color: var(--green-dark); font-weight: 600; }
#rowPersoane, #rowMesaj { transition: opacity .4s, max-height .4s; }
.rsvp-form.declined #rowPersoane { display: none; }

/* ---------- countdown (deasupra confirmării) ---------- */
.sec-count { padding-top: 40px; padding-bottom: 30px; }
.count-caption {
  font-family: var(--font-script);
  font-size: clamp(32px, 7vw, 46px);
  color: var(--green);
  margin-bottom: 26px;
}
.countdown {
  display: flex; justify-content: center; gap: clamp(8px, 2vw, 20px);
  flex-wrap: nowrap;
}
.count-cell {
  min-width: clamp(62px, 19vw, 118px);
  padding: clamp(16px, 3vw, 26px) 8px clamp(14px, 2.6vw, 22px);
  text-align: center;
}
.count-num {
  font-family: var(--font-serif);
  font-size: clamp(34px, 8vw, 54px); font-weight: 500; color: var(--green-dark);
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.count-label {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 4px;
}

/* ---------- footer (verde închis, simplu) ---------- */
.footer {
  text-align: center;
  background: #3a4733;
  color: #e6d9c3;
  margin-top: 70px;
  padding: 74px 24px 46px;
}
.footer-script {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(36px, 7vw, 48px); color: #e9d9bd;
}
.footer-date {
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  letter-spacing: .06em; color: #d9cbb2; margin-top: 14px;
}
.footer-made {
  font-family: var(--font-body); font-size: 14px; font-weight: 400;
  color: #c6b99f; margin-top: 20px;
}
.footer-made .heart { color: #d9b48c; padding: 0 2px; }
.footer-line {
  border: none; height: 1px; background: rgba(233, 217, 189, .22);
  max-width: 860px; margin: 34px auto 26px;
}
.footer-tag {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: .08em; color: #b3a78e;
}

/* ---------- animații reveal ---------- */
.reveal, .reveal-img { will-change: transform, opacity; }
html.no-anim .reveal, html.no-anim .reveal-img { opacity: 1 !important; transform: none !important; }
html.no-anim .intro-hint { animation: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .section { padding: 72px 18px; }
  .program-grid { grid-template-columns: 1fr; max-width: 460px; }
  .hero { padding-top: 60px; }
}
@media (max-width: 380px) {
  .attend-toggle { grid-template-columns: 1fr; }
}

/* fără selecție/highlight pe elementele interactive */
.btn, .attend-toggle span, .pers-slider, .scroll-cue, .count-cell, .label, .intro-hint {
  -webkit-user-select: none; user-select: none;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob, .scroll-cue, .intro-hint { animation: none !important; }
  html { scroll-behavior: auto; }
}
