/**
 * Vstupní brána — bez viditelného UI: cream, posvátná geometrie, pomalý „bloom“ (přiblížení),
 * hexové kruhy + particles (interactive-particle-glow, MIT).
 */
html:not(.verca-entry-done) body {
  overflow: hidden;
}

.verca-entry-gate {
  position: fixed;
  inset: 0;
  /* Nad #verca-transition (2147483000), aby úvod nezmizel pod přechodem ani při návratu na index */
  z-index: 2147483646;
  isolation: isolate;
  display: block;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 120% 90% at 20% 15%, rgba(255, 236, 210, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse 100% 80% at 88% 75%, rgba(232, 196, 181, 0.35) 0%, transparent 48%),
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(168, 194, 174, 0.12) 0%, transparent 45%),
    linear-gradient(168deg, #f7f4ee 0%, #f0ebe3 42%, #e8e4dc 100%);
  /* Default kurzor (klasická šípka) — krížikový crosshair bol rušivý/technický.
     Default je neutrálny — neťahá pozornosť na klik (auto-enter za 10s spraví vstup sám). */
  cursor: default;
  opacity: 1;
  outline: none;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.verca-entry-gate:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(184, 100, 71, 0.35);
}

.verca-entry-gate__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Vertikálne centrovaný úvodný copy block — text "dýcha" v strede viewportu,
   bloom orb a kruhy ostávajú pod ním ako vizuálne pozadie. */
.verca-entry-gate__center {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Padding zhora aj zdola zabezpečí, že na malých displejoch text nelipne k okraju
     a má priestor pre cookies notice dole. */
  padding: clamp(2rem, 8vh, 4rem) max(16px, env(safe-area-inset-right))
    clamp(7rem, 18vh, 11rem) max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

/* Bottom zóna — cookies notice + auto-enter progress bar */
.verca-entry-gate__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);
  padding: 0 max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

/* Subtilný auto-enter progress — 10s lineárny fill, jemný náznak "niečo sa deje" */
.verca-entry-gate__autoenter {
  width: min(220px, 60vw);
  height: 2px;
  border-radius: 999px;
  background: rgba(58, 38, 32, 0.08);
  overflow: hidden;
  pointer-events: none;
}
.verca-entry-gate__autoenter-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(184, 100, 71, 0.55),
    var(--terracotta-mid, #c97b5c),
    rgba(201, 123, 92, 0.85)
  );
  animation: verca-entry-autoenter-fill 10s linear forwards;
  animation-delay: 2.5s; /* nech text najprv "dosadne" cez stagger animations */
}
@keyframes verca-entry-autoenter-fill {
  from { width: 0; }
  to { width: 100%; }
}
.reduce-motion .verca-entry-gate__autoenter {
  display: none;
}

.verca-entry-gate__copy {
  position: relative;
  width: min(36rem, 100%);
  text-align: center;
  z-index: 1;
  pointer-events: none;
  animation: verca-entry-copy-in 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

/* Západ slunce pod textem — čitelnost + návaznost na hero / terrakotové akcenty.
   Pridaná jasnejšia stredná vrstva (cream glow) pre lepšiu čitateľnosť lead textu
   bez nutnosti pevného scrim-u/boxu, ktorý by narušil organický pocit. */
.verca-entry-gate__copy::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 122%;
  height: 175%;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background:
    /* Cream glow stred — lifne text z textúrovaného pozadia */
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(252, 248, 240, 0.62) 0%, rgba(252, 248, 240, 0.32) 38%, transparent 65%),
    /* Originálne sunset vrstvy (slabšie aby cream stred dominoval) */
    radial-gradient(ellipse 72% 55% at 50% 88%, rgba(255, 196, 160, 0.38) 0%, transparent 58%),
    radial-gradient(ellipse 90% 70% at 22% 30%, rgba(255, 214, 188, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 88% 22%, rgba(232, 160, 130, 0.18) 0%, transparent 50%),
    linear-gradient(168deg, rgba(255, 248, 240, 0.14) 0%, rgba(58, 38, 32, 0.06) 100%);
  filter: blur(0.5px);
}

@keyframes verca-entry-copy-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reduce-motion .verca-entry-gate__copy {
  animation: none;
  opacity: 1;
}

