/* ── Písmo: Unbounded (SIL OFL 1.1), self-hosted, variabilná hrúbka 200–900 ── */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/unbounded-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #020912;
  --ink: #f2fbfb;
  --muted: rgba(214, 238, 240, 0.72);
  --accent: #7ff4f2;
  --hl-a: #3fd8f5;
  --hl-b: #c5e4ff;
  --pad: clamp(16px, 3vw, 40px);
  /* hlavička a nadpis tvoria jeden celok: logo hneď nad textom */
  --head-pad: clamp(12px, 1.8vw, 22px);
  --logo-h: clamp(30px, 3vw, 40px);
  --copy-top: calc(var(--head-pad) + var(--logo-h) + clamp(12px, 2vh, 22px));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Unbounded', system-ui, sans-serif;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── scéna ── */
#scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* veľký viewport → schovanie panela s adresou na mobile plátno neprestavuje */
  height: 100vh;
  height: 100lvh;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.is-ready #scene {
  opacity: 1;
}
/* tancujúci jungler v jaskyni (WebGL), viditeľný len vnútri */
#dancer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  pointer-events: none;
  visibility: hidden;
}

/* čitateľnosť nadpisu hore + jemná vineta (statické, nič sa neprekresľuje) */
.shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 9, 14, 0.74) 0%, rgba(2, 9, 14, 0.4) 26%, rgba(2, 9, 14, 0) 46%),
    radial-gradient(120% 90% at 50% 55%, transparent 58%, rgba(0, 0, 0, 0.45) 100%);
}

.shade-low {
  position: fixed;
  inset: auto 0 0;
  height: 42vh;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(2, 9, 14, 0.82) 0%, rgba(2, 9, 14, 0.5) 45%, rgba(2, 9, 14, 0) 100%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.on-way .shade-low {
  opacity: 1;
}

/* ── hlavička ── */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--head-pad) var(--pad);
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand img {
  height: var(--logo-h);
  width: auto;
}

/* ── texty zastávok ── */
.copy {
  position: fixed;
  z-index: 4;
  left: 50%;
  top: var(--copy-top);
  width: min(92vw, 1120px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(25px, 4vw, 62px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}
/* nadpis na úvode: vždy presne dva riadky — písmo sa zmenší tak, aby sa dlhší riadok
   („Krypto je džungľa" ≈ 13 em) zmestil na šírku obrazovky */
.title--hero {
  font-size: min(clamp(26px, 4.6vw, 74px), calc((100vw - 40px) / 13.4));
}
.title .line {
  white-space: nowrap;
}
/* „Poď bližšie a vstúp dnu." je dole pod džungľou, nie hore */
.copy--low {
  top: auto;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px), 6vh);
}
.title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--hl-a), var(--hl-b) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.copy .line {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.copy.is-on .line {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease,
    transform 1s var(--ease-out);
}
.copy.is-on .line:nth-child(2) {
  transition-delay: 0.12s;
}

/* ── tlačidlá na úvode ── */
.copy .cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(16px, 2.6vh, 26px);
  pointer-events: auto;
}
.copy:not(.is-on) .cta {
  pointer-events: none;
}
.copy.is-on .cta {
  transition-delay: 0.24s;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: clamp(13px, 1.1vw, 17px) clamp(22px, 2vw, 30px);
  border-radius: 999px;
  font-size: clamp(10px, 0.95vw, 14px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--primary {
  color: #04121a;
  background: linear-gradient(100deg, var(--hl-a), var(--hl-b));
  box-shadow: 0 10px 30px -10px rgba(63, 216, 245, 0.65);
}
.btn--primary:hover {
  box-shadow: 0 14px 36px -10px rgba(63, 216, 245, 0.85);
}
.btn--ghost {
  color: var(--ink);
  border: 1px solid rgba(197, 228, 255, 0.45);
  background: rgba(4, 16, 22, 0.35);
}
.btn--ghost:hover {
  border-color: var(--accent);
}

/* ── sociálne siete ── */
.socials {
  position: fixed;
  z-index: 7;
  top: var(--head-pad);
  right: var(--pad);
  height: var(--logo-h);
  transition: opacity 0.4s ease;
}
/* v jaskyni sú ikony dole namiesto hore */
.is-inside .socials {
  opacity: 0;
  pointer-events: none;
}
.soc {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 12px);
}
.soc a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(234, 252, 255, 0.85);
  border: 1px solid rgba(197, 228, 255, 0.22);
  background: rgba(4, 16, 22, 0.35);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.soc a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.soc svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.soc .dot {
  fill: currentColor;
  stroke: none;
}
@media (max-width: 760px) {
  /* na mobile sú ikony dole, len na začiatku */
  .socials {
    top: auto;
    left: 0;
    right: 0;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 14px), 4vh);
    justify-content: center;
  }
  body:not(.at-start) .socials {
    opacity: 0;
    pointer-events: none;
  }
}

/* dráha pre scroll (presnú výšku nastaví js/main.js) */
.track {
  height: 360vh;
}

/* ── vnútro brlohu ── */
.inside {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--copy-top) 24px 72px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0s linear 0.45s;
}
.inside.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease;
}
.inside__inner > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.inside.is-on .inside__inner > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 1s var(--ease-out);
}
.inside.is-on .inside__inner > :nth-child(2) {
  transition-delay: 0.12s;
}
.inside.is-on .inside__inner > :nth-child(3) {
  transition-delay: 0.24s;
}
.inside.is-on .inside__inner > :nth-child(4) {
  transition-delay: 0.36s;
}
/* „Vitaj v Kryptobrlohu." na jeden riadok (≈ 15 em), na mobile na dva */
.inside .title {
  font-size: min(clamp(27px, 4.4vw, 66px), calc((100vw - 40px) / 15.6));
}
.inside .title > span {
  white-space: nowrap;
}
.inside__inner {
  pointer-events: auto;
}
.inside__cta {
  margin-top: clamp(16px, 2.6vh, 26px);
}
/* kurzor nad junglerom: dá sa naňho kliknúť (vyskočí) */
.over-dancer {
  cursor: pointer;
}
/* ikony sociálnych sietí a pätička dole pod junglerom */
.inside__bottom {
  position: absolute;
  inset: auto 0 max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.inside.is-on .inside__bottom {
  opacity: 1;
  transition: opacity 0.8s ease 0.4s;
}
.inside__foot {
  margin: 0;
  color: rgba(214, 238, 240, 0.35);
  font-size: 10px;
  letter-spacing: 0.14em;
}

@media (max-width: 640px) {
  .copy {
    width: calc(100vw - 40px);
  }
  .inside .title {
    font-size: min(clamp(27px, 4.4vw, 66px), calc((100vw - 40px) / 10.6));
  }
  .inside .title > span {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy .line,
  .copy.is-on .line,
  .inside__inner > *,
  .inside.is-on .inside__inner > * {
    transform: none;
  }
}
