:root {
  --ink: #0b1220;
  --text: #1f2937;
  --muted: #5b6474;
  --line: #e6e8ee;
  --bg: #ffffff;
  --bg-2: #f6f8fc;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --red: #e11d48;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', 'Kantumruy Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html[lang='km'] body { font-family: 'Kantumruy Pro', 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.75; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3 { color: var(--ink); margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap; font-family: inherit; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }
.btn.lg { height: 50px; padding: 0 26px; font-size: 1.02rem; border-radius: 12px; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: #be123c; }
.btn.outline { border-color: #c9cfdb; background: #fff; color: var(--ink); }
.btn.outline:hover { border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn.white { background: #fff; color: var(--blue-dark); }
.btn.white:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* header */
.head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { background: none; border: 0; font: inherit; font-weight: 500; color: var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.nav-link:hover { background: var(--bg-2); color: var(--ink); }
.head-right { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: none; padding: 5px 11px; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--muted); }
.lang button.on { background: var(--ink); color: #fff; }

/* dropdowns */
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16); padding: 8px; display: none; flex-direction: column; }
.dd-menu.right { left: auto; right: 0; }
.dd.open .dd-menu { display: flex; }
.dd-menu > a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 500; }
.dd-menu > a:hover { background: var(--bg-2); }
.mega { width: 380px; }
.mega-item { align-items: flex-start !important; gap: 12px !important; }
.mega-item small { display: block; color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.mega-all { color: var(--blue) !important; font-weight: 600 !important; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px !important; margin-top: 4px; }

/* hero */
.hero { background: radial-gradient(900px 480px at 92% -10%, rgba(29, 78, 216, 0.14), transparent 60%), radial-gradient(700px 420px at -10% 110%, rgba(225, 29, 72, 0.08), transparent 60%), linear-gradient(180deg, #f3f6fd, #fff); padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; color: var(--blue); margin-bottom: 14px; }
html[lang='km'] .eyebrow { letter-spacing: 0; font-size: 0.9rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
html[lang='km'] .hero h1 { line-height: 1.4; letter-spacing: 0; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 20px 0 28px; max-width: 600px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }
.fine { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.featured { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.featured-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.app-tile { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s; }
.app-tile:hover { background: var(--bg-2); border-color: var(--line); }
.app-tile img { border-radius: 12px; flex: none; }
.app-tile strong { display: block; color: var(--ink); font-size: 1.05rem; }
.app-tile small { color: var(--muted); font-size: 0.88rem; }
.featured-all { margin-top: 4px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--blue); font-weight: 600; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 44px 0 56px; } }

/* sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.02em; font-weight: 800; line-height: 1.2; }
html[lang='km'] .section h2 { letter-spacing: 0; line-height: 1.5; }
.sub { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }
.sub.center { max-width: 680px; margin-left: auto; margin-right: auto; }

.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
@media (max-width: 960px) { .products { grid-template-columns: 1fr; max-width: 640px; margin-left: auto; margin-right: auto; } }
.product { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.product::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); }
.product:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12); }
.product-head { display: flex; gap: 14px; align-items: center; }
.product-head img { border-radius: 14px; flex: none; }
.product h3 { font-size: 1.3rem; }
.product-head p { color: var(--muted); font-size: 0.95rem; }
.product ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product li { padding-left: 28px; position: relative; }
.product li::before { content: ''; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.3 14.3-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.3 14.3-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.trial { font-size: 0.9rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, #fff); padding: 8px 12px; border-radius: 10px; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.product-actions .btn { flex: 1; }
.product-actions .btn.primary { background: var(--accent); }
.product-actions .btn.primary:hover { filter: brightness(0.9); }

.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }
.value { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.v-icon { font-size: 1.8rem; }
.value h3 { font-size: 1.12rem; }
.value p { color: var(--muted); font-size: 0.95rem; }

.band { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; padding: 52px 0; }
.band-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; }
@media (max-width: 760px) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.band strong { display: block; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.band span { opacity: 0.85; font-size: 0.95rem; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .contact-list { grid-template-columns: 1fr; } }
.contact-list a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; color: var(--ink); }
.contact-list a:hover { border-color: var(--blue); color: var(--blue); }
.qr-card { justify-self: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; text-align: center; box-shadow: var(--shadow); max-width: 280px; }
.qr-card img { width: 220px; height: 220px; margin: 0 auto 10px; }
.qr-card p { color: var(--muted); font-size: 0.9rem; }

.final { background: radial-gradient(800px 400px at 50% 0%, rgba(255, 255, 255, 0.14), transparent 60%), linear-gradient(135deg, #172554, var(--blue-dark) 50%, #1d4ed8); color: #fff; padding: 84px 0; }
.final h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; }
.final p { opacity: 0.85; margin: 12px 0 26px; font-size: 1.1rem; }

/* footer */
.foot { background: #0b1220; color: #c7cdd8; padding: 56px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
.foot .brand { color: #fff; }
.foot-brand p { margin-top: 10px; color: #8b93a3; }
.foot h3 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 8px; }
.foot a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid #1f2937; margin-top: 40px; padding-top: 20px; font-size: 0.85rem; color: #8b93a3; }

@media (max-width: 760px) { .hide-sm { display: none; } }
@media (max-width: 520px) {
  .hide-xs { display: none; }
  .head-row { gap: 8px; }
  .brand span { display: none; }
  .head-right .btn.primary { padding: 0 12px; }
  .mega { width: min(340px, calc(100vw - 32px)); }
  .section { padding: 64px 0; }
}

/* icons */
.v-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); }
.ci { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: #eef2ff; flex: none; }

/* shop band: link to the software licence store at /products/ */
.shop-band { background: #f0fdfa; border-top: 1px solid #ccfbf1; border-bottom: 1px solid #ccfbf1; padding: 36px 0; }
.shop-band-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.shop-band-grid > div { flex: 1 1 320px; }
.shop-band h2 { margin: 0 0 6px; color: var(--ink); font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.shop-band p { margin: 0; color: var(--muted); }
.shop-band img { border-radius: 16px; flex: none; }

/* software licence slider (cards come from /store-api/public/products) */
.lic { padding: 64px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lic-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.lic-head h2 { margin: 4px 0 6px; color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.lic-head .sub { margin: 0; color: var(--muted); max-width: 620px; }
.lic-nav { display: flex; align-items: center; gap: 10px; }
.lic-arrow { width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lic-arrow:hover:not(:disabled) { background: var(--ink); color: #fff; }
.lic-arrow:disabled { opacity: 0.35; cursor: default; }
.lic-arrow[hidden] { display: none; }
.lic-track { list-style: none; margin: 0; padding: 4px 2px 18px; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.lic-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.lic-track.dragging a { pointer-events: none; }
.lic-item { flex: 0 0 270px; scroll-snap-align: start; }
.lic-card { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: var(--text); text-decoration: none; transition: box-shadow 0.15s, transform 0.15s; user-select: none; }
.lic-card:hover { box-shadow: 0 10px 28px rgba(11, 18, 32, 0.1); transform: translateY(-2px); }
.lic-frame { position: relative; display: grid; place-items: center; height: 210px; border: 4px solid #94a3b8; background: #fafafa; overflow: hidden; }
.lic-office { border-color: #d9601a; }
.lic-windows { border-color: #0b7bc0; }
.lic-adobe { border-color: #c8102e; }
.lic-mysoft { border-color: #1d4ed8; }
.lic-frame img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.lic-noimg { width: 90px; height: 110px; border-radius: 6px; background: #1d4ed8; color: #fff; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; }
.lic-stamp { position: absolute; top: 8px; left: 8px; z-index: 1; width: 70px; height: 70px; border-radius: 999px; border: 3px solid #dc2626; background: #fff; color: #dc2626; display: grid; place-items: center; text-align: center; font-size: 0.72rem; font-weight: 800; line-height: 1.1; padding: 6px; box-sizing: border-box; transform: rotate(-14deg); }
.lic-badge { position: absolute; top: 10px; left: 10px; z-index: 1; border-radius: 999px; padding: 4px 12px; color: #fff; font-size: 0.82rem; font-weight: 700; }
.lic-badge-drop { background: #15803d; }
.lic-badge-new { background: #6d28d9; }
.lic-name { color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.lic-price { display: flex; align-items: baseline; gap: 8px; font-size: 1.15rem; }
.lic-price s { color: var(--muted); font-size: 0.95rem; }
.lic-price b { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lic-buy { margin-top: auto; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; background: #17706e; color: #fff; font-weight: 700; }
.lic-card:hover .lic-buy { background: #0f4f4d; }
.lic-item-more { flex-basis: 100%; }
.lic-more { display: block; padding: 28px; border: 1px dashed var(--line); border-radius: 18px; background: #fff; text-align: center; font-weight: 700; }
@media (max-width: 640px) { .lic { padding: 44px 0; } .lic-item { flex-basis: 78%; } .lic-nav .btn { flex: 1; } }

/* illustrated hero scene */
.hero-scene { position: relative; overflow: hidden; padding: 64px 0 0; background: radial-gradient(900px 420px at 85% 10%, rgba(255, 255, 255, 0.7), transparent 60%), linear-gradient(180deg, #cfe8f1 0%, #dff1f4 55%, #f3fafb 100%); }
.hero-copy { position: relative; z-index: 2; }
.hero-scene h1 { max-width: 720px; font-size: clamp(2.3rem, 5.2vw, 4.1rem); line-height: 1.04; letter-spacing: -0.035em; }
html[lang='km'] .hero-scene h1 { line-height: 1.35; letter-spacing: 0; font-size: clamp(1.9rem, 4vw, 3rem); }
.hero-scene .lead { max-width: 560px; color: #334155; }
.hero-scene .fine { color: #475569; }
.hero-art { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 1600 / 560; margin-top: -8vw; }
.hero-brand { font: 800 12px 'Plus Jakarta Sans', system-ui, sans-serif; fill: #fff; letter-spacing: 0.04em; }
.hero-app-name { font: 700 17px 'Plus Jakarta Sans', 'Kantumruy Pro', system-ui, sans-serif; fill: #0b1220; }
.hero-apps a:hover rect { fill: #eef4ff; }
.hero-apps a:focus-visible { outline: none; }
.hero-apps a:focus-visible rect { stroke: #1d4ed8; stroke-width: 3; }
.hero-dash { animation: hero-dash 1.6s linear infinite; }
.hero-led { transform-box: fill-box; transform-origin: center; animation: hero-led 3s linear infinite; }
@keyframes hero-led { 0% { fill: #ffffff; opacity: 1; transform: scale(1.7); } 12% { fill: #fde68a; opacity: 0.9; transform: scale(1.15); } 30%, 100% { fill: #fbbf24; opacity: 0.45; transform: scale(1); } }
@keyframes hero-dash { to { stroke-dashoffset: -20; } }
.hero-cloud { position: absolute; z-index: 0; width: 150px; opacity: 0.95; animation: hero-drift 38s ease-in-out infinite alternate; }
.hero-cloud.c1 { top: 70px; right: 6%; width: 170px; }
.hero-cloud.c2 { top: 170px; right: 30%; width: 90px; animation-duration: 46s; }
.hero-cloud.c3 { top: 26px; right: 38%; width: 70px; animation-duration: 30s; opacity: 0.8; }
@keyframes hero-drift { to { transform: translateX(-60px); } }
@media (max-width: 1100px) { .hero-cloud.c2, .hero-cloud.c3 { display: none; } }
@media (max-width: 900px) {
  .hero-scene { padding-top: 40px; }
  .hero-art { margin-top: 12px; height: 240px; aspect-ratio: auto; }
  .hero-apps, .hero-links { display: none; }
  .hero-cloud.c1 { top: auto; bottom: 200px; right: -30px; width: 120px; }
}
@media (prefers-reduced-motion: reduce) { .hero-dash, .hero-cloud, .hero-led { animation: none; } }
/* phones: keep the header inside the screen ("Start for free" sits just below in the hero) */
@media (max-width: 480px) { .head-row { gap: 8px; } .nav-link { padding: 8px 8px; } .head-right .btn.primary { display: none; } }
.foot-grid > div { min-width: 0; overflow-wrap: anywhere; }
