/* Public website (landing, auth, account, legal). Uses the design tokens from /style.css + /themes.css. */

body.site { display: block; height: auto; min-height: 100%; background: var(--bg); }
.site a { color: var(--accent); text-decoration: none; }
.site a:hover { text-decoration: underline; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.grad-text { background: linear-gradient(120deg, var(--accent), #06b6d4 60%, #22c55e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- top navigation ---------- */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.nav .brand { color: var(--text); font-size: 17px; }
.nav .brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 20px; margin-left: 12px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav .spacer { flex: 1; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.primary.glow { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.site .btn { text-decoration: none !important; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), #06b6d4); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 760px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(closest-side at 80% 30%, color-mix(in srgb, #06b6d4 18%, transparent), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(4%, 3%, 0) scale(1.05); } }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12.5px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: beacon 2s infinite; }
@keyframes beacon { 70% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 16px; }
.hero p.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { color: var(--ok); width: 15px; height: 15px; }

/* animated product mock */
.mock { position: relative; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgb(0 0 0 / .18); overflow: hidden; transform: perspective(1400px) rotateY(-8deg) rotateX(3deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg) translateY(-8px); } }
.mock-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #f87171; } .mock-bar i:nth-child(2) { background: #fbbf24; } .mock-bar i:nth-child(3) { background: #4ade80; }
.mock-body { display: grid; grid-template-columns: 1fr 54px 1fr; gap: 10px; padding: 16px; min-height: 270px; position: relative; }
.mock-pane { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); }
.mock-pane header { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 11px; font-weight: 700; border-bottom: 1px solid var(--border); }
.mock-pane header .led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.mock-pane.l header { color: var(--c-left); } .mock-pane.r header { color: var(--c-right); }
.mock-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 11.5px; border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent); }
.mock-row .ft { width: 15px; height: 15px; }
.mock-row .bar { margin-left: auto; height: 5px; width: 46px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.mock-row .bar b { display: block; height: 100%; background: var(--accent); width: 0; animation: fill 3.2s ease-in-out infinite; }
.mock-row:nth-child(3) .bar b { animation-delay: .6s; } .mock-row:nth-child(4) .bar b { animation-delay: 1.2s; }
@keyframes fill { 0% { width: 0; } 60%, 100% { width: 100%; } }
.mock-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.mock-mid .arrow { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(90deg, var(--c-left), var(--c-right)); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.flyer { position: absolute; top: 50%; left: 38%; width: 34px; height: 40px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; box-shadow: 0 8px 20px rgb(0 0 0 / .18); animation: fly 3.2s cubic-bezier(.5, 0, .3, 1) infinite; }
.flyer:nth-of-type(2) { animation-delay: 1.07s; } .flyer:nth-of-type(3) { animation-delay: 2.14s; }
.flyer .icon { width: 18px; height: 18px; }
@keyframes fly { 0% { transform: translate(-60px, 10px) scale(.6); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(110px, -20px) scale(.8) rotate(8deg); opacity: 0; } }
.mock-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); background: var(--surface-2); }
.mock-foot b { color: var(--text); }

/* ---------- sections ---------- */
section.block { padding: 84px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.block h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; margin: 10px 0 12px; }
.block .sub { color: var(--muted); font-size: 17px; max-width: 680px; line-height: 1.6; margin: 0 0 40px; }
.center { text-align: center; } .center .sub { margin-left: auto; margin-right: auto; }

.hero .wrap.protocols { display: flex; }
.protocols { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 26px 0 8px; }
.protocols span { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 13px; letter-spacing: .03em; color: var(--muted); transition: transform .2s, color .2s, border-color .2s; }
.protocols span:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { position: relative; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden; }
.alt .feature { background: var(--bg); }
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 14%, transparent); }
.feature .fi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; color: var(--fc, var(--accent)); background: color-mix(in srgb, var(--fc, var(--accent)) 14%, transparent); }
.feature .fi .icon { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 8px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.feature ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 26px; border-radius: 16px; border: 1px dashed var(--border); position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; } .step p { margin: 0; color: var(--muted); line-height: 1.6; }

.security { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; line-height: 1.55; }
.checks li .icon { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 1px; }
.checks b { display: block; }
.shield-art { aspect-ratio: 1.2; border-radius: 22px; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--ok) 20%, transparent), transparent 60%), var(--surface); border: 1px solid var(--border); }
.shield-art .icon { width: 120px; height: 120px; color: var(--ok); animation: float 6s ease-in-out infinite; }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-big { text-align: center; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.stat-big strong { display: block; font-size: 36px; letter-spacing: -.02em; }
.stat-big span { color: var(--muted); font-size: 14px; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 20px; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }

.cta-band { border-radius: 24px; padding: 48px; text-align: center; color: #fff; background: linear-gradient(120deg, #4f46e5, #0891b2 60%, #16a34a); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin-top: 0; } .cta-band p { color: rgb(255 255 255 / .85); font-size: 17px; }
.cta-band .btn { background: #fff; color: #1e1b4b; border: 0; }

footer.site-foot { padding: 34px 0 44px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
footer.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer.site-foot nav { display: flex; gap: 16px; margin-left: auto; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.features .reveal:nth-child(3n+2) { transition-delay: .08s; } .features .reveal:nth-child(3n) { transition-delay: .16s; }

@media (max-width: 980px) {
  .hero .wrap, .security { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps, .stats-band { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .mock { transform: none; animation: none; }
}
@media (max-width: 620px) {
  .features, .steps, .stats-band { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 20px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .mock, .flyer, .hero::before { animation: none; } }

/* ---------- legal pages ---------- */
.legal-doc { max-width: 820px; margin: 0 auto; padding: 48px 0 64px; line-height: 1.75; }
.legal-doc h1 { font-size: 36px; letter-spacing: -.02em; margin: 0 0 6px; }
.legal-doc h2 { font-size: 20px; margin: 34px 0 8px; }
.legal-doc p, .legal-doc li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.legal-doc .updated { color: var(--muted); margin-bottom: 28px; }
.legal-doc .summary { padding: 16px 20px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.legal-doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.legal-doc .toc a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; }

/* ---------- phone-width navigation ---------- */
.nav .brand span { white-space: nowrap; }
@media (max-width: 620px) {
  .nav .wrap { gap: 10px; }
  .nav .brand { font-size: 15px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn:not(.primary) { display: none; }
  .nav-actions .btn.primary { height: 34px; padding: 0 12px; font-size: 13px; }
  .nav-actions #theme-btn { width: 30px; height: 30px; }
}
