/* ===========================================================================
   StudyLab Digital — vizuální vrstva
   =========================================================================== */

:root {
  --ink:      #0D0F1A;
  --ink-2:    #141628;
  --bg-soft:  #F0F2FA;

  --glow-kern: rgba(255, 183, 77, .15);
  --glow:      rgba(255, 183, 77, .09);
  --glow-warm: rgba(255, 183, 77, .18);
  --ring:      rgba(255, 183, 77, .40);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow-zone { position: relative; overflow: hidden; }

.glow-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  background:
    radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%),
      var(--glow-kern), transparent 70%),
    radial-gradient(620px circle at var(--mx, 50%) var(--my, 50%),
      var(--glow), transparent 66%);
}
.glow-zone.is-lit::before { opacity: 1; }
.glow-zone > * { position: relative; z-index: 1; }

.hero { position: relative; overflow: hidden; }

.hero .aurora {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 45% at 22% 30%, rgba(99,102,241,.18), transparent 60%),
    radial-gradient(32% 40% at 78% 18%, rgba(255,183,77,.14), transparent 62%),
    radial-gradient(34% 38% at 62% 82%, rgba(99,102,241,.12), transparent 60%);
  filter: blur(24px);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2.5%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2.5%, 0) scale(1.02); }
}

.hero::after,
.band::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ring), transparent);
  opacity: .50;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 {
    background: linear-gradient(178deg, #FFFFFF 34%, #FFD180 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.card, .step, .split__col, .quiz, .faq details, .toc {
  position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.3,1),
              box-shadow .25s cubic-bezier(.2,.7,.3,1),
              border-color .25s;
}

.card::before, .step::before, .split__col::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(99,102,241,.07), transparent 60%
  );
}
.card.is-lit::before,
.step.is-lit::before,
.split__col.is-lit::before { opacity: 1; }

.card:hover, .step:hover, .split__col:hover {
  transform: translateY(-4px);
  border-color: #C8CCDF;
  box-shadow:
    0 1px 2px rgba(16,24,40,.05),
    0 18px 44px -14px rgba(16,24,40,.22),
    0 0 0 1px rgba(99,102,241,.09);
}

.card:hover .icon { transform: scale(1.06) rotate(-2deg); }
.icon { transition: transform .3s cubic-bezier(.2,.7,.3,1); }

.section--dark {
  position: relative;
  background:
    radial-gradient(700px 380px at 78% 8%, rgba(99,102,241,.12), transparent 62%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  overflow: hidden;
}
.section--dark .section__head h2 { color: #fff; }
.section--dark .section__head p  { color: var(--on-dark-mut); }
.section--dark .eyebrow {
  background: rgba(255,183,77,.14);
  color: var(--accent-br);
}

.section--dark .card {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.section--dark .card h3       { color: #fff; }
.section--dark .card p        { color: var(--on-dark-mut); }
.section--dark .card__num     { color: var(--accent-br); }
.section--dark .card .icon    { background: rgba(255,183,77,.12); color: var(--accent-br); }
.section--dark .card::before  {
  background: radial-gradient(300px circle at var(--mx,50%) var(--my,50%),
              rgba(255,183,77,.12), transparent 62%);
}
.section--dark .card:hover {
  border-color: rgba(255,183,77,.35);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.6);
}

.btn--primary {
  box-shadow: 0 8px 26px -10px rgba(255,183,77,.6);
}
.btn--primary:hover {
  box-shadow: 0 14px 36px -10px rgba(255,183,77,.85);
}
.btn--solid { box-shadow: 0 8px 24px -12px rgba(99,102,241,.65); }
.btn--solid:hover { box-shadow: 0 14px 32px -12px rgba(99,102,241,.8); }

.btn--ghost { backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,183,77,.09); }

.header {
  transition: background-color .35s ease, box-shadow .35s ease,
              border-color .35s ease, backdrop-filter .35s ease;
}
.header.is-scrolled {
  background: rgba(13,15,26,.80);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(255,183,77,.16);
  box-shadow: 0 10px 34px -18px rgba(0,0,0,.85);
}

.nav .btn--primary { color: var(--accent-ink); }
.nav .btn--ghost   { color: var(--on-dark); }

.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 5px;
  height: 1.5px;
  background: var(--accent-br);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.step__no, .stepslist li::before {
  box-shadow: 0 0 0 1px rgba(255,183,77,.22),
              0 6px 18px -8px rgba(255,183,77,.50);
}
.logo__mark { box-shadow: 0 6px 18px -8px rgba(255,183,77,.55); }

.js-fx [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s cubic-bezier(.2,.7,.3,1),
              transform .65s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--delay, 0ms);
}
.js-fx [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.figure { position: relative; overflow: hidden; }
.figure img { transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.figure:hover img { transform: scale(1.03); }

.f input, .f select {
  transition: border-color .2s, background-color .2s, box-shadow .25s;
}
.f input:focus, .f select:focus {
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 4px rgba(255,183,77,.14);
}
.opt { transition: border-color .18s, background-color .18s, transform .18s; }
.opt:hover { transform: translateX(2px); }

.video__start { transition: filter .3s; }
.video__start:hover { filter: brightness(1.12); }
.video__play { box-shadow: 0 0 0 8px rgba(255,183,77,.07), 0 10px 30px -10px rgba(255,183,77,.45); }

@media (hover: none), (pointer: coarse) {
  .glow-zone::before,
  .card::before, .step::before, .split__col::before { display: none; }
  .card:hover, .step:hover, .split__col:hover { transform: none; }
  .figure:hover img { transform: none; }
  .header.is-scrolled { backdrop-filter: none; background: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .aurora { animation: none; }
  .js-fx [data-reveal] { opacity: 1 !important; transform: none !important; }
  .card, .step, .split__col, .figure img, .icon, .nav a:not(.btn)::after { transition: none !important; }
  .card:hover, .step:hover, .split__col:hover { transform: none; }
}

/* ── Popup / Modal ─────────────────────────────────────────────────── */
.sl-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13,15,26,.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: popFade .25s ease;
}
@keyframes popFade { from { opacity: 0; } to { opacity: 1; } }
.sl-popup {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 80px -20px rgba(0,0,0,.5);
  animation: popSlide .28s cubic-bezier(.2,.7,.3,1);
}
@keyframes popSlide { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.sl-popup__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #EEF0FF;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: #6366F1;
}
.sl-popup h2 { font-size: 1.4rem; margin-bottom: 10px; color: #0D0F1A; }
.sl-popup p  { color: #56637C; margin-bottom: 24px; }
.sl-popup .btn { width: 100%; }
