/* ============================================================
   Power Toys / LLM Toolkit — promo site
   Style: Nocturne (80%) + Minimal Tech (20%) — dark-only
   Tokens mirror packages/web/tailwind.config.js
   ============================================================ */

:root {
  --void: #0E0E12;
  --canvas: #16161C;
  --surface: #212128;
  --raised: #2A2A32;
  --active: #33333D;
  --border-subtle: #35353F;
  --border-strong: #45454F;
  --glow: #06B6D4;
  --glow-bright: #22D3EE;
  --text-faint: #6B6B80;
  --text-muted: #8888A0;
  --text-body: #A8A8BC;
  --text-strong: #E4E4EE;
  --text-white: #FFFFFF;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --glow-shadow: 0 0 24px rgba(6, 182, 212, 0.18);
  --max-w: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* scroll-coupled caption parallax is JS/state-driven (inline transform) — kill it too */
  .ix-caption { transform: none !important; }
}

body {
  background: var(--void);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--glow);
  color: var(--void);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

a { color: var(--glow-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--glow-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-white);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-nav > a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
}
.site-nav > a:not(.btn):hover { color: var(--text-white); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.btn:hover { text-decoration: none; }
.btn-accent {
  background: var(--glow);
  color: var(--void);
}
.btn-accent:hover { background: var(--glow-bright); box-shadow: var(--glow-shadow); }
.btn-ghost {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border-subtle);
}
.btn-ghost:hover { background: var(--raised); border-color: var(--border-strong); color: var(--text-white); }
.btn-outline {
  background: transparent;
  color: var(--glow-bright);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--glow); background: rgba(6, 182, 212, 0.08); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(6, 182, 212, 0.10), transparent 70%),
    var(--void);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-inner { max-width: 820px; }
.hero-mark { margin-bottom: 24px; }
.eyebrow {
  color: var(--glow-bright);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.hero h1 {
  color: var(--text-white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.accent { color: var(--glow-bright); }
.lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.fact-row {
  list-style: none;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.fact-row li {
  color: var(--text-faint);
  font-size: 0.825rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 14px;
  background: rgba(33, 33, 40, 0.5);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt {
  background: var(--canvas);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
h2 {
  color: var(--text-white);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.section-lede {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 40px;
}
.section-lede code, p code, li code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--glow-bright);
}

/* ---------- Bento capabilities ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--glow-shadow); }
.card-wide { grid-column: span 2; }
.card h3 {
  color: var(--text-white);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p { font-size: 0.925rem; color: var(--text-muted); }
.chip {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--glow-bright);
  background: var(--void);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 12px;
}

/* ---------- Install ---------- */
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.install-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--glow);
  color: var(--void);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px 8px;
}
.install-card p { font-size: 0.875rem; margin-top: 14px; color: var(--text-muted); }

.codeblock {
  position: relative;
  background: var(--void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow-x: auto;
}
.codeblock pre {
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.7;
  color: var(--text-strong);
}
.codeblock-lg pre { font-size: 0.9rem; padding: 22px 24px; }
.prompt { color: var(--glow-bright); user-select: none; }
.comment { color: var(--text-faint); }
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--raised);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 100ms ease;
}
.codeblock:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--text-white); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--glow-bright); border-color: var(--glow); opacity: 1; }

/* ---------- Donate ---------- */
.donate-inner {
  text-align: center;
  max-width: 640px;
}
.donate-inner .section-lede { margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--void);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.footer-title {
  color: var(--text-white);
  font-weight: 600;
  margin-bottom: 4px;
}
.footer-brand p { font-size: 0.85rem; color: var(--text-faint); }
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-nav a { color: var(--text-muted); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--text-white); }
.footer-legal { font-size: 0.8rem; color: var(--text-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bento, .install-grid { grid-template-columns: repeat(2, 1fr); }
  .card-wide { grid-column: span 2; }
}
@media (max-width: 620px) {
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .bento, .install-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .header-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 16px; }
}

/* ============================================================
   Cute pass — robots, interstitials, heartbeat
   (Nocturne dark identity: glow cyan on void, no pastel)
   ============================================================ */

/* ---------- 8-card bento: final wide card takes the full row ---------- */
.bento .card-wide:last-child { grid-column: 1 / -1; }

/* ---------- Heartbeat glow on donate CTAs ---------- */
a[data-donate] { animation: heartbeat 1.8s ease-in-out infinite; }
a[data-donate]:hover { animation-play-state: paused; transform: scale(1.04); }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(6, 182, 212, 0); }
  14% { transform: scale(1.05); box-shadow: 0 0 22px rgba(6, 182, 212, 0.35); }
  28% { transform: scale(1); box-shadow: 0 0 0 rgba(6, 182, 212, 0); }
  42% { transform: scale(1.04); box-shadow: 0 0 16px rgba(6, 182, 212, 0.25); }
  56% { transform: scale(1); box-shadow: 0 0 0 rgba(6, 182, 212, 0); }
}

