:root {
  --black: #050706;
  --panel: #090d0b;
  --panel-light: #111512;
  --cream: #f4f3ee;
  --green: #c5f45a;
  --green-dark: #9ac43e;
  --grey: #929892;
  --line: rgba(197, 244, 90, 0.16);
  --white: #fff;
  --display: Impact, "Arial Narrow", sans-serif;
  --body: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  position: relative;
  width: 100%;
  min-width: 320px;
  max-width: 100vw;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 10%, #172019 0, transparent 34%),
    radial-gradient(ellipse at center, transparent 42%,
      rgba(0, 0, 0, 0.78) 100%),
    var(--black);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  background-image: url("assets/noise.svg");
  content: "";
  mix-blend-mode: soft-light;
  opacity: 0.13;
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: 99;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 45%,
      rgba(0, 0, 0, 0.3) 76%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025),
      transparent 18%, transparent 78%, rgba(0, 0, 0, 0.4));
  content: "";
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-shell {
  width: 100%;
  max-width: 1600px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  padding: 0 clamp(24px, 4vw, 60px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 35%),
    rgba(5, 7, 6, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--black);
  background: var(--green);
  place-items: center;
  transform: skew(-5deg);
}

.header-link {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #c7cbc7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-link span {
  color: var(--green);
  font-size: 17px;
}

.header-actions {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
}

.private-link {
  color: var(--green);
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(780px, 54vw, 970px);
  overflow: hidden;
  grid-template-columns: 1fr 1fr;
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.98) 0%,
      rgba(5, 7, 6, 0.75) 43%, rgba(5, 7, 6, 0.45) 100%),
    repeating-linear-gradient(90deg, transparent 0 120px,
      rgba(255, 255, 255, 0.018) 121px 122px),
    radial-gradient(ellipse at 70% 62%, #263027 0, #0a0e0b 48%,
      #030504 80%);
}

.hero > * {
  min-width: 0;
}

.hero::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  background:
    repeating-linear-gradient(170deg, transparent 0 44px,
      rgba(197, 244, 90, 0.035) 45px 46px);
  content: "";
  opacity: 0.75;
  transform: perspective(500px) rotateX(58deg);
  transform-origin: bottom;
}

.hero::after {
  position: absolute;
  z-index: 1;
  right: -8%;
  bottom: 2%;
  width: 78%;
  height: 42%;
  background:
    radial-gradient(ellipse at center, rgba(191, 198, 190, 0.12),
      rgba(105, 114, 106, 0.05) 38%, transparent 72%);
  content: "";
  filter: blur(30px);
  opacity: 0.75;
  pointer-events: none;
  transform: rotate(-4deg);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px clamp(30px, 5vw, 78px) 150px;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h1 {
  max-width: 700px;
  font-size: clamp(72px, 8vw, 130px);
  line-height: 0.87;
}

h1 span {
  display: block;
  margin-top: 12px;
  color: var(--green);
}

.hero-intro {
  max-width: 490px;
  margin: 38px 0 0;
  color: #c0c4c0;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
}

.primary-button {
  position: relative;
  display: inline-flex;
  gap: 15px;
  align-items: center;
  min-width: 292px;
  margin-top: 40px;
  padding: 18px 72px 18px 20px;
  overflow: hidden;
  color: var(--black);
  background: var(--green);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-button:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.button-play {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--green);
  background: var(--black);
  font-size: 12px;
  place-items: center;
}

.button-stripes {
  position: absolute;
  top: -10px;
  right: -20px;
  width: 72px;
  height: 90px;
  background: repeating-linear-gradient(135deg, transparent 0 6px,
    var(--black) 7px 10px);
  transform: skew(-10deg);
}

.hero-art {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(5, 7, 6, 0.18), transparent 30%),
    url("assets/basketball-court.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 6, 0.06),
      transparent 45%, rgba(5, 7, 6, 0.58)),
    radial-gradient(ellipse at 55% 72%, rgba(209, 214, 209, 0.09),
      transparent 46%);
  content: "";
  pointer-events: none;
}

.hero-stat {
  position: absolute;
  z-index: 2;
  top: 120px;
  right: 55px;
  display: flex;
  align-items: center;
  min-width: 124px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 7, 6, 0.88);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.38);
  flex-direction: column;
}

.hero-stat strong {
  font-family: var(--display);
  font-size: 54px;
  line-height: 0.95;
}

.hero-stat span {
  margin-top: 10px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-stat span::before {
  color: var(--green);
  content: "• ";
}

.library {
  position: relative;
  z-index: 3;
  width: auto;
  max-width: calc(100% - clamp(40px, 8vw, 120px));
  margin: 0 clamp(20px, 4vw, 60px);
  padding: clamp(38px, 5vw, 66px) clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 48% 0,
      rgba(157, 166, 158, 0.075), transparent 43%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.025),
      transparent 36%),
    #070b09;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
}

.library::before {
  position: absolute;
  z-index: -1;
  right: 4%;
  bottom: -70px;
  left: 4%;
  height: 180px;
  background: radial-gradient(ellipse at center,
    rgba(173, 181, 173, 0.09), transparent 68%);
  content: "";
  filter: blur(24px);
  pointer-events: none;
}

.private-site {
  background:
    radial-gradient(circle at 70% 10%, rgba(197, 244, 90, 0.08),
      transparent 30%),
    var(--black);
}

.private-library {
  min-height: calc(100vh - 266px);
  margin-top: 48px;
}

