/* Qiguard: one cinematic page. Dark only. No external fonts, images or requests (CSP: style-src 'self').
   Layers: canvas (WebGL filaments) < static backdrop (fallback) < vignette < content < fixed brand / hint / progress bar.
   Without JavaScript or WebGL the scenes are a plain stacked page; with JavaScript on wide screens (html.pin) every scene is pinned while it is read. */
:root {
  --bg: #04060b;
  --ink: #f2f5fb;            /* body text */
  --ink-2: #cdd4e3;          /* secondary text */
  --ink-3: #bac2d3;          /* quiet text (hint, API line, tags) */
  --blue: #7aa2ff;
  --violet: #b99aff;
  --amber: #ffa971;
  --ring: #a9c1ff;           /* focus ring */
  --scrim-rgb: 4, 7, 15;
  --scrim-a: 0.8;            /* soft backdrop behind loose text; check-site tests the worst case (white filaments under it) */
  --glass-a: 0.74;           /* cards */
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.36);
  /* system fonts only (CSP: no font downloads). One stack per script, covering Windows / macOS + iOS / Android in that order of names;
     the Latin face comes first where the script font has no Latin of its own, so names like Qiguard and EIP-712 keep one look. */
  --font-latin: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-zh: "Inter", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-hi: "Inter", "Segoe UI", "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", "Mangal", system-ui, sans-serif;
  --font-bn: "Inter", "Segoe UI", "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali", "Vrinda", system-ui, sans-serif;
  --font-ar: "Segoe UI", "Geeza Pro", "SF Arabic", "Noto Naskh Arabic", "Noto Sans Arabic", "Tahoma", system-ui, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Urdu Typesetting", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Naskh Arabic", "Tahoma", system-ui, sans-serif;
  --font: var(--font-latin);
  --stage-pad: 96px;
}
html[data-lang="zh"] { --font: var(--font-zh); }
html[data-lang="hi"] { --font: var(--font-hi); }
html[data-lang="bn"] { --font: var(--font-bn); }
html[data-lang="ar"] { --font: var(--font-ar); }
html[data-lang="ur"] { --font: var(--font-ur); }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: auto; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-width: 300px; background: var(--bg); color: var(--ink);   /* 320 px phones, and a 320 px window with a 15 px classic scrollbar */
  font: 400 clamp(15px, 0.35vw + 13.4px, 17px) / 1.65 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
.nb { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* languages: all eleven live in the HTML, one is shown (English by default and without JavaScript) */
[data-l]:not([data-l="en"]) { display: none; }
html:not([data-lang="en"]) [data-l="en"] { display: none; }
html[data-lang="zh"] [data-l="zh"], html[data-lang="hi"] [data-l="hi"], html[data-lang="es"] [data-l="es"], html[data-lang="ar"] [data-l="ar"],
html[data-lang="fr"] [data-l="fr"], html[data-lang="bn"] [data-l="bn"], html[data-lang="pt"] [data-l="pt"], html[data-lang="ru"] [data-l="ru"],
html[data-lang="ur"] [data-l="ur"], html[data-lang="tr"] [data-l="tr"] { display: inline; }

/* ---------------------------------------------------------------- background layers */
.backdrop {                       /* static fallback: shown until WebGL runs, and whenever it cannot (or without JavaScript) */
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  --bd: radial-gradient(46% 38% at 50% 46%, rgba(91, 140, 255, 0.18), transparent 70%),
    radial-gradient(30% 26% at 66% 38%, rgba(255, 138, 76, 0.12), transparent 70%),
    radial-gradient(34% 30% at 36% 58%, rgba(176, 107, 255, 0.13), transparent 72%),
    linear-gradient(#050811, #04060b 60%, #05070d);
  background: var(--bd);
  transition: opacity 0.8s ease;
}
html.no-gl .backdrop, html:not(.js) .backdrop {   /* the hero shield ring, drawn once as hairlines (assets/backdrop.svg, built from the same geometry) */
  background-image: url(/assets/backdrop.svg), var(--bd);
  background-repeat: no-repeat, no-repeat; background-size: auto 100%, auto; background-position: center 46%, center;
}
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; }
html.gl .bg-canvas { display: block; }
html.gl .backdrop { opacity: 0; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 44%, transparent 55%, rgba(2, 3, 6, 0.55) 100%);
}
main { position: relative; z-index: 2; overflow-x: clip; }