/* ---------- Footer robot (robot-wave cutout, gentle idle) ---------- */
.footer-bot {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: url("/images/parallax/robot-wave.png") no-repeat center / contain;
  animation: bot-sway-small 3.8s ease-in-out infinite;
  transform-origin: 50% 90%;
  flex-shrink: 0;
}
@keyframes bot-sway-small {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.footer-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Hero mascot ---------- */
.hero { position: relative; }
.hero-mascot {
  position: absolute;
  right: 4%;
  bottom: 48px;
  width: 130px;
  height: 130px;
  background: url("/images/parallax/robot-wave.png") no-repeat center / contain;
  animation: bot-bob 4.8s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes bot-bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}
@media (max-width: 999px) {
  .hero-mascot { display: none; }
}

/* ---------- Parallax interstitials ----------
   far / mid / robot layers are pure CSS keyframe ambient loops;
   ONLY the caption is scroll-linked (Hologram $scroll.throttle action). */
.interstitial {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--canvas);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.ix-layer { position: absolute; inset: 0; }

/* far: scene plate (opaque, 1536x640) + slow ken burns;
   radial gradient underlay doubles as fallback until assets land */
.ix-far {
  background-color: var(--canvas);
  background-image: radial-gradient(ellipse 70% 90% at 50% 115%, rgba(6, 182, 212, 0.12), transparent 65%);
  background-size: cover;
  background-position: center;
  transform-origin: 50% 100%;
  animation: ix-kenburns 22s ease-in-out infinite alternate;
}
.ix-far-archive {
  background-image: url("/images/parallax/bg-archive.jpg"),
    radial-gradient(ellipse 70% 90% at 50% 115%, rgba(6, 182, 212, 0.12), transparent 65%);
}
.ix-far-depot {
  background-image: url("/images/parallax/bg-depot.jpg"),
    radial-gradient(ellipse 65% 85% at 55% 118%, rgba(6, 182, 212, 0.09), transparent 60%);
}
@keyframes ix-kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.14) translateY(-8px); }
}

/* mid: drifting dust-atmosphere plate (transparent png) + soft mist fallback */
.ix-mid::before, .ix-mid::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 140px;
  border-radius: 50%;
  background: rgba(42, 42, 50, 0.55);
  filter: blur(28px);
  animation: ix-mist 14s ease-in-out infinite alternate;
}
.ix-mid::before { left: -6%; bottom: -30px; }
.ix-mid::after { right: -8%; top: -20px; animation-delay: -7s; }
@keyframes ix-mist {
  from { transform: translate3d(0, 0, 0); opacity: 0.7; }
  to { transform: translate3d(70px, -12px, 0); opacity: 1; }
}
.ix-dust {
  background: url("/images/parallax/mid-dust.png") repeat top left;
  opacity: 0.85;
  animation: ix-drift 14s linear infinite alternate;
}
.ix-dust-alt { animation-direction: alternate-reverse; }
@keyframes ix-drift {
  from { background-position: 0 0; }
  to { background-position: 260px 70px; }
}

/* near: robot cutout on its own clock (never scroll-coupled) */
.ix-robot-layer {
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: auto 90%;
  transform-origin: 50% 95%;
  animation: ix-sway 4.6s ease-in-out infinite;
}
.ix-robot-dig {
  background-image: url("/images/parallax/robot-dig.png");
  animation-duration: 3.8s;
}
.ix-robot-pack {
  background-image: url("/images/parallax/robot-pack.png");
  animation-duration: 5.6s;
}
@keyframes ix-sway {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-7px); }
}

/* overlays */
.ix-scanlines {
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(228, 228, 238, 0.025) 0 1px,
    transparent 1px 3px
  );
}
.ix-vignette {
  pointer-events: none;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, transparent 52%, rgba(14, 14, 18, 0.88) 100%);
}

/* caption — the only scroll-coupled piece */
.ix-caption {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(14, 14, 18, 0.74);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 7px 16px;
  backdrop-filter: blur(6px);
  will-change: transform;
}
.ix-tag {
  color: var(--glow-bright);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .interstitial { height: 200px; }
  .ix-robot-layer { background-size: auto 84%; }
  .ix-caption {
    max-width: calc(100% - 32px);
    white-space: normal;
    font-size: 0.72rem;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }
}


/* ============================================================
   Tools hub — spotlight, toolbox, site cards
   ============================================================ */

/* ---------- Spotlight ---------- */
.spotlight { padding: 36px; border-color: var(--border-strong); box-shadow: var(--glow-shadow); }
.spotlight h2 { margin-bottom: 4px; }
.spotlight h3 { margin-top: 22px; }
.spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* command-family chips — mono, tighter than .chip */
.cmd-family {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--glow-bright);
  background: var(--void);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ---------- Toolbox ---------- */
.toolcat {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin: 44px 0 16px;
}
.toolcat:first-of-type { margin-top: 0; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tool-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-lang {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-faint);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px 8px;
}
.tool-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.tool-meta a { overflow-wrap: anywhere; }
.tool-grid .card-wide { grid-column: 1 / -1; }

/* ---------- Tools hub responsive ---------- */
@media (max-width: 900px) {
  .spotlight-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .spotlight { padding: 24px; }
  .tool-grid { grid-template-columns: 1fr; }
}
