/* AegisNex website. Colours are the app's "Aegis Night" theme (core/ui/theme/AegisColors.kt):
   dark by default, the Day set when the system asks for light. Layout follows tasteskill:
   one section per screen, equal edges, one button pair, quiet hover and press, one entrance. */

:root {
  --bg: #070D1F;
  --surface: #0E1730;
  --raised: #152142;
  --line: #2A3B66;
  --line-soft: #1C2A4D;
  --ink: #EAF2FF;
  --muted: #9DB0D0;
  --brand-a: #3B82F6;
  --brand-b: #22D3EE;
  --on-brand: #04112B;
  --accent: #22D3EE;          /* links and small marks */
  --glow: #2563EB;
  --glow-a: .45;
  --safe: #4ADE80;
  --warn: #FBBF24;
  --danger: #F87171;
  --danger-wash: #3A1218;
  --warn-wash: #33260A;
  --core: #070D1F;

  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
  --wrap: 1120px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F8FF;
  --surface: #FFFFFF;
  --raised: #EEF3FF;
  --line: #C3D0EA;
  --line-soft: #DDE6F7;
  --ink: #0B1630;
  --muted: #4A5B7A;
  --brand-a: #1D4ED8;
  --brand-b: #0E7490;
  --on-brand: #FFFFFF;
  --accent: #0B5FA8;
  --glow: #93C5FD;
  --glow-a: .28;
  --safe: #15803D;
  --warn: #B45309;
  --danger: #B91C1C;
  --danger-wash: #FEE2E2;
  --warn-wash: #FEF3C7;
  --core: #F5F8FF;
  color-scheme: light;
}
/* No script or no choice yet: follow the system. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F5F8FF;
    --surface: #FFFFFF;
    --raised: #EEF3FF;
    --line: #C3D0EA;
    --line-soft: #DDE6F7;
    --ink: #0B1630;
    --muted: #4A5B7A;
    --brand-a: #1D4ED8;
    --brand-b: #0E7490;
    --on-brand: #FFFFFF;
    --accent: #0B5FA8;
    --glow: #93C5FD;
    --glow-a: .28;
    --safe: #15803D;
    --warn: #B45309;
    --danger: #B91C1C;
    --danger-wash: #FEE2E2;
    --warn-wash: #FEF3C7;
    --core: #F5F8FF;
    color-scheme: light;
  }
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand-b); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-s); z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; min-height: 44px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; transition: border-color .2s var(--ease), background .2s var(--ease); }
.lang:hover { border-color: var(--brand-b); background: var(--raised); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .18s var(--ease); }
.theme-toggle:hover { border-color: var(--brand-b); background: var(--raised); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* ---------- buttons: one pair ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: var(--r-s); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease); }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); color: var(--on-brand); box-shadow: 0 8px 28px -10px var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 36px -10px var(--glow); filter: brightness(1.05); }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { border-color: var(--brand-b); background: var(--raised); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* ---------- sections ---------- */
.screen { min-height: calc(100svh - 64px); display: flex; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.screen > .wrap { width: 100%; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; }
.section-head { max-width: 40em; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 16px; }
.section-head.compact { margin-bottom: 28px; }
.section-head.compact h2 { font-size: clamp(28px, 3.4vw, 40px); }

/* hero */
.hero .wrap { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 64px; } }
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); margin-bottom: 20px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-bottom: 20px; }
.fact { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; margin-bottom: 32px; max-width: 34em; }
.fact svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--safe); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* the app, as a phone */
.device { justify-self: center; width: min(100%, 310px); padding: 10px; border-radius: 44px; background: linear-gradient(160deg, var(--line), var(--line-soft)); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55), 0 0 0 1px var(--line-soft); }
.device-screen { border-radius: 36px; background: var(--bg); padding: 18px 16px 20px; overflow: hidden; }
.app-bar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); padding: 0 6px 6px; }
.app-bar b { color: var(--ink); font-size: 16px; }
.app-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 4px color-mix(in srgb, var(--safe) 20%, transparent); }
.app-hero { width: 170px; margin: 0 auto; }
.app-verdict { text-align: center; margin: 2px 0 16px; }
.app-verdict strong { display: block; font-size: 19px; }
.app-verdict span { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-m); padding: 12px; font-size: 13px; }
.tile b { display: block; font-size: 14px; margin-bottom: 4px; }
.tile span { color: var(--muted); display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; }
.tile span::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--safe); }

/* shield (port of ShieldHero) */
.shield { width: 100%; height: auto; overflow: visible; }
.shield .halo-stop { stop-color: var(--glow); stop-opacity: var(--glow-a); }
.shield .halo-end { stop-color: var(--glow); stop-opacity: 0; }
.shield .g-a { stop-color: var(--brand-b); }
.shield .g-b { stop-color: var(--brand-a); }
.shield .core { fill: var(--core); fill-opacity: .92; }
.shield .orbit-back { stroke: var(--brand-b); stroke-opacity: .35; }
.shield .orbit-front { stroke: var(--brand-b); stroke-opacity: .85; }
.shield .star { fill: var(--brand-b); transform-box: fill-box; transform-origin: center; animation: breathe 2.6s ease-in-out infinite alternate; }
.shield .halo { transform-box: fill-box; transform-origin: center; animation: halo 5.2s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.88); } to { transform: scale(1.08); } }
@keyframes halo { from { opacity: .75; } to { opacity: 1; } }

