:root {
  --bg: #08040d;
  --nav: #0d0715;
  --surface: #12091e;
  --surface-strong: #190d28;
  --surface-soft: #201134;
  --fg: #f7f1ff;
  --muted: #b8a8ca;
  --accent: #8b5cf6;
  --accent-strong: #a78bfa;
  --line: #34204c;
  --radius: 4px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.page-shell {
  position: relative;
  width: min(100%, var(--max));
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(18px + env(safe-area-inset-top))
    clamp(14px, 4vw, 32px)
    calc(32px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--nav);
}

.brand,
.nav-cluster,
.mode-nav,
.hero__actions,
.video-card__meta {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 12px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 14px 7px 7px;
  background: var(--surface);
  font-weight: 800;
  letter-spacing: 0;
}

.brand__mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 3px;
  border: 1px solid var(--accent-strong);
  object-fit: cover;
}

.nav-cluster {
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.mode-nav {
  gap: 8px;
  min-width: 0;
}

.mode-nav a,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.mode-nav a:hover,
.mode-nav a:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible {
  border-color: var(--accent-strong);
  background: var(--surface-soft);
  color: var(--fg);
  outline: none;
}

.nav-cta {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(min(100%, 340px), 0.92fr);
  align-items: center;
  gap: clamp(18px, 5vw, 44px);
  padding-block: clamp(42px, 9vw, 82px) clamp(26px, 6vw, 56px);
}

.hero__copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-size: 8.4rem;
  line-height: 0.88;
  letter-spacing: 0;
}

.hero__text {
  width: min(100%, 560px);
  margin: clamp(20px, 5vw, 28px) 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.hero__actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(22px, 5vw, 32px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button--ghost {
  background: var(--surface-soft);
  color: var(--fg);
}

.client-panel {
  align-self: stretch;
  display: flex;
  min-width: 0;
  min-height: 380px;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 4vw, 28px);
  background: var(--surface);
}

.client-panel__logo {
  display: block;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-strong);
}

.client-panel__copy {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-strong);
}

.client-panel__copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.client-panel__copy strong {
  display: block;
  color: var(--fg);
  font-size: 1.12rem;
  line-height: 1.35;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3.5vw, 24px);
  min-width: 0;
}

.video-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-strong);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.video-card.is-active {
  border-color: var(--accent-strong);
}

.video-card:hover {
  transform: translateY(-2px);
}

.video-card__meta {
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.video-card__meta p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--fg);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card__meta a {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card__meta a:hover,
.video-card__meta a:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #05000d;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 820px) {
  .hero,
  .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    font-size: 6.2rem;
  }

  .client-panel {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    justify-content: center;
  }

  .nav-cluster {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

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

  .mode-nav a {
    font-size: 0.86rem;
    text-align: center;
  }

  .nav-cta {
    min-height: 46px;
  }

  h1 {
    font-size: 4.65rem;
  }

  .hero__text {
    font-size: 1rem;
  }

  .video-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    padding-inline: 10px;
  }

  .button {
    width: 100%;
    padding-inline: 13px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 3.45rem;
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  .brand {
    min-height: 50px;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
  }

  .mode-nav a {
    min-height: 44px;
    padding-inline: 10px;
  }
}

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