/* koli-bg.com — the page behind the 3D scene (js/main.js). No inline styles:
   the site is served with a strict CSP (style-src 'self'). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-wght-normal.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;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/caveat-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/caveat-latin-500-normal.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;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/caveat-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/caveat-latin-700-normal.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: #070b16;
  --ink: #eef2ff;
  --muted: #a3afcf;
  --faint: #6b7799;
  --line: rgba(148, 173, 255, 0.18);
  --panel: rgba(12, 18, 36, 0.66);
  --blue: #60a5fa;
  --blue-deep: #2563eb;
  --paper: #f4ecd8;
  --green: #34d399;
  --amber: #fbbf24;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- the scene ---- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(3, 5, 12, 0.72) 100%);
}

/* ---- header ---- */

.top {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand span { color: var(--blue); }

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 22, 0.5);
  backdrop-filter: blur(8px);
}
.langs button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
}
.langs button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--ink);
}
.langs button:focus-visible,
.brand:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---- the acts: tall sections that give the scene its scroll distance;
        their captions are pinned and faded by the script ---- */

main { position: relative; z-index: 2; }

.act { height: 140vh; }
.act[data-act="0"] { height: 120vh; }

.caption {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  will-change: opacity, transform;
}
.act:not([data-act="0"]) .caption { opacity: 0; }

.caption-hero {
  left: var(--gutter);
  top: 50%;
  width: min(38rem, 46vw);
  margin-top: -11rem;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1rem;
}

h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.8rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 em {
  font-family: "Caveat", "Manrope", cursive;
  font-style: normal;
  font-weight: 700;
  font-size: 1.16em;
  letter-spacing: -0.01em;
  color: var(--paper);
  position: relative;
  white-space: nowrap;
}
h1 em::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -3%;
  top: 56%;
  height: 0.07em;
  border-radius: 1em;
  background: var(--blue);
  transform: rotate(-2deg) scaleX(0);
  transform-origin: left center;
  animation: strike 0.7s 0.9s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
@keyframes strike { to { transform: rotate(-2deg) scaleX(1); } }

.lead {
  margin-top: 1.6rem;
  max-width: 30rem;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--muted);
}

.hint {
  margin-top: 2.6rem;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.hint i {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--blue), transparent);
  transform-origin: top;
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(22px); opacity: 0; }
}

.caption-low {
  left: 50%;
  bottom: clamp(36px, 9vh, 96px);
  width: min(44rem, calc(100vw - 2 * var(--gutter)));
  margin-left: calc(min(44rem, calc(100vw - 2 * var(--gutter))) / -2);
  text-align: center;
}
.caption-low h2 {
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(7, 11, 22, 0.9);
}
.caption-low p {
  margin-top: 0.9rem;
  font-size: clamp(0.98rem, 1.2vw, 1.15rem);
  color: var(--muted);
  text-wrap: balance;
  text-shadow: 0 1px 16px rgba(7, 11, 22, 0.95);
}

/* ---- the two apps ---- */

.apps {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 52vh var(--gutter) 0;
}

.cards {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 44px);
}

.card {
  --tint: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.2);
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(80% 60% at 20% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%);
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--tint) 60%, transparent);
  box-shadow: 0 24px 70px -30px color-mix(in srgb, var(--tint) 70%, transparent);
}
.card-garage { --tint: #7dd3fc; }

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mark {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 10px;
  border-radius: 15px;
  color: #fff;
  background: var(--blue-deep);
}
.card-garage .mark { background: #2d5fd3; padding: 9px; }

.card h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.domain {
  margin-top: 3px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--faint);
}

.tagline {
  margin-top: 1.4rem;
  font-family: "Caveat", "Manrope", cursive;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  line-height: 1.1;
  color: var(--paper);
}
.desc {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.pills {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pills li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(7, 11, 22, 0.45);
}
.pills li.ok::before,
.pills li.warn::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.pills li.warn::before {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.go {
  margin-top: auto;
  padding-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--tint);
}
.go i {
  font-style: normal;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .go i { transform: translateX(6px); }

.foot {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 0 26px;
  font-size: 0.8rem;
  color: var(--faint);
}

/* ---- narrow screens ---- */

@media (max-width: 820px) {
  .caption-hero {
    top: 84px;
    margin-top: 0;
    width: calc(100vw - 2 * var(--gutter));
  }
  .lead { margin-top: 1.1rem; }
  .hint { margin-top: 1.4rem; }
  .hint i { height: 30px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .apps { padding-top: 46vh; }
}

/* ---- no WebGL, or the visitor asked for less motion: a plain page ---- */

html.static #scene,
html.static .vignette,
html.static .hint { display: none; }
html.static body {
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(37, 99, 235, 0.22), transparent 60%),
    var(--bg);
}
html.static .act,
html.static .act[data-act="0"] { height: auto; padding: 0 var(--gutter); }
html.static .act[data-act="0"] { padding-top: 22vh; padding-bottom: 6vh; }
html.static .act:not([data-act="0"]) { display: none; }
html.static .caption {
  position: static;
  opacity: 1;
  width: auto;
  max-width: 44rem;
  margin: 0;
  pointer-events: auto;
}
html.static .apps { min-height: 0; padding-top: 4vh; }
html.static h1 em::after { animation: none; transform: rotate(-2deg); }

@media (prefers-reduced-motion: reduce) {
  .hint i, h1 em::after { animation: none; }
  .card, .go i { transition: none; }
}
