/* ==========================================================================
   Devasdf — shared styles
   Palette: Midnight ink + electric violet → cyan, with a lime spark accent.
   ========================================================================== */

:root {
  --ink: #07080f;
  --ink-2: #0c0e1a;
  --surface: #111427;
  --surface-2: #171a33;
  --line: #242849;
  --line-soft: rgba(255, 255, 255, 0.07);

  --text: #eef0ff;
  --muted: #9aa0c7;
  --dim: #6c7199;

  --violet: #7c5cff;
  --violet-2: #a18bff;
  --cyan: #22d3ee;
  --lime: #c6f432;
  --amber: #ffb547;

  --grad: linear-gradient(120deg, #7c5cff 0%, #5b8cff 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.12));

  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --wrap: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.08; margin: 0; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { left: 16px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--violet-2);
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; color: var(--text);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { color: var(--text); border-color: #3a3f6e; background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.btn-primary {
  border: 0; color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.7);
}
.btn-primary:hover { background: var(--grad); box-shadow: 0 16px 40px -12px rgba(124, 92, 255, 0.9); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
/* blur lives on a pseudo-element so the fixed mobile menu isn't trapped inside the nav */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(7, 8, 15, 0.72);
}
body.menu-open .nav::before { background: rgba(7, 8, 15, 0.98); }
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand svg { width: 34px; height: 34px; flex: none; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav .btn { height: 42px; padding: 0 18px; font-size: 15px; }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }

.menu-btn path { transition: transform .3s ease, opacity .2s ease; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .l1 { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .l2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .l3 { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav .wrap { height: 64px; }
  .brand { font-size: 20px; }
  .brand svg { width: 30px; height: 30px; }
  .menu-btn { display: inline-flex; position: relative; z-index: 2; }
  .nav .nav-cta { display: none; }
  /* full-screen overlay menu */
  .nav-links {
    position: fixed; inset: 64px 0 0 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    background: rgba(7, 8, 15, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    overflow-y: auto;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 6px; font-family: var(--display); font-size: 28px; font-weight: 600;
    letter-spacing: -0.02em; color: var(--text); border-radius: 0;
  }
  .nav-links a::after { content: "→"; font-size: 20px; color: var(--dim); }
  .nav-links a:hover { background: none; color: var(--cyan); }
  .nav-links .mobile-cta { border: 0; margin-top: auto; padding-top: 24px; }
  .nav-links .mobile-cta a { justify-content: center; height: 56px; padding: 0; border-radius: 999px; font-family: var(--font); font-size: 17px; background: var(--grad); color: #fff; }
  .nav-links .mobile-cta a::after { content: none; }
  body.menu-open { overflow: hidden; }
}

/* touch devices: no sticky hover lift, no grey tap flash */
@media (hover: none) {
  a, button, summary { -webkit-tap-highlight-color: transparent; }
  .btn:hover { transform: none; }
}
@media (min-width: 901px) { .nav-links .mobile-cta { display: none; } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 120px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(34px, 5vw, 54px); }
.section-head p { color: var(--muted); font-size: 19px; margin: 18px 0 0; }

@media (max-width: 700px) {
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 40px; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 64px 0 40px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer .about p { margin: 16px 0 0; max-width: 320px; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--dim); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-bottom { flex-direction: column; margin-top: 40px; }
  .legal { padding: 40px 0 64px; }
  .legal h2 { font-size: 23px; margin-top: 44px; }
  .legal .summary, .legal .toc { padding: 20px; }
  .nav .btn { height: 40px; padding: 0 14px; font-size: 14px; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0 96px; }
.legal .wrap { width: min(800px, 100% - 32px); }
.legal h1 { font-size: clamp(40px, 7vw, 62px); margin: 0 0 14px; }
.legal .meta { font-family: var(--mono); font-size: 13.5px; color: var(--dim); margin: 0 0 36px; }
.legal h2 { font-size: 27px; margin: 56px 0 14px; scroll-margin-top: 96px; }
.legal h3 { font-size: 20px; margin: 30px 0 8px; scroll-margin-top: 96px; }
.legal p, .legal li { color: #c9cce6; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
.legal code { font-family: var(--mono); font-size: .86em; background: var(--surface); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; }
.legal .summary { background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; }
.legal .summary p:last-child, .legal .summary ul:last-child { margin-bottom: 0; }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 28px; margin: 20px 0 8px; }
.legal .toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.legal .toc li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 600px) { .legal .toc ol { columns: 1; } }
.app-tag { display: flex; align-items: center; gap: 14px; margin: 56px 0 14px; }
.app-tag img { width: 52px; height: 52px; border-radius: 14px; }
.app-tag h2 { margin: 0; }
.app-tag small { display: block; font-family: var(--mono); font-size: 13px; color: var(--dim); font-weight: 400; letter-spacing: 0; margin-top: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: #c9cce6; }
.legal th { color: var(--text); background: var(--surface); font-weight: 600; }
.legal tr:last-child td { border-bottom: 0; }
