/* NextG Design — shared design system ("The Lens"). See _src/design/MASTER.md */

:root {
  --bg: #07060d;
  --bg-2: #0f0c1d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f3ff;
  --muted: #aaa5c8;
  --primary: #8b5cf6;
  --primary-ink: #ffffff;
  --accent: #ec4899;
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, #8b5cf6 0%, #ec4899 55%, #f59e0b 100%);
  --grad-cool: linear-gradient(120deg, #22d3ee, #8b5cf6);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
  --radius: 22px;
  --radius-sm: 14px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf7ff;
  --bg-2: #f1ebfd;
  --surface: #ffffff;
  --surface-2: #f6f1ff;
  --line: #e6dcfa;
  --line-strong: #d3c4f5;
  --text: #0f172a;
  --muted: #4b5563;
  --primary: #7c3aed;
  --accent: #db2777;
  --cyan: #0891b2;
  --shadow: 0 30px 60px -34px rgba(76, 29, 149, 0.35);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

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

/* ---------- Ambient background: drifting aurora + film grain ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
.aurora span {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.32; will-change: transform;
}
.aurora span:nth-child(1) { background: #7c3aed; top: -22vmax; left: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { background: #db2777; top: 10vmax; right: -24vmax; opacity: 0.22; animation: drift2 32s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { background: #0891b2; bottom: -30vmax; left: 20vmax; opacity: 0.18; animation: drift3 38s ease-in-out infinite alternate; }
:root[data-theme="light"] .aurora span { opacity: 0.16; }
:root[data-theme="light"] .aurora span:nth-child(2) { opacity: 0.10; }
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-12vmax, 8vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-10vmax, -12vmax) scale(1.15); } }
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain { opacity: 0.035; }

/* ---------- Header ---------- */
.site-top {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-top .wrap { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.8);
}
.logo-mark svg { width: 20px; height: 20px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 500;
  padding: 10px 13px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .nav-cta { color: #fff; background: var(--grad); font-weight: 700; margin-left: 6px; box-shadow: 0 10px 24px -12px rgba(236, 72, 153, 0.9); }
.nav .nav-cta:hover { color: #fff; background: var(--grad); filter: brightness(1.08); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease-spring);
}
.icon-btn:hover { border-color: var(--primary); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
.menu-btn { display: none; }

@media (max-width: 920px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; visibility: hidden;
    transition: opacity 0.2s var(--ease-out), transform 0.25s var(--ease-out), visibility 0s 0.25s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out); }
  .nav a { padding: 13px 14px; font-size: 1rem; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .site-top .theme-btn { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease-spring), box-shadow 0.25s, filter 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 20px; height: 20px; transition: transform 0.3s var(--ease-spring); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translate(var(--mx), var(--my)) scale(0.96); transition-duration: 0.12s; }
.btn-primary { color: #fff; background: var(--grad); background-size: 160% 100%; box-shadow: 0 18px 40px -18px rgba(236, 72, 153, 0.85); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 22px 48px -18px rgba(139, 92, 246, 0.95); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); background: var(--surface-2); }

/* ---------- Common blocks ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }

.card {
  --sx: 50%; --sy: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(420px circle at var(--sx) var(--sy), rgba(139, 92, 246, 0.18), transparent 60%);
}
.card:hover::before, .card:focus-within::before { opacity: 1; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover, a.card:focus-visible { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); transform: translateY(-4px); box-shadow: var(--shadow); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip-ai { color: #fff; border: 0; background: var(--grad); }

.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; color: var(--muted); font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h3 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; font-family: var(--font-body); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.foot-grid a:hover { color: var(--text); }
.foot-note { margin-top: 12px; max-width: 34ch; }
.foot-base { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .aurora span { animation: none; }
}
