/* UKP – biela časť stránky. Všetko je viazané na triedy z ukp-white.js. */

/* 1. Svitanie medzi čiernou a bielou časťou */
.ukpfx-dawn {
  --dawn: 0;
  position: relative;
  height: 34svh;
  overflow: hidden;
  background: #050505;
  pointer-events: none;
}

.ukpfx-dawn::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 250vw;
  height: 230%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff 0 78%, #ffffff9c 86%, #fff0);
  will-change: scale;
  translate: -50% 50%;
  scale: calc(.12 + var(--dawn) * 1.16) calc(.02 + var(--dawn) * var(--dawn) * 1.2);
}

.ukpfx-dawn::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(#fff0, #fff 88%);
}

/* 2. Ukazovateľ posunu */
.ukpfx-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  z-index: 2;
  height: 3px;
  background: #0b0b0b;
  transform: scaleX(var(--page, 0));
  transform-origin: left;
}

/* 3. Mapový papier */
.ukpfx-white .ukpfx-paper { isolation: isolate; }
.ukpfx-white :is(.ukpfx-paper):not(.site-header) { position: relative; }

.ukpfx-white .ukpfx-paper > :is(.ukpfx-grid, .ukpfx-contours) {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.ukpfx-grid {
  display: block;
  background: radial-gradient(circle, #0000006b 1px, #0000 1.6px) 0 0 / 26px 26px;
  opacity: .55;
  -webkit-mask-image: radial-gradient(260px circle at var(--paper-x, 86%) var(--paper-y, 14%), #000, #0000002e 80%);
  mask-image: radial-gradient(260px circle at var(--paper-x, 86%) var(--paper-y, 14%), #000, #0000002e 80%);
}

/* Nadpisy: posledné slovo má na bielej tmavý prechod, pod nadpisom sa vykreslí linka. */
.ukpfx-white :is(#top, #ciele, #priebeh, #mapa, #kontakt) ukp-w.ukpfx-key {
  background-image: linear-gradient(105deg, #050505 0%, #050505 34%, #5f5f5f 50%, #050505 66%, #050505 100%);
}

.ukpfx-white :is(#top, #ciele, #priebeh, #mapa, #kontakt) h2.ukpfx-split::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin-top: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0b0b0b 60%, #0b0b0b00);
  transition: width 1s cubic-bezier(.2, .7, .2, 1) .4s;
}

.ukpfx-white :is(#top, #ciele, #priebeh, #mapa, #kontakt) h2.ukpfx-in::after { width: 130px; }

/* Tmavý pás „Služba“ s hviezdami */
.ukpfx-white #sluzba { position: relative; }

/* 4. Karty */
.ukpfx-white .goal-grid { perspective: 1300px; }
.ukpfx-white .process-steps { perspective: 1200px; }
.ukpfx-white .hero-stats { perspective: 700px; }
.ukpfx-white .hero-stats > div { position: relative; overflow: hidden; }

.ukpfx-white .goal-grid article.ukpfx-tile {
  transition:
    opacity 720ms ease,
    transform 420ms cubic-bezier(.22, 1, .36, 1),
    rotate 180ms ease-out,
    box-shadow 300ms ease,
    border-color 300ms ease;
}

.ukpfx-white .process-steps article.ukpfx-tile {
  transition:
    opacity 720ms ease,
    transform 500ms cubic-bezier(.22, 1, .36, 1),
    rotate 180ms ease-out,
    box-shadow 500ms ease,
    border-color 500ms ease;
}

.ukpfx-ink {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
  background: radial-gradient(220px circle at var(--ink-x, 50%) var(--ink-y, 0%), #0000001c, #0000 70%);
}

.ukpfx-ink::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: radial-gradient(180px circle at var(--ink-x, 50%) var(--ink-y, 0%), #000, #0000 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

@media (hover: hover) and (pointer: fine) {
  .ukpfx-tile:hover > .ukpfx-ink { opacity: 1; }
}

.ukpfx-white .goal-grid .icon { transition: background .35s ease, color .35s ease, rotate .6s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.ukpfx-white .goal-grid article:hover .icon,
.ukpfx-white .goal-grid article.is-selected .icon {
  background: #0b0b0b;
  color: #fff;
  box-shadow: 0 0 0 7px #00000012;
}
.ukpfx-white .goal-grid article:hover .icon { rotate: 360deg; }
.ukpfx-white .goal-grid article .icon svg { color: inherit; }

/* 5. Priebeh */
.ukpfx-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #0b0b0b;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.ukpfx-white .process-steps article.ukpfx-on {
  border-color: #0b0b0b;
  box-shadow: 0 26px 60px #00000030;
}

.ukpfx-on > .ukpfx-fill { transform: scaleX(1); transition: transform 1.95s cubic-bezier(.4, 0, .25, 1); }
.ukpfx-past > .ukpfx-fill { transform: scaleX(1); opacity: .25; }
.ukpfx-white .process-steps article.ukpfx-on > span { animation: ukpfx-step 1.4s ease-out both; }

@keyframes ukpfx-step {
  0% { box-shadow: 0 0 0 0 #000000a0; }
  100% { box-shadow: 0 0 0 18px #0000; }
}

/* 6. Erb v úvodnom paneli */
/* Štvorcový priestor presne pre kruhy: nič nepresiahne k čiare ani k okraju panela. */
.ukpfx-crown {
  position: relative;
  display: grid;
  place-items: center;
  width: min(288px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

.ukpfx-white .hero .ukpfx-crown .hero-logo {
  position: relative;
  z-index: 1;
  width: 74%;
  max-width: 74%;
  height: auto;
  margin: 0;
  animation: ukpfx-float 7s ease-in-out infinite;
}

.ukpfx-crown svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ukpfx-crown svg :is(circle, ellipse) { fill: none; stroke: #0000002e; stroke-width: .8; }
.ukpfx-crown svg .dash { stroke-dasharray: 2 7; stroke: #00000073; }
.ukpfx-crown svg .dot { fill: #0b0b0b; stroke: none; }
.ukpfx-crown svg g { transform-origin: 100px 100px; }
.ukpfx-crown svg .a { animation: ukpfx-spin 22s linear infinite; }
.ukpfx-crown svg .b { animation: ukpfx-spin 34s linear infinite reverse; }
.ukpfx-crown svg .c { animation: ukpfx-spin 16s linear infinite; }

@keyframes ukpfx-spin { to { rotate: 360deg; } }
@keyframes ukpfx-float { 0%, 100% { translate: 0 -5px; } 50% { translate: 0 6px; } }

/* 7. Tlačidlá a polia formulára */
.ukpfx-white main .button,
.ukpfx-white .header-action,
.ukpfx-white .contact-form button[type="submit"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ukpfx-white main .button.primary::before,
.ukpfx-white .header-action::before,
.ukpfx-white .contact-form button[type="submit"]::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, #0000 35%, #ffffff55 50%, #0000 65%) 160% 0 / 300% 100% no-repeat;
  animation: ukpfx-button-shine 2.6s ease-in-out 1s 2 both;
}

.ukpfx-white .ukp-chapter-mentor .button.primary::before { content: none; }

.ukpfx-white main .button { transition: translate .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease; }
.ukpfx-white main .button:hover { translate: 0 -3px; box-shadow: 0 14px 30px #0000002e; }

.ukpfx-white .contact-form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  transition: box-shadow .25s ease, border-color .25s ease;
}

.ukpfx-white .contact-form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus {
  border-color: #0b0b0b;
  box-shadow: 0 0 0 5px #00000017;
}

/* 8. Hlavička na mobile: ponuka v jednom riadku, dá sa posúvať prstom. */
@media (max-width: 760px) {
  .ukpfx-white .site-header { padding-block: 6px; row-gap: 0; }
  .ukpfx-white .site-header .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    padding-block: 2px 6px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, #0000);
    mask-image: linear-gradient(90deg, #000 88%, #0000);
  }
  .ukpfx-white .site-header .nav::after { content: ""; flex: 0 0 24px; }
}

@media print {
  .ukpfx-dawn, .ukpfx-progress, .ukpfx-grid, .ukpfx-contours, .ukpfx-crown svg { display: none !important; }
}

/* Podstránky: na bielych častiach tmavý lesk posledného slova a linka pod nadpisom. */
.ukpfx-white :is(.subpage-intro, .ukp-story-section, .subpage-next, .legal-page main, #top, #ciele, #priebeh) :is(h1, h2) ukp-w.ukpfx-key {
  background-image: linear-gradient(105deg, #050505 0%, #050505 34%, #5f5f5f 50%, #050505 66%, #050505 100%);
}

.ukpfx-white :is(.subpage-intro, .ukp-story-section, .legal-page main, #top, #ciele, #priebeh) :is(h1, h2).ukpfx-split::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin-top: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0b0b0b 60%, #0b0b0b00);
  transition: width 1s cubic-bezier(.2, .7, .2, 1) .4s;
}

.ukpfx-white :is(.subpage-intro, .ukp-story-section, .legal-page main, #top, #ciele, #priebeh) :is(h1, h2).ukpfx-in::after { width: 130px; }
.ukpfx-white :is(.ukp-story-grid article, .ukp-faq-item) { position: relative; }
.ukpfx-white .ukp-faq-item > .ukpfx-ink { z-index: 0; }
