/* Pagină publică de invitație — v2 premium. Temele vin din --iv-* (templates.js). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--iv-bg); color: var(--iv-ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--iv-display); line-height: 1.12; margin: 0 0 0.5em; font-weight: 560; }
h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); text-align: center; }
h2::after {
  content: '❦'; display: block; margin: 10px auto 0;
  font-size: 1rem; color: var(--iv-accent); opacity: 0.8;
}
.center { text-align: center; }
.muted { opacity: 0.72; }
.iv-main { max-width: 780px; margin: 0 auto; padding: 0 22px 48px; }
.iv-section { padding: 50px 0 10px; }

.btn-invite {
  position: relative; display: inline-block; padding: 14px 32px; border-radius: 999px;
  background: var(--iv-accent); color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--iv-accent); cursor: pointer; overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease, filter 0.2s ease;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.4);
}
.btn-invite:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-invite:active { transform: translateY(0) scale(0.98); }
.btn-outline { background: transparent; color: var(--iv-accent); box-shadow: none; }
#music-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 54px; height: 54px;
  border-radius: 50%; border: none; background: var(--iv-accent); color: #fff;
  font-size: 1.45rem; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
#music-btn:hover { transform: scale(1.08); }
#music-btn.playing::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--iv-accent); opacity: 0.6;
  animation: ringPulse 1.8s ease-out infinite;
}
@keyframes ringPulse { from { transform: scale(0.85); opacity: 0.7; } to { transform: scale(1.25); opacity: 0; } }
.iv-preview-bar {
  margin: 0; padding: 11px; text-align: center; background: #2b2126; color: #fff; font-size: 0.9rem;
}
.iv-preview-bar a { color: #f4d58d; }

/* ---------- Copertă ---------- */
.iv-cover { max-width: 1120px; margin: 0 auto; padding: 56px 22px 24px; position: relative; }
.iv-kicker { text-transform: uppercase; letter-spacing: 4px; font-size: 0.78rem; font-weight: 800; opacity: 0.72; }
.iv-date { font-size: 1.28rem; font-weight: 700; }
.iv-venue { font-size: 1.06rem; }
.iv-amp { display: block; font-family: 'Great Vibes', cursive; font-size: 1.5em; line-height: 1; margin: 0.05em 0; color: var(--iv-accent); }
.iv-cover-media img, .iv-cover-fallback { width: 100%; object-fit: cover; display: block; }
.iv-cover-fallback {
  aspect-ratio: 4/3; display: grid; place-items: center;
  background: radial-gradient(120% 130% at 20% 10%, var(--iv-soft), var(--iv-accent) 72%);
  color: #fff; font-family: var(--iv-display); font-size: 4.2rem; letter-spacing: 0.06em;
}
/* Pe coperta plină, textul de rezervă ar dubla titlul — păstrăm doar gradientul. */
.iv-layout-full .iv-cover-fallback { font-size: 0; }
.petal { position: absolute; top: -16px; border-radius: 60% 4px 60% 4px; pointer-events: none; z-index: 5; opacity: 0.75; }

/* arc: arcadă + inel decorativ */
.iv-layout-arc .iv-cover { text-align: center; }
.iv-layout-arc .iv-cover-media { position: relative; max-width: 430px; margin: 0 auto 30px; }
.iv-layout-arc .iv-cover-media::before {
  content: ''; position: absolute; inset: -16px -16px auto; height: 70%;
  border: 2px solid var(--iv-accent); opacity: 0.35;
  border-radius: 999px 999px 0 0; border-bottom: none; pointer-events: none;
}
.iv-layout-arc .iv-cover-media img, .iv-layout-arc .iv-cover-fallback {
  aspect-ratio: 3/4; border-radius: 999px 999px 26px 26px;
  border: 7px solid var(--iv-card); box-shadow: 0 24px 55px -18px rgba(0, 0, 0, 0.35);
}