/* ---------------------------------------------------------------- brand (centred, top) and skip link */
.skip {
  position: fixed; left: 50%; top: 10px; z-index: 40; transform: translate(-50%, -200%); padding: 10px 18px; border-radius: 999px;
  background: #0b1224; color: #fff; border: 1px solid var(--line-strong); text-decoration: none; font-size: 14px;
}
.skip:focus-visible { transform: translate(-50%, 0); outline: 2px solid var(--ring); outline-offset: 3px; }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: flex-start; padding: 18px 20px 0; pointer-events: none; }   /* owner 2026-10-27: wordmark at the start, links in the middle, language + wallet at the end */
.brand {
  pointer-events: auto; display: inline-flex; padding: 8px 12px; border-radius: 12px; color: var(--ink); text-decoration: none;
  background: rgba(var(--scrim-rgb), 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.top::before {                    /* text that scrolls up under the wordmark fades out instead of running through the letters */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 84px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(var(--scrim-rgb), 0.9), rgba(var(--scrim-rgb), 0.55) 60%, rgba(var(--scrim-rgb), 0));
}
.brand__svg { display: block; height: 29px; width: auto; }   /* the mark is 1.3 x the letters (HEADER_MARK_SCALE): letters stay 22 px */

/* ---------------------------------------------------------------- scenes */
.scene { position: relative; }
.stage {
  min-height: 100vh; min-height: 100svh; padding: var(--stage-pad) 20px 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 44px;
}
.stage--split { justify-content: space-between; }
.stage__low { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.scene--static .stage { min-height: 100vh; min-height: 100svh; }

html.pin .scene { height: calc(var(--len, 1.5) * 100vh); }
html.pin .stage { position: sticky; top: 0; height: 100vh; min-height: 0; padding: 92px 6vw 52px; will-change: opacity; }
html.pin .is-off, html.pin .is-off * { pointer-events: none; }
.scene--hero { --len: 1.4; }
.scene--protect { --len: 1.9; }
.scene--custody { --len: 1.6; }
.scene--quantum { --len: 1.6; }
.scene--today { --len: 1.5; }
.scene--quantum .stage { padding-bottom: 20vh; }          /* the field rises from the bottom: keep the text above it */
html.pin .scene--quantum .stage { padding-bottom: 26vh; }
html.pin .scene--static { height: auto; }
html.pin .scene--static .stage { position: relative; height: auto; min-height: 100vh; }

/* soft backdrop behind loose text: a blurred, dark, rounded box that reaches past the text on every side */
.scrim { position: relative; isolation: isolate; max-width: min(100%, 820px); }
.scrim::before {
  content: ""; position: absolute; z-index: -1; inset: -72px -96px; border-radius: 72px; pointer-events: none;
  background: rgba(var(--scrim-rgb), var(--scrim-a)); filter: blur(40px);
}
.scrim > * + * { margin-top: 20px; }

.kicker {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 4px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-2);
}
.kicker::before, .kicker::after { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--violet)); }
.kicker::after { transform: scaleX(-1); }
.display {
  font-weight: 350; letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(36px, 5.6vw, 78px); color: #fff; text-wrap: balance;
  text-shadow: 0 2px 28px rgba(2, 4, 10, 0.85), 0 1px 2px rgba(2, 4, 10, 0.8);
}
.display--m { font-size: clamp(30px, 4.2vw, 56px); }
.lead { max-width: 54ch; margin-inline: auto; color: var(--ink-2); font-size: clamp(15.5px, 0.5vw + 13.6px, 19px); text-wrap: balance; text-shadow: 0 1px 14px rgba(2, 4, 10, 0.9); }
.note { max-width: 54ch; margin-inline: auto; color: var(--ink-3); font-size: 14.5px; text-wrap: balance; text-shadow: 0 1px 12px rgba(2, 4, 10, 0.9); }

