:root {
  --bg: #0c0b12; --ink: #ecebf3; --muted: #9089a3; --soft: #c2bdd0;
  --line: #23212f; --card: #16141f; --accent: #8b6ef0; --accent2: #5b8def;
  --sy: 0; --mx: 0; --my: 0;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --rv-blur: 6px;
}
/* cursor glow colour, changes smoothly with the active section (set in script.js) */
@property --glow { syntax: '<color>'; inherits: true; initial-value: #8b6ef0; }
html { scroll-behavior: smooth; transition: --glow 1.2s ease; }
@media (max-width: 640px) { :root { --rv-blur: 0px; } }

/* page intro: plain CSS, so it plays even without JS; --d = delay */
.intro { animation: intro-up .9s var(--ease-out) var(--d, 0ms) both; }
.intro-down { animation-name: intro-down; }
.intro-logo { animation-name: intro-logo; animation-duration: 1.2s; }
.intro-mask { animation-name: intro-mask; animation-duration: 1s; }
.intro-fade { animation-name: intro-fade; animation-duration: 1.6s; }
@keyframes intro-up { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-down { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes intro-logo { from { opacity: 0; transform: scale(.85); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-mask { from { transform: translateY(105%); } to { transform: none; } }
@keyframes intro-fade { from { opacity: 0; } }

/* hero parallax, driven by --sy */
.hero-par {
  transform: translate3d(0, calc(min(var(--sy), 900) * .12px), 0);
  opacity: calc(1 - min(var(--sy), 900) / 1500);
}
.hero-code { transform: translate3d(0, calc(min(var(--sy), 1200) * .2px), 0); }

/* scroll hint at the bottom of the hero, fades out as soon as the page is scrolled */
.scroll-hint { opacity: calc(1 - min(var(--sy), 120) / 120); }
.scroll-hint__wheel { animation: scroll-wheel 1.8s var(--ease-out) infinite; }
@keyframes scroll-wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(9px); } }

/* scroll reveal: .js-anim (set in <head>, before first paint) hides [data-reveal]; script.js adds .rv-in when it scrolls into view, then .rv-done */
/* transitions live only on .rv-in, so only the reveal animates */
.rv-in { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); }
.js-anim [data-reveal]:not(.rv-in):not(.rv-done) { opacity: 0; transform: translateY(28px); filter: blur(var(--rv-blur)); }
.js-anim [data-reveal="card"]:not(.rv-in):not(.rv-done) { transform: translateY(36px) scale(.96); }
/* mask: text is wiped in from the bottom (a mask, not clip-path, which would hide it from IntersectionObserver) */
@property --rv-mask { syntax: '<percentage>'; inherits: false; initial-value: 130%; }
.js-anim [data-reveal="mask"]:not(.rv-done) {
  -webkit-mask-image: linear-gradient(to top, #000 calc(var(--rv-mask) - 30%), transparent var(--rv-mask));
  mask-image: linear-gradient(to top, #000 calc(var(--rv-mask) - 30%), transparent var(--rv-mask));
}
[data-reveal="mask"].rv-in { transition: transform 1s var(--ease-out), --rv-mask 1s var(--ease-out); }
.js-anim [data-reveal="mask"]:not(.rv-in):not(.rv-done) { opacity: 1; filter: none; transform: translateY(.45em); --rv-mask: 0%; }
/* stagger: the container stays, its children come in one by one (--i = child index) */
.js-anim [data-reveal="stagger"]:not(.rv-in):not(.rv-done) { opacity: 1; transform: none; filter: none; }
[data-reveal="stagger"].rv-in > * { transition: opacity .7s var(--ease-out) calc(var(--i, 0) * 45ms), transform .7s var(--ease-out) calc(var(--i, 0) * 45ms); }
.js-anim [data-reveal="stagger"]:not(.rv-in):not(.rv-done) > * { opacity: 0; transform: translateY(14px) scale(.96); }

/* section divider that draws itself from left to right */
.sec { position: relative; }
.sec::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none; background: var(--line); transform-origin: left; transition: transform 1.2s var(--ease-out); }
.js-anim .sec:not(.sec-in)::before { transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  .intro, .scroll-hint__wheel { animation: none !important; }
  .hero-par, .hero-code { transform: none !important; }
  .hero-par { opacity: 1 !important; }
}
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
#techswiper { scrollbar-width: none; -ms-overflow-style: none; }
#techswiper::-webkit-scrollbar { display: none; }

/* cookie banner (vanilla-cookieconsent) in site colours */
#cc-main {
  --cc-font-family: 'IBM Plex Sans', system-ui, sans-serif;
  --cc-modal-border-radius: 16px;
  --cc-btn-border-radius: 12px;
  --cc-bg: var(--card);
  --cc-primary-color: var(--ink);
  --cc-secondary-color: var(--soft);
  --cc-link-color: var(--accent);
  --cc-btn-primary-bg: var(--ink);
  --cc-btn-primary-color: var(--bg);
  --cc-btn-primary-border-color: var(--ink);
  --cc-btn-primary-hover-bg: #ffffff;
  --cc-btn-primary-hover-color: var(--bg);
  --cc-btn-primary-hover-border-color: #ffffff;
  --cc-btn-secondary-bg: transparent;
  --cc-btn-secondary-color: var(--ink);
  --cc-btn-secondary-border-color: var(--line);
  --cc-btn-secondary-hover-bg: color-mix(in srgb, var(--accent) 12%, transparent);
  --cc-btn-secondary-hover-color: var(--ink);
  --cc-btn-secondary-hover-border-color: var(--accent);
  --cc-separator-border-color: var(--line);
  --cc-toggle-on-bg: var(--accent);
  --cc-toggle-off-bg: #4a4560;
  --cc-toggle-on-knob-bg: #ffffff;
  --cc-toggle-off-knob-bg: var(--ink);
  --cc-toggle-readonly-bg: #3a3650;
  --cc-toggle-readonly-knob-bg: var(--soft);
  --cc-cookie-category-block-bg: var(--bg);
  --cc-cookie-category-block-border: var(--line);
  --cc-cookie-category-block-hover-bg: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --cc-cookie-category-block-hover-border: var(--line);
  --cc-cookie-category-expanded-block-bg: transparent;
  --cc-cookie-category-expanded-block-hover-bg: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --cc-overlay-bg: rgba(5, 4, 10, .7);
  --cc-footer-bg: var(--bg);
  --cc-footer-color: var(--soft);
  --cc-footer-border-color: var(--line);
}
#cc-main .cm, #cc-main .pm { border: 1px solid var(--line); }
/* pill-shaped buttons (the variable above also rounds the preference sections) */
#cc-main .cm__btn:not(.cm__btn--close), #cc-main .pm__btn, #cc-main .pm__close-btn { border-radius: 999px; }
#cc-main .cm__title, #cc-main .pm__title { font-family: 'Space Grotesk', sans-serif; }
/* justify only the banner text and the last preferences section ("More information") */
#cc-main .cm__desc, #cc-main .pm__section:last-child .pm__section-desc { text-align: justify; text-wrap: pretty; }

/* privacy policy pages */
.legal h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.375rem; margin: 2.5rem 0 .75rem; color: var(--ink); }
.legal p, .legal li { font-size: 15.5px; line-height: 1.7; color: var(--soft); }
.legal p { margin: 0 0 .9rem; text-align: justify; text-wrap: pretty; }
.legal ul { margin: 0 0 .9rem; padding-left: 1.25rem; list-style: disc; }
.legal li { margin-bottom: .35rem; }
.legal a { color: var(--accent); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal code { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: .5rem 0 1rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--soft); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* floating cookie settings button */
.cookie-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--soft);
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .8);
  transition: transform .2s, border-color .2s, color .2s, box-shadow .2s;
}
.cookie-fab[hidden] { display: none; }
.cookie-fab:hover, .cookie-fab:focus-visible {
  border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--accent) 60%, transparent);
  outline: none;
}
.cookie-fab__tip {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.cookie-fab:hover .cookie-fab__tip, .cookie-fab:focus-visible .cookie-fab__tip { opacity: 1; }
html[lang="cs"] .cookie-fab__tip [lang="en"], html[lang="en"] .cookie-fab__tip [lang="cs"] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .cookie-fab:hover, .cookie-fab:focus-visible { transform: none; }
}
