:root {
  color-scheme: dark;
  --bg: #0a090c;
  --bg-soft: #141218;
  --ink: #f7f1e6;
  --muted: #c9b79a;
  --gold: #e6b84d;
  --gold-deep: #c48a1f;
  --crimson: #c42745;
  --line: rgba(230, 184, 77, 0.22);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Noto Sans Khmer", "Khmer OS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(196, 39, 69, 0.18), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(230, 184, 77, 0.12), transparent 50%),
    var(--bg);
  font-family: var(--font);
  line-height: 1.55;
}

::selection {
  background: rgba(230, 184, 77, 0.35);
  color: #fff;
}

a, button {
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 9, 12, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(196, 39, 69, 0.28);
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand-word {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
}

.brand-tag {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.header-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 6px;
  border-radius: 999px;
  color: #1a1203;
  background: linear-gradient(180deg, #ffe7a8 0%, #e6b84d 48%, #c48a1f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 22px rgba(196, 138, 31, 0.28);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
}

.header-download:hover { filter: brightness(1.05); }
.header-download:active { transform: translateY(1px); }

.download-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1c1308;
  color: var(--gold);
}

.download-symbol svg,
.cta-icon svg,
.home-btn-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.02);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 12, 0.35) 0%, rgba(10, 9, 12, 0.18) 28%, rgba(10, 9, 12, 0.82) 68%, rgba(10, 9, 12, 0.98) 100%),
    linear-gradient(90deg, rgba(10, 9, 12, 0.78) 0%, rgba(10, 9, 12, 0.2) 55%, rgba(10, 9, 12, 0.55) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
  max-width: 34rem;
  animation: riseIn 700ms var(--ease) both;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 64px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff8e8;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-en {
  margin: 10px 0 0;
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 16px 0 0;
  color: rgba(247, 241, 230, 0.88);
  font-size: 17px;
  font-weight: 600;
}

.hero-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px 0 6px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
}

.home-btn:active { transform: translateY(1px); }

.home-btn--gold {
  color: #1a1203;
  background: linear-gradient(180deg, #ffe7a8, #e6b84d 55%, #c48a1f);
  box-shadow: 0 12px 28px rgba(196, 138, 31, 0.3);
}

.home-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.home-btn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.home-btn--ghost .home-btn-icon {
  background: rgba(230, 184, 77, 0.16);
  color: var(--gold);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 8px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.25;
  font-weight: 800;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 18%);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.poster-rail::-webkit-scrollbar {
  height: 6px;
}

.poster-rail::-webkit-scrollbar-thumb {
  background: rgba(230, 184, 77, 0.35);
  border-radius: 999px;
}

.poster-card {
  scroll-snap-align: start;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: transform 220ms var(--ease);
}

.poster-card:hover { transform: translateY(-4px); }

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.poster-card strong {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 800;
}

.poster-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.feature-band {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 18, 24, 0.95), rgba(10, 9, 12, 0.98));
}

.feature-band img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.feature-list {
  display: grid;
  gap: 0;
  padding: 8px 0;
}

.feature-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-item:first-child { border-top: 0; }

.feature-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--gold);
  background: rgba(230, 184, 77, 0.1);
  border: 1px solid var(--line);
}

.feature-ico svg {
  width: 22px;
  height: 22px;
}

.feature-item h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.feature-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cta-panel {
  margin: 48px auto 24px;
  width: min(1120px, calc(100% - 32px));
  padding: 36px 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(196, 39, 69, 0.22), transparent 60%),
    linear-gradient(145deg, #17141c, #0f0d12);
  text-align: center;
}

.cta-panel h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
}

.cta-panel p {
  margin: 10px auto 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 15px;
}

.cta-panel .home-btn {
  margin-top: 20px;
}

.site-footer {
  padding: 36px 0 120px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #08070a;
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.footer-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-brand .brand-word { font-size: 18px; }

.footer-tagline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 26rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.footer-cols h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.footer-cols span {
  display: block;
  margin: 0 0 8px;
  color: rgba(201, 183, 154, 0.72);
  font-size: 13px;
}

.footer-copy {
  color: rgba(201, 183, 154, 0.5);
  font-size: 12px;
}

.download-bar {
  position: fixed;
  z-index: 80;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 12, 16, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  animation: barIn 500ms 200ms var(--ease) both;
}

.download-bar .brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.download-bar-info {
  flex: 1;
  min-width: 0;
}

.download-bar-info strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.download-bar-info span {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.download-bar-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: #1a1203;
  background: linear-gradient(180deg, #ffe7a3, #e2a33a);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

@keyframes heroDrift {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.08) translateY(-1.5%); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes barIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  :root { --header-h: 80px; }

  .brand-icon { width: 52px; height: 52px; border-radius: 14px; }
  .brand-word { font-size: 26px; }
  .brand-tag { font-size: 13px; }

  .hero-copy {
    padding: 72px 0 80px;
    max-width: 40rem;
  }

  .hero-actions { gap: 12px; }
  .home-btn { min-height: 52px; font-size: 16px; }

  .poster-rail {
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }

  .feature-band {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .feature-band img {
    height: 100%;
    max-height: none;
  }

  .footer-inner {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }

  .download-bar {
    left: auto;
    right: 20px;
    width: min(420px, calc(100% - 40px));
    margin: 0;
  }
}

@media (max-width: 640px) {
  .brand-tag { display: none; }
  .header-download span:last-child { font-size: 14px; }
  .hero-copy { padding: 36px 0 44px; }
  .hero-lead { font-size: 15px; }
  .home-btn { flex: 1 1 auto; justify-content: center; }
  .footer-cols { grid-template-columns: 1fr; gap: 18px; }
  .cta-panel { padding: 28px 18px; }
}
