/* ==========================================================
   ARPY FX — strat comun de efecte vizuale
   Se încarcă pe toate paginile. Nu modifică stilurile existente,
   doar adaugă straturi peste / sub conținut.
   ========================================================== */

:root {
  --afx-accent: #c59b27;
  --afx-accent-2: #e8ca82;
  --afx-ink: #2a221f;
}

/* ---------- 1. Straturi de atmosferă (fum, ceață, vignetă) ---------- */
.afx-smoke {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  animation: afx-fade-in 2.4s ease 0.3s forwards;
}
.afx-smoke i {
  position: absolute;
  display: block;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  background: radial-gradient(circle at 40% 40%,
              var(--afx-accent-2) 0%,
              rgba(255, 255, 255, 0.18) 42%,
              transparent 70%);
  will-change: transform;
}
.afx-smoke i:nth-child(1) { top: -12%; left: -14%; animation: afx-drift-a 38s ease-in-out infinite; }
.afx-smoke i:nth-child(2) { top: 18%; right: -20%; animation: afx-drift-b 46s ease-in-out infinite; opacity: 0.16; }
.afx-smoke i:nth-child(3) { bottom: -22%; left: 22%; animation: afx-drift-c 54s ease-in-out infinite; opacity: 0.14; }

@keyframes afx-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(12vw, 8vh, 0) scale(1.18); }
}
@keyframes afx-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.1); }
  50%      { transform: translate3d(-14vw, 12vh, 0) scale(0.92); }
}
@keyframes afx-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); }
  50%      { transform: translate3d(10vw, -10vh, 0) scale(1.22); }
}
@keyframes afx-fade-in { to { opacity: 1; } }

.afx-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 42%,
              transparent 42%,
              rgba(0, 0, 0, 0.38) 100%);
}

/* Pânza pentru particule, artificii, scântei */
#afxCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
/* Artificiile trebuie să treacă peste sigiliul final */
#afxCanvas.afx-front { z-index: 120; }

/* ---------- 2. Raza de lumină la deschiderea plicului ---------- */
.afx-lightburst {
  position: absolute;
  top: 120px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 14;
  box-shadow: 0 0 120px 60px rgba(255, 240, 200, 0.55);
  opacity: 0;
}
.afx-lightburst.afx-go { animation: afx-burst 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes afx-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); }
}

/* ---------- 3. Sigiliul: puls + luciu metalic ---------- */
.wax-seal { animation: afx-seal-pulse 2.6s ease-in-out infinite; }
.wax-seal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg,
              transparent 35%,
              rgba(255, 255, 255, 0.75) 50%,
              transparent 65%);
  background-size: 260% 260%;
  animation: afx-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes afx-seal-pulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 0 0 rgba(255, 225, 150, 0.45); }
  55%      { box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 0 18px rgba(255, 225, 150, 0); }
}
@keyframes afx-shine {
  0%   { background-position: 200% 0; }
  60%  { background-position: -80% 0; }
  100% { background-position: -80% 0; }
}
.envelope-box.opened .wax-seal { animation: none; }

/* Indiciu discret sub plic, dispare la deschidere */
.afx-hint {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  z-index: 12;
  pointer-events: none;
  animation: afx-hint-float 2.4s ease-in-out infinite;
  transition: opacity 0.5s ease;
}
.envelope-box.opened .afx-hint { opacity: 0; }
@keyframes afx-hint-float {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50%      { transform: translateX(-50%) translateY(5px); opacity: 1; }
}

/* ---------- 4. Apariție la derulare ---------- */
.afx-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.afx-reveal.afx-in { opacity: 1; transform: none; }

/* ---------- 5. Blocul de dată + numărătoare inversă ---------- */
.afx-date {
  margin: 0 auto 34px;
  max-width: 460px;
  text-align: center;
}
.afx-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--afx-accent);
}
.afx-rule::before, .afx-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 110px;
  background: linear-gradient(90deg, transparent, currentColor);
}
.afx-rule::after { background: linear-gradient(90deg, currentColor, transparent); }
.afx-rule span { font-size: 0.9rem; line-height: 1; }

.afx-date-main {
  font-size: 0.82rem;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 4px;
}
.afx-date-time {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 18px;
}