/* what it checks */
.checks { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .checks { grid-template-columns: 1fr 1fr; gap: 64px; } }
.check-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.check-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.check-list .ic { width: 44px; height: 44px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--raised); color: var(--brand-b); }
.check-list .ic svg { width: 22px; height: 22px; }
.check-list h3 { font-size: 18px; margin-bottom: 4px; letter-spacing: -0.01em; }
.check-list p { color: var(--muted); font-size: 15px; }

/* alerts, as the app shows them */
.alerts { display: grid; gap: 16px; max-width: 440px; justify-self: center; width: 100%; }
.alert { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6); transition: transform .2s var(--ease); }
.alert:hover { transform: translateY(-2px); }
.alert .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.alert .ic svg { width: 20px; height: 20px; }
.alert.danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: linear-gradient(135deg, var(--danger-wash), var(--surface) 70%); }
.alert.danger .ic { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: linear-gradient(135deg, var(--warn-wash), var(--surface) 70%); }
.alert.warn .ic { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.alert.ok .ic { background: color-mix(in srgb, var(--safe) 18%, transparent); color: var(--safe); }
.alert small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.alert strong { display: block; font-size: 16px; margin-bottom: 4px; }
.alert p { color: var(--muted); font-size: 14px; }

/* privacy promises */
.promises { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
@media (min-width: 820px) { .promises { grid-template-columns: repeat(3, 1fr); border-top: 0; } }
.promise { padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
@media (min-width: 820px) { .promise { padding: 8px 32px 8px 0; border-bottom: 0; border-left: 1px solid var(--line-soft); padding-left: 32px; } .promise:first-child { border-left: 0; padding-left: 0; } }
.promise .num { font-size: clamp(40px, 5vw, 56px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; }
.promise h3 { font-size: 20px; margin-bottom: 8px; }
.promise p { color: var(--muted); font-size: 15px; }
.more { margin-top: 40px; }

/* close */
.close { text-align: center; border-bottom: 0; }
.close .wrap { display: grid; justify-items: center; gap: 24px; }
.close .mark { width: 140px; }
.close h2 { font-size: clamp(32px, 5vw, 56px); max-width: 16em; }
.close .lead { margin: 0 auto; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: grid; gap: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; background: linear-gradient(var(--brand-b), var(--brand-b)) 0 calc(100% - 10px) / 0 1px no-repeat; transition: background-size .25s var(--ease); }
.foot-links a:hover { background-size: 100% 1px; }
.site-foot p { max-width: 70em; }
.site-foot a { color: var(--muted); }

/* ---------- documents (legal pages, /get) ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: calc(68ch + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(32px, 4.6vw, 48px); margin-bottom: 12px; }
.doc h2 { font-size: 22px; margin: 48px 0 12px; scroll-margin-top: 88px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc ul, .doc ol, .doc table { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--brand-b); }
.meta { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.note { background: var(--raised); border-left: 3px solid var(--brand-b); border-radius: 0 var(--r-s) var(--r-s) 0; padding: 14px 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-weight: 600; }
.toc { border: 1px solid var(--line-soft); border-radius: var(--r-m); padding: 18px 20px; margin: 0 0 32px; background: var(--surface); }
.toc b { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 0; break-inside: avoid; }
.toc a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--accent); }

/* /get */
.get-head { display: grid; justify-items: start; gap: 8px; margin-bottom: 8px; }
.get-head .mark { width: 120px; margin-left: -12px; }
.panel { border: 1px solid var(--line-soft); background: var(--surface); border-radius: var(--r-l); padding: 28px 24px; margin-top: 24px; }
.panel h2 { margin: 0 0 8px; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.panel h2 svg { width: 24px; height: 24px; color: var(--brand-b); }
.panel > p { color: var(--muted); margin-bottom: 20px; }
form.wait { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
form.wait input[type=text] { font: inherit; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg); color: var(--ink); width: 100%; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
form.wait input[type=text]:focus { outline: none; border-color: var(--brand-b); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-b) 25%, transparent); }
form.wait label.consent { font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
form.wait label.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand-b); }
form.wait .btn { justify-self: start; }
#wait-status { margin: 0; color: var(--warn); font-size: 14px; min-height: 1.4em; }
#wait-done { margin: 0; }
@media (max-width: 560px) { .btn { width: 100%; } form.wait .btn { justify-self: stretch; } .actions { flex-direction: column; } }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- entrance, once ---------- */
.enter > * { animation: rise .7s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .08s; }
.enter > *:nth-child(3) { animation-delay: .16s; }
.enter > *:nth-child(4) { animation-delay: .24s; }
.enter > *:nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 899px) { .screen { min-height: 0; padding: 64px 0; } }