/* four equal glass cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; width: min(1180px, 100%); }   /* every card as tall as the tallest */
.card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 20px 20px;
  background: rgba(8, 12, 24, var(--glass-a)); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card { background: rgba(8, 12, 24, 0.92); } }
.card__icon { color: var(--blue); margin-bottom: 2px; }
.card__title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; color: #fff; text-wrap: balance; }
.card__text { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); text-wrap: balance; }
.card__tag {
  margin-top: auto; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; color: var(--ink-3);
}
.card__text + .card__tag { margin-top: auto; }
.card > .card__text { margin-bottom: 8px; }

.nets__label { margin-top: 26px !important; font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-3); }
.nets { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px !important; }
.nets li {
  padding: 8px 18px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.actions { display: flex; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line-strong); color: #fff; font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  background: linear-gradient(120deg, rgba(91, 140, 255, 0.22), rgba(176, 107, 255, 0.22)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.btn:hover { background: linear-gradient(120deg, rgba(91, 140, 255, 0.42), rgba(176, 107, 255, 0.42)); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.icon--ext { flex: none; opacity: 0.85; }
.api { color: var(--ink-3); font-size: 14.5px; text-shadow: 0 1px 12px rgba(2, 4, 10, 0.9); }
.risk { max-width: 60ch; margin-inline: auto; color: var(--ink-2); font-size: 14.5px; text-wrap: balance; text-shadow: 0 1px 12px rgba(2, 4, 10, 0.9); }

/* footer: language switch + parent brand + copyright, centred */
.scrim > .foot { margin-top: 30px; }
.stage__low .scrim > * + * { margin-top: 14px; }              /* the lower stack of the last scene is kept compact: the shield and galaxy need the room above it */
.stage__low .scrim > .foot { margin-top: 22px; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* language switch (header, left of the wallet button): a toggle with the native name of the language in use, and a list of the eleven that
   opens below it */
.lang { position: relative; display: inline-flex; }
html:not(.js) .lang { display: none; }
.lang__toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 12px 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(var(--scrim-rgb), 0.6); color: var(--ink-2); cursor: pointer; font: 600 13.5px / 1.2 var(--font);
}
.lang__toggle:hover, .lang__toggle[aria-expanded="true"] { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.lang__now { color: #fff; }
.lang__globe { flex: none; color: var(--blue); }
.lang__chev { flex: none; opacity: 0.8; transition: transform 0.2s; }
.lang__toggle[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__list {
  position: absolute; z-index: 5; top: calc(100% + 10px); inset-inline-end: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: max-content; min-width: 330px; max-width: calc(100vw - 24px);
  padding: 8px; border: 1px solid var(--line-strong); border-radius: 18px; background: #0a1022; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.lang__list[hidden] { display: none; }
.lang__opt {
  display: block; width: 100%; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font: 500 14.5px / 1.25 var(--font-latin); color: var(--ink-2); text-align: center; white-space: nowrap;
}
.lang__opt:lang(zh) { font-family: var(--font-zh); }
.lang__opt:lang(hi) { font-family: var(--font-hi); }
.lang__opt:lang(bn) { font-family: var(--font-bn); }
.lang__opt:lang(ar) { font-family: var(--font-ar); }
.lang__opt:lang(ur) { font-family: var(--font-ur); }
.lang__opt:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.lang__opt[aria-pressed="true"] { background: linear-gradient(120deg, rgba(91, 140, 255, 0.55), rgba(176, 107, 255, 0.55)); color: #fff; }
@media (max-width: 560px) { .lang__list { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; min-width: 0; } }
@media (max-width: 420px) { .lang__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot__line { font-size: 13.5px; color: var(--ink-3); text-shadow: 0 1px 10px rgba(2, 4, 10, 0.9); }
.foot__link { display: inline-flex; align-items: center; gap: 6px; padding-block: 6px; color: var(--ink-2); text-underline-offset: 3px; }
.foot__link:hover { color: #fff; }

:where(a, button):focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 10px; }
/* ---------------------------------------------------------------- header line + wallet (owner decision 2026-10-24) */
.top::after {                     /* the header: a thin white line under the wordmark, fading out at both ends */
  content: ""; position: absolute; left: 0; right: 0; top: 76px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.42) 16%, rgba(255, 255, 255, 0.42) 84%, rgba(255, 255, 255, 0));
}
/* the end of the header line: the language switch, then the wallet button, then the phone menu (the right in left-to-right languages,
   the left in Arabic and Urdu) */
.top__end { pointer-events: auto; position: absolute; inset-inline-end: 20px; top: 21.5px; display: flex; align-items: center; gap: 10px; }
.top .lang__toggle { background: rgba(var(--scrim-rgb), 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
/* the links: one pill in the middle of the header line; js/lang.js moves them behind the menu button when they would touch the wordmark or
   the end group (a long language, a narrow window) */
.nav {
  pointer-events: auto; position: absolute; top: 21.5px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; height: 38px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(var(--scrim-rgb), 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav__link, .menu__link { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav__link:hover, .menu__link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.menu { display: none; position: relative; }
.menu__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(var(--scrim-rgb), 0.92); color: var(--ink); cursor: pointer; list-style: none;
}
.menu__btn::-webkit-details-marker { display: none; }
.menu__btn:hover, .menu[open] .menu__btn { border-color: rgba(255, 255, 255, 0.6); }
.menu__list {
  position: absolute; z-index: 5; top: calc(100% + 10px); inset-inline-end: 0; display: flex; flex-direction: column; min-width: 210px; padding: 8px;
  border: 1px solid var(--line-strong); border-radius: 18px; background: #0a1022; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.menu__link { height: 42px; padding: 0 14px; font-size: 15px; }
.top.is-compact .nav { display: none; }
.top.is-compact .menu { display: block; }
@media (max-width: 899px) { .nav { display: none; } .menu { display: block; } }
@media (max-width: 560px) {
  .top { padding-inline: 12px; }
  .top__end { inset-inline-end: 12px; gap: 8px; }
  .top .lang__now { display: none; }
}
@media (max-width: 400px) { .top .lang__chev { display: none; } .top .lang__toggle { padding: 4px 9px; } .top .brand__svg { height: 21px; } }
.wallet {                         /* the last item of .top__end, right of the language switch (owner 2026-10-27) */
  pointer-events: auto; display: none; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(var(--scrim-rgb), 0.92); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .2s, background-color .2s;
}
html.js .wallet { display: inline-flex; }
html.js .wallet[hidden] { display: none; }        /* a browser without <dialog> */
.wallet:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(16, 24, 52, 0.95); }
.wallet__icon { flex: none; color: #ffb37a; }
.wallet.is-on .wallet__icon { color: #6ee7a8; }
.wallet.is-on .wallet__label { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; direction: ltr; unicode-bidi: isolate; }   /* the short address */
.wallet__label { white-space: nowrap; }
.wallet__net { display: none; padding-inline-start: 10px; border-inline-start: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 500; white-space: nowrap; }
@media (min-width: 1100px) { .wallet__net { display: inline; } }   /* wide screens: the network next to the address */
.wallet-dlg {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px;
  background: #0a1022; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.wallet-dlg::backdrop { background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.wallet-dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 18px 8px; padding-inline: 22px 18px; }
.wallet-dlg__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.wallet-dlg__close { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.wallet-dlg__close:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.wallet-dlg__list { display: grid; gap: 8px; padding: 8px 18px; }
.wallet-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: start; text-decoration: none; cursor: pointer;
}
.wallet-row:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }
.wallet-row__icon { flex: none; width: 28px; height: 28px; border-radius: 8px; color: var(--ink-2); }
.wallet-row__name { flex: 1 1 0; min-width: 6.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* the wallet name keeps its room: a long tag wraps instead */
.wallet-row__tag { flex: 0 1 auto; min-width: 0; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.35; text-align: center; color: #6ee7a8; background: rgba(110, 231, 168, 0.1); }
.wallet-row--out .wallet-row__tag { color: var(--ink-2); background: rgba(255, 255, 255, 0.07); }
.wallet-acct { padding: 6px 4px 4px; }
.wallet-acct__label { margin: 0 0 6px; color: #6ee7a8; font-size: 13px; font-weight: 600; }
.wallet-acct__addr { margin: 0; font-size: 14px; word-break: break-all; font-variant-numeric: tabular-nums; text-wrap: balance; direction: ltr; unicode-bidi: isolate; text-align: left; }   /* a wrapped address splits in two even halves; it reads left to right in every language */
html[dir="rtl"] .wallet-acct__addr { text-align: right; }
.wallet-acct__net { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.wallet-acct__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wallet-act { flex: 1 1 8em; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.25; cursor: pointer; }
.wallet-act--quiet { color: var(--ink-2); }
.wallet-act:hover { border-color: rgba(255, 255, 255, 0.6); }
.wallet-dlg__status { min-height: 0; margin: 4px 22px 0; color: #ffb37a; font-size: 13px; }
.wallet-dlg__status:empty { margin-top: 0; }                  /* the live region stays in the page while empty: screen readers hear the next message */
html:has(dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }   /* the page behind the open dialog does not scroll (wheel, touch, keys) */
.wallet-dlg__note { margin: 10px 22px 20px; color: var(--ink-3); font-size: 12px; line-height: 1.5; }
@media (max-width: 560px) {
  .wallet { width: 38px; padding: 0; justify-content: center; }
  .wallet__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .wallet-acct__addr { font-size: 13px; }
}
/* wider screens: js/wallet.js drops a label that would reach the wordmark (a long language, the address + network) to the icon the same way */
.wallet.wallet--icon { width: 38px; padding: 0; justify-content: center; }
.wallet.wallet--icon .wallet__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wallet.wallet--icon .wallet__net { display: none; }

.btn:focus-visible, .lang__toggle:focus-visible { border-radius: 999px; }
.lang__opt:focus-visible { border-radius: 12px; outline-offset: 1px; }

/* scroll hint and progress bar (decorative) */
.hint {
  position: fixed; left: 50%; bottom: 22px; z-index: 30; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); pointer-events: none; transition: opacity 0.4s;
}
.hint__line { width: 1px; height: 30px; background: linear-gradient(var(--ink-3), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0.2); opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0.2) translateY(26px); opacity: 0; } }
.bar { position: fixed; left: 0; bottom: 0; z-index: 31; height: 2px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #5b8cff, #b06bff, #ff8a4c); pointer-events: none; }
html:not(.js) .hint, html:not(.js) .bar { display: none; }

/* ---------------------------------------------------------------- scripts and reading direction
   Capitals: text-transform follows the lang of each text span (Turkish i -> İ, ı -> I); Chinese, Hindi, Bengali, Arabic and Urdu have no case.
   Arabic and Urdu letters join, and Devanagari and Bengali hang from one headline: wide tracking would tear them apart, so it is off there.
   Their marks above and below the line need more line height than Latin headings (Urdu Nastaliq the most). */
html:is([data-lang="ar"], [data-lang="ur"], [data-lang="hi"], [data-lang="bn"]) :is(.kicker, .nets__label, .hint, .display, .card__title, .card__tag, .btn, .wallet, .wallet.is-on .wallet__label) { letter-spacing: 0; }
html[data-lang="zh"] :is(.kicker, .nets__label, .hint) { letter-spacing: 0.16em; }
html:is([data-lang="ar"], [data-lang="ur"], [data-lang="hi"], [data-lang="bn"]) :is(.kicker, .nets__label) { font-size: 13.5px; }
html:is([data-lang="ar"], [data-lang="ur"], [data-lang="hi"], [data-lang="bn"]) .hint { font-size: 12.5px; }
html[data-lang="zh"] .display { line-height: 1.22; }
/* Chinese headings break at the spaces around Latin names and at punctuation, not inside a word (平台 stays together); a run longer than the line still breaks */
html[data-lang="zh"] :is(.display, .card__title) { word-break: keep-all; overflow-wrap: anywhere; }
html:is([data-lang="hi"], [data-lang="bn"]) .display { line-height: 1.34; }
html:is([data-lang="hi"], [data-lang="bn"]) body { line-height: 1.75; }
html:is([data-lang="hi"], [data-lang="bn"]) :is(.card__title, .card__text) { line-height: 1.65; }
html[data-lang="ar"] .display { line-height: 1.32; }
html[data-lang="ar"] body { line-height: 1.8; }
html[data-lang="ur"] .display { line-height: 1.6; }
html[data-lang="ur"] body { line-height: 2; }
html[data-lang="ur"] :is(.card__title, .card__text, .note) { line-height: 1.95; }
/* right to left (Arabic, Urdu): the page is centred, so the mirror shows in the kicker hairlines, the progress bar, the wallet button (at the
   inline end of the header) and the dialog; the WebGL scenes and the wordmark are pictures and keep their orientation */
html[dir="rtl"] .kicker::before { transform: scaleX(-1); }
html[dir="rtl"] .kicker::after { transform: none; }
html[dir="rtl"] .bar { transform-origin: 100% 50%; background: linear-gradient(270deg, #5b8cff, #b06bff, #ff8a4c); }

/* ---------------------------------------------------------------- screen sizes */
@media (max-width: 1099px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; } }
@media (max-width: 699px) {
  :root { --stage-pad: 84px; }
  .stage { gap: 36px; padding-bottom: 56px; }
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
  .scrim::before { inset: -44px -26px; border-radius: 44px; filter: blur(18px); }
  .kicker { letter-spacing: 0.22em; }
  .kicker::before, .kicker::after { width: 16px; }
  .brand__svg { height: 25px; }
  .top__end, .nav { top: 19.5px; }                           /* centred on the 41 px wordmark box */
  .hint { bottom: 14px; }
}
@media (max-width: 359px) { .display { font-size: 32px; } .display--m { font-size: 28px; } .kicker { letter-spacing: 0.16em; } }
@media (min-width: 1800px) {
  :root { --stage-pad: 110px; }
  .scrim { max-width: min(100%, 1180px); }
  .cards { width: min(1440px, 100%); gap: 20px; }
  .brand__svg { height: 34px; }
  .top__end, .nav { top: 24px; }                             /* centred on the 50 px wordmark box */
}
@media (min-width: 1800px) and (min-height: 801px) {           /* the large type only where the screen is tall as well as wide (a 2560 x 640 window keeps the regular sizes: the longer languages fit) */
  .display { font-size: clamp(78px, 4.2vw, 108px); }
  .display--m { font-size: clamp(56px, 3.1vw, 80px); }
  .lead { font-size: clamp(19px, 0.9vw, 24px); }
  .card { padding: 30px 26px 24px; }
  .card__title { font-size: 20px; }
  .card__text { font-size: 16.5px; }
}
/* 1000-1099 px wide and pinned: the four cards stand in two rows. On a short screen the longer languages need the room: tighter cards */
@media (min-width: 1000px) and (max-width: 1099px) and (max-height: 900px) {
  html.pin .scene--protect .stage { gap: 24px; }
  html.pin .scene--protect .cards { gap: 12px; }
  html.pin .scene--protect .card { padding: 16px 18px 14px; gap: 7px; }
  html.pin .scene--protect .card > .card__text { margin-bottom: 4px; }
  html.pin[data-lang="ur"] .scene--protect :is(.card__title, .card__text) { line-height: 1.75; }
}
@media (max-height: 560px) and (min-width: 700px) { :root { --stage-pad: 72px; } .stage { gap: 24px; } }
@media (max-height: 800px) and (min-width: 700px) {            /* laptop screens: the footer is one row and the stages sit a little tighter, so the shield and galaxy of the last scene keep their room */
  html.pin .stage { padding-top: 92px; padding-bottom: 40px; }   /* 92: the first line of the last scene stays >= 24 px under the wordmark pill (45 px tall since the larger logo, 50 px from 1800 px wide) */
  .foot { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
  .stage__low .scrim > .foot { margin-top: 14px; }
}

@media (pointer: coarse) {
  .card, .btn, .brand, .nav, .wallet { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card { background: rgba(8, 12, 24, 0.86); }
}

/* ---------------------------------------------------------------- motion, forced colours and print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hint { display: none; }
}
@media (forced-colors: active) {
  .bg-canvas, .backdrop, .veil, .hint, .bar, .top::before, .scrim::before { display: none !important; }
  .brand, .card, .btn, .nets li, .card__tag, .lang__toggle, .lang__list, .nav, .menu__btn, .menu__list { background: Canvas; border: 1px solid CanvasText; }
  .btn { border-color: LinkText; }
  .lang__opt { border: 1px solid transparent; }
  .lang__opt[aria-pressed="true"] { background: Highlight; color: HighlightText; border-color: HighlightText; forced-color-adjust: none; }
  .display, .lead, .note, .api, .risk, .kicker, .foot__line, .card__title, .card__text { text-shadow: none; }
  :where(a, button):focus-visible { outline: 2px solid Highlight; }
}
@media print {
  .bg-canvas, .backdrop, .veil, .top, .hint, .bar, .skip, .lang, .wallet-dlg { display: none !important; }
  main::before { content: "QIGUARD"; display: block; text-align: center; margin-bottom: 6mm; font-size: 14pt; font-weight: 600; letter-spacing: 0.32em; color: #000; }
  html, body { background: #fff; color: #000; }
  .scene, html.pin .scene { height: auto !important; }
  .stage, html.pin .stage { position: static !important; height: auto !important; min-height: 0 !important; opacity: 1 !important; padding: 10mm 0 !important; gap: 8mm; break-inside: avoid; }
  .scrim::before { display: none; }
  .display, .lead, .note, .api, .risk, .kicker, .card__title, .card__text, .card__tag, .foot__line, .nets li, .nets__label { color: #000; text-shadow: none; }
  .card, .btn, .nets li, .card__tag { background: none; border-color: #777; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #000; }
  .kicker::before, .kicker::after { background: #777; }
  a { color: #000; }
}

/* ---------------------------------------------------------------- views: Pricing and Docs inside the page (owner 2026-10-27)
   html[data-view] (boot.js from the address, js/lang.js on a header link): the scenes give way to the view; the header, the background
   and the language stay. Without JavaScript only the home page shows. */
.view { display: none; position: relative; z-index: 2; }
html[data-view="pricing"] .view--pricing, html[data-view="docs"] .view--docs { display: block; }
html[data-view="pricing"] .scene, html[data-view="docs"] .scene,
html[data-view="pricing"] :is(.hint, .bar), html[data-view="docs"] :is(.hint, .bar) { display: none; }
html:is([data-view="pricing"], [data-view="docs"]) .bg-canvas { opacity: 0.22; transition: opacity 0.4s; }   /* the shape stays, dimmed: the cards and the guide read first */
.view__in { max-width: 1240px; margin: 0 auto; padding: 128px 20px 88px; text-align: center; }
.view__in > .lead { margin-top: 14px; }
.nav__link[aria-current="page"], .menu__link[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.1); }

/* period switch */
.period { display: inline-flex; gap: 4px; margin: 30px auto 0; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(var(--scrim-rgb), 0.85); }
.period__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 14.5px / 1.2 var(--font); cursor: pointer; }
.period__btn[aria-pressed="true"] { background: linear-gradient(120deg, rgba(91, 140, 255, 0.55), rgba(176, 107, 255, 0.55)); color: #fff; }
.period__save { padding: 2px 8px; border-radius: 999px; background: rgba(176, 107, 255, 0.2); color: #d4bfff; font-size: 12px; font-weight: 700; }
[data-price="year"] { display: none; }
html[data-period="year"] [data-price="year"] { display: inline; }
html[data-period="year"] [data-price="month"] { display: none; }

/* plan cards (the look the owner pointed at: big price, the popular plan framed in amber with a badge, a full-width buy button) */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 40px 0 0; padding: 0; list-style: none; text-align: center; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 34px 26px 28px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 26px;
  background: linear-gradient(180deg, rgba(20, 26, 44, 0.94), rgba(10, 14, 26, 0.94)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.plan--popular { border-color: rgba(176, 107, 255, 0.8); box-shadow: 0 0 0 1px rgba(176, 107, 255, 0.3), 0 30px 80px rgba(140, 90, 255, 0.22); }
.plan__badge {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border: 1px solid rgba(176, 107, 255, 0.75); border-radius: 999px;
  background: #1c1236; color: #d4bfff; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.plan__name { font-size: 22px; font-weight: 800; color: #fff; }
.plan__for { min-height: 2.6em; color: var(--ink-3); font-size: 14px; }
.plan__price { margin-top: 4px; font-size: clamp(40px, 3.4vw, 54px); font-weight: 800; line-height: 1; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan__per { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.plan__rows { display: grid; gap: 8px; margin: 14px 0 6px; padding: 16px 0 0; border-top: 1px solid var(--line); text-align: start; }
.plan__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.plan__row dt { color: var(--ink-3); }
.plan__row dd { margin: 0; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.plan__buy {
  margin-top: auto; display: block; padding: 15px 18px; border: 1px solid var(--line-strong); border-radius: 16px; color: #fff; font-size: 17px; font-weight: 800;
  text-decoration: none; background: rgba(8, 12, 24, 0.9); transition: border-color .2s, transform .2s, background .2s;
}
.plan__buy:hover { border-color: rgba(255, 255, 255, 0.7); transform: translateY(-1px); }
.plan__buy--hot { border-color: transparent; color: #fff; background: linear-gradient(120deg, #6d5bff, #b06bff); box-shadow: 0 10px 30px rgba(140, 90, 255, 0.4); }
.plan__buy--hot:hover { background: linear-gradient(120deg, #7f6eff, #c084ff); }
.pay { margin: 26px auto 0; max-width: 62ch; color: var(--ink-2); font-size: 15px; }

/* steps (how buying works, the guide) */
.steps__title { margin: 64px 0 22px; font-size: 26px; font-weight: 700; color: #fff; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; text-align: start; }
.steps--guide { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin: 40px auto 0; }
.step { position: relative; padding: 22px 22px 22px 70px; border: 1px solid var(--line); border-radius: 20px; background: rgba(12, 17, 32, 0.9); }
.step__n {
  position: absolute; inset-inline-start: 20px; top: 20px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(120deg, rgba(91, 140, 255, 0.7), rgba(176, 107, 255, 0.7)); color: #fff; font-weight: 800;
}
html[dir="rtl"] .step { padding: 22px 70px 22px 22px; }
.step__title { font-size: 17px; font-weight: 700; color: #fff; }
.step__text { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.code {
  margin: 14px 0 0; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #050913; color: #cfe0ff;
  font: 13px / 1.6 ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace; text-align: left; white-space: pre;
}
.view--docs .actions { margin-top: 34px; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; } .steps:not(.steps--guide) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .view__in { padding: 104px 16px 64px; }
  .plans, .steps:not(.steps--guide) { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: 30px 20px 24px; }
}
