:root {
  /* Mire — tech */
  --tech-bg: #0a0f1c;
  --tech-bg-2: #111a2e;
  --tech-fg: #c9d6ea;
  --tech-accent: #3ef0b0;
  --tech-accent-2: #5cc8ff;
  --tech-purple: #c792ea;
  --tech-orange: #ffcb6b;
  --tech-muted: #5c6c8a;

  /* Mireasa — artistic */
  --art-bg: #fbf4ee;
  --art-fg: #5a3e46;
  --art-rose: #d9869b;
  --art-gold: #c9a46a;
  --art-sage: #8aa77b;

  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --script: 'Parisienne', cursive;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--art-fg);
  /* Fundalul păstrează împărțirea: stânga mire, dreapta mireasă */
  background: linear-gradient(90deg, var(--tech-bg) 0 50%, var(--art-bg) 50% 100%);
  overflow-x: hidden;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.half {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

/* ---- Mire ---- */
.groom {
  background: radial-gradient(ellipse at 30% 20%, var(--tech-bg-2), var(--tech-bg) 70%);
  color: var(--tech-fg);
  font-family: var(--mono);
}
#matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 240, 176, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 240, 176, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.terminal {
  position: relative;
  width: min(420px, 100%);
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid rgba(92, 200, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(62, 240, 176, 0.12), 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  font-size: 0.9rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(92, 200, 255, 0.15);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title { margin-left: auto; margin-right: auto; color: var(--tech-muted); font-size: 0.75rem; }
.terminal-body { padding: 14px 18px 18px; }
.terminal-body p { margin: 0.25rem 0; }
.prompt { color: var(--tech-accent); margin-right: 0.4rem; }
.out { color: var(--tech-accent-2); padding-left: 1.1rem; min-height: 1.3em; }
.str { color: var(--tech-orange); }
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--tech-accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.groom-name {
  position: relative;
  margin-top: 2.5rem;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(62, 240, 176, 0.45);
  text-align: center;
}
.bracket { color: var(--tech-accent); }

/* ---- Mireasă ---- */
.bride {
  background: var(--art-bg);
  text-align: center;
}
.watercolor {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}
.w1 { width: 380px; height: 320px; background: #f7cfa6; top: -60px; right: -80px; }
.w2 { width: 300px; height: 300px; background: #f6c9d2; bottom: -40px; left: -60px; animation-delay: -6s; }
.w3 { width: 260px; height: 220px; background: #e6dfe8; top: 40%; left: 45%; animation-delay: -12s; }
@keyframes drift {
  to { transform: translate(30px, -25px) scale(1.12); }
}
.cat { position: absolute; overflow: visible; }
.cat-black-hero { width: clamp(120px, 14vw, 200px); right: 6%; bottom: 4%; }
.cat-calico-hero { width: clamp(170px, 20vw, 290px); left: 10%; bottom: 3%; }
.yarn-hanging {
  position: absolute;
  top: 0;
  left: 18%;
  width: clamp(40px, 4vw, 60px);
  transform-origin: 50% 0;
  animation: swing 4s ease-in-out infinite alternate;
}
@keyframes swing { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }

/* Coada se mișcă, ochii clipesc */
.cat .tail { transform-box: fill-box; transform-origin: 0% 100%; animation: tail 3s ease-in-out infinite alternate; }
@keyframes tail { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
.cat .eyes { transform-box: fill-box; transform-origin: center; animation: cat-blink 5s infinite; }
@keyframes cat-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }

.bride-text { position: relative; }
.bride-kicker {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  color: var(--art-gold);
  margin: 0;
}
.bride-name {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin: 0.2rem 0;
  color: var(--art-rose);
  line-height: 1.1;
}
.bride-verse {
  font-style: italic;
  font-size: 1.25rem;
  margin: 0;
}

#petals { position: absolute; inset: 0; pointer-events: none; }
.paw {
  position: absolute;
  top: -24px;
  width: 18px;
  height: 18px;
  background: var(--paw, #d9869b);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cellipse cx='10' cy='13.5' rx='5' ry='4.3'/%3E%3Cellipse cx='3.6' cy='8' rx='2' ry='2.6'/%3E%3Cellipse cx='7.6' cy='4.2' rx='2' ry='2.7'/%3E%3Cellipse cx='12.4' cy='4.2' rx='2' ry='2.7'/%3E%3Cellipse cx='16.4' cy='8' rx='2' ry='2.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cellipse cx='10' cy='13.5' rx='5' ry='4.3'/%3E%3Cellipse cx='3.6' cy='8' rx='2' ry='2.6'/%3E%3Cellipse cx='7.6' cy='4.2' rx='2' ry='2.7'/%3E%3Cellipse cx='12.4' cy='4.2' rx='2' ry='2.7'/%3E%3Cellipse cx='16.4' cy='8' rx='2' ry='2.6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.55;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); opacity: 0.2; }
}

/* ---- Centru ---- */
.hero-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}
.ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, var(--tech-bg) 50%, var(--art-bg) 50%);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 3px var(--art-gold),
    0 0 30px rgba(62, 240, 176, 0.35),
    0 0 30px rgba(217, 134, 155, 0.35);
}
.amp {
  font-family: var(--script);
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(90deg, var(--tech-accent) 50%, var(--art-rose) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-date, .hero-place {
  margin: 0.8rem 0 0;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--art-gold);
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.hero-date { background: var(--art-gold); color: #fff; }
.hero-place {
  background: #fff;
  color: var(--art-fg);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--art-gold);
  border-radius: 14px;
  z-index: 3;
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--art-gold);
  animation: scroll 1.8s ease-in-out infinite;
}
@keyframes scroll { 50% { transform: translateY(12px); opacity: 0.3; } }

/* ================= SECȚIUNI ÎMPĂRȚITE ================= */
.section { padding: 6rem 0; }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.side { padding: 2rem clamp(1.5rem, 5vw, 5rem); }
.side.tech { color: var(--tech-fg); font-family: var(--mono); display: flex; flex-direction: column; align-items: flex-end; }
.side.art { text-align: center; }

.code {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.2vw, 0.98rem);
  line-height: 1.7;
  color: var(--tech-fg);
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}
.code.small { font-size: clamp(0.75rem, 1.05vw, 0.9rem); padding: 1.2rem 1.4rem; }
.code .c { color: var(--tech-muted); font-style: italic; }
.code .k { color: var(--tech-purple); }
.code .v { color: var(--tech-accent-2); }
.code .p { color: var(--tech-accent); }
.code .s { color: var(--tech-orange); }
.code .f { color: var(--tech-accent-2); }

.script { font-family: var(--script); color: var(--art-rose); margin: 0; line-height: 1.2; }
.script.big { font-size: clamp(2.8rem, 5vw, 4.2rem); }
.script.mid { font-size: clamp(2rem, 3.5vw, 2.8rem); }
.script.huge { font-size: clamp(3.5rem, 7vw, 5.5rem); }
.serif { font-size: 1.3rem; line-height: 1.6; margin: 0.6rem auto; max-width: 30ch; }
.serif em { color: var(--art-gold); font-style: italic; font-weight: 600; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--tech-accent);
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}

/* Countdown */
.digits { display: flex; gap: 0.8rem; }
.digits > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 0.8rem 0.6rem;
  border: 1px solid rgba(62, 240, 176, 0.3);
  border-radius: 8px;
  background: rgba(62, 240, 176, 0.05);
}
.digits span {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--tech-accent);
  text-shadow: 0 0 12px rgba(62, 240, 176, 0.5);
  font-variant-numeric: tabular-nums;
}
.digits small { color: var(--tech-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* Program */
.card-tech {
  width: min(460px, 100%);
  border: 1px solid rgba(92, 200, 255, 0.25);
  border-radius: 10px;
  background: var(--tech-bg-2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.card-tech-head {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--tech-muted);
  border-bottom: 1px solid rgba(92, 200, 255, 0.15);
}
.card-tech-head::before { content: '● '; color: var(--tech-orange); }
.cat-peek { position: static; display: block; width: 120px; margin: 0 auto 0.4rem; }
.cat-on-card { width: 80px; top: -74px; right: 18%; }
.card-art {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border: 1px solid var(--art-gold);
  border-radius: 200px 200px 16px 16px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(201, 164, 106, 0.18);
}
.card-art::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(201, 164, 106, 0.5);
  border-radius: 192px 192px 10px 10px;
  pointer-events: none;
}
.time { font-size: 1.8rem; color: var(--art-gold); font-weight: 600; margin: 0.3rem auto; }
.btn-art {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--art-rose);
  color: var(--art-rose);
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.3s, color 0.3s;
}
.btn-art:hover { background: var(--art-rose); color: #fff; }

/* ================= RSVP ================= */
.rsvp { display: flex; justify-content: center; padding-left: 1rem; padding-right: 1rem; }
.rsvp-card {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  border-top: 6px solid transparent;
  border-image: linear-gradient(90deg, var(--tech-accent), var(--tech-accent-2), var(--art-rose), var(--art-gold)) 1;
}
.rsvp-head { text-align: center; padding: 2.5rem 2rem 1rem; }
.rsvp-head .mono-label { color: var(--tech-muted); }
form { padding: 0 2rem 2.5rem; }
.field { display: block; border: 0; margin: 0 0 1.3rem; padding: 0; }
.field > span, .field legend {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tech-bg-2);
  margin-bottom: 0.5rem;
}
.field em { text-transform: none; color: #999; }
input[type='text'], input[type='number'], input[type='tel'], textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.15rem;
  color: var(--art-fg);
  border: 1px solid #e5d8cf;
  border-radius: 10px;
  background: #fffaf6;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--art-rose);
  box-shadow: 0 0 0 3px rgba(217, 134, 155, 0.2);
}
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border: 1px solid #e5d8cf;
  border-radius: 999px;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.choices input:checked + span {
  background: linear-gradient(90deg, var(--tech-bg-2), #3a2f45 50%, var(--art-rose));
  border-color: transparent;
  color: #fff;
}
.choices input:focus-visible + span { box-shadow: 0 0 0 3px rgba(62, 240, 176, 0.5); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  border: 1px solid #e5d8cf;
  border-radius: 12px;
  background: #fffaf6;
  font-size: 1.05rem;
}
.menu-item input[type='number'] { width: 4.2rem; padding: 0.35rem 0.5rem; text-align: center; font-family: var(--mono); font-size: 1rem; }
.menu-sum { margin: 0.5rem 0 0; font-family: var(--mono); font-size: 0.8rem; color: #2e8b57; }
.menu-sum.bad { color: #c0392b; }
.if-coming[hidden], .if-outside[hidden], .if-transport[hidden] { display: none; }

.btn-submit {
  width: 100%;
  padding: 1rem;
  border: 0;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--tech-bg) 0%, #2b3a5c 45%, var(--art-rose) 100%);
  background-size: 200% 100%;
  transition: background-position 0.5s, transform 0.2s;
}
.btn-submit:hover { background-position: 100% 0; transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; cursor: wait; }
.form-msg { min-height: 1.4em; font-size: 1.1rem; text-align: center; margin: 0 0 1rem; }
.form-msg.error { color: #c0392b; }
.form-msg.ok { color: #2e8b57; }

.rsvp-done { text-align: center; padding: 1rem 2rem 3rem; }
.rsvp-done .code { display: inline-block; text-align: left; background: var(--tech-bg); padding: 1rem 1.4rem; border-radius: 10px; }

/* ================= FOOTER ================= */
.footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  background: linear-gradient(90deg, var(--tech-bg) 50%, var(--art-bg) 50%);
}
.footer .script {
  background: linear-gradient(90deg, var(--tech-accent) 50%, var(--art-rose) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer .mono-label { color: var(--art-gold); margin-top: 0.5rem; }

/* ================= ANIMAȚII LA SCROLL ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ================= MOBIL ================= */
@media (max-width: 800px) {
  body { background: var(--art-bg); }
  .hero, .split { grid-template-columns: 1fr; }
  .half { min-height: 55svh; padding: 3rem 1.25rem; }
  .groom { padding-bottom: 5rem; }
  .bride { padding-top: 5rem; }
  .hero-center { top: 55svh; }
  .script.big { font-size: 2.4rem; }
  .footer .script.mid { font-size: 1.6rem; }
  .cat-black-hero { right: 4%; bottom: 2%; }
  .cat-calico-hero { left: 2%; bottom: 2%; }
  .yarn-hanging { left: 8%; }
  .ring { width: 96px; height: 96px; background: linear-gradient(180deg, var(--tech-bg) 50%, var(--art-bg) 50%); }
  .amp { font-size: 3.2rem; background: linear-gradient(180deg, var(--tech-accent) 50%, var(--art-rose) 50%); -webkit-background-clip: text; background-clip: text; }
  .hero-date, .hero-place { display: none; }
  .scroll-hint { display: none; }

  .section { padding: 0; }
  .side { padding: 3.5rem 1.25rem; }
  .side.tech { background: var(--tech-bg); align-items: center; }
  .split.program .side.tech, .split .side.tech { align-items: center; }
  .digits { gap: 0.4rem; }
  .digits > div { min-width: 64px; }
  .rsvp { padding: 3rem 1rem; background: linear-gradient(180deg, var(--tech-bg) 0 30%, var(--art-bg) 30%); }
  form { padding: 0 1.25rem 2rem; }
  .footer { background: linear-gradient(180deg, var(--tech-bg) 50%, var(--art-bg) 50%); }
  .footer .script { background: linear-gradient(180deg, var(--tech-accent) 50%, var(--art-rose) 50%); -webkit-background-clip: text; background-clip: text; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
