:root {
  color-scheme: dark;
  --bg: #090b0f;
  --surface: #11151c;
  --text: #f7f1e8;
  --muted: #a9b1bd;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff3d57;
  --accent-strong: #ff6b35;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(9, 11, 15, 0.9), rgba(9, 11, 15, 0));
}

.brand,
.nav,
.ghost-button {
  animation: slide-down 560ms ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-strong)),
    var(--accent);
  box-shadow: 0 0 36px rgba(255, 61, 87, 0.45);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  border-left: 10px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  color: rgba(247, 241, 232, 0.78);
  font-size: 14px;
  font-weight: 650;
}

.nav a,
.section-heading a {
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav a:hover,
.section-heading a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.ghost-button,
.cta button,
.signup-row button,
.dialog-panel button[type="submit"] {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 34px rgba(255, 61, 87, 0.22);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.ghost-button {
  padding: 10px 18px;
}

button:hover {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 94svh;
  overflow: hidden;
  padding: 160px clamp(20px, 6vw, 86px) 72px;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: image-drift 12s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 61, 87, 0.2), transparent 34%),
    linear-gradient(90deg, rgba(9, 11, 15, 0.96) 0%, rgba(9, 11, 15, 0.68) 42%, rgba(9, 11, 15, 0.2) 100%),
    linear-gradient(180deg, rgba(9, 11, 15, 0.1), var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  animation: rise-in 720ms 120ms ease both;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(56px, 9vw, 126px);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-copy {
  width: min(560px, 100%);
  color: rgba(247, 241, 232, 0.8);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.signup-form {
  width: min(620px, 100%);
  margin-top: 32px;
}

.signup-form label,
.dialog-panel label {
  display: block;
  margin-bottom: 8px;
  color: rgba(247, 241, 232, 0.78);
  font-size: 13px;
  font-weight: 750;
}

.signup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 15px 18px;
  color: var(--text);
  background: rgba(9, 11, 15, 0.72);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

input:focus {
  border-color: rgba(255, 107, 53, 0.92);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.16);
  background: rgba(9, 11, 15, 0.92);
}

.signup-row button,
.dialog-panel button[type="submit"] {
  padding: 0 24px;
  white-space: nowrap;
}

.form-message,
.dialog-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: #96f0bd;
  font-size: 14px;
  font-weight: 700;
}

.rail,
.channels,
.cta {
  padding: 56px clamp(20px, 5vw, 72px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2,
.channels h2,
.cta h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.section-heading a {
  color: var(--muted);
  font-weight: 800;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.video-tile {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise-in 700ms ease both;
}

.video-tile:nth-child(2) {
  animation-delay: 80ms;
}

.video-tile:nth-child(3) {
  animation-delay: 150ms;
}

.video-tile:nth-child(4) {
  animation-delay: 220ms;
}

.video-tile:nth-child(5) {
  animation-delay: 290ms;
}

.video-tile.feature {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 578px;
}

.video-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.04);
  transition:
    transform 420ms ease,
    filter 420ms ease;
}

.video-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.8));
}

.video-tile:hover img {
  transform: scale(1.07);
  filter: saturate(1.16) contrast(1.08);
}

.tile-meta {
  position: absolute;
  z-index: 1;
  inset: auto 18px 18px;
}

.tile-meta span {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.tile-meta h3 {
  margin-bottom: 6px;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.04;
}

.tile-meta p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.channels {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0d1117;
}

.channel-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.channel-list a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  background: #0d1117;
  color: rgba(247, 241, 232, 0.82);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 850;
  transition:
    color 180ms ease,
    padding 180ms ease;
}

.channel-list a:hover {
  color: white;
  padding-left: 14px;
}

.channel-list strong {
  color: var(--accent-strong);
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.cta p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.cta button {
  padding: 16px 24px;
}

.signup-dialog {
  width: min(470px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.signup-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-panel {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #10141b;
  box-shadow: var(--shadow);
}

.dialog-panel h2 {
  margin: 0 0 4px;
  font-size: 32px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.dialog-panel button[type="submit"] {
  min-height: 50px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes image-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, 1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: 88svh;
    padding-top: 124px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-tile.feature {
    grid-column: span 2;
    min-height: 460px;
  }

  .channels,
  .cta {
    grid-template-columns: 1fr;
  }

  .cta button {
    width: max-content;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 66px;
    padding-inline: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .ghost-button {
    padding: 9px 12px;
  }

  .hero {
    min-height: 92svh;
    padding: 112px 16px 44px;
  }

  .signup-row {
    grid-template-columns: 1fr;
  }

  .signup-row button {
    min-height: 50px;
  }

  .rail,
  .channels,
  .cta {
    padding-inline: 16px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-tile,
  .video-tile.feature {
    grid-column: auto;
    min-height: 310px;
  }
}
