:root {
  --ink: #08060c;
  --ink-2: #12101a;
  --panel: #1a1524;
  --line: rgba(232, 168, 74, 0.18);
  --gold: #e8a84a;
  --gold-soft: #f0c57a;
  --heat: #c73e4a;
  --jade: #2a8f7a;
  --fog: rgba(255, 244, 230, 0.72);
  --fog-dim: rgba(255, 244, 230, 0.46);
  --paper: #fff4e6;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Moul", "Kantumruy Pro", serif;
  --font-body: "Kantumruy Pro", "Noto Sans Khmer", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(199, 62, 74, 0.22), transparent 55%),
    radial-gradient(900px 600px at -10% 20%, rgba(42, 143, 122, 0.18), transparent 50%),
    linear-gradient(180deg, #0d0a14 0%, var(--ink) 45%, #05040a 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(232, 168, 74, 0.35);
  color: #fff;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
  background: none;
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 244, 230, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 230, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.35;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: calc(96px + var(--safe-bottom));
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 8px 24px rgba(199, 62, 74, 0.28);
  border: 1px solid rgba(232, 168, 74, 0.28);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand__sub {
  font-size: 12px;
  color: var(--fog-dim);
}

.nav {
  display: none;
  gap: 8px;
}

.nav a,
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--fog);
  border: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.nav a:hover,
.chip:hover,
.chip.is-on {
  border-color: var(--line);
  background: rgba(232, 168, 74, 0.08);
  color: var(--paper);
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--heat), #a52d45 45%, #8b3a1f);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(199, 62, 74, 0.35);
}

.topbar__cta svg {
  width: 16px;
  height: 16px;
}

/* Hero */
.hero {
  position: relative;
  margin-top: 8px;
  min-height: min(78vh, 720px);
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 244, 230, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero__stage {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__media {
  position: absolute;
  inset: -8%;
  background-position: center;
  background-size: cover;
  transform: scale(1.08);
  will-change: transform;
}

.hero__slide.is-active .hero__media {
  animation: kenburns 9s var(--ease-out) forwards;
}

@keyframes kenburns {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.22) translate3d(-2%, -1.5%, 0); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 6, 12, 0.92) 0%, rgba(8, 6, 12, 0.55) 42%, rgba(8, 6, 12, 0.2) 70%, rgba(8, 6, 12, 0.55) 100%),
    linear-gradient(0deg, rgba(8, 6, 12, 0.95) 0%, transparent 42%);
}

.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(78vh, 720px);
  padding: 28px 22px 26px;
  max-width: 640px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(199, 62, 74, 0.18);
  border: 1px solid rgba(199, 62, 74, 0.35);
  color: #ffd0d5;
  font-size: 13px;
  font-weight: 700;
}

.hero__badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--heat);
  box-shadow: 0 0 0 0 rgba(199, 62, 74, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(199, 62, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 62, 74, 0); }
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.25;
  font-weight: 400;
  text-wrap: balance;
}

.hero__lead {
  margin: 14px 0 0;
  max-width: 34ch;
  color: var(--fog);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s;
}

.btn:focus-visible,
.nav a:focus-visible,
.chip:focus-visible,
.card:focus-visible,
.dock__btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold), #d4892e);
  color: #1a1004;
  box-shadow: 0 14px 30px rgba(232, 168, 74, 0.28);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(232, 168, 74, 0.36);
}

.btn--ghost {
  background: rgba(255, 244, 230, 0.06);
  border: 1px solid rgba(255, 244, 230, 0.14);
  color: var(--paper);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.hero__dots {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 244, 230, 0.28);
}

.hero__dots button.is-on {
  background: var(--gold);
  width: 22px;
  border-radius: 999px;
}

/* Marquee strip */
.strip {
  margin: 22px 0 8px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.strip__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.strip:hover .strip__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.strip__item {
  position: relative;
  width: 112px;
  height: 148px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 244, 230, 0.08);
}

.strip__item .live-cover {
  inset: -12%;
}

/* Sections */
.section {
  margin-top: 34px;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  font-weight: 400;
}

