:root {
  --page: #f8fafb;
  --surface: #ffffff;
  --surface-soft: #edf6f4;
  --surface-muted: #f0f4f6;
  --ink: #17252f;
  --muted: #63727c;
  --line: #dce5e8;
  --brand: #176b68;
  --brand-dark: #105552;
  --brand-soft: #dff0ed;
  --accent: #d89145;
  --shadow: 0 18px 48px rgba(23, 51, 59, .09);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

[data-bs-theme="dark"] {
  --page: #10191e;
  --surface: #16242a;
  --surface-soft: #193331;
  --surface-muted: #1b2a31;
  --ink: #edf4f3;
  --muted: #aebdc2;
  --line: #2b3d43;
  --brand: #75c8c1;
  --brand-dark: #9bdad4;
  --brand-soft: #20413f;
  --accent: #e1a665;
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
  transition: background-color 180ms ease, color 180ms ease;
}

html[lang="km"] body,
html[lang="km"] button,
html[lang="km"] input,
html[lang="km"] select,
html[lang="km"] textarea {
  font-family: "Noto Sans Khmer", sans-serif;
}

html[lang="en"] body,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] select,
html[lang="en"] textarea {
  font-family: "Inter", system-ui, sans-serif;
}

body,
.navbar,
.product-card,
.product-detail,
.pricing-card,
.benefit-card,
.btn {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.section-space { padding: 6.5rem 0; }
.section-label {
  margin: 0 0 .75rem;
  color: var(--brand);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html[lang="km"] .section-label { letter-spacing: 0; text-transform: none; }
.section-title {
  max-width: 700px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.2;
}
html[lang="km"] .section-title { letter-spacing: -.02em; line-height: 1.45; }
.section-copy { margin: 0; color: var(--muted); }

/* Navigation */
.navbar {
  min-height: 76px;
  padding-block: .8rem;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  backdrop-filter: blur(14px);
}

.navbar-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.13rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}

.navbar-brand:hover,
.footer-brand:hover { color: var(--ink); }

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: var(--page);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-mark.small { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; font-size: .8rem; }

.nav-link {
  color: var(--muted);
  font-size: .93rem;
  font-weight: 650;
}
.nav-link:hover,
.nav-link:focus { color: var(--ink); }
.navbar-toggler { padding: .45rem; border-color: var(--line); box-shadow: none !important; }

.nav-tools { display: flex; align-items: center; gap: .55rem; }
.language-switch {
  display: inline-flex;
  gap: .18rem;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.language-btn {
  min-width: 48px;
  height: 35px;
  padding: 0 .65rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.language-btn.active { background: var(--brand-soft); color: var(--brand); }
.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--brand); background: var(--surface-soft); }
.icon-btn svg { width: 18px; height: 18px; }

/* Buttons */
.btn-brand,
.btn-quiet {
  padding: .84rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 750;
}
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: #176b68;
  --bs-btn-border-color: #176b68;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #105552;
  --bs-btn-hover-border-color: #105552;
  --bs-btn-active-bg: #0d4947;
}
[data-bs-theme="dark"] .btn-brand {
  --bs-btn-color: #10201f;
  --bs-btn-bg: #75c8c1;
  --bs-btn-border-color: #75c8c1;
  --bs-btn-hover-color: #10201f;
  --bs-btn-hover-bg: #9bdad4;
  --bs-btn-hover-border-color: #9bdad4;
}
.btn-quiet {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn-quiet:hover { border-color: var(--brand); background: var(--surface-soft); color: var(--ink); }

/* Hero */
.hero { padding: 7rem 0 6rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.25rem;
  color: var(--brand);
  font-size: .82rem;
  font-weight: 750;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  max-width: 760px;
  margin: 0 0 1.4rem;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.06;
}
html[lang="km"] .hero h1 { font-size: clamp(2.35rem, 5vw, 4.25rem); letter-spacing: -.025em; line-height: 1.42; }
.hero-copy { max-width: 680px; margin: 0 0 2rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin: 1.4rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: .82rem;
  list-style: none;
}
.trust-list li { display: flex; align-items: center; gap: .4rem; }
.trust-list li > span:first-child { color: var(--brand); font-weight: 900; }

.hero-catalog {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 750;
}
.catalog-count {
  padding: .26rem .55rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: .7rem;
}
.catalog-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
}
.catalog-row + .catalog-row { border-top: 1px solid var(--line); }
.catalog-row:hover { background: var(--surface-soft); color: var(--ink); }
.mini-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--brand);
  font-family: "Inter", system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 800;
}
.catalog-row strong,
.catalog-row small { display: block; }
.catalog-row strong { margin-bottom: .1rem; font-size: .9rem; }
.catalog-row small { color: var(--muted); font-size: .75rem; }
.row-arrow { color: var(--brand); font-family: "Inter", sans-serif; font-size: 1.1rem; }

/* Product selection */
.product-section { background: var(--surface); }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .75fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem;
}
.product-card {
  position: relative;
  display: flex;
  min-height: 200px;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.35rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--page);
  color: var(--ink);
}
html[lang="km"] .product-card { text-align: left; }
.product-card:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.product-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.product-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 1.6rem;
  place-items: center;
  border-radius: 11px;
  background: var(--surface);
  color: var(--brand);
}
.product-card-icon svg { width: 23px; height: 23px; }
.product-card-copy { display: block; padding-right: 1rem; }
.product-card-copy strong,
.product-card-copy small { display: block; }
.product-card-copy strong { margin-bottom: .35rem; font-size: .98rem; }
.product-card-copy small { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.select-mark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: none;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--page);
  font-size: .72rem;
  font-weight: 900;
}
.product-card.active .select-mark { display: grid; }

