/*
 * Shared design system for side-quest-ai.com sub-pages.
 * Mirrors the homepage: Space Grotesk + JetBrains Mono, framed dark hero,
 * dark panels alternating with paper panels on a textured green-black page,
 * one lime→mint accent. Pages add their own accent via --acc-a / --acc-b.
 */

:root {
  --page: #1f2420;
  --bezel: #2a2e2b;
  --ink: #0a0b0c;
  --ink-2: #121514;
  --paper: #f3f3ee;
  --paper-2: #e9ebe3;
  --paper-ink: #111312;
  --paper-muted: #5d625e;
  --text: #f6f7f5;
  --muted: #a4aaa6;
  --soft: #c6ccc8;
  --line: rgba(255, 255, 255, 0.10);
  --line-dark: rgba(0, 0, 0, 0.10);
  --lime-a: #e4f96b;
  --lime-b: #7ee8a2;
  --acc-a: var(--lime-a);
  --acc-b: var(--lime-b);
  --r-xl: 34px;
  --r-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background-color: var(--page);
  background-image:
    radial-gradient(60rem 40rem at 10% 0%, rgba(126, 232, 162, 0.10), transparent 60%),
    radial-gradient(50rem 40rem at 95% 60%, rgba(228, 249, 107, 0.06), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 18px 18px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

/* ---------- shells ---------- */

.frame {
  background: var(--bezel);
  border-radius: calc(var(--r-xl) + 10px);
  padding: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.panel { border-radius: var(--r-xl); position: relative; overflow: hidden; isolation: isolate; }
.panel.pad { padding: clamp(26px, 4vw, 52px); }
.panel.dark { background: var(--ink); border: 1px solid var(--line); }
/* Cursor glow: one fixed layer over the whole viewport (pointer-events off), so
   it runs edge to edge instead of being clipped by each panel's overflow. */
.cursor-glow {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(560px circle at var(--gx, -999px) var(--gy, -999px), var(--glow-c, color-mix(in srgb, var(--acc-b) 12%, transparent)), transparent 62%);
}
.cursor-glow.on { opacity: 1; }
@media (hover: none) { .cursor-glow { display: none; } }
.panel.light { background: var(--paper); color: var(--paper-ink); }
.panel.light.alt { background: var(--paper-2); }

/* ---------- top bar ---------- */

.topbar {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 26px clamp(22px, 5vw, 70px) 0;
}
.brand { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(140deg, var(--acc-a), var(--acc-b)); box-shadow: 0 0 18px var(--acc-b); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 32px; font-weight: 500; font-size: 17.5px; flex-wrap: wrap; }
.nav a { color: #d7dbd8; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--acc-a); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- buttons ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 12px 22px;
  font-weight: 600; font-size: 15px; border: 1px solid var(--line); background: #1a1c1e; color: var(--text);
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.pill:hover { background: #26292b; transform: translateY(-2px); }

.btn-acc {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; padding: 16px 28px; font-weight: 700; font-size: 16px;
  color: #0b1408; background: linear-gradient(100deg, var(--acc-a), var(--acc-b));
  box-shadow: 0 10px 40px color-mix(in srgb, var(--acc-b) 30%, transparent);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn-acc::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg); transition: left 0.7s var(--ease);
}
.btn-acc:hover { transform: translateY(-3px) scale(1.02); }
.btn-acc:hover::after { left: 130%; }
.btn-dark {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
  background: var(--paper-ink); color: #fff; font-weight: 600; font-size: 15px;
  transition: transform 0.4s var(--ease), background 0.3s ease;
}
.btn-dark:hover { transform: translateY(-3px); background: #000; }

/* ---------- type ---------- */

.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc-b); box-shadow: 0 0 10px var(--acc-b); }
.dark .kicker { color: var(--muted); }
.light .kicker { color: var(--paper-muted); }

.display {
  margin: 0; font-weight: 400; letter-spacing: -0.045em; line-height: 0.98;
  font-size: clamp(46px, 6.6vw, 96px);
}
.grad { background: linear-gradient(100deg, var(--acc-a), var(--acc-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

h2.title { margin: 0 0 16px; font-weight: 500; font-size: clamp(30px, 4vw, 50px); line-height: 1.02; letter-spacing: -0.035em; }
h3.sub-title { margin: 0 0 10px; font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; line-height: 1.1; }
.lede { font-size: 18px; line-height: 1.6; max-width: 720px; margin: 0; }
.dark .lede, .dark p { color: var(--soft); }
.light .lede, .light p { color: #3d423f; }
p { line-height: 1.65; }

.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: end; margin-bottom: 30px; }
.sec-head p { margin: 0; justify-self: end; max-width: 520px; font-size: 15.5px; }
.dark .sec-head p { color: var(--muted); }
.light .sec-head p { color: var(--paper-muted); }

.facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; font-size: 15.5px; line-height: 1.45; }
.facts li::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: linear-gradient(140deg, var(--acc-a), var(--acc-b));
  -webkit-mask: radial-gradient(circle, transparent 3px, #000 3.5px);
  mask: radial-gradient(circle, transparent 3px, #000 3.5px);
}

/* ---------- rotating "explore" badge sitting in a notch of the hero frame ---------- */
/* Usage: <div class="frame has-badge"> … hero … <a class="badge-wrap" href="#next">…</a></div> */

.frame { position: relative; }
.frame.has-badge .hero { padding-bottom: 96px; }
.badge-wrap {
  position: absolute; left: 50%; bottom: -12px; z-index: 6;
  width: 132px; height: 132px; border-radius: 50%; padding: 12px;
  background: var(--bezel); transform: translateX(-50%);
}
.badge {
  width: 100%; height: 100%; border-radius: 50%; background: #0b0c0d;
  display: grid; place-items: center; position: relative; transition: transform 0.5s var(--ease);
}
.badge:hover { transform: scale(1.08); }
.badge svg { position: absolute; inset: 0; animation: spin 16s linear infinite; }
.badge .down { font-size: 28px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-width: 560px) { .badge-wrap { width: 108px; height: 108px; padding: 10px; } .badge .down { font-size: 22px; } }

/* ---------- footer ---------- */

.site-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-foot h2 { margin: 0; font-size: clamp(30px, 4vw, 54px); font-weight: 400; letter-spacing: -0.04em; line-height: 1; }
.site-foot .meta {
  width: 100%; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px;
}
.site-foot .meta nav { display: flex; gap: 22px; }
.site-foot .meta a:hover { color: #fff; }

/* ---------- motion ---------- */

.rise { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.loaded .rise { opacity: 1; transform: none; }
.reveal { opacity: 0; transform: translateY(50px) scale(0.98); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

@keyframes float { 50% { translate: 0 -12px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.8; } }
@keyframes blink { 50% { opacity: 0.3; } }

@media (max-width: 900px) {
  .nav { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
}
@media (max-width: 560px) {
  .wrap { padding: 10px 10px 30px; gap: 12px; }
  .frame { padding: 6px; border-radius: 34px; }
  .panel { border-radius: 28px; }
  .topbar .pill { padding: 10px 16px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .rise { opacity: 1; transform: none; filter: none; }
}

/* phones: the bigger name and the pill stay on one line */
.brand, .topbar .pill { white-space: nowrap; }
@media (max-width: 560px) { .brand { font-size: 21px; gap: 8px; } }
