/* Intro overlay — variante: seal (default) | drawn | curtain | none.
   Preview: index.html?intro=seal / ?intro=drawn / ?intro=curtain / ?intro=none */

.intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #f8f5ef 0, #eee7dc 55%, #e2d7c7 100%);
}
html:not([data-intro]) .intro { display: none; }
html[data-intro] body { overflow: hidden; }

.intro-gate {
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  color: var(--ink);
  font-family: var(--font-text);
  position: relative;
  z-index: 2;
  padding: 40px;
  transition: opacity .45s ease;
}
.intro-monogram {
  width: min(230px, 50vw);
  height: 230px;
  object-fit: cover;
  object-position: 50% 33%;
  mix-blend-mode: multiply;
  margin-bottom: -46px;
}
.intro-names {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  text-transform: uppercase;
  letter-spacing: .19em;
  padding-left: .19em;
  margin-top: 18px;
}
.intro-names i { font-style: normal; color: var(--gold); font-size: .6em; }
.intro-rule { width: 54px; height: 1px; background: var(--gold); margin: 26px 0; }
.intro-cta {
  font-variant-caps: all-small-caps;
  font-size: 14px;
  letter-spacing: .22em;
  color: var(--muted);
  animation: intro-breathe 3.2s ease-in-out infinite;
}
@keyframes intro-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.intro-gate:hover .intro-cta, .intro-gate:focus-visible .intro-cta { opacity: 1; animation: none; }
.intro-gate:focus-visible { outline: 1px solid var(--bronze); outline-offset: 6px; }

/* Cadrul vine acum din desenul arcadei; la curtain rămâne unul propriu. */
html[data-intro="curtain"] .intro::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--hairline-soft);
  outline: 1px solid rgba(128, 106, 71, .12);
  outline-offset: 4px;
  pointer-events: none;
}

/* ---------- Varianta 1: seal — overlay-ul se ridică ---------- */
html[data-intro="seal"].intro-open .intro {
  transform: translateY(-100%);
  transition: transform 1.15s cubic-bezier(.72, 0, .22, 1) .2s;
}
html[data-intro="seal"].intro-open .intro-gate { opacity: 0; }

/* ---------- Varianta 2: drawn — monograma „aurită" prin sheen wipe ---------- */
html[data-intro="drawn"] .intro-monogram {
  -webkit-mask-image: linear-gradient(115deg, #000 46%, rgba(0,0,0,0) 54%);
  mask-image: linear-gradient(115deg, #000 46%, rgba(0,0,0,0) 54%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  animation: intro-gild 2.1s cubic-bezier(.5, 0, .3, 1) .3s backwards;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}
@keyframes intro-gild {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
html[data-intro="drawn"] .intro-names { animation: intro-fade .9s ease 1.7s backwards; }
html[data-intro="drawn"] .intro-rule,
html[data-intro="drawn"] .intro-cta { animation: intro-fade .9s ease 2.2s backwards, intro-breathe 3.2s ease-in-out 3.1s infinite; }
html[data-intro="drawn"] .intro-rule { animation: intro-fade .9s ease 2.2s backwards; }
@keyframes intro-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
html[data-intro="drawn"].intro-open .intro {
  opacity: 0;
  transition: opacity .9s ease .15s;
}

/* ---------- Varianta 3: curtain — panouri care se despart ---------- */
html[data-intro="curtain"] .intro { background: transparent; }
.intro-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.1%;
  display: none;
}
html[data-intro="curtain"] .intro-curtain { display: block; }
.intro-left { left: 0; background: linear-gradient(100deg, #f8f5ef 0, #eee7dc 70%, #e6dccc 100%); }
.intro-right { right: 0; background: linear-gradient(260deg, #f8f5ef 0, #eee7dc 70%, #e6dccc 100%); }
.intro-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--gold);
  opacity: 0;
  display: none;
  transform: scaleY(0);
  transform-origin: top;
}
html[data-intro="curtain"] .intro-seam { display: block; }
html[data-intro="curtain"].intro-open .intro-seam {
  opacity: .8;
  transform: scaleY(1);
  transition: transform .55s cubic-bezier(.6, 0, .3, 1), opacity .2s ease;
}
html[data-intro="curtain"].intro-open .intro-gate { opacity: 0; transition-delay: .25s; }
html[data-intro="curtain"].intro-open .intro-left {
  transform: translateX(-101%);
  transition: transform 1.25s cubic-bezier(.72, 0, .22, 1) .55s;
}
html[data-intro="curtain"].intro-open .intro-right {
  transform: translateX(101%);
  transition: transform 1.25s cubic-bezier(.72, 0, .22, 1) .55s;
}
html[data-intro="curtain"].intro-open .intro::after,
html[data-intro="curtain"].intro-open .intro-seam { opacity: 0; transition: opacity .5s ease .6s; }

/* ---------- Cascada hero după deschidere ---------- */
html[data-intro] .hero-content > * { opacity: 0; transform: translateY(16px); }
html.intro-open .hero-content > * {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .8s ease;
}
html.intro-open .hero-content > *:nth-child(1) { transition-delay: .75s; }
html.intro-open .hero-content > *:nth-child(2) { transition-delay: .9s; }
html.intro-open .hero-content > *:nth-child(3) { transition-delay: 1.05s; }
html.intro-open .hero-content > *:nth-child(4) { transition-delay: 1.2s; }
html.intro-open .hero-content > *:nth-child(5) { transition-delay: 1.35s; }
html.intro-open .hero-content > *:nth-child(6) { transition-delay: 1.5s; }

@media (prefers-reduced-motion: reduce) {
  .intro, .intro * , .intro::after { animation: none !important; transition: none !important; }
  html.intro-open .intro { display: none; }
  html[data-intro] .hero-content > *, html.intro-open .hero-content > * {
    opacity: 1; transform: none; transition: none;
  }
}
