/* Public landing page (ids.cyberdefense.asia, not logged in). Served as a file: the CSP allows no inline styles.
   Layout: one column of bands - hero, how it helps (feature grid), privacy, three steps, call to action. */
:root {
  --ink: #0d1b2a; --ink-2: #13263a; --line: #23394f; --text: #e6edf3; --muted: #9fb1c2;
  --blue: #3d8fe0; --red: #e2383f; --ok: #3cbf7a;
  --khmer: "Khmer OS Siemreap", "Khmer OS", "Noto Sans Khmer", "Leelawadee UI", sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, var(--khmer);
}
* { box-sizing: border-box; }
body.landing { margin: 0; background: var(--ink); color: var(--text); font: 16px/1.6 var(--body); }
.landing a { color: var(--blue); }
.landing .wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.landing header.top { border-bottom: 1px solid var(--line); }
.landing header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
.landing .logo { font-weight: 700; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.landing .logo span { color: var(--blue); }
.landing .nav { display: flex; gap: 10px; flex-wrap: wrap; }
.landing .btn { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--blue); }
.landing .btn.primary { background: var(--blue); color: #fff; }
.landing .btn.ghost { color: var(--text); border-color: var(--line); }
.landing .btn:hover { opacity: .9; }
.landing .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.landing .hero .wrap { padding-block: 56px 40px; display: grid; gap: 18px; }
.landing .kh { font-family: var(--khmer); color: var(--muted); font-size: 1.05rem; }
.landing h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.12; margin: 0; text-wrap: balance; max-width: 22ch; }
.landing .lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
.landing .flag { display: inline-flex; height: 6px; width: 72px; border-radius: 3px; overflow: hidden; }
.landing .flag i { flex: 1; } .landing .flag i:nth-child(1), .landing .flag i:nth-child(3) { background: var(--blue); } .landing .flag i:nth-child(2) { background: var(--red); flex: 2; }
.landing .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.landing section.band { border-top: 1px solid var(--line); }
.landing section.band .wrap { padding-block: 44px; }
.landing h2 { font-size: 1.6rem; margin: 0 0 4px; text-wrap: balance; }
.landing h2 + .kh { margin: 0 0 22px; }
.landing .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.landing .f { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.landing .f h3 { margin: 0 0 6px; font-size: 1.02rem; display: flex; gap: 10px; align-items: baseline; }
.landing .f h3 b { color: var(--blue); font-family: ui-monospace, Consolas, monospace; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.landing .f p { margin: 0; color: var(--muted); font-size: .95rem; }
.landing .steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; counter-reset: s; }
.landing .steps li { counter-increment: s; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.landing .steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; margin-bottom: 8px; }
.landing .steps b { display: block; }
.landing .steps span { color: var(--muted); font-size: .95rem; }
.landing .private { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.landing .private li { padding-left: 22px; position: relative; color: var(--muted); }
.landing .private li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.landing .private li b { color: var(--text); }
.landing footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.landing footer .wrap { padding-block: 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) { .landing .btn { transition: opacity .15s; } }

/* How it works: attacker -> shield -> your site, then the Telegram alert (CSS only; 6 s loop) */
.landing .demo { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 12px; margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.landing .node { display: grid; justify-items: center; text-align: center; gap: 2px; position: relative; }
.landing .node .ic { font-size: 34px; line-height: 1; }
.landing .node small { color: var(--muted); font-size: .85rem; }
.landing .atk b { color: var(--red); } .landing .site b { color: var(--ok); }
.landing .lane { position: relative; height: 44px; border-bottom: 2px dashed var(--line); }
.landing .wall { position: absolute; right: 18%; top: 50%; transform: translate(50%, -40%); font-size: 30px; animation: shield 6s infinite; }
.landing .pk { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -2px; border-radius: 50%; background: var(--red); opacity: 0; animation: pk 6s infinite; }
.landing .p2 { animation-delay: .5s; } .landing .p3 { animation-delay: 1s; }
.landing .tg { position: absolute; top: -34px; white-space: nowrap; font-size: .8rem; background: var(--blue); color: #fff; padding: 3px 10px; border-radius: 12px; opacity: 0; animation: tg 6s infinite; }
@keyframes pk { 0% { left: 0; opacity: 0; } 5% { opacity: 1; } 40% { left: 78%; opacity: 1; } 46% { left: 76%; opacity: 0; transform: scale(2); } 100% { left: 76%; opacity: 0; } }
@keyframes shield { 0%, 38% { transform: translate(50%, -40%) scale(1); filter: none; } 45% { transform: translate(50%, -40%) scale(1.3); filter: drop-shadow(0 0 10px var(--blue)); } 60%, 100% { transform: translate(50%, -40%) scale(1); filter: none; } }
@keyframes tg { 0%, 50% { opacity: 0; transform: translateY(6px); } 58%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.landing ol.how { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.landing ol.how li { counter-increment: s; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; }
.landing ol.how li b::before { content: counter(s) " · "; color: var(--blue); }
.landing ol.how li span { color: var(--muted); font-size: .95rem; }
.landing .note { color: var(--muted); font-size: .9rem; margin-top: 16px; }
@media (max-width: 600px) {
  .landing .demo { grid-template-columns: 1fr; }
  .landing .lane { height: 70px; width: 2px; margin: 0 auto; border-bottom: 0; border-left: 2px dashed var(--line); }
  .landing .pk { left: -7px !important; animation-name: pkv; }
  .landing .wall { right: auto; left: 0; top: 70%; transform: translate(-50%, -50%); animation: none; }
  .landing .tg { position: static; margin-top: 8px; }
}
@keyframes pkv { 0% { top: 0; opacity: 0; } 5% { opacity: 1; } 40% { top: 60%; opacity: 1; } 46%, 100% { top: 60%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .landing .pk, .landing .wall { animation: none; } .landing .tg { animation: none; opacity: 1; } }
@media (min-width: 900px) { .landing ol.how { grid-template-columns: repeat(5, 1fr); } }
/* donations */
.landing .give { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.landing .give figure { margin: 0; text-align: center; }
.landing .give img { background: #fff; padding: 10px; border-radius: 12px; max-width: 100%; height: auto; }
.landing .give figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; max-width: 240px; }
.landing .mono { font-family: ui-monospace, Consolas, monospace; }
.landing .amounts { display: flex; gap: 10px; flex-wrap: wrap; }
/* what we support + honest promise */
.landing ul.sup { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.landing ul.sup li { margin: 2px 0; }
.landing .honest { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 16px 20px; margin-top: 16px; background: var(--ink-2); max-width: 820px; }
.landing .honest p { margin: 0 0 10px; } .landing .honest p:last-child { margin: 0; }
.landing .credits { display: block; border-top: 1px solid var(--line); padding-block: 14px; color: var(--muted); font-size: .85rem; } .landing .credits p { margin: 4px 0; }
.landing html, html:has(body.landing) { scroll-behavior: smooth; } .landing section[id] { scroll-margin-top: 12px; }
/* who we are */
.landing .about { max-width: 820px; } .landing .about p { margin: 12px 0 0; }
.landing .grid2l { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
.landing .card-l { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--ink-2); }
.landing .card-l h3 { margin: 0 0 4px; font-size: 1.05rem; }
/* top menu: text links, then Log in / Sign up buttons */
.landing .nav { align-items: center; gap: 6px 4px; }
.landing .nav .lnk { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .95rem; }
.landing .nav .lnk:hover { background: var(--ink-2); }
.landing .nav .lnk:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.landing .nav .btn { padding: 8px 14px; }
@media (max-width: 700px) { .landing .nav { width: 100%; } .landing .nav .lnk { padding: 6px 8px; font-size: .9rem; } }
.landing .nav .lnk.on { background: var(--ink-2); color: var(--blue); } .landing [data-page][hidden] { display: none !important; }
/* compact footer: two lines */
.landing footer .wrap.foot { display: block; padding-block: 10px; }
.landing footer .foot p { margin: 2px 0; font-size: .82rem; line-height: 1.45; }
.landing footer .foot .credits { color: var(--muted); opacity: .85; }
/* How it works: without vs with CyberDefense (8 s loop, CSS only) */
.landing .vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 8px; }
.landing .side { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--ink-2); }
.landing .side.bad { border-color: #5a2228; } .landing .side.good { border-color: #1f5a3c; }
.landing .side figcaption { font-weight: 700; margin-bottom: 8px; }
.landing .bad figcaption { color: #ff6b70; } .landing .good figcaption { color: var(--ok); }
.landing .scene { position: relative; height: 56px; display: flex; align-items: center; justify-content: space-between; font-size: 28px; }
.landing .trail { position: absolute; left: 40px; right: 40px; top: 50%; height: 0; border-top: 2px dashed var(--line); }
.landing .trail i { position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--red); opacity: 0; animation: go-bad 8s infinite; }
.landing .trail i:nth-child(2) { animation-delay: .4s; } .landing .trail i:nth-child(3) { animation-delay: .8s; }
.landing .good .trail i { animation-name: go-good; }
.landing .tgt { position: relative; }
.landing .boom, .landing .ok { position: absolute; right: -10px; top: -14px; font-size: 18px; opacity: 0; }
.landing .boom { animation: boom 8s infinite; } .landing .ok { color: var(--ok); animation: boom 8s infinite; }
.landing .bad .tgt { animation: hacked 8s infinite; }
.landing .wall2 { position: absolute; left: 58%; font-size: 26px; animation: shield2 8s infinite; }
.landing .story { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: .92rem; }
.landing .story li { opacity: .35; animation: step 8s infinite; }
.landing .story li:nth-child(2) { animation-delay: 1.5s; } .landing .story li:nth-child(3) { animation-delay: 3s; } .landing .story li:nth-child(4) { animation-delay: 4.5s; }
.landing .result { margin: 10px 0 0; font-weight: 700; }
@keyframes go-bad { 0% { left: 0; opacity: 0; } 5% { opacity: 1; } 35%, 100% { left: 100%; opacity: 0; } }
@keyframes go-good { 0% { left: 0; opacity: 0; } 5% { opacity: 1; } 30% { left: 52%; opacity: 1; } 34%, 100% { left: 52%; opacity: 0; } }
@keyframes boom { 0%, 35% { opacity: 0; } 40%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hacked { 0%, 35% { filter: none; } 40%, 92% { filter: grayscale(1) brightness(.6) drop-shadow(0 0 6px #e2383f); } 100% { filter: none; } }
@keyframes shield2 { 0%, 28% { transform: scale(1); } 32% { transform: scale(1.35); filter: drop-shadow(0 0 8px var(--blue)); } 40%, 100% { transform: scale(1); filter: none; } }
@keyframes step { 0% { opacity: .35; } 4%, 60% { opacity: 1; color: var(--text); } 70%, 100% { opacity: .35; } }
@media (max-width: 700px) { .landing .vs { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .landing .trail i, .landing .boom, .landing .ok, .landing .bad .tgt, .landing .wall2, .landing .story li { animation: none; opacity: 1; } }
.landing h3.mitigate { margin: 26px 0 0; font-size: 1.25rem; color: var(--text); } .landing h3.mitigate::before { content: "🛡 "; }
/* Khmer / English */
html[lang=km] *:not(code):not(pre):not(.mono){font-family:"Khmer UI","Leelawadee UI","Khmer Sangam MN","Noto Sans Khmer",system-ui,sans-serif}
html[lang=km] body{line-height:1.75}
html[lang=km] h1,html[lang=km] h2,html[lang=km] h3,html[lang=km] p,html[lang=km] a,html[lang=km] li{letter-spacing:normal;word-spacing:normal}
html[lang=km] h1{line-height:1.45;font-weight:700}
a.lang{font-weight:600;padding:2px 10px;border:1px solid currentColor;border-radius:6px;text-decoration:none;margin-left:12px;font-size:.85em;opacity:.85}

/* ---- 2026-11 redesign: hero with network globe, badges, stats, call-to-action band ---- */
.landing .kh { display: none; }   /* Khmer lives in the ខ្មែរ version, not under English headings */
.landing header.top { position: sticky; top: 0; z-index: 20; background: rgba(9, 18, 32, .82); backdrop-filter: blur(10px); }
.landing .logo { font-size: 1.15rem; }
.landing .hero { position: relative; overflow: hidden; min-height: min(92vh, 860px); display: grid; align-items: center;
  background: radial-gradient(ellipse at 50% 38%, #12345a 0%, #0b1a2e 45%, #070f1c 100%); }
.landing .hero .net { position: absolute; inset: 0; width: 100%; height: 100%; }
.landing .hero .globe { position: absolute; left: 50%; top: 36%; width: min(70vw, 620px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(90, 170, 255, .35), rgba(30, 90, 170, .12) 45%, transparent 70%);
  box-shadow: 0 0 120px 30px rgba(61, 143, 224, .18), inset 0 0 80px rgba(120, 190, 255, .18); pointer-events: none; }
.landing .hero .wrap { position: relative; z-index: 1; text-align: center; justify-items: center; padding-block: 72px 56px; gap: 20px; }
.landing .eyebrow { margin: 0; letter-spacing: .28em; text-transform: uppercase; font-size: .78rem; color: #9fc6ee; }
.landing h1.big { font-size: clamp(48px, 10vw, 112px); line-height: 1; font-weight: 800; letter-spacing: -.02em; max-width: none; color: #fff; text-shadow: 0 6px 40px rgba(61, 143, 224, .45); }
.landing h1.big span { color: #64aef5; }
.landing .hero .lead { text-align: center; color: #c7d6e6; font-size: clamp(1rem, 2vw, 1.2rem); }
.landing .hero .cta { justify-content: center; }
.landing .btn.light { background: #fff; color: #0d2a4a; border-color: #fff; }
.landing .badges { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; width: min(100%, 860px); }
.landing .badges li { position: relative; aspect-ratio: 1; display: grid; place-content: center; text-align: center; color: #fff; }
.landing .badges svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.landing .badges circle { fill: rgba(13, 27, 42, .75); stroke: #c9d6e3; stroke-width: 3; }
.landing .badges circle.in { fill: none; stroke: #64aef5; stroke-width: 1.5; stroke-dasharray: 4 3; }
.landing .badges b { position: relative; font-size: clamp(.95rem, 2.2vw, 1.35rem); line-height: 1.1; }
.landing .badges span { position: relative; font-size: clamp(.55rem, 1.1vw, .72rem); text-transform: uppercase; letter-spacing: .06em; color: #b9cbe0; padding: 0 10%; }
@media (max-width: 700px) { .landing .badges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.landing .stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 18px; padding-block: 34px; }
.landing .stats .wrap > div { border-left: 3px solid var(--blue); padding-left: 14px; }
.landing .stats b { display: block; font-size: 1.7rem; color: #fff; }
.landing .stats span { color: var(--muted); font-size: .92rem; }
.landing .ctaband { background: linear-gradient(90deg, #1f4f8f, #2a6fc0); }
.landing .ctaband .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-block: 30px; }
.landing .ctaband h2 { margin: 0; color: #fff; }
.landing .ctaband p { margin: 4px 0 0; color: #dbe8f7; }
.landing section.band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 18px; }
.landing .f { transition: transform .2s, border-color .2s; }
.landing .f:hover { transform: translateY(-3px); border-color: var(--blue); }
@media (prefers-reduced-motion: reduce) { .landing .f { transition: none; } .landing .f:hover { transform: none; } }
.landing header.top .wrap { max-width: 1320px; flex-wrap: nowrap; }
.landing header.top .nav { flex-wrap: nowrap; justify-content: flex-end; gap: 2px; }
.landing header.top .nav .lnk { font-size: .9rem; padding: 7px 9px; white-space: nowrap; }
.landing header.top .nav .btn { padding: 7px 14px; font-size: .9rem; white-space: nowrap; }
@media (max-width: 1100px) { .landing header.top .wrap { flex-wrap: wrap; } .landing header.top .nav { flex-wrap: wrap; justify-content: flex-start; } }
