/* ░░ UNDER CONSTRUCTION — Frost-tech blueprint overlay ░░
   Aktívne len keď construction.js nastaví na <html> triedu .uc-on.
   Keď je vypnuté (UC_ON=false), tieto pravidlá sa neuplatnia — web je normálny. */

/* skry reálny web, drž tmavé pozadie (žiadny FOUC), zablokuj scroll */
html.uc-on { background: #060912; }
html.uc-on, html.uc-on body { overflow: hidden; height: 100%; }
html.uc-on body { visibility: hidden; }
html.uc-on #uc { visibility: visible; }

#uc {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: #E6EDF5;
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(120% 95% at 50% 28%, #16203c 0%, #0b1020 62%, #060912 100%);
  -webkit-tap-highlight-color: transparent;
}

/* blueprint mriežka */
#uc .uc-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(129,140,248,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129,140,248,0.10) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(120% 90% at 50% 35%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 35%, #000 55%, transparent 100%);
  animation: uc-grid-pan 9s linear infinite;
}

/* skenovacia línia */
#uc .uc-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #38BDF8, #22D3EE, transparent);
  box-shadow: 0 0 18px 2px rgba(56,189,248,0.55);
  opacity: 0.8; animation: uc-scan 3.6s cubic-bezier(.5,0,.5,1) infinite;
}

/* stage */
#uc .uc-stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; padding: 28px; width: min(620px, 92vw); text-align: center;
}

/* wireframe „stránka sa stavia" */
#uc .uc-wire {
  width: 100%; max-width: 440px; aspect-ratio: 16 / 10;
  border: 1px dashed rgba(56,189,248,0.45); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  position: relative; background: rgba(11,16,32,0.4);
}
/* rohové crop-marky (blueprint feel) */
#uc .uc-wire::before, #uc .uc-wire::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid rgba(34,211,238,0.7);
}
#uc .uc-wire::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
#uc .uc-wire::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

#uc .uc-w {
  border: 1px solid rgba(56,189,248,0.40);
  background: linear-gradient(120deg, rgba(56,189,248,0.10), rgba(129,140,248,0.10));
  border-radius: 7px; opacity: 0;
  animation: uc-snap 4s ease infinite;
}
#uc .uc-w-nav  { height: 14%; animation-delay: 0s; }
#uc .uc-w-hero { flex: 1; animation-delay: .45s; }
#uc .uc-row { display: flex; gap: 12px; height: 30%; }
#uc .uc-w-card { flex: 1; height: 100%; animation-delay: .9s; }
#uc .uc-w-card2 { animation-delay: 1.2s; }

/* zváraná vločka */
#uc .uc-flake { width: 64px; height: 64px; filter: drop-shadow(0 0 12px rgba(56,189,248,0.5)); }
#uc .uc-flake line { stroke-dasharray: 30; stroke-dashoffset: 30; animation: uc-draw 4s ease infinite; }
#uc .uc-flake circle { opacity: 0; animation: uc-spark 4s ease infinite; }

/* glitch nadpis */
#uc .uc-title {
  position: relative; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.8rem, 7vw, 3rem); letter-spacing: 3px; line-height: 1;
  background: linear-gradient(120deg, #38BDF8, #818CF8, #22D3EE);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
#uc .uc-title::before, #uc .uc-title::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  -webkit-background-clip: text; background-clip: text;
}
#uc .uc-title::before { color: #22D3EE; -webkit-text-fill-color: #22D3EE; animation: uc-glitch-a 2.6s steps(2) infinite; }
#uc .uc-title::after  { color: #818CF8; -webkit-text-fill-color: #818CF8; animation: uc-glitch-b 3.1s steps(2) infinite; }

#uc .uc-sub { color: #9fb0c7; font-size: clamp(.9rem, 2.4vw, 1.05rem); margin-top: -6px; }

/* progress bar */
#uc .uc-bar {
  width: min(360px, 80vw); height: 8px; border-radius: 99px;
  background: rgba(129,140,248,0.14); overflow: hidden; border: 1px solid rgba(56,189,248,0.25);
}
#uc .uc-bar-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #38BDF8, #818CF8, #22D3EE);
  box-shadow: 0 0 12px rgba(56,189,248,0.6);
  animation: uc-fill 4s cubic-bezier(.5,.1,.4,1) infinite;
}
#uc .uc-pct { font-family: 'Space Grotesk', sans-serif; font-size: .85rem; letter-spacing: 2px; color: #38BDF8; }

/* úvodné logo (brand) v overlayi */
#uc .uc-brand { display: flex; align-items: center; gap: 12px; }
#uc .uc-brand .uc-flake { width: 46px; height: 46px; }
#uc .uc-brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(1.2rem, 3.6vw, 1.7rem); letter-spacing: 2px; color: #E6EDF5; }
#uc .uc-brand-name span { background: linear-gradient(120deg, #38BDF8, #818CF8, #22D3EE); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* odpočet do spustenia */
#uc .uc-count {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 5rem); letter-spacing: 3px; line-height: 1;
  background: linear-gradient(120deg, #38BDF8, #818CF8, #22D3EE);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  margin: 2px 0; font-variant-numeric: tabular-nums;
}

@keyframes uc-grid-pan { to { background-position: 40px 40px; } }
@keyframes uc-scan { 0% { top: -2%; opacity: 0; } 12% { opacity: .85; } 88% { opacity: .85; } 100% { top: 102%; opacity: 0; } }
@keyframes uc-snap {
  0%   { opacity: 0; transform: translateY(14px) scale(.94); }
  10%  { opacity: 1; transform: translateY(0) scale(1); }
  82%  { opacity: 1; transform: translateY(0) scale(1); }
  94%, 100% { opacity: 0; transform: translateY(-8px) scale(.98); }
}
@keyframes uc-draw { 0% { stroke-dashoffset: 30; } 45% { stroke-dashoffset: 0; } 86% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 30; } }
@keyframes uc-spark { 0%,40% { opacity: 0; } 48% { opacity: 1; } 60% { opacity: .5; } 86% { opacity: .5; } 100% { opacity: 0; } }
@keyframes uc-fill { 0% { width: 0; } 82% { width: 100%; } 100% { width: 100%; } }
@keyframes uc-glitch-a {
  0%,100% { transform: none; clip-path: inset(0 0 0 0); }
  20% { transform: translate(-2px,1px); clip-path: inset(0 0 62% 0); }
  40% { transform: translate(2px,-1px); clip-path: inset(58% 0 0 0); }
}
@keyframes uc-glitch-b {
  0%,100% { transform: none; clip-path: inset(0 0 0 0); }
  25% { transform: translate(2px,-1px); clip-path: inset(40% 0 30% 0); }
  55% { transform: translate(-2px,1px); clip-path: inset(70% 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  #uc .uc-grid, #uc .uc-scan, #uc .uc-w, #uc .uc-flake line, #uc .uc-flake circle,
  #uc .uc-title::before, #uc .uc-title::after, #uc .uc-bar-fill { animation: none; }
  #uc .uc-w { opacity: 1; }
  #uc .uc-flake line { stroke-dashoffset: 0; }
  #uc .uc-flake circle { opacity: 1; }
  #uc .uc-bar-fill { width: 100%; }
}