/* full: copertă plină + indicator scroll */
.iv-layout-full .iv-cover {
  max-width: none; min-height: 96vh; display: grid; place-items: center; text-align: center;
  position: relative; padding: 70px 22px; color: #fff; overflow: hidden;
}
.iv-layout-full .iv-cover-media { position: absolute; inset: 0; }
.iv-layout-full .iv-cover-media img, .iv-layout-full .iv-cover-fallback { height: 100%; border-radius: 0; }
.iv-layout-full .iv-cover-text { position: relative; z-index: 2; max-width: 780px; }
.iv-layout-full .iv-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.28) 45%, rgba(0,0,0,0.62));
}
.iv-layout-full .iv-amp { color: #fff; }
.iv-layout-full .btn-invite { background: #fff; border-color: #fff; color: #222; }
.scroll-hint { display: none; }
.iv-layout-full .scroll-hint {
  position: absolute; z-index: 3; bottom: 26px; left: 50%; translate: -50% 0;
  color: rgba(255, 255, 255, 0.9); font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase;
  display: grid; justify-items: center; gap: 6px;
}
.scroll-hint::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg); animation: hintDrop 1.8s ease-in-out infinite;
}
@keyframes hintDrop { 0%, 100% { translate: 0 -4px; opacity: 0.5; } 50% { translate: 0 5px; opacity: 1; } }

/* frame: carton clasic cu chenar dublu */
.iv-layout-frame .iv-cover-text {
  border: 1px solid var(--iv-accent); outline: 4px double var(--iv-accent); outline-offset: 9px;
  background: var(--iv-card); padding: 52px 30px; text-align: center; max-width: 660px; margin: 30px auto 0;
  box-shadow: 0 24px 55px -20px rgba(0, 0, 0, 0.25);
}
.iv-layout-frame .iv-cover-media { max-width: 660px; margin: 0 auto; }
.iv-layout-frame .iv-cover-media img, .iv-layout-frame .iv-cover-fallback { aspect-ratio: 16/9; border-radius: 8px; }

/* split: editorial */
.iv-layout-split .iv-cover {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; max-width: 1020px;
}
.iv-layout-split .iv-cover-media img, .iv-layout-split .iv-cover-fallback {
  aspect-ratio: 4/5; border-radius: 20px; box-shadow: 0 24px 55px -18px rgba(0, 0, 0, 0.3);
}
.iv-layout-split .iv-kicker { display: inline-block; border-bottom: 2px solid var(--iv-accent); padding-bottom: 8px; }
@media (max-width: 760px) {
  .iv-layout-split .iv-cover { grid-template-columns: 1fr; text-align: center; gap: 26px; }
}

/* ---------- Secțiuni ---------- */
.iv-story { font-size: 1.14rem; text-align: center; max-width: 640px; margin: 0 auto; }
.iv-story::first-letter {
  font-family: var(--iv-display); font-size: 2.6em; line-height: 0.9;
  float: left; margin: 0.08em 0.12em 0 0; color: var(--iv-accent);
}
.iv-section blockquote {
  margin: 1.6em auto 0; max-width: 580px; text-align: center;
  font-family: var(--iv-display); font-style: italic; font-size: 1.35rem; color: var(--iv-accent);
}
.iv-section blockquote::before { content: '“'; display: block; font-size: 2.2em; line-height: 0.6; opacity: 0.5; }

/* Program ca linie de timp */
.iv-program { list-style: none; padding: 0; max-width: 540px; margin: 0 auto; position: relative; }
.iv-program::before {
  content: ''; position: absolute; left: 96px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--iv-accent) 12%, var(--iv-accent) 88%, transparent);
  opacity: 0.45;
}
.iv-program li {
  display: grid; grid-template-columns: 84px 1fr; gap: 26px; padding: 13px 4px;
  position: relative;
}
.iv-program li::before {
  content: ''; position: absolute; left: 91px; top: 21px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--iv-bg); border: 3px solid var(--iv-accent);
}
.p-time { font-weight: 800; color: var(--iv-accent); font-variant-numeric: tabular-nums; }

