:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --bg-raised: #ffffff;
  --ink: #1f1b16;
  --muted: #6d655c;
  --accent: #b8891a;
  --accent-strong: #9a7010;
  --accent-ink: #ffffff;
  --line: rgba(31, 27, 22, 0.1);
  --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: var(--bg);
  font-family: var(--font);
  line-height: 1.55;
}

::selection {
  background: rgba(184, 137, 26, 0.28);
  color: #1f1b16;
}

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 var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.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: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand-word {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.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: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.header-download:hover { background: var(--accent-strong); }
.header-download:active { transform: translateY(1px); }

.download-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  color: #fff;
}

.download-symbol 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;
  background: #d9d2c7;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.18) 0%, rgba(20, 16, 12, 0.35) 42%, rgba(20, 16, 12, 0.78) 100%),
    linear-gradient(90deg, rgba(20, 16, 12, 0.55) 0%, rgba(20, 16, 12, 0.12) 52%, rgba(20, 16, 12, 0.28) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
  max-width: 34rem;
  color: #fff;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 58px);
  line-height: 1.15;
  font-weight: 800;
  color: #fff;
}

.hero-en {
  margin: 10px 0 0;
  color: #f0d48a;
  font-size: 14px;
  font-weight: 700;
}

.hero-lead {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  font-weight: 600;
}

.hero-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  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: 10px;
  font-size: 15px;
  font-weight: 800;
}

.home-btn:active { transform: translateY(1px); }

.home-btn--gold {
  color: #fff;
  background: var(--accent);
}

.home-btn--gold:hover { background: var(--accent-strong); }

.home-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.home-btn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.home-btn--ghost .home-btn-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.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(24px, 4vw, 32px);
  line-height: 1.25;
  font-weight: 800;
  color: var(--ink);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.poster-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 4px 0 18px;
}

.poster-card {
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #e8e2d8;
  border: 1px solid var(--line);
}

.poster-card strong {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.poster-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.feature-band {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(31, 27, 22, 0.05);
}

.feature-list {
  display: grid;
  gap: 0;
  padding: 4px 0;
}

.feature-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.feature-item:first-child { border-top: 0; }

.feature-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--accent-strong);
  background: rgba(184, 137, 26, 0.1);
  border: 1px solid rgba(184, 137, 26, 0.18);
}

.feature-ico svg {
  width: 20px;
  height: 20px;
}

.feature-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.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: 16px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(31, 27, 22, 0.05);
  text-align: center;
}

.cta-panel h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: var(--ink);
}

.cta-panel p {
  margin: 10px auto 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 15px;
}

.cta-panel .home-btn {
  margin-top: 20px;
}

.cta-panel .home-btn--gold {
  color: #fff;
  background: var(--accent);
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  padding: 36px 0 120px;
  border-top: 1px solid var(--line);
  background: #ebe6de;
}

.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: 8px;
}

.footer-brand .brand-word {
  font-size: 18px;
  color: var(--ink);
}

.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: var(--ink);
}

.footer-cols span {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.footer-copy {
  color: rgba(109, 101, 92, 0.85);
  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: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 27, 22, 0.14);
}

.download-bar .brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.download-bar-info {
  flex: 1;
  min-width: 0;
}

.download-bar-info strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.download-bar-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.download-bar-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.download-bar-btn:hover { background: var(--accent-strong); }

@media (min-width: 900px) {
  :root { --header-h: 80px; }

  .brand-icon { width: 52px; height: 52px; border-radius: 12px; }
  .brand-word { font-size: 26px; }
  .brand-tag { font-size: 13px; }

  .hero-copy {
    padding: 72px 0 80px;
    max-width: 40rem;
  }

  .hero-media img {
    object-position: center 40%;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(20, 16, 12, 0.12) 0%, rgba(20, 16, 12, 0.28) 40%, rgba(20, 16, 12, 0.72) 100%),
      linear-gradient(90deg, rgba(20, 16, 12, 0.62) 0%, rgba(20, 16, 12, 0.12) 48%, rgba(20, 16, 12, 0.2) 100%);
  }

  .hero-actions { gap: 12px; }
  .home-btn { min-height: 52px; font-size: 16px; }

  .poster-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 16px;
  }

  .feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .feature-item:nth-child(1),
  .feature-item:nth-child(2) {
    border-top: 0;
  }

  .feature-item:nth-child(2),
  .feature-item:nth-child(4) {
    border-left: 1px solid var(--line);
  }

  .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: 768px) {
  .hero-media img {
    object-position: center 30%;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(20, 16, 12, 0.1) 0%, rgba(20, 16, 12, 0.35) 45%, rgba(20, 16, 12, 0.82) 100%);
  }
}

@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; }
}