/* ── Brand titulok (Esencia Viva) — najväčšia hierarchická úroveň ── */
.verca-entry-gate__brand {
  margin: 0 0 clamp(1rem, 2.6vw, 1.6rem);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2.6rem, 9.5vw, 4.4rem);
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--wine-deep, #241e19);
  background-image: linear-gradient(
    102deg,
    var(--wine, #3a3128) 0%,
    var(--terracotta, #b86447) 32%,
    var(--bloom-coral, #d4a088) 55%,
    var(--terracotta-mid, #c97b5c) 78%,
    var(--wine, #3a3128) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(255, 200, 168, 0.5)) drop-shadow(0 2px 12px rgba(58, 36, 28, 0.12));
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .verca-entry-gate__brand {
    background: none;
    -webkit-text-fill-color: unset;
    color: var(--terracotta, #b86447);
    filter: none;
  }
}

/* ── Pozdrav od Verci (krátky text) — Cormorant italic so silnejším kontrastom.
   Pôvodne bol text málo čitateľný (tenké italic ťahy na textúre). Riešenie:
   bump weight 400→500, tmavšia farba, väčší size, viacvrstvový text-shadow
   ako jemné "halo" čo lifne text z pozadia bez agresívneho boxu. ── */
.verca-entry-gate__lead {
  margin: 0 auto clamp(0.85rem, 1.8vw, 1.15rem);
  max-width: min(34rem, 94vw);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.85vw, 1.55rem);
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: #2a221b;
  text-wrap: balance;
  /* Cream halo — text "vyskočí" z textúrovaného pozadia bez nutnosti boxu/scrim */
  text-shadow:
    0 0 1px rgba(247, 244, 238, 0.95),
    0 0 8px rgba(247, 244, 238, 0.85),
    0 0 16px rgba(247, 244, 238, 0.6),
    0 1px 0 rgba(255, 252, 246, 0.75);
}

/* ── Signatúra "— Verca" — handwritten Caveat, čitateľnejšia ── */
.verca-entry-gate__signature {
  margin: 0 auto clamp(1.65rem, 3.8vw, 2.2rem);
  font-family: var(--font-accent, 'Caveat', cursive);
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 600;
  color: var(--terracotta, #b86447);
  letter-spacing: 0.02em;
  text-shadow:
    0 0 1px rgba(247, 244, 238, 0.9),
    0 0 8px rgba(247, 244, 238, 0.7);
}

/* ── Stagger animations — texty sa zjavujú postupne, nie všetko naraz.
   Override: rodič .verca-entry-gate__copy mal vlastnú opacity animáciu — vypneme ju
   a každý child má vlastnú stagger animáciu s rastúcimi delays.
   Vďaka tomu má príchod meditatívne tempo: brand → text → signatúra → Vstoupit. ── */
.verca-entry-gate__copy {
  animation: none !important;
  opacity: 1;
  transform: none;
}

.verca-entry-gate__brand,
.verca-entry-gate__lead,
.verca-entry-gate__signature {
  opacity: 0;
  transform: translateY(12px);
  animation: verca-entry-stagger-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.verca-entry-gate__brand { animation-delay: 0.45s; }
.verca-entry-gate__lead { animation-delay: 0.95s; }
.verca-entry-gate__signature { animation-delay: 1.55s; }

@keyframes verca-entry-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reduce-motion .verca-entry-gate__brand,
.reduce-motion .verca-entry-gate__lead,
.reduce-motion .verca-entry-gate__signature {
  animation: none;
  opacity: 1;
  transform: none;
}

.verca-entry-gate__cookies {
  pointer-events: auto;
  max-width: 34rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  text-align: center;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    rgba(255, 248, 240, 0.52) 0%,
    rgba(255, 220, 196, 0.28) 45%,
    rgba(232, 196, 181, 0.22) 100%
  );
  border: 1px solid rgba(184, 100, 71, 0.22);
  box-shadow: 0 4px 28px rgba(58, 36, 28, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.verca-entry-gate__cookies-text {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: clamp(0.68rem, 2vw, 0.8rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(58, 49, 42, 0.88);
}

.verca-entry-gate__cookies a {
  color: var(--terracotta, #b86447);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.verca-entry-gate__cookies a:hover {
  color: var(--terracotta-mid, #c97b5c);
}

.verca-entry-gate__cookies a:focus-visible {
  outline: 2px solid var(--terracotta, #b86447);
  outline-offset: 3px;
  border-radius: 4px;
}

.reduce-motion .verca-entry-gate__cookies {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ═══ MOBILNÁ OPTIMALIZÁCIA ═══
   Na malých telefónoch (iPhone SE, malé Androidy) potrebujeme:
   - Menší vertikálny gap, aby všetko sedelo aj pri 568px viewport height
   - Lead text trochu väčší relatívne (na úkor brand-u) — lepšie sa číta
   - Cookies notice kompaktnejší
   - Bloom orb a kruhy nech sa neroztiahnu mimo viewport */
@media (max-width: 640px) {
  .verca-entry-gate__center {
    padding: clamp(1.25rem, 5vh, 2rem) max(14px, env(safe-area-inset-right))
      clamp(5.5rem, 14vh, 7.5rem) max(14px, env(safe-area-inset-left));
  }
  .verca-entry-gate__brand {
    font-size: clamp(2.3rem, 10.5vw, 3.2rem);
    margin-bottom: clamp(0.85rem, 2.4vw, 1.25rem);
    letter-spacing: 0.04em;
  }
  .verca-entry-gate__lead {
    font-size: clamp(1.1rem, 4.6vw, 1.35rem);
    line-height: 1.55;
    max-width: 92vw;
    margin-bottom: clamp(0.65rem, 1.5vw, 0.9rem);
  }
  .verca-entry-gate__signature {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    margin-bottom: 0;
  }
  .verca-entry-gate__cookies {
    padding: 0.45rem 0.75rem;
  }
  .verca-entry-gate__cookies-text {
    font-size: 11.5px;
    line-height: 1.45;
  }
  .verca-entry-gate__autoenter {
    width: min(180px, 56vw);
  }
}

/* Extra malé viewport (iPhone SE 1st gen, malý Android landscape) */
@media (max-height: 600px) {
  .verca-entry-gate__center {
    padding-top: clamp(0.85rem, 3vh, 1.5rem);
    padding-bottom: clamp(4.5rem, 11vh, 6rem);
  }
  .verca-entry-gate__brand {
    font-size: clamp(2rem, 8vh, 2.8rem);
    margin-bottom: clamp(0.5rem, 1.5vh, 0.85rem);
  }
  .verca-entry-gate__lead {
    font-size: clamp(1rem, 3vh, 1.2rem);
    line-height: 1.5;
    margin-bottom: clamp(0.5rem, 1.5vh, 0.85rem);
  }
  .verca-entry-gate__signature {
    font-size: clamp(1.1rem, 2.8vh, 1.35rem);
  }
}

/* Dlaždice květ + hex */
.verca-entry-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: var(--verca-geo-tile, none);
  background-size: 74px 74px;
  background-repeat: repeat;
  background-position: 0 0;
  animation: verca-entry-geo-drift 61.8s linear infinite;
}

.verca-entry-gate::after {
  content: '';
  position: absolute;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: var(--verca-geo-tile, none);
  background-size: 98px 98px;
  background-repeat: repeat;
  background-position: 40% 30%;
  transform: rotate(30deg);
  transform-origin: 50% 45%;
  animation: verca-entry-geo-spin 157.08s linear infinite;
}

@keyframes verca-entry-geo-drift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 120px 72px;
  }
}

@keyframes verca-entry-geo-spin {
  from {
    transform: rotate(30deg);
  }
  to {
    transform: rotate(390deg);
  }
}

html.verca-entry-done .verca-entry-gate {
  display: none !important;
  pointer-events: none;
}

.verca-entry-gate.verca-entry-gate--out {
  opacity: 0;
  pointer-events: none;
}

.verca-entry-gate__glow-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Centrální bloom: začíná „daleko“ (malý, rozmazaný, slabý) → pomalu se přiblíží */
.verca-entry-gate__bloom {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(150vmin, 920px);
  height: min(150vmin, 920px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle at 48% 46%,
    rgba(255, 248, 240, 0.82) 0%,
    rgba(245, 214, 188, 0.46) 22%,
    rgba(232, 188, 160, 0.22) 42%,
    rgba(240, 228, 215, 0.06) 58%,
    transparent 72%
  );
  animation: verca-entry-bloom-approach 36s ease-in-out infinite alternate;
}

@keyframes verca-entry-bloom-approach {
  0% {
    transform: translate(-50%, -50%) scale(0.52);
    opacity: 0.32;
    filter: blur(22px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
    filter: blur(0px);
  }
}

.verca-entry-gate__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  pointer-events: none;
  z-index: 0;
}

.verca-entry-gate__orb--1 {
  width: min(120vmin, 720px);
  height: min(120vmin, 720px);
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at 42% 42%,
    rgba(232, 165, 133, 0.52) 0%,
    rgba(201, 123, 92, 0.18) 42%,
    transparent 68%
  );
  animation: verca-entry-orb-breathe 42s ease-in-out infinite alternate;
}

.verca-entry-gate__orb--2 {
  width: min(95vmin, 560px);
  height: min(95vmin, 560px);
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at 55% 48%,
    rgba(168, 194, 174, 0.36) 0%,
    rgba(90, 114, 96, 0.12) 45%,
    transparent 70%
  );
  animation: verca-entry-orb-breathe-sage 34s ease-in-out infinite alternate;
}

@keyframes verca-entry-orb-breathe {
  0% {
    transform: translate(-50%, -50%) scale(0.62);
    opacity: 0.48;
    filter: blur(12px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.04) translate(0.8%, -0.5%);
    opacity: 0.96;
    filter: blur(0px);
  }
}

@keyframes verca-entry-orb-breathe-sage {
  0% {
    transform: translate(-50%, -50%) scale(0.68);
    opacity: 0.4;
    filter: blur(10px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.08) translate(-0.6%, 0.4%);
    opacity: 0.88;
    filter: blur(0px);
  }
}

.verca-entry-gate__rings {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(104vmin, 620px);
  height: min(104vmin, 620px);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.verca-entry-gate__ring {
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(44, 56, 48, 0.14);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transform-origin: 50% 50%;
  animation: verca-entry-ring-rotate 76.38s linear infinite;
  opacity: 0.55;
}

.verca-entry-gate__ring--inner {
  inset: 18%;
  border-color: rgba(184, 100, 71, 0.2);
  animation-duration: 47.2s;
  animation-direction: reverse;
  opacity: 0.65;
}

@keyframes verca-entry-ring-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.reduce-motion .verca-entry-gate::before,
.reduce-motion .verca-entry-gate::after {
  animation: none;
}

.reduce-motion .verca-entry-gate__ring,
.reduce-motion .verca-entry-gate__ring--inner {
  animation: none;
}

/* Semínko života — jemný kruhový vzor (doplněk k dlaždici) */
.verca-entry-gate__seed {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(78vmin, 480px);
  height: min(78vmin, 480px);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 240, 0.35) 0%, transparent 42%),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20200%20200%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23a08068%22%20stroke-width%3D%220.55%22%20opacity%3D%220.9%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%22100%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2278%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%22119%22%20cy%3D%2289%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%22119%22%20cy%3D%22111%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%22122%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%2281%22%20cy%3D%22111%22%20r%3D%2222%22%2F%3E%3Ccircle%20cx%3D%2281%22%20cy%3D%2289%22%20r%3D%2222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
    center / contain no-repeat;
  animation: verca-entry-seed-breathe 52s ease-in-out infinite alternate;
}

@keyframes verca-entry-seed-breathe {
  0% {
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 0.2;
  }
}

/* Květy podél čar ke kurzoru (canvas overlay) */
.verca-entry-gate__line-adorn {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.reduce-motion .verca-entry-gate__bloom,
.reduce-motion .verca-entry-gate__orb--1,
.reduce-motion .verca-entry-gate__orb--2 {
  animation: none;
  opacity: 0.75;
  filter: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.reduce-motion .verca-entry-gate__seed {
  animation: none;
  opacity: 0.14;
  transform: translate(-50%, -50%) scale(0.96);
}

#verca-entry-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

#verca-entry-particles canvas {
  display: block;
}
