/* Khmer Law website: same look as the app (navy gradient, white cards, very light shadows). */
:root {
  --navy: #1f3a5f;
  --blue: #3d6fb6;
  --soft: #eaf0f8;
  --bg: #f3f5fa;
  --text: #111827;
  --muted: #5b6474;
  --border: #e7e9ee;
  --gold: #f0b33e;
  --shadow: 0 2px 10px rgba(27, 47, 78, 0.04);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Kantumruy Pro", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { position: absolute; inset: 0 0 auto 0; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand:hover { text-decoration: none; }
.lang { color: rgba(255, 255, 255, 0.85); font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.3); padding: 4px 12px; border-radius: 999px; }
.lang:hover { text-decoration: none; background: rgba(255, 255, 255, 0.1); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #162a47 0%, #26467a 55%, #3d6fb6 100%);
  color: #fff;
  padding: 120px 0 0;
  border-radius: 0 0 36px 36px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.07);
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -140px; }
.hero::after { width: 300px; height: 300px; left: -120px; bottom: -160px; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: end; }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.35; margin: 0 0 14px; font-weight: 800; }
.hero p.lead { font-size: 18px; color: rgba(255, 255, 255, 0.85); margin: 0 0 28px; max-width: 34em; }
.tag { display: inline-block; font-size: 13px; background: rgba(255, 255, 255, 0.14); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px;
  font-weight: 600; font-size: 15px; background: #fff; color: var(--navy);
}
.btn:hover { text-decoration: none; background: #f5f8fc; }
.btn.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn svg { width: 20px; height: 20px; }
.btn small { display: block; font-size: 11px; font-weight: 400; opacity: 0.75; line-height: 1.2; }
.btn span { line-height: 1.25; }
.hero .phone { align-self: end; justify-self: center; width: min(300px, 80%); }
.phone img {
  border-radius: 28px 28px 0 0; border: 6px solid rgba(255, 255, 255, 0.18); border-bottom: 0;
  height: 540px; width: 100%; object-fit: cover; object-position: top;
}
.hero .wrap > div:first-child { align-self: center; padding-bottom: 48px; }

/* Sections */
section { padding: 72px 0 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-title h2 { font-size: clamp(24px, 3.2vw, 32px); margin: 0 0 8px; line-height: 1.4; }
.section-title p { color: var(--muted); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.5; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.ico svg { width: 20px; height: 20px; }
.ico.orange { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.ico.teal { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.ico.rose { background: linear-gradient(135deg, #be123c, #fb7185); }
.ico.violet { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.ico.green { background: linear-gradient(135deg, #15803d, #4ade80); }

.codes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.code { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-align: center; }
.code b { display: block; font-size: 15px; line-height: 1.5; margin-top: 10px; }
.code span { color: var(--muted); font-size: 13px; }
.code .ico { margin: 0 auto; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.shot { background: #fff; border-radius: 26px; padding: 10px; box-shadow: var(--shadow); }
.shot img { border-radius: 18px; }
.shot figcaption { text-align: center; color: var(--muted); font-size: 14px; padding: 10px 6px 4px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.note {
  max-width: 760px; margin: 0 auto; background: var(--soft); border-radius: var(--radius); padding: 20px 22px;
  color: #33415c; font-size: 14.5px;
}

footer { margin-top: 72px; padding: 32px 0 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Privacy page */
.doc { background: #fff; border-radius: var(--radius); padding: 32px clamp(20px, 4vw, 44px); box-shadow: var(--shadow); margin-top: -40px; position: relative; }
.doc h2 { font-size: 20px; margin: 28px 0 6px; line-height: 1.5; }
.doc p, .doc li { color: #33415c; }
.doc ul { padding-left: 22px; }
.hero.small { padding: 110px 0 70px; }
.hero.small .wrap { display: block; }
.hero.small h1 { margin-bottom: 4px; }
.hero.small p { color: rgba(255, 255, 255, 0.8); margin: 0; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .phone { width: min(260px, 70%); }
  .phone img { height: 380px; }
  .hero .wrap > div:first-child { padding-bottom: 8px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .codes { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots .shot:last-child { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
  .hero p.lead { font-size: 16px; }
  .phone img { height: 320px; }
}

/* Khmer has no spaces between words: let long runs wrap, and let grid cells shrink. */
body { overflow-x: hidden; overflow-wrap: anywhere; }
.grid > *, .codes > *, .shots > *, .hero .wrap > * { min-width: 0; }
