/* =========================================================
   PSYDEK INTERACTIVE — shared design system
   Display: Saira (wide, techy)  ·  Body: IBM Plex Sans
   Brand: lime #dfff48 · cyan #2aabff · pink #fe2277
   ========================================================= */

:root {
  /* brand neons (constant across themes) */
  --lime: #dfff48;
  --cyan: #2aabff;
  --pink: #fe2277;
  --lime-deep: #8fa600;   /* readable on light */
  --cyan-deep: #0a7fc9;
  --pink-deep: #d40b53;

  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;

  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --shadow-glow-cyan: 0 0 0 1px rgba(42,171,255,.4), 0 8px 40px -8px rgba(42,171,255,.45);
  --shadow-glow-pink: 0 0 0 1px rgba(254,34,119,.4), 0 8px 40px -8px rgba(254,34,119,.45);
}

/* ---------- DARK (default) ---------- */
:root, [data-theme="dark"] {
  --bg: #07080a;
  --bg-1: #0c0e12;
  --bg-2: #131620;
  --panel: rgba(255,255,255,.025);
  --panel-2: rgba(255,255,255,.05);
  --text: #f3f5f8;
  --text-soft: #c2c8d0;
  --muted: #828b97;
  --border: rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.18);
  --a-cyan: var(--cyan);
  --a-pink: var(--pink);
  --a-lime: var(--lime);
  --hero-grid: rgba(255,255,255,.05);
  --glow: .9;
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-1: #ffffff;
  --bg-2: #eef0f4;
  --panel: rgba(12,14,18,.025);
  --panel-2: rgba(12,14,18,.045);
  --text: #0b0d11;
  --text-soft: #353b44;
  --muted: #646c78;
  --border: rgba(12,14,18,.12);
  --border-strong: rgba(12,14,18,.22);
  --a-cyan: var(--cyan-deep);
  --a-pink: var(--pink-deep);
  --a-lime: var(--lime-deep);
  --hero-grid: rgba(12,14,18,.05);
  --glow: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s var(--ease), color .4s var(--ease);
}

/* themed backdrop that survives environments which force body bg transparent */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--bg); transition: background .4s var(--ease);
}

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- wordmark (CSS, theme-aware) ---------- */
.wm { font-family: var(--font-display); font-weight: 800; letter-spacing: .04em; line-height: 1; white-space: nowrap; display: inline-flex; align-items: baseline; }
.wm .psy { color: var(--a-cyan); }
.wm .dek { color: var(--a-pink); }
.wm-stack { display: inline-flex; flex-direction: column; gap: 3px; }
.wm-sub {
  font-family: var(--font-display); font-weight: 600; color: var(--a-lime);
  letter-spacing: .42em; text-transform: uppercase;
}
[data-theme="dark"] .wm .psy { text-shadow: 0 0 14px rgba(42,171,255,.55); }
[data-theme="dark"] .wm .dek { text-shadow: 0 0 14px rgba(254,34,119,.55); }
[data-theme="dark"] .wm-sub  { text-shadow: 0 0 10px rgba(223,255,72,.5); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: all .25s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px var(--a-cyan); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--a-cyan); color: var(--a-cyan); transform: translateY(-2px); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- header / nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; height: 72px; display: flex; align-items: center; gap: 28px; }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo .bolts { height: 26px; width: auto; }

/* logo lockup (transparent neon wordmark) */
.logo-plate { display: inline-flex; align-items: center; border-radius: 10px; transition: background .35s var(--ease), box-shadow .35s var(--ease); }
.wordmark { height: 38px; width: auto; display: block; }
[data-theme="light"] .logo-plate { background: #0a0c10; padding: 9px 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
[data-theme="light"] .footer-brand .logo-plate { padding: 11px 16px; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link {
  font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: .02em;
  padding: 8px 15px; border-radius: 100px; color: var(--text-soft);
  position: relative; transition: color .2s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content:""; position:absolute; left:15px; right:15px; bottom:2px; height:2px; border-radius:2px;
  background: linear-gradient(90deg, var(--a-cyan), var(--a-pink));
}
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-soft);
  cursor: pointer; transition: all .25s var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--a-cyan); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.nav-burger { display:none; }

/* mobile nav */
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 14px;
    background: var(--bg-1); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 13px 16px; font-size: 17px; }
  .nav-burger { display: grid; place-items:center; margin-left:auto; width:42px; height:42px; border-radius:10px;
    border:1px solid var(--border-strong); background:var(--panel); color:var(--text); cursor:pointer; }
  .nav-actions { margin-left: 10px; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-1); margin-top: 120px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 64px 28px 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .bolts { height: 30px; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 30ch; font-size: 15px; }
