:root {
  color-scheme: light;
  --ink: #242843;
  --green: #242843;
  --green-dark: #242843;
  --lime: #d4df46;
  --yellow: #f2c84b;
  --cream: #ffffff;
  --white: #fff;
  --muted: #697972;
  --line: #d9ded9;
  --shadow: 0 20px 55px rgba(36, 40, 67, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 16px;
}
button, input { font: inherit; }
button { color: inherit; }
.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;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  background: var(--green);
  color: white;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 800 .95rem/1 Manrope, sans-serif; letter-spacing: .13em; }
.brand-mark { display: grid; place-items: center; width: 31px; aspect-ratio: 1; border: 2px solid var(--lime); border-radius: 50%; color: var(--lime); font-size: .85rem; letter-spacing: 0; }
.surprise-button { display: flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: transparent; color: white; cursor: pointer; }
.surprise-button:hover { background: rgba(255,255,255,.1); }

.intro { padding: clamp(54px, 8vw, 108px) clamp(20px, 6vw, 92px) clamp(48px, 7vw, 84px); background: var(--green); color: white; border-radius: 0 0 clamp(28px, 5vw, 72px) clamp(28px, 5vw, 72px); }
.eyebrow { margin-bottom: 20px; color: var(--lime); font: 700 .78rem/1 Manrope, sans-serif; letter-spacing: .2em; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); align-items: end; gap: clamp(32px, 7vw, 100px); }
h1 { margin: 0; max-width: 850px; font: 800 clamp(3.2rem, 7.8vw, 7.9rem)/.87 Manrope, sans-serif; letter-spacing: -.07em; }
h1 em { color: var(--yellow); font-style: normal; }
.intro-copy > p { margin: 0 0 32px; max-width: 440px; color: #dbe6e1; font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.65; }
.stats { display: flex; gap: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); color: #b9cbc4; font-size: .88rem; }
.stats strong { display: block; color: white; font: 700 1.65rem/1.1 Manrope, sans-serif; }

.library { padding: clamp(32px, 5vw, 64px) clamp(20px, 6vw, 92px) 90px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1 1 340px; max-width: 490px; }
.search-box svg { position: absolute; top: 50%; left: 18px; width: 20px; fill: none; stroke: var(--green); stroke-width: 1.7; transform: translateY(-50%); }
.search-box input { width: 100%; min-height: 51px; padding: 12px 18px 12px 52px; border: 1px solid var(--line); border-radius: 15px; outline: none; background: rgba(255,255,255,.7); color: var(--ink); }
.search-box input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,40,67,.1); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 3px; scrollbar-width: none; }
.filter-button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; white-space: nowrap; cursor: pointer; }
.filter-button:hover { border-color: var(--green); }
.filter-button.active { background: var(--green); border-color: var(--green); color: white; }
.result-count { margin: 32px 0 18px; color: var(--muted); font-size: .88rem; }
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.video-card { min-width: 0; animation: rise .55s both; animation-delay: var(--delay); }
.poster { position: relative; display: block; width: 100%; aspect-ratio: 9/14; padding: 0; overflow: hidden; border: 0; border-radius: 24px; background: var(--cover); box-shadow: var(--shadow); text-align: left; cursor: pointer; isolation: isolate; transition: transform .28s ease, box-shadow .28s ease; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20,23,43,.82) 100%); z-index: -1; }
.poster:hover { transform: translateY(-7px); box-shadow: 0 28px 70px rgba(36,40,67,.22); }
.poster:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }
.new-badge, .poster-duration { position: absolute; top: 14px; padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.new-badge { left: 14px; background: var(--lime); color: var(--green-dark); }
.poster-duration { right: 14px; background: rgba(36,40,67,.72); color: white; backdrop-filter: blur(7px); }
.play-icon { position: absolute; left: 18px; bottom: 89px; display: grid; place-items: center; width: 48px; aspect-ratio: 1; border-radius: 50%; background: white; color: var(--green); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.play-icon svg { width: 24px; fill: currentColor; }
.poster-caption { position: absolute; right: 18px; bottom: 20px; left: 18px; color: white; }
.poster-caption strong { display: block; margin-bottom: 2px; font: 700 clamp(1.35rem, 2.2vw, 2rem)/1.1 Manrope, sans-serif; }
.poster-caption span { color: rgba(255,255,255,.83); font-size: .9rem; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; padding: 13px 5px 0; color: var(--muted); font-size: .78rem; }
.card-meta span:first-child { color: var(--green); font-weight: 700; }
.empty-state { padding: 72px 20px; text-align: center; }
.empty-state > span { font-size: 3rem; }
.empty-state h2 { margin: 10px 0 4px; font: 700 1.4rem Manrope, sans-serif; }
.empty-state p { color: var(--muted); }
.empty-state button { margin-top: 10px; padding: 11px 18px; border: 0; border-radius: 999px; background: var(--green); color: white; cursor: pointer; }

.player-dialog { width: min(1000px, calc(100% - 30px)); max-height: calc(100dvh - 30px); padding: 0; overflow: visible; border: 0; border-radius: 30px; background: var(--green-dark); color: white; box-shadow: 0 35px 100px rgba(0,0,0,.42); }
.player-dialog::backdrop { background: rgba(20,23,43,.82); backdrop-filter: blur(9px); }
.dialog-shell { position: relative; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(340px, 1fr); min-height: min(700px, calc(100dvh - 30px)); overflow: hidden; border-radius: inherit; }
.close-button { position: absolute; top: 16px; right: 16px; z-index: 5; display: grid; place-items: center; width: 43px; height: 43px; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(36,40,67,.65); color: white; font-size: 1.7rem; cursor: pointer; }
.video-stage { position: relative; min-height: 580px; overflow: hidden; background: #061d17; }
.video-stage video, .video-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-stage video { z-index: 2; opacity: 0; transition: opacity .3s; }
.video-stage video.ready { opacity: 1; }
.video-fallback { display: grid; place-items: center; color: rgba(255,255,255,.7); font-weight: 700; }
.profile { align-self: center; padding: clamp(36px, 6vw, 74px); }
.profile-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.activity-pill { padding: 7px 11px; border-radius: 999px; background: var(--lime); color: var(--green-dark); font-size: .75rem; font-weight: 700; }
.duration { color: #a8bdb5; font-size: .82rem; }
.profile h2 { margin: 32px 0 4px; font: 800 clamp(2.7rem, 6vw, 5rem)/.95 Manrope, sans-serif; letter-spacing: -.06em; }
.dialog-role { margin: 0; color: var(--yellow); font-size: 1.15rem; }
.profile blockquote { margin: 36px 0; padding: 0; color: #dbe5e1; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.65; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; padding: 24px 0; border-top: 1px solid rgba(255,255,255,.17); border-bottom: 1px solid rgba(255,255,255,.17); }
.details div { min-width: 0; }
.details dt { margin-bottom: 5px; color: #91aaa0; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.details dd { margin: 0; }
.dialog-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; color: #9fb4ac; }
.dialog-nav button { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: transparent; color: white; font-size: 1.25rem; cursor: pointer; }
.dialog-nav button:hover, .close-button:hover { background: rgba(255,255,255,.1); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 1050px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .topbar { height: 66px; }
  .surprise-button { padding: 9px 12px; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-copy { max-width: 560px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-shell { grid-template-columns: minmax(190px, .75fr) 1fr; min-height: min(620px, calc(100dvh - 24px)); }
  .profile { padding: 34px 26px; }
  .video-stage { min-height: 520px; }
}
@media (max-width: 560px) {
  .brand span:last-child { display: none; }
  .toolbar { display: block; }
  .search-box { display: block; max-width: none; }
  .filters { margin-top: 16px; }
  .video-grid { gap: 12px; }
  .poster { border-radius: 18px; }
  .play-icon { bottom: 76px; width: 40px; }
  .poster-caption strong { font-size: 1.2rem; }
  .poster-caption span { font-size: .78rem; }
  .card-meta { display: none; }
  .dialog-shell { display: block; min-height: 0; max-height: calc(100dvh - 20px); overflow-y: auto; }
  .video-stage { width: min(100%, 380px); min-height: 64dvh; margin: 0 auto; }
  .profile { padding: 30px 24px; }
  .profile h2 { margin-top: 20px; }
  .profile blockquote { margin: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