.section__head p {
  margin: 6px 0 0;
  color: var(--fog-dim);
  font-size: 0.92rem;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 18%);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 168, 74, 0.35) transparent;
}

.rail::-webkit-scrollbar {
  height: 6px;
}

.rail::-webkit-scrollbar-thumb {
  background: rgba(232, 168, 74, 0.35);
  border-radius: 999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  scroll-snap-align: start;
  display: block;
  text-align: left;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(26, 21, 36, 0.75);
  border: 1px solid rgba(255, 244, 230, 0.07);
  transition: transform 0.28s var(--ease-out), border-color 0.28s, box-shadow 0.28s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 168, 74, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card__thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #15121e;
}

.live-cover {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: coverDrift 12s ease-in-out infinite alternate;
  will-change: transform;
}

.card:nth-child(2n) .live-cover {
  animation-duration: 14s;
  animation-direction: alternate-reverse;
}

.card:nth-child(3n) .live-cover {
  animation-duration: 10s;
}

@keyframes coverDrift {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.18) translate3d(-3%, -2%, 0); }
}

.card:hover .live-cover {
  animation-duration: 4.5s;
}

.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 244, 230, 0.18) 48%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.card:hover .card__shine {
  animation: shine 0.9s var(--ease-out);
}

@keyframes shine {
  to { transform: translateX(120%); }
}

.card__meta {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.tag--hot {
  background: rgba(199, 62, 74, 0.85);
  color: #fff;
}

.tag--new {
  background: rgba(42, 143, 122, 0.88);
  color: #fff;
}

.tag--hd {
  background: rgba(8, 6, 12, 0.7);
  color: var(--gold-soft);
  border: 1px solid rgba(232, 168, 74, 0.35);
}

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(8, 6, 12, 0.15), rgba(8, 6, 12, 0.45));
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2;
}

.card:hover .card__play {
  opacity: 1;
}

.card__play span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(232, 168, 74, 0.95);
  color: #1a1004;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.card__play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.card__body {
  padding: 12px 12px 14px;
}

.card__title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__info {
  margin-top: 6px;
  color: var(--fog-dim);
  font-size: 0.82rem;
}

/* Feature band */
.feature {
  margin-top: 36px;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(232, 168, 74, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(26, 21, 36, 0.9), rgba(18, 16, 26, 0.95));
  border: 1px solid var(--line);
}

.feature h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
}

.feature p {
  margin: 8px 0 0;
  color: var(--fog);
  line-height: 1.6;
  max-width: 46ch;
}

.feature__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature__list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.feature__list strong {
  display: block;
  margin-bottom: 2px;
}

.feature__list span {
  color: var(--fog-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(232, 168, 74, 0.12);
  color: var(--gold);
}

.feature__icon svg {
  width: 18px;
  height: 18px;
}

/* Dock */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(8, 6, 12, 0.88) 28%, rgba(8, 6, 12, 0.96));
  backdrop-filter: blur(10px);
}

.dock__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(26, 21, 36, 0.92);
  border: 1px solid rgba(255, 244, 230, 0.1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
}

.dock__preview {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
  border: 1px solid rgba(232, 168, 74, 0.28);
}

.dock__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dock__copy {
  flex: 1;
  min-width: 0;
}

.dock__copy strong {
  display: block;
  font-size: 0.95rem;
}

.dock__copy span {
  color: var(--fog-dim);
  font-size: 0.8rem;
}

.dock__btn {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #d4892e);
  color: #1a1004;
  font-weight: 800;
  white-space: nowrap;
}

.footer {
  margin: 40px 0 20px;
  color: var(--fog-dim);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .nav {
    display: flex;
  }

  .hero__content {
    padding: 40px 42px 36px;
  }

  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding: 32px;
  }

  .rail {
    grid-auto-columns: minmax(170px, 16%);
  }
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide.is-active .hero__media,
  .live-cover,
  .strip__track,
  .card__shine,
  .hero__badge i {
    animation: none !important;
  }

  .hero__slide {
    transition: none;
  }
}