/* Galerie + lightbox */
.iv-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.iv-gallery a {
  display: block; border-radius: 14px; overflow: hidden; position: relative;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.35);
}
.iv-gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.iv-gallery a:hover img { transform: scale(1.06); }
.iv-gallery a::after {
  content: '⤢'; position: absolute; right: 10px; bottom: 8px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1rem;
  opacity: 0; transition: opacity 0.25s ease;
}
.iv-gallery a:hover::after { opacity: 1; }
@media (max-width: 600px) { .iv-gallery { grid-template-columns: repeat(2, 1fr); } }
.iv-lb {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(15, 8, 12, 0.92); padding: 24px;
  animation: lbIn 0.25s ease;
}
@keyframes lbIn { from { opacity: 0; } }
.iv-lb img { max-width: min(920px, 92vw); max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.iv-lb button {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.3rem; cursor: pointer;
  transition: background 0.2s ease;
}
.iv-lb button:hover { background: rgba(255, 255, 255, 0.25); }
.iv-lb .lb-x { top: 20px; right: 20px; }
.iv-lb .lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.iv-lb .lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* Countdown */
.iv-countdown { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.iv-countdown div {
  background: var(--iv-card); border: 1px solid var(--iv-soft); border-radius: 16px;
  min-width: 82px; padding: 14px 10px; text-align: center;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.3);
}
.iv-countdown b {
  display: block; font-size: 2rem; font-variant-numeric: tabular-nums; color: var(--iv-accent);
  font-family: var(--iv-display); line-height: 1.1;
}
.iv-countdown b.tick { animation: tickPop 0.4s ease; }
@keyframes tickPop { 30% { transform: scale(1.18); } }
.iv-countdown span { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }

/* RSVP */
.iv-rsvp {
  display: grid; gap: 16px; background: var(--iv-card);
  border: 1px solid var(--iv-soft); border-radius: 22px; padding: 34px 30px;
  max-width: 580px; margin: 0 auto;
  box-shadow: 0 24px 55px -22px rgba(0, 0, 0, 0.3);
}
.iv-rsvp label { display: grid; gap: 7px; font-weight: 700; text-align: left; font-size: 0.95rem; }
.iv-rsvp input[type="text"], .iv-rsvp input[type="number"], .iv-rsvp textarea {
  font: inherit; font-weight: 500; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--iv-soft); background: var(--iv-bg); color: var(--iv-ink); width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.iv-rsvp input:focus, .iv-rsvp textarea:focus {
  outline: none; border-color: var(--iv-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--iv-accent) 18%, transparent);
}
.iv-rsvp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iv-rsvp .radio {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--iv-soft); border-radius: 999px; padding: 11px 8px;
  font-weight: 800; cursor: pointer; margin: 0;
  transition: all 0.22s ease;
}
.iv-rsvp .radio input { position: absolute; opacity: 0; pointer-events: none; }
.iv-rsvp .radio:has(input:checked) { background: var(--iv-accent); border-color: var(--iv-accent); color: #fff; }
.form-msg { min-height: 1.5em; margin: 0; text-align: center; font-weight: 700; }
.form-msg.ok { color: #2f7a4d; animation: tickPop 0.5s ease; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Footer */
.iv-footer { text-align: center; padding: 40px 20px 64px; }
.iv-brand {
  display: inline-block; background: var(--iv-card); border: 1px solid var(--iv-soft);
  border-radius: 999px; padding: 11px 24px; font-size: 0.9rem;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.35);
}
.iv-brand a { color: var(--iv-accent); font-weight: 800; }

/* Confetti */
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 100; pointer-events: none; border-radius: 2px; }

/* Ornamente per șablon */
.iv-orn-floral h2::after { content: '❦'; }
.iv-orn-geo h2::after { content: '◆ ◆ ◆'; font-size: 0.65rem; letter-spacing: 6px; }
.iv-orn-line h2::after {
  content: ''; width: 72px; height: 2px; margin: 14px auto 0;
  background: var(--iv-accent); border-radius: 2px;
}

/* polaroid: poze suprapuse ca niște amintiri */
.pol-behind { display: none; }
.iv-layout-polaroid .iv-cover {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; max-width: 1020px;
}
.iv-layout-polaroid .iv-cover-media { position: relative; padding: 18px 18px 60px; background: #fff; border-radius: 8px;
  transform: rotate(-3deg); box-shadow: 0 28px 60px -20px rgba(0, 0, 0, 0.4); }
