:root {
  --ink: #0b0e14;
  --surface: #131722;
  --border: #232838;
  --paper: #eef1f6;
  --muted: #8891a3;
  --sky: #38bdf8;
  --sky-dim: #1c6f96;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(circle at 82% -10%, rgba(56, 189, 248, 0.12), transparent 45%);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
::selection { background: var(--sky); color: var(--ink); }
a { color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0;
}
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  text-decoration: none; letter-spacing: -0.01em;
}
.nav { display: flex; gap: 1.75rem; font-size: 0.9rem; color: var(--muted); }
.nav a { text-decoration: none; transition: color 0.2s ease; }
.nav a:hover { color: var(--paper); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--sky-dim));
  color: #0b0e14;
  box-shadow: 0 10px 30px -12px rgba(56, 189, 248, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--sky); color: var(--sky); }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
  padding: 5rem 1.5rem 6rem;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--sky); margin: 0 0 0.75rem;
}
.hero-text h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.lede { color: var(--muted); font-size: 1.05rem; max-width: 34rem; margin: 0 0 2rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* player mock */
.hero-mock { display: flex; justify-content: center; }
.player {
  width: 100%; max-width: 24rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.player-screen {
  position: relative;
  height: 13rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, #182234, #0b0e14 65%);
  display: flex; align-items: center; justify-content: center;
}
.play-btn {
  width: 3.5rem; height: 3.5rem; border-radius: 999px;
  background: rgba(238, 241, 246, 0.12);
  border: 1px solid rgba(238, 241, 246, 0.25);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.play-btn:hover { background: rgba(56, 189, 248, 0.25); transform: scale(1.05); }
.quality-badge {
  position: absolute; top: 0.75rem; right: 0.75rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  background: rgba(11, 14, 20, 0.7); border: 1px solid var(--border);
  padding: 0.2rem 0.5rem; border-radius: 0.4rem; color: var(--sky);
}
.player-bar { padding: 1rem 1.1rem 1.1rem; }

/* signature: прогресс-бар воспроизведения с "живым" плейхедом */
.player-progress {
  position: relative; height: 6px; border-radius: 999px;
  background: var(--border); overflow: visible; margin-bottom: 0.6rem;
}
.player-progress-fill {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-dim), var(--sky));
  width: 0%;
}
.player-progress-fill::after {
  content: "";
  position: absolute; top: 50%; right: -5px;
  width: 10px; height: 10px; border-radius: 999px;
  background: #bfe8fd;
  box-shadow: 0 0 10px 3px rgba(56, 189, 248, 0.75);
  transform: translateY(-50%);
}
.player-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
}
.buffer-ok::before {
  content: "●"; color: #4ade80; margin-right: 0.35rem; font-size: 0.6rem;
}

/* catalog */
.catalog {
  padding: 4rem 1.5rem 5rem;
  border-top: 1px solid var(--border);
}
.catalog h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  margin: 0.5rem 0 2rem; letter-spacing: -0.01em;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1.25rem;
}

.film-tile {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem;
}
.film-tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.film-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 14, 20, 0.85) 100%);
}

.tile-1 { background: linear-gradient(160deg, #1c6f96, #0b0e14 75%); }
.tile-2 { background: linear-gradient(160deg, #7c5cf0, #0b0e14 75%); }
.tile-3 { background: linear-gradient(160deg, #b3572f, #0b0e14 75%); }
.tile-4 { background: linear-gradient(160deg, #1e8f6a, #0b0e14 75%); }
.tile-5 { background: linear-gradient(160deg, #a8355a, #0b0e14 75%); }
.tile-6 { background: linear-gradient(160deg, #38bdf8, #0b0e14 75%); }
.tile-7 { background: linear-gradient(160deg, #8a7a3c, #0b0e14 75%); }
.tile-8 { background: linear-gradient(160deg, #5c67d6, #0b0e14 75%); }

.tile-badge {
  position: relative; z-index: 1;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(11, 14, 20, 0.65);
  border: 1px solid rgba(238, 241, 246, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  color: var(--sky);
  margin-bottom: auto;
}

.tile-title {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

.tile-meta {
  position: relative; z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .film-grid { grid-template-columns: repeat(2, 1fr); }
}

/* features */
.how { padding: 4rem 1.5rem 5rem; border-top: 1px solid var(--border); }
.how h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  margin: 0.5rem 0 2.5rem; letter-spacing: -0.01em;
}
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  padding: 1.75rem;
}
.step-num { font-family: var(--font-mono); color: var(--sky); font-size: 0.85rem; }
.step h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0.75rem 0 0.5rem; }
.step p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* invite */
.invite { padding: 2rem 1.5rem 6rem; }
.invite-card {
  max-width: 32rem; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem;
  padding: 2.5rem 2rem;
}
.invite-card .eyebrow { justify-content: center; }
.invite-card h2 {
  font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 0.75rem; letter-spacing: -0.01em;
}
.invite-text { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.75rem; }
.invite-form { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.invite-form input {
  flex: 1 1 14rem; padding: 0.75rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.9rem;
}
.invite-form input::placeholder { color: var(--muted); }
.invite-hint { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-row {
  display: flex; justify-content: space-between; padding: 1.5rem;
  font-size: 0.8rem; color: var(--muted);
}
.footer-dim { font-family: var(--font-mono); }

/* motion */
.animate-in { animation: fade-in-up 0.6s ease-out both; }
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .steps { grid-template-columns: 1fr; }
  .nav { display: none; }
}