.private-library .section-heading h1 {
  font-size: clamp(55px, 6vw, 88px);
  line-height: 0.9;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: clamp(55px, 6vw, 88px);
  line-height: 0.9;
}

.video-count {
  margin: 0 0 8px;
  color: var(--grey);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  gap: 20px;
  margin: 38px 0 34px;
  grid-template-columns: 1fr auto;
}

.search-field {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #d3d6d3;
  background: linear-gradient(90deg, #151917, #1b1f1d);
  grid-column: 1 / -1;
}

.search-field svg {
  width: 23px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--cream);
  background: transparent;
}

.search-field input::placeholder {
  color: #7f857f;
}

.sort-field {
  display: flex;
  align-items: center;
  min-width: 255px;
  min-height: 58px;
  padding: 0 16px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  color: #d7dad7;
  background: #090c0a;
  font-size: 12px;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1;
  text-transform: uppercase;
}

.sort-field select {
  min-height: 56px;
  border: 0;
  outline: 0;
  color: var(--cream);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  flex: 1;
}

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

.video-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: linear-gradient(145deg, #0b100d, #111512);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.025);
}

.video-card::after {
  position: absolute;
  right: 7%;
  bottom: -28px;
  left: 7%;
  height: 45px;
  background: radial-gradient(ellipse at center,
    rgba(178, 187, 179, 0.12), transparent 70%);
  content: "";
  filter: blur(14px);
  opacity: 0.5;
  pointer-events: none;
}

.video-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--cream);
  background: none;
  cursor: pointer;
  text-align: left;
}

.thumbnail-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: #080b09;
  aspect-ratio: 16 / 9;
}

.thumbnail-wrap::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(197, 244, 90, 0.035)),
    repeating-linear-gradient(90deg, transparent 0 120px,
      rgba(197, 244, 90, 0.1) 121px 122px);
  content: "";
  pointer-events: none;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(0.55) contrast(1.18);
  transition: opacity 300ms ease, transform 400ms ease;
}

.thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  color: rgba(197, 244, 90, 0.16);
  background:
    radial-gradient(circle at center, transparent 0 21%,
      rgba(197, 244, 90, 0.2) 21.5% 22%, transparent 22.5%),
    linear-gradient(90deg, transparent 49.7%,
      rgba(197, 244, 90, 0.22) 50%, transparent 50.3%),
    #080c09;
  font-family: var(--display);
  font-size: clamp(110px, 15vw, 220px);
  place-items: center;
}

.new-badge {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  padding: 8px 14px;
  border-radius: 0 0 7px;
  color: var(--black);
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.play-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--green);
  background: rgba(5, 7, 6, 0.85);
  place-items: center;
  transform: translate(-50%, -50%);
  transition: background 180ms ease, transform 180ms ease;
}

.play-icon svg {
  width: 34px;
  fill: currentcolor;
}

.video-trigger:hover .video-thumbnail {
  opacity: 0.9;
  transform: scale(1.035);
}

.video-trigger:hover .play-icon {
  color: var(--black);
  background: var(--green);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-trigger:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: -3px;
}

.card-copy {
  display: flex;
  gap: 12px;
  padding: 22px 24px 24px;
  flex-direction: column;
}

.video-title {
  overflow: hidden;
  font-size: 20px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-meta {
  color: var(--grey);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-meta::before {
  margin-right: 8px;
  color: var(--green);
  content: "▣";
}

.status-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 40px;
  border: 1px dashed rgba(197, 244, 90, 0.3);
  border-radius: 10px;
  color: var(--grey);
  text-align: center;
}

.status-panel[hidden] {
  display: none;
}

.status-configuration,
.status-error {
  color: #d8d3ca;
  background: #17140e;
}

.loader {
  width: 22px;
  height: 22px;
  border: 2px solid #343a34;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 180px;
  padding: 70px clamp(24px, 5vw, 80px) 45px;
  color: var(--grey);
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018)),
    radial-gradient(ellipse at 50% 120%,
      rgba(197, 244, 90, 0.045), transparent 48%);
}

.brand-small {
  color: var(--cream);
}

.brand-small .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.video-dialog {
  width: min(1100px, calc(100vw - 40px));
  max-width: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cream);
  background: #0c100e;
}

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

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 30px 24px;
}

.dialog-header .eyebrow {
  margin-bottom: 7px;
}

.dialog-header h2 {
  max-width: 850px;
  overflow: hidden;
  font-size: clamp(24px, 4vw, 38px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-button {
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--cream);
  background: transparent;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  place-items: center;
}

.video-frame {
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  margin: -1px;
  white-space: nowrap;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .hero {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    width: 100%;
    padding-bottom: 70px;
  }

  .hero-art {
    width: 100%;
    min-height: 440px;
    background-position: center 18%;
    background-size: cover;
  }

  .library {
    width: calc(100% - 32px);
    max-width: none;
    margin: 0 16px;
  }

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

  .toolbar {
    display: flex;
    flex-direction: column;
  }

  .sort-field {
    width: 100%;
    min-width: 0;
    order: -1;
  }

  .search-field {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 820px;
  }

  .hero-copy {
    padding-top: 72px;
  }

  .header-actions {
    gap: 14px;
  }

  .header-actions .header-link:first-child {
    display: none;
  }

  h1 {
    font-size: clamp(62px, 20vw, 90px);
  }

  .hero-intro {
    margin-top: 28px;
  }

  .hero-art {
    min-height: 330px;
  }

  .hero-stat {
    top: 30px;
    right: 28px;
  }

  .library {
    width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
  }

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

  footer {
    gap: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-header {
    padding: 20px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
