:root {
  --ink: #edf7ff;
  --paper: #050a12;
  --deep-space: #071525;
  --surface: #0b1d31;
  --cyan: #29c9ff;
  --blue: #287cff;
  --violet: #a75cff;
  --sunset: #ff9d5c;
  --acid: #29c9ff;
  --muted: #8ba4b8;
  --line: rgba(126, 187, 231, .23);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 5vw;
}

.site-header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: .05em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #02101c;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 26px rgba(41, 201, 255, .26);
  font-size: 18px;
}

.edition, .eyebrow, .archive-heading, .video-meta, footer, .filter, .dialog-copy p {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: .11em;
}

.edition span { color: var(--muted); margin: 0 7px; }
.channel-link { color: var(--muted); text-decoration: none; transition: color .2s; }
.banner-channel-link { display: flex; justify-content: flex-end; padding: 18px 0; border-bottom: 1px solid var(--line); }
.channel-link:hover { color: var(--cyan); }

.world-banner {
  position: relative;
  min-height: clamp(280px, 34vw, 440px);
  margin-top: 28px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(83, 190, 255, .35);
  background-image:
    linear-gradient(90deg, rgba(2, 7, 13, .84) 0%, rgba(2, 7, 13, .24) 54%, rgba(2, 7, 13, .06) 100%),
    linear-gradient(0deg, rgba(2, 7, 13, .86) 0%, transparent 48%),
    url("bannerYouTube.png");
  background-size: cover;
  background-position: center 56%;
  box-shadow: 0 24px 80px rgba(0, 31, 64, .38), inset 0 0 80px rgba(15, 93, 160, .12);
}

.world-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 44%, rgba(45, 174, 255, .12) 54%, transparent 64%);
}

.banner-copy, .banner-coordinate { position: relative; z-index: 1; }
.banner-copy p, .banner-coordinate { font: 10px "DM Mono", monospace; letter-spacing: .16em; }
.banner-copy p { margin: 0 0 12px; color: var(--cyan); }
.banner-copy h2 { margin: 0 0 22px; max-width: 520px; font-size: clamp(36px, 5vw, 66px); line-height: .93; letter-spacing: -.055em; }
.banner-copy a { display: inline-flex; gap: 28px; align-items: center; padding: 11px 15px; color: #03111e; background: var(--cyan); text-decoration: none; font-size: 12px; font-weight: 700; }
.banner-copy a:hover { background: #fff; }
.banner-coordinate { margin: 0; text-align: right; line-height: 1.7; color: rgba(237, 247, 255, .72); }

.hero {
  min-height: 370px;
  padding: 70px 0 56px;
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: end;
  gap: 40px;
}

.eyebrow { margin: 0 0 26px; }
.eyebrow { color: var(--cyan); }
.eyebrow::before { content: "✦"; color: var(--sunset); margin-right: 10px; }

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(48px, 6.2vw, 92px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.065em;
}

h1 em { font-family: Georgia, serif; font-weight: 400; }

.intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.controls {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.search-box { position: relative; display: flex; align-items: center; width: min(330px, 100%); }
.search-box input { width: 100%; padding: 14px 56px 14px 32px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: var(--muted); }
.search-icon { position: absolute; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); right: -4px; bottom: -2px; }
kbd { position: absolute; right: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; font-family: "DM Mono", monospace; font-size: 10px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filter { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(8, 28, 47, .45); cursor: pointer; transition: .2s ease; }
.filter:hover, .filter.active { border-color: var(--cyan); color: #03111e; background: var(--cyan); box-shadow: 0 0 22px rgba(41, 201, 255, .18); }

.archive { padding: 54px 0 88px; }
.archive-heading { display: flex; justify-content: space-between; margin-bottom: 28px; }
.archive-heading h2, .archive-heading p { margin: 0; font: inherit; }
.archive-heading p { color: var(--cyan); }

.video-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 46px 22px; }
.video-card { min-width: 0; grid-column: span 4; cursor: pointer; }
.video-card:nth-child(5n + 1), .video-card:nth-child(5n + 2) { grid-column: span 6; }

.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.8) brightness(.83) contrast(1.08); transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .3s; }
.video-card:hover img { transform: scale(1.035); filter: saturate(1.1) brightness(.95); }
.play { position: absolute; left: 18px; bottom: 18px; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #03111e; background: var(--cyan); box-shadow: 0 0 25px rgba(41, 201, 255, .45); cursor: pointer; transition: transform .2s; }
.play::after { content: ""; margin-left: 3px; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.video-card:hover .play { transform: scale(1.08); }
.duration { position: absolute; right: 12px; bottom: 12px; padding: 5px 7px; color: white; background: rgba(3, 10, 18, .85); font: 10px "DM Mono", monospace; }

.video-meta { display: flex; gap: 10px; margin: 16px 0 10px; color: var(--muted); }
.video-meta span:first-child { color: var(--cyan); }
.video-title { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.2; letter-spacing: -.025em; }
.video-summary { margin: 12px 0 0; max-width: 58ch; color: var(--muted); font-size: 13px; line-height: 1.65; }

.empty-state { padding: 80px 20px; text-align: center; border: 1px solid var(--line); }
.empty-state button { padding: 10px 16px; border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; }

footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); }
footer span { color: var(--violet); margin-left: 8px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--cyan); }

dialog { width: min(1000px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); color: var(--ink); background: #050d17; box-shadow: 0 24px 80px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(1, 5, 10, .88); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,.65); font-size: 24px; cursor: pointer; }
.player-wrap { aspect-ratio: 16/9; }
.player-wrap iframe { width: 100%; height: 100%; border: 0; }
.dialog-copy { padding: 20px 24px 28px; }
.dialog-copy p { margin: 0 0 8px; color: var(--acid); }
.dialog-copy h2 { margin: 0; font-size: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
  .page-shell { padding: 0 22px; }
  .hero { min-height: 360px; grid-template-columns: 1fr; padding: 60px 0 42px; }
  .world-banner { background-position: 42% center; }
  .intro { max-width: 440px; }
  .controls { align-items: stretch; flex-direction: column; padding: 18px 0; }
  .search-box { width: 100%; }
  .filters { justify-content: flex-start; }
  .video-card, .video-card:nth-child(5n + 1), .video-card:nth-child(5n + 2) { grid-column: span 6; }
}

@media (max-width: 540px) {
  .edition { display: none; }
  .banner-channel-link .edition { display: inline-block; }
  h1 { font-size: 45px; }
  .world-banner { min-height: 360px; margin-top: 18px; padding: 24px; background-position: 38% center; }
  .banner-coordinate { display: none; }
  .banner-copy h2 { max-width: 280px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .video-card, .video-card:nth-child(5n + 1), .video-card:nth-child(5n + 2) { grid-column: 1; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 10px; }
  footer p { margin: 0; }
}

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