.footer-col h5 { font-family: var(--font-display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.footer-col a { display: block; color: var(--text-soft); font-size: 15px; padding: 6px 0; transition: color .2s var(--ease); width: fit-content; }
.footer-col a:hover { color: var(--a-cyan); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border); }
.footer-bottom .copy { color: var(--muted); font-size: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
.footer-legal a { color: var(--muted); font-size: 14px; transition: color .2s var(--ease); }
.footer-legal a:hover { color: var(--text); }
@media (max-width: 760px){ .footer-top{ grid-template-columns: 1fr 1fr; gap:32px; } .footer-brand{ grid-column: 1 / -1; } }

/* ---------- cookie banner ---------- */
.cookie {
  position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 90; max-width: 720px; margin: 0 auto;
  background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 20px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.cookie.show { transform: translateY(0); }
.cookie p { margin: 0; font-size: 14px; color: var(--text-soft); }
.cookie a { color: var(--a-cyan); text-decoration: underline; text-underline-offset: 3px; }
.cookie .acts { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }
.cookie .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 620px){ .cookie{ flex-direction: column; align-items: stretch; text-align:left; } .cookie .acts{ margin-left:0; } .cookie .acts .btn{ flex:1; justify-content:center; } }

/* ---------- shared bolts mark ---------- */
.bolts { filter: drop-shadow(0 0 18px rgba(42,171,255,.0)); }

/* ---------- generic page chrome ---------- */
.page-hero { padding: 110px 0 70px; position: relative; }
.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 12px; border-radius: 100px;
  border: 1px solid var(--border-strong); background: var(--panel); font-family: var(--font-display);
  font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--text-soft); white-space: nowrap;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--a-lime); box-shadow: 0 0 10px var(--a-lime); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* failsafe: if the document timeline is frozen (offscreen capture) or JS is slow,
   force the visible end-state with no transition so content is never stuck hidden */
.reveal-fallback .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- centered "state" pages (coming soon / careers) ---------- */
.state {
  position: relative; min-height: calc(100vh - 72px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 24px 100px; overflow: hidden;
}
.state-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(45% 50% at 50% 38%, rgba(42,171,255,.12), transparent 60%),
              radial-gradient(40% 45% at 65% 70%, rgba(254,34,119,.09), transparent 60%); }
[data-theme="light"] .state-glow { opacity: .55; }
.state-bolts { width: 132px; margin-bottom: 34px; }
.state-wordmark { margin: 0 auto 40px; align-self: center; width: fit-content; max-width: 92%; justify-content: center; }
.state-wordmark img { width: min(720px, 92%); height: auto; display: block; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference){ .state-wordmark { animation: floaty 7s ease-in-out infinite; } }
[data-theme="light"] .state-wordmark { padding: 22px 34px; border-radius: 18px; }
@media (prefers-reduced-motion: no-preference){ .state-bolts { animation: floaty 7s ease-in-out infinite; } }
.state .badge { margin-bottom: 26px; }
.state h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.02em; line-height: 1.04; max-width: 22ch; }
.state h1 .grad { background: linear-gradient(90deg, var(--a-cyan), var(--a-pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.state p.lead { color: var(--text-soft); font-size: clamp(17px, 1.6vw, 20px); max-width: 52ch; margin: 24px auto 0; line-height: 1.6; }
.state .acts { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }
.state .meta { margin-top: 30px; font-family: var(--font-display); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- legal / document pages ---------- */
.doc { padding: 72px 0 24px; }
.doc-inner { max-width: 760px; margin: 0 auto; }
.doc-head { padding-bottom: 30px; margin-bottom: 38px; border-bottom: 1px solid var(--border); }
.doc-head .eyebrow { margin-bottom: 16px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.02em; }
.doc-head .updated { color: var(--muted); font-size: 14px; margin-top: 16px; }
.doc-note {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; margin-bottom: 40px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--panel);
}
.doc-note .pip { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; margin-top: 8px; background: var(--a-lime); box-shadow: 0 0 12px var(--a-lime); }
[data-theme="light"] .doc-note .pip { box-shadow: none; }
.doc-note p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.6; }
.doc section { margin-bottom: 36px; }
.doc h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 12px; }
.doc h2 .idx { color: var(--a-cyan); font-weight: 600; margin-right: 10px; }
.doc p { color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.doc ul { color: var(--text-soft); font-size: 16px; line-height: 1.7; padding-left: 20px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc a.inline { color: var(--a-cyan); text-decoration: underline; text-underline-offset: 3px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.doc-toc a { font-family: var(--font-display); font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border); color: var(--text-soft); transition: all .2s var(--ease); }
.doc-toc a:hover { border-color: var(--a-cyan); color: var(--a-cyan); }