.afx-countdown {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.afx-cd-slot {
  min-width: 62px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.afx-cd-num {
  display: block;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--afx-accent);
  font-variant-numeric: tabular-nums;
}
.afx-cd-lab {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 6px;
}
.afx-today {
  font-size: 1.05rem;
  letter-spacing: 1px;
  color: var(--afx-accent);
  margin-bottom: 18px;
}

.afx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.afx-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 30px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: inherit;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease;
}
.afx-btn:hover, .afx-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--afx-accent);
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ---------- 6. Bara plutitoare (sunet / partajare / sus) ---------- */
.afx-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.afx-dock button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(22, 17, 15, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f6e9cd;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.afx-dock button:hover, .afx-dock button:focus-visible {
  transform: translateY(-3px) scale(1.06);
  background: var(--afx-accent);
  color: #1d1505;
}
.afx-dock button[hidden] { display: none; }

/* ---------- 7. Notificare scurtă ---------- */
.afx-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 24px);
  z-index: 200;
  padding: 12px 22px;
  border-radius: 30px;
  background: rgba(22, 17, 15, 0.92);
  color: #f7ecd6;
  font-size: 0.78rem;
  letter-spacing: 1px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.afx-toast.afx-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 8. Lupă foto (lightbox) ---------- */
.afx-zoomable { cursor: zoom-in; }
.afx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 8, 7, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  cursor: zoom-out;
}
.afx-lightbox.afx-show { opacity: 1; pointer-events: auto; }
.afx-lightbox img {
  max-width: min(92vw, 720px);
  max-height: 86vh;
  border-radius: 14px;
  border: 5px solid #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.afx-lightbox.afx-show img { transform: scale(1); }

/* ---------- 9. Insignă „mod demo” pentru formular ---------- */
.afx-demo-note {
  display: block;
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.6px;
  text-align: center;
  opacity: 0.6;
  line-height: 1.5;
}

/* ---------- 10. Carduri din catalog: intrare pe rând ---------- */
.afx-stagger { transition-delay: calc(var(--afx-i, 0) * 90ms); }

/* ---------- 11. Respectă preferința de mișcare redusă ---------- */
@media (prefers-reduced-motion: reduce) {
  .afx-smoke, .afx-smoke i, .wax-seal, .wax-seal::after, .afx-hint {
    animation: none !important;
  }
  .afx-reveal { opacity: 1; transform: none; transition: none; }
  #afxCanvas { display: none; }
}

/* ---------- 12. Ajustări mobil ---------- */
@media (max-width: 600px) {
  .afx-dock { right: 10px; bottom: 10px; }
  .afx-dock button { width: 40px; height: 40px; font-size: 0.92rem; }
  .afx-cd-slot { min-width: 54px; }
  .afx-cd-num { font-size: 1.28rem; }
  .afx-vignette { background: radial-gradient(ellipse at 50% 42%, transparent 50%, rgba(0,0,0,0.32) 100%); }
}

/* =====================================================================
   ARPY FX v2 — module suplimentare
   ===================================================================== */

/* ---------- Apariție cu blur progresiv ---------- */
.afx-reveal { filter: blur(6px); transition-property: opacity, transform, filter; }
.afx-reveal.afx-in { filter: blur(0); }

/* ---------- Efect de mașină de scris ---------- */
.afx-type { white-space: pre-wrap; }
.afx-type .afx-char { opacity: 0; transition: opacity 0.25s ease; }
.afx-type .afx-char.afx-on { opacity: 1; }
.afx-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  vertical-align: -0.12em;
  background: currentColor;
  margin-left: 2px;
  animation: afx-blink 1s step-end infinite;
}
@keyframes afx-blink { 50% { opacity: 0; } }

/* ---------- Micro-interacțiuni: arc / bounce ---------- */
.afx-btn, .btn-send, .btn-send-invitation, .afx-dock button,
button[type="submit"], .btn-open, .btn-portal {
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.24s ease, background 0.24s ease,
              color 0.24s ease, border-color 0.24s ease;
}
.afx-press { transform: scale(0.94) !important; }
.afx-spring { animation: afx-spring 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes afx-spring {
  0%   { transform: scale(0.94); }
  45%  { transform: scale(1.045); }
  100% { transform: scale(1); }
}

/* ---------- Bannerul de bun venit pentru invitatul nominalizat ---------- */
.afx-guest {
  margin: 0 auto 26px;
  max-width: 470px;
  padding: 16px 22px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.55));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  text-align: center;
}
.afx-guest-hi {
  font-size: 0.66rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 6px;
}
.afx-guest-name {
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--afx-accent);
  font-family: inherit;
}
.afx-guest-msg { font-size: 0.85rem; opacity: 0.7; margin-top: 6px; }