.product-detail {
  margin-top: 1rem;
  padding: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--page);
}
.detail-kicker {
  display: inline-block;
  margin-bottom: .7rem;
  color: var(--brand);
  font-family: "Inter", sans-serif;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.product-detail h3 { margin: 0 0 .8rem; font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.4; }
.product-detail p { max-width: 670px; margin: 0; color: var(--muted); }
.detail-features { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; margin-top: 1.4rem; }
.detail-features > span { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-size: .84rem; }
.detail-features i { color: var(--brand); font-style: normal; font-weight: 900; }
.detail-summary {
  padding: 1.35rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}
.summary-label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.detail-summary strong { display: block; font-size: .95rem; line-height: 1.65; }
.detail-link { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .82rem; font-weight: 750; text-decoration: none; }

/* Benefits */
.benefits { background: var(--page); }
.section-intro { max-width: 760px; margin: 0 auto 3rem; }
.section-intro .section-title { margin-inline: auto; }
.benefit-card {
  height: 100%;
  padding: 1.7rem;
  border-top: 2px solid var(--line);
  background: transparent;
}
.benefit-number { display: inline-block; margin-bottom: 2rem; color: var(--brand); font-family: "Inter", sans-serif; font-size: .75rem; font-weight: 800; }
.benefit-card h3 { margin: 0 0 .65rem; font-size: 1.08rem; font-weight: 800; }
.benefit-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Pricing */
.pricing-section { background: var(--surface); }
.pricing-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}
.pricing-heading .section-copy { margin-top: .8rem; }
.pricing-heading .section-copy strong { color: var(--brand); }
.billing-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .25rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}
.billing-btn {
  min-height: 44px;
  padding: .55rem .85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}
.billing-btn small { display: block; margin-top: -.1rem; color: var(--brand); font-size: .62rem; }
.billing-btn.active { background: var(--brand-soft); color: var(--brand); }
.pricing-card {
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--page);
}
.pricing-card.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan-topline { min-height: 30px; margin-bottom: .7rem; }
.plan-tag {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
}
.plan-tag.popular { background: var(--brand-soft); color: var(--brand); }
.pricing-card h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.plan-users { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; }
.price-wrap { margin: 1.35rem 0 1rem; }
.currency { vertical-align: 1rem; color: var(--muted); font-size: .95rem; font-weight: 700; }
.price { font-family: "Inter", sans-serif; font-size: 3.15rem; font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.price-period { color: var(--muted); font-size: .8rem; }
.plan-copy { min-height: 52px; margin: 0; color: var(--muted); font-size: .88rem; }
.plan-list { display: grid; gap: .75rem; margin: 1.4rem 0 1.7rem; padding: 1.35rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.plan-list li { display: flex; gap: .65rem; color: var(--ink); font-size: .86rem; }
.plan-list li > span:first-child { color: var(--brand); font-weight: 900; }
.pricing-note { margin: 1.5rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }

/* Support and footer */
.support-strip { padding: 4.5rem 0; background: var(--surface-soft); }
.support-inner { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.support-inner h2 { margin: 0 0 .55rem; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; }
.support-inner p:not(.section-label) { max-width: 700px; margin: 0; color: var(--muted); }
.support-inner .btn { flex: 0 0 auto; }

.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .78rem; text-align: center; }
.footer-links { display: flex; justify-content: flex-end; gap: 1.4rem; }
.footer-links a { color: var(--muted); font-size: .78rem; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 991.98px) {
  .navbar-collapse { margin-top: .8rem; padding: 1rem 0 .4rem; border-top: 1px solid var(--line); }
  .navbar-nav { margin-bottom: 1rem; }
  .nav-link { padding-block: .55rem; }
  .hero { padding: 5rem 0; }
  .hero h1 { max-width: 800px; }
  .hero-catalog { max-width: 720px; }
  .section-space { padding: 5rem 0; }
  .section-heading { grid-template-columns: 1fr; gap: 1.1rem; }
  .section-heading .section-copy { max-width: 720px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { min-height: 180px; }
  .pricing-heading { align-items: flex-start; }
  .support-inner { align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner p { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}

@media (max-width: 767.98px) {
  .hero { padding: 4.25rem 0; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.7rem); }
  html[lang="km"] .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }
  .product-detail { padding: 1.5rem; }
  .detail-summary { border-left: 0; border-top: 3px solid var(--brand); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
  .benefit-card { padding: 1.4rem .25rem; }
  .benefit-number { margin-bottom: 1rem; }
  .pricing-heading { flex-direction: column; }
  .support-inner { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 575.98px) {
  .container { --bs-gutter-x: 1.5rem; }
  .navbar { min-height: 70px; }
  .navbar-brand { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .nav-tools { justify-content: space-between; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .trust-list { display: grid; }
  .catalog-row { grid-template-columns: 40px 1fr auto; padding: .9rem; }
  .mini-icon { width: 40px; height: 40px; }
  .catalog-row small { font-size: .7rem; }
  .section-space { padding: 4.25rem 0; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; display: grid; grid-template-columns: 44px 1fr; gap: .8rem; padding: 1rem; }
  .product-card-icon { width: 44px; height: 44px; margin: 0; }
  .select-mark { top: .8rem; right: .8rem; }
  .product-card-copy { padding-right: 1.5rem; }
  .detail-features { display: grid; }
  .billing-toggle { width: 100%; }
  .billing-btn { flex: 1; }
  .pricing-card { padding: 1.5rem; }
  .support-inner .btn { width: 100%; }
  .footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-inner p { text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

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