/* CAM-X — site styles. Self-hosted fonts, no third-party requests (keeps the CSP strict). */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #070b14; --bg-2: #0a0f1c; --panel: #0d1322; --panel-2: #0a1020; --row: #141c2e;
  --line: #1e2940; --line-2: #263149; --line-3: #172033;
  --text: #e6edf7; --text-2: #a9b6ca; --text-3: #8d9ab0;
  --ink: #0b1220; --ink-2: #475569; --paper: #ffffff; --paper-2: #f5f7fb; --paper-line: #dce3ee;
  --accent: #5b8cff; --accent-ink: #06101f; --accent-d: #2b5bd7;
  --ok: #34d399; --warn: #f5b942; --bad: #fb7185;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans Khmer", "Khmer UI", "Khmer Sangam MN", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
html[lang="km"] { --sans: "Noto Sans Khmer", "Khmer UI", "Khmer Sangam MN", "Inter", system-ui, sans-serif; --display: var(--sans); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[lang="km"] body { line-height: 1.8; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
html[lang="km"] h1, html[lang="km"] h2, html[lang="km"] h3 { letter-spacing: 0; line-height: 1.45; }
p { margin: 0; }
a { color: #9db7ff; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--warn); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }

/* Icons */
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-lg { width: 28px; height: 28px; stroke-width: 1.8; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border-radius: 10px; border: 1px solid var(--accent); transition: background .15s ease, transform .15s ease; }
.btn:hover { background: #7aa2ff; color: var(--accent-ink); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-xl { height: 56px; padding: 0 28px; font-size: 17px; }
.btn-ghost { background: transparent; color: var(--text); border-color: #2b3752; font-weight: 500; }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: #fff; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 20, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-3); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.menu { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.menu a:not(.btn) { color: #b4c0d3; text-decoration: none; font-size: 15px; }
.menu a:not(.btn):hover { color: #fff; }
.menu-cta { display: none; }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.lang { height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: #d5ddea; font: inherit; font-size: 14px; cursor: pointer; }
.lang:hover { border-color: var(--accent); }
.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; border-radius: 2px; }

/* Hero */
.hero { border-bottom: 1px solid var(--line-3); }
.hero-grid { padding: 96px 0 104px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 12.5px; color: #b4c0d3; letter-spacing: .04em; text-transform: uppercase; }
html[lang="km"] .chip { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 14px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-weight: 700; font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -0.025em; margin: 28px 0 24px; color: #fff; }
.lead { font-size: 19px; color: var(--text-2); max-width: 560px; margin-bottom: 36px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.hero .checks { margin-top: 44px; font-size: 14px; color: var(--text-3); }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks li::before { content: ""; flex: none; width: 12px; height: 7px; margin-top: .55em; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.panel-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 12px; color: var(--text-3); }
html[lang="km"] .panel-bar .mono { font-family: var(--sans); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.offer { list-style: none; margin: 0; padding: 4px 22px 14px; }
.offer li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--accent); }
.offer li:last-child { border-bottom: 0; }
.offer strong { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; color: #fff; }
.offer span { display: block; font-size: 14.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }

/* Standards strip */
.strip { background: var(--bg-2); border-bottom: 1px solid var(--line-3); }
.strip-inner { padding: 28px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.strip-label { font-size: 13px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
html[lang="km"] .strip-label { text-transform: none; letter-spacing: 0; font-size: 15px; }
.std { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 44px; font-family: var(--display); font-weight: 600; font-size: 17px; color: #c9d3e3; }

/* Sections */
.section { padding: 112px 0; }
.section.light { background: var(--paper-2); color: var(--ink); }
.section.white { background: var(--paper); color: var(--ink); border-top: 1px solid #e6ebf3; }
.section.dark { background: var(--bg); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; color: var(--accent); }
.light .kicker, .white .kicker { color: var(--accent-d); }
html[lang="km"] .kicker { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 15px; }
.section h2 { font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.1; max-width: 760px; }
.dark h2 { color: #fff; }
.sub { font-size: 17px; color: var(--text-2); max-width: 620px; margin-top: 16px; }
.light .sub, .white .sub { color: var(--ink-2); }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.head-row .sub { max-width: 420px; margin: 0; }

/* Service tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--paper-line); border: 1px solid var(--paper-line); border-radius: 16px; overflow: hidden; }
.tile { background: var(--paper); padding: 36px; display: flex; flex-direction: column; gap: 14px; color: var(--accent-d); }
.tile h3 { font-size: 21px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.tile p { font-size: 15.5px; color: var(--ink-2); }
.meta { font-size: 14px; font-weight: 600; color: var(--accent-d); margin-top: auto; padding-top: 8px; }

/* Solutions */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 28px; }
.tab { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: #c9d3e3; font: inherit; font-size: 15px; cursor: pointer; }
.tab:hover { border-color: var(--accent); }
.tab.active { background: #fff; color: var(--bg); border-color: #fff; font-weight: 600; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: 40px; background: var(--bg-2); }
.demo[hidden] { display: none; }
.demo-copy h3 { font-size: 28px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.demo-copy p { color: var(--text-2); margin-bottom: 24px; }
.demo-copy .checks { flex-direction: column; font-size: 15px; color: #d5ddea; }

.screen { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13px; min-width: 0; }
.screen-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.screen-bar .mono { flex: 1; font-size: 12px; color: var(--text-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sample { font-size: 11px; font-weight: 600; color: #1a1206; background: var(--warn); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.screen-body { padding: 18px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpis div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpis small { display: block; font-size: 12px; color: var(--text-3); }
.kpis strong { font-family: var(--display); font-size: 24px; font-weight: 600; color: #fff; }
.kpis .alert { color: var(--bad); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.col { background: var(--panel-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col h4 { margin: 0; display: flex; justify-content: space-between; font-size: 12px; color: #b4c0d3; }
.col em { font-style: normal; color: #6f7e96; }
.col p { background: var(--row); border-radius: 8px; padding: 9px 10px; font-weight: 600; font-size: 13px; color: var(--text); }
.col small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.col small.ok { color: var(--ok); }
.toolbar { display: flex; justify-content: space-between; align-items: center; }
.toolbar strong { color: #fff; font-size: 14px; }
.pill { background: var(--row); color: var(--text-3); padding: 3px 10px; border-radius: 999px; font-size: 11px; }
.table-box { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; color: #6f7e96; font-weight: 600; font-size: 11px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.grid td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.05); white-space: nowrap; }
.st { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.s1 { background: #1e2b48; color: #a5b4cf; } .s2 { background: rgba(91,140,255,.16); color: #9db7ff; } .s3 { background: rgba(52,211,153,.16); color: var(--ok); }
.sd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3b4a6b; margin-right: 6px; }
.sd.ok { background: var(--ok); } .sd.warn { background: var(--warn); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; padding: 10px; background: var(--panel-2); border-radius: 10px; }
.bars span { flex: 1; background: var(--accent); opacity: .85; border-radius: 4px 4px 0 0; }
.b78 { height: 78%; } .b88 { height: 88%; } .b91 { height: 91%; } .b92 { height: 92%; } .b94 { height: 94%; } .b96 { height: 96%; } .b97 { height: 97%; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.log li { background: var(--row); border-radius: 8px; padding: 8px 10px; }
.log li.w { box-shadow: inset 3px 0 0 var(--bad); }
.log time { color: #6f7e96; margin-right: 10px; font-variant-numeric: tabular-nums; }

/* Industries */
.ind { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.ind div { border: 1px solid var(--paper-line); border-radius: 14px; padding: 28px; }
.ind h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.ind p { font-size: 15px; color: var(--ink-2); }

/* Approach */
.approach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--paper-line); border: 1px solid var(--paper-line); border-radius: 16px; overflow: hidden; }
.steps li { background: var(--paper); padding: 30px; }
.steps .mono { font-size: 13px; color: var(--accent-d); }
.steps h3 { font-size: 20px; font-weight: 600; margin: 10px 0 8px; }
.steps p { font-size: 15px; color: var(--ink-2); }

/* Contact */
#contact { padding: 104px 0; }
.cta-box { border: 1px solid var(--line); border-radius: 24px; background: var(--panel); padding: 64px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.cta-box > div:first-child { flex: 1 1 480px; }
.cta-box h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 16px; }
.cta-box p { font-size: 17px; color: var(--text-2); }
.cta-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-3); }

/* Footer */
.footer { background: #05080f; border-top: 1px solid #141b2b; }
.foot { padding: 32px 0; display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; font-size: 14px; color: var(--text-3); }
.footer a { color: #b4c0d3; text-decoration: none; }

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid, .demo, .approach { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .burger { display: block; }
  .nav-cta { display: none; }
  .menu { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); padding: 8px 16px 20px; border-bottom: 1px solid var(--line); display: none; }
  .menu.open { display: flex; }
  .menu li a:not(.btn) { display: block; padding: 14px 4px; }
  .menu-cta { display: block; margin-top: 8px; }
  .menu-cta .btn { width: 100%; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero-grid { padding: 56px 0 64px; gap: 40px; }
  .tiles, .ind, .steps { grid-template-columns: 1fr; }
  .tile { padding: 28px; }
  .demo { padding: 20px; gap: 28px; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid th:nth-child(3), .grid td:nth-child(3) { display: none; }
  .cta-box { padding: 32px 22px; }
  .lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