/* ---------- Meniu de calendar ---------- */
.afx-menu-wrap { position: relative; display: inline-flex; }
.afx-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  min-width: 190px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  padding: 6px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.afx-menu.afx-show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.afx-menu a, .afx-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 9px;
  font: inherit;
  font-size: 0.78rem;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.afx-menu a:hover, .afx-menu button:hover { background: rgba(0, 0, 0, 0.05); }

/* ---------- Cartea de oaspeți ---------- */
.afx-guestbook {
  margin-top: 34px;
  padding: 30px 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}
.afx-gb-title {
  font-size: 1.55rem;
  text-align: center;
  color: var(--afx-accent);
  margin-bottom: 4px;
  font-family: inherit;
}
.afx-gb-sub {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.65;
  margin-bottom: 20px;
}
.afx-gb-form { display: grid; gap: 10px; margin-bottom: 20px; }
.afx-gb-form input, .afx-gb-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  resize: vertical;
}
.afx-gb-form textarea { min-height: 84px; }
.afx-gb-send {
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--afx-accent);
  color: #fff;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}
.afx-gb-list { display: grid; gap: 12px; max-height: 330px; overflow-y: auto; }
.afx-gb-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.afx-gb-who { font-size: 0.72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--afx-accent); font-weight: 700; }
.afx-gb-msg { font-size: 0.92rem; line-height: 1.55; margin-top: 5px; }
.afx-gb-when { font-size: 0.64rem; opacity: 0.45; margin-top: 6px; }
.afx-gb-empty { text-align: center; font-size: 0.85rem; opacity: 0.55; padding: 14px; }

/* ---------- Invitație la muzică ---------- */
.afx-music-prompt {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: 40px;
  background: rgba(22, 17, 15, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #f7ecd6;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.afx-music-prompt.afx-show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.afx-music-prompt b { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.6px; }
.afx-music-prompt small { display: block; font-size: 0.64rem; opacity: 0.6; margin-top: 2px; }
.afx-music-note {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--afx-accent);
  color: #1d1505;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex: 0 0 auto;
  animation: afx-seal-pulse 2.2s ease-in-out infinite;
}
.afx-music-x {
  background: none; border: 0; color: inherit; opacity: 0.45;
  font-size: 1rem; cursor: pointer; padding: 0 2px;
}

/* ---------- Filtre de colecție ---------- */
.afx-filters {
  position: relative;
  z-index: 3;
  max-width: 1250px;
  margin: 26px auto 6px;
  padding: 0 20px;
}
.afx-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.afx-filter-lab {
  font-size: 0.62rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
}
.afx-chip {
  padding: 7px 15px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.afx-chip:hover { border-color: var(--afx-accent); color: #fff; }
.afx-chip.afx-active {
  background: var(--afx-accent);
  border-color: var(--afx-accent);
  color: #15100a;
}
.afx-count {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 1.6px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
}
.afx-hidden-card { display: none !important; }

/* ---------- Bară de navigare comună ---------- */
.afx-nav {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 16px 12px 0;
}
.afx-nav a {
  padding: 7px 15px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}
.afx-nav a:hover, .afx-nav a[aria-current="page"] {
  background: var(--afx-accent);
  border-color: var(--afx-accent);
  color: #15100a;
}

@media (prefers-reduced-motion: reduce) {
  .afx-reveal { filter: none; }
  .afx-music-note { animation: none; }
}

/* ---------- Varianta pentru modele cu fundal închis ---------- */
body[data-afx-dark="1"] .afx-cd-slot {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
body[data-afx-dark="1"] .afx-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
body[data-afx-dark="1"] .afx-btn:hover,
body[data-afx-dark="1"] .afx-btn:focus-visible {
  background: var(--afx-accent);
  border-color: var(--afx-accent);
  color: #12100c;
}
body[data-afx-dark="1"] .afx-guest,
body[data-afx-dark="1"] .afx-guestbook,
body[data-afx-dark="1"] .afx-gb-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
body[data-afx-dark="1"] .afx-gb-form input,
body[data-afx-dark="1"] .afx-gb-form textarea {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
body[data-afx-dark="1"] .afx-menu {
  background: #1b1f28;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
body[data-afx-dark="1"] .afx-menu a:hover,
body[data-afx-dark="1"] .afx-menu button:hover { background: rgba(255, 255, 255, 0.1); }
