/* Shared styles: tokens, footer component, legal pages, 404. Loaded by every page. */
:root {
  --bg: #0b0b10; --card: #17171f; --card-2: #1e1e29; --text: #f5f5fa; --muted: #9b9bb0;
  --accent: #7c5cff; --accent-2: #ff6bb5; --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 20px; --spring: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid #b6a5ff; outline-offset: 3px; border-radius: 6px; }

.btn { min-height: 54px; padding: 0 26px; border: 0; border-radius: 16px; font-size: 17px; font-weight: 700; color: #fff; background: var(--grad);
  position: relative; overflow: hidden; transition: transform .15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.btn.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 55%, 100% { transform: translateX(120%); } }
.kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Footer component (<site-footer>) ---------- */
.sf { margin-top: 72px; border-top: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, transparent, rgba(124,92,255,.07)); }
.sf-in { max-width: 960px; margin: 0 auto; padding: 44px 16px 22px; display: grid; gap: 34px; }
.sf-brand { display: inline-block; line-height: 0; text-decoration: none; }
.sf-brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.sf .sf-brand img { width: 56px; height: 56px; border-radius: 14px; }
.sf-tag { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 32ch; }
.sf h3 { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #c9bbff; }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sf nav a, .sf address a { display: inline-block; padding: 8px 0; color: #d6d6e6; text-decoration: none; font-size: 15px; }
.sf nav a:hover, .sf address a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.sf nav a[aria-current="page"] { color: #fff; font-weight: 700; }
.sf address { font-style: normal; color: #d6d6e6; font-size: 15px; line-height: 1.6; }
.sf address strong { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }
.sf address .sf-mail { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35); }
.sf-bar { max-width: 960px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.07);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.sf-top { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px; }
@media (min-width: 720px) { .sf-in { grid-template-columns: 1.3fr 1fr 1.3fr; gap: 48px; } }

/* ---------- Floating back-to-top button ---------- */
.to-top { position: fixed; z-index: 15; right: max(16px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); cursor: pointer; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #8b6cff, #6a45f0); box-shadow: 0 10px 28px rgba(124,92,255,.55), 0 2px 6px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none; transition: opacity .3s, transform .35s var(--spring), box-shadow .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: 0 14px 34px rgba(124,92,255,.75), 0 2px 6px rgba(0,0,0,.4); transform: translateY(-3px); }
.to-top:active { transform: scale(.93); }
.to-top svg { width: 22px; height: 22px; }
@media (min-width: 720px) { .to-top { right: 28px; bottom: 28px; width: 56px; height: 56px; } }

/* ---------- Legal / About pages ---------- */
.page-top { max-width: 760px; margin: 0 auto; padding: 18px 16px 0; display: flex; align-items: center; justify-content: space-between; }
.page-top .back { font-size: 14px; font-weight: 600; color: #c9bbff; text-decoration: none; padding: 10px 0; }
.page-top .back:hover { text-decoration: underline; text-underline-offset: 4px; }
.doc { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.doc h1 { margin: 8px 0 8px; font-size: clamp(34px, 8.5vw, 54px); line-height: 1.02; letter-spacing: -.035em; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc .intro { font-size: 18px; line-height: 1.55; color: #d9d9e8; margin: 0 0 8px; }
.doc h2 { margin: 36px 0 10px; font-size: 22px; letter-spacing: -.02em; }
.doc p, .doc li { color: #c6c6d6; font-size: 16px; line-height: 1.65; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: #c9bbff; text-underline-offset: 3px; }
.doc .callout { margin: 22px 0; padding: 18px; border-radius: 18px; background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.35); }
.doc .callout p { margin: 0; color: #e6e0ff; }
.cards { display: grid; gap: 12px; margin: 22px 0; }
.cards div { padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid rgba(255,255,255,.07); }
.cards b { display: block; font-size: 17px; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 404 ---------- */
.nf { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100dvh - 60px); display: grid; align-content: center; justify-items: center; text-align: center; padding: 40px 16px 20px; }
.blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .5; animation: drift 14s ease-in-out infinite alternate; }
.b1 { width: 300px; height: 300px; background: var(--accent); top: -60px; left: -80px; }
.b2 { width: 260px; height: 260px; background: var(--accent-2); bottom: 0; right: -90px; animation-delay: -6s; }
@keyframes drift { to { transform: translate(40px, 50px) scale(1.15); } }
.nf-phone { width: 128px; aspect-ratio: 9/19; border-radius: 30px; padding: 5px; background: #111; box-shadow: 0 0 0 1.5px rgba(255,255,255,.18), 0 30px 60px rgba(0,0,0,.55);
  transform: rotate(-8deg); animation: nfbob 5s ease-in-out infinite; position: relative; }
.nf-phone::before { content: ""; position: absolute; top: 12px; left: 50%; width: 34%; height: 9px; border-radius: 9px; background: #000; transform: translateX(-50%); z-index: 2; }
.nf-phone .scr { width: 100%; height: 100%; border-radius: 25px; background: linear-gradient(160deg, #1a1740, #0d0d1a); display: grid; place-items: center; font-size: 44px; font-weight: 900;
  background-clip: padding-box; color: #fff; letter-spacing: -.04em; }
.nf-phone .scr span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: flicker 4s steps(1) infinite; }
@keyframes nfbob { 50% { transform: rotate(-4deg) translateY(-14px); } }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 94%, 98% { opacity: .35; } }
.nf h1 { margin: 26px 0 8px; font-size: clamp(36px, 10vw, 60px); line-height: 1; letter-spacing: -.04em; }
.nf h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { margin: 0 auto; max-width: 34ch; color: #c6c6d6; font-size: 17px; line-height: 1.5; }
.nf .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01s !important; animation: none !important; } html { scroll-behavior: auto; } }
