/* BORDERLINE Studio — brand: Unbounded / Inter / JetBrains Mono, black + signal red. Fonts are OFL, see fonts/. */
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("fonts/unbounded-cyrillic-ext.woff2") format("woff2"); unicode-range: U+20B4; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("fonts/unbounded-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; 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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("fonts/inter-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #050505;
  --ink: #f4f2ef;
  --muted: #9b9794;
  --dim: #5f5b58;
  --line: rgba(255, 255, 255, 0.12);
  --red: #ff2a36;
  --red-deep: #c8131f;
  --panel: rgba(14, 14, 14, 0.62);
  --heading: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: #fff; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(5, 5, 5, 0.55) 100%),
    linear-gradient(to bottom, transparent 70%, rgba(5, 5, 5, 0.65));
}
.veil::after {
  content: ""; position: absolute; inset: -50%; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }
.no-gl #gl { display: none; }
.no-gl body, .no-gl { background: radial-gradient(80% 60% at 70% 20%, rgba(255, 42, 54, 0.22), transparent 60%), var(--bg); }

main, .nav, .footer { position: relative; z-index: 2; }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-content: center; gap: 22px; justify-items: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.loader-word { font-family: var(--heading); font-weight: 800; font-size: clamp(28px, 6vw, 64px); letter-spacing: -0.02em; }
.loader-word span { color: var(--red); }
.loader-bar { width: min(320px, 70vw); height: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 16px var(--red); transition: width 0.3s; }
.loader-num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.2em; }
.is-loaded .loader { opacity: 0; visibility: hidden; }

/* Cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), border-color 0.35s, background 0.35s; mix-blend-mode: difference; }
.cursor span { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; }
.cursor.is-hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; border-color: #fff; background: rgba(255, 255, 255, 0.08); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(var(--gutter), 3vw) 18px;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.is-solid { background: rgba(5, 5, 5, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; }
.brand { font-family: var(--heading); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand span { color: var(--red); }
.brand i { font-style: normal; color: var(--red); }
.nav-links { display: flex; gap: 34px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.nav-links a { position: relative; transition: color 0.3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--red); transition: right 0.4s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { background: none; border: 0; color: var(--muted); font: 600 11px var(--mono); letter-spacing: 0.1em; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; overflow: hidden;
  font: 600 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; isolation: isolate;
  transition: transform 0.4s var(--ease), border-color 0.3s, color 0.3s;
}
.btn b { font-weight: 400; transition: transform 0.4s var(--ease); }
.btn:hover b { transform: translate(3px, -3px); }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 0 0 1px rgba(255, 42, 54, 0.6), 0 12px 40px -10px rgba(255, 42, 54, 0.75); }
.btn.primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; transform: translateY(101%); transition: transform 0.5s var(--ease); }
.btn.primary:hover { color: var(--bg); }
.btn.primary:hover::before { transform: translateY(0); }
.btn.ghost { border: 1px solid rgba(255, 255, 255, 0.28); color: var(--ink); background: rgba(5, 5, 5, 0.35); backdrop-filter: blur(6px); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 10px 18px; font-size: 11px; }
.btn.big { padding: 22px 38px; font-size: 15px; }

.label { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 500 12px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.label i { width: 28px; height: 1px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.label.center { justify-content: center; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 140px max(var(--gutter), 6vw) 160px; }
.hero-inner { max-width: 860px; }
.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; font: 500 12px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.hero-title { margin: 0; font-family: var(--heading); font-weight: 800; font-size: clamp(40px, 7.1vw, 112px); line-height: 0.94; letter-spacing: -0.035em; text-transform: uppercase; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .accent { color: var(--red); text-shadow: 0 0 46px rgba(255, 42, 54, 0.45); }
.split { display: inline-block; }
.split .ch { display: inline-block; transform: translateY(110%) rotate(6deg); opacity: 0; transition: transform 1.1s var(--ease), opacity 1.1s var(--ease); transition-delay: calc(var(--i) * 35ms + var(--d, 0ms)); }
.is-loaded .split .ch { transform: none; opacity: 1; }
.lead { max-width: 560px; margin: 32px 0 38px; font-size: clamp(16px, 1.35vw, 19px); color: #c9c5c1; opacity: 0; transform: translateY(16px); transition: 1s var(--ease) 0.9s; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; opacity: 0; transform: translateY(16px); transition: 1s var(--ease) 1.05s; }
.is-loaded .lead, .is-loaded .actions { opacity: 1; transform: none; }
.hud { position: absolute; display: flex; gap: 14px; font: 500 11px var(--mono); letter-spacing: 0.16em; color: var(--dim); }
.hud-tl { left: max(var(--gutter), 3vw); top: 96px; }
.hud-tr { right: max(var(--gutter), 3vw); top: 96px; }
.hud-blink { color: var(--red); animation: pulse 1.2s infinite; }
.scroll-hint { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--red), transparent); animation: drop 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.marquee { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; border-top: 1px solid var(--line); padding: 12px 0; font: 600 12px var(--mono); letter-spacing: 0.3em; color: var(--dim); }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: marquee 32s linear infinite; }
.marquee b { color: var(--red); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Story */
.story { position: relative; height: 520vh; }
.story-sticky { position: sticky; top: 0; height: 100svh; padding: 110px max(var(--gutter), 6vw) 60px; display: grid; grid-template-rows: auto 1fr auto; pointer-events: none; }
.story-head { display: flex; justify-content: space-between; align-items: baseline; }
.story-counter { margin: 0; font: 500 13px var(--mono); color: var(--muted); letter-spacing: 0.14em; }
.story-counter b { color: var(--ink); font-size: 22px; font-weight: 600; }
.steps { position: relative; list-style: none; margin: 0; padding: 0; align-self: center; max-width: 430px; }
.step { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-40%); opacity: 0; transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); pointer-events: none; }
.step.is-active { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.step-num { display: inline-block; margin-bottom: 18px; font: 600 12px var(--mono); color: var(--red); letter-spacing: 0.2em; padding: 6px 10px; border: 1px solid rgba(255, 42, 54, 0.45); border-radius: 999px; }
.step h2 { margin: 0 0 16px; font-family: var(--heading); font-weight: 700; font-size: clamp(28px, 3.4vw, 50px); line-height: 1.02; letter-spacing: -0.03em; text-transform: uppercase; }
.step p { margin: 0; color: #c9c5c1; font-size: clamp(15px, 1.2vw, 18px); max-width: 400px; }
.step-fallback { display: none; }
.story-bar { height: 2px; background: rgba(255, 255, 255, 0.1); }
.story-bar i { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 14px var(--red); }
.no-gl .story { height: auto; }
.no-gl .story-sticky { position: relative; height: auto; display: block; }
.no-gl .steps { max-width: none; display: grid; gap: 70px; margin-top: 40px; }
.no-gl .step { position: static; opacity: 1; transform: none; }
.no-gl .step-fallback { display: block; margin-top: 24px; max-width: 520px; border-radius: 18px; border: 1px solid var(--line); }
.no-gl .story-bar { display: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(5, 5, 5, 0.55); backdrop-filter: blur(10px); }
.stat { padding: 56px max(var(--gutter), 2.5vw); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--heading); font-weight: 800; font-size: clamp(48px, 6vw, 96px); line-height: 1; letter-spacing: -0.04em; }
.stat:nth-child(2) b { color: var(--red); text-shadow: 0 0 30px rgba(255, 42, 54, 0.5); }
.stat span { display: block; margin-top: 14px; max-width: 220px; color: var(--muted); font-size: 14px; }

/* Work */
.work { padding: 160px max(var(--gutter), 6vw) 120px; }
.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head h2, .about h2 { margin: 0 0 18px; font-family: var(--heading); font-weight: 800; font-size: clamp(36px, 5.4vw, 84px); line-height: 0.98; letter-spacing: -0.035em; text-transform: uppercase; }
.section-head p { margin: 0; color: #c9c5c1; font-size: clamp(16px, 1.3vw, 19px); max-width: 560px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; perspective: 1400px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transform-style: preserve-3d; transition: border-color 0.4s, box-shadow 0.5s; will-change: transform; }
.card.wide { grid-column: span 2; flex-direction: row; }
.card:hover { border-color: rgba(255, 42, 54, 0.55); box-shadow: 0 30px 80px -30px rgba(255, 42, 54, 0.45); }
.card-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #0c0c0c; }
.card.wide .card-media { flex: 1.35; aspect-ratio: auto; min-height: 380px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.06) translate3d(var(--px, 0), var(--py, 0), 0); transition: transform 0.8s var(--ease), filter 0.6s; filter: saturate(0.9) brightness(0.9); }
.card:hover .card-media img { filter: none; transform: scale(1.1) translate3d(var(--px, 0), var(--py, 0), 0); }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.16), transparent 45%); opacity: 0; transition: opacity 0.4s; mix-blend-mode: overlay; }
.tilt:hover .glare { opacity: 1; }
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; transform: translateZ(30px); }
.card.wide .card-body { flex: 1; justify-content: center; padding: 40px; }
.card-tag { margin: 0; font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.card h3 { margin: 0; font-family: var(--heading); font-weight: 700; font-size: clamp(22px, 2vw, 32px); letter-spacing: -0.02em; text-transform: uppercase; }
.card p { margin: 0; color: #bdb9b5; font-size: 15px; }
.card-note { margin-top: 8px; font: 500 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card-note.link { color: var(--ink); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: 120px max(var(--gutter), 6vw); }
.about-photo { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line); transform-style: preserve-3d; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) contrast(1.05); }
.about-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(255, 42, 54, 0.28), transparent 45%); mix-blend-mode: screen; }
.about h2 { font-size: clamp(32px, 4.3vw, 66px); overflow-wrap: anywhere; }
.about-text p { color: #c9c5c1; font-size: clamp(16px, 1.3vw, 19px); max-width: 560px; margin: 0 0 18px; }
.about-text .btn { margin-top: 18px; }

/* CTA */
.cta { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 140px max(var(--gutter), 6vw); }
.cta-title { margin: 0 0 46px; font-family: var(--heading); font-weight: 800; font-size: clamp(34px, 6vw, 96px); line-height: 1; letter-spacing: -0.035em; text-transform: uppercase; max-width: 1200px; }
.cta-title span { display: block; }
.cta-title .accent { color: var(--red); text-shadow: 0 0 50px rgba(255, 42, 54, 0.45); }
.cta-handle { margin: 22px 0 0; font: 500 13px var(--mono); letter-spacing: 0.2em; color: var(--muted); user-select: all; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 26px max(var(--gutter), 3vw) calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); background: var(--bg); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(36px); filter: blur(8px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; flex-direction: column; }
  .card.wide .card-media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
  .card.wide .card-body { padding: 26px 28px 30px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 440px; }
}
@media (max-width: 640px) {
  .hud { display: none; }
  .hero { padding-top: 40svh; padding-bottom: 150px; align-items: flex-end; }
  .lead { font-size: 15px; margin: 22px 0 26px; }
  .nav-right .btn { display: none; }
  .story-sticky { padding-top: 92px; grid-template-rows: auto 1fr auto; }
  .steps { align-self: end; margin-bottom: 26px; padding: 22px; border-radius: 20px; background: rgba(5, 5, 5, 0.72); backdrop-filter: blur(12px); border: 1px solid var(--line); min-height: 230px; }
  .step { top: 22px; left: 22px; right: 22px; transform: translateY(10px); }
  .step.is-active { transform: none; }
  .stat { padding: 34px 20px; }
  .work, .about { padding-top: 100px; padding-bottom: 80px; }
  .btn.big { padding: 18px 26px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .split .ch, .lead, .actions, .js .reveal { transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
  .marquee-track, .veil::after, .scroll-hint i { animation: none; }
}