.iv-layout-polaroid .iv-cover-media img, .iv-layout-polaroid .iv-cover-fallback { aspect-ratio: 1; border-radius: 3px; }
.iv-layout-polaroid .iv-cover-media::before {
  content: ''; position: absolute; top: -14px; left: 50%; translate: -50% 0;
  width: 110px; height: 30px; background: rgba(255, 255, 255, 0.55);
  border-left: 1px dashed rgba(0, 0, 0, 0.15); border-right: 1px dashed rgba(0, 0, 0, 0.15);
  transform: rotate(2deg);
}
.iv-layout-polaroid .pol-behind {
  display: block; position: absolute; width: 46%; right: -8%; bottom: -14%;
  background: #fff; padding: 10px 10px 34px; border-radius: 6px;
  transform: rotate(6deg); box-shadow: 0 20px 45px -16px rgba(0, 0, 0, 0.4);
}
.iv-layout-polaroid .pol-behind img { aspect-ratio: 1; border-radius: 3px; }
.iv-layout-polaroid .iv-cover-text { transform: rotate(1deg); }
@media (max-width: 760px) {
  .iv-layout-polaroid .iv-cover { grid-template-columns: 1fr; text-align: center; gap: 30px; overflow-x: clip; }
  .iv-layout-polaroid .iv-cover-media { max-width: 340px; margin: 0 auto; }
  .iv-layout-polaroid .pol-behind { right: 0; }
}

/* elegant: lux minimalist, centrat, cu linii fine */
.iv-layout-elegant .iv-cover { text-align: center; max-width: 720px; }
.iv-layout-elegant .iv-cover-media { max-width: 200px; margin: 0 auto 26px; }
.iv-layout-elegant .iv-cover-media img, .iv-layout-elegant .iv-cover-fallback {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--iv-accent); padding: 6px; background: var(--iv-card);
}
.iv-layout-elegant .iv-kicker { letter-spacing: 6px; }
.iv-layout-elegant .iv-cover-text { border-top: 1px solid var(--iv-accent); border-bottom: 1px solid var(--iv-accent); padding: 34px 10px; }
.iv-layout-elegant h1 { letter-spacing: 0.04em; }

/* Oameni dragi */
.iv-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; max-width: 640px; margin: 0 auto; }
.iv-person {
  background: var(--iv-card); border: 1px solid var(--iv-soft); border-radius: 16px;
  padding: 18px; text-align: center; box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.3);
}
.iv-role { display: block; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--iv-accent); margin-bottom: 4px; }
.iv-person strong { font-family: var(--iv-display); font-size: 1.15rem; font-weight: 560; }

/* Dress code */
.iv-dress {
  max-width: 520px; margin: 0 auto; text-align: center; font-size: 1.1rem; font-weight: 700;
  background: var(--iv-card); border: 1px dashed var(--iv-accent); border-radius: 999px; padding: 16px 28px;
}
.iv-dress span { color: var(--iv-accent); }

/* Mențiuni */
.iv-notes {
  max-width: 600px; margin: 0 auto; background: var(--iv-card);
  border-left: 4px solid var(--iv-accent); border-radius: 0 16px 16px 0;
  padding: 20px 26px; box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.3);
}
.iv-notes p { margin: 0.5em 0; }
.iv-notes p:first-child { margin-top: 0; }
.iv-notes p:last-child { margin-bottom: 0; }

/* Apariție */
.iv-section { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.iv-section.in { opacity: 1; transform: none; }
.iv-cover { animation: ivIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes ivIn { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 420px) {
  .iv-countdown { gap: 10px; }
  .iv-countdown div { min-width: 68px; padding: 10px 6px; }
  .iv-countdown b { font-size: 1.5rem; }
  .iv-rsvp { padding: 26px 18px; }
  .iv-program::before { left: 88px; }
  .iv-program li { grid-template-columns: 76px 1fr; gap: 22px; }
  .iv-program li::before { left: 83px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .iv-section { opacity: 1; transform: none; transition: none; }
  .iv-cover { animation: none; }
  .iv-countdown b.tick { animation: none; }
  .scroll-hint::after, #music-btn.playing::after { animation: none; }
}
