/* =========================================================
   Claude Superpowers — custom styles
   Tailwind CDN handles utilities; this file owns the
   signature components, animations, and fine details.
   ========================================================= */

:root {
  --ink: #0E0F1E;
  --surface: #191A2E;
  --surface-2: #21223A;
  --line: #2E3050;
  --violet: #6D5EF6;
  --violet-bright: #8B7CFF;
  --citron: #DFFF4F;
  --muted: #9294B4;
  --soft: #ECEDF7;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; }

h1, h2, h3, h4 { font-family: "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.02em; }
::selection { background: rgba(109, 94, 246, 0.4); }

a { color: inherit; text-decoration: none; }

/* Accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--citron); color: #101010; padding: 0.6rem 1rem;
  font-weight: 600; border-radius: 0 0 0.6rem 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--citron);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ambient background glow — the atmosphere */
.site-glow {
  position: fixed;
  inset: -20% 0 auto 0;
  max-width: 100%;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(45% 60% at 20% 0%, rgba(109, 94, 246, 0.22), transparent 70%),
    radial-gradient(40% 55% at 85% 10%, rgba(223, 255, 79, 0.10), transparent 70%);
  filter: blur(4px);
}
main, .site-footer { position: relative; z-index: 1; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(14, 15, 30, 0.72);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--citron), var(--violet-bright));
  box-shadow: 0 0 20px rgba(139, 124, 255, 0.4);
}
.brand-text { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; }

.nav-menu {
  display: flex; align-items: center; gap: 1.6rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-link {
  font-size: 0.95rem; color: var(--muted);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--soft); }
.nav-link.is-active { color: var(--soft); }
.nav-link.is-active::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--citron); border-radius: 2px;
}
.nav-cta {
  font-size: 0.9rem; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--citron); color: #101010;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(223, 255, 79, 0.25); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--soft);
  border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet-bright);
}
.section-pad { padding-block: clamp(3.5rem, 8vw, 6rem); }

.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "JetBrains Mono", monospace; font-size: 0.72rem;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; padding: 0.8rem 1.4rem; border-radius: 12px;
  background: var(--violet); color: white; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--violet-bright); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(109, 94, 246, 0.35); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 500; padding: 0.8rem 1.3rem; border-radius: 12px;
  border: 1px solid var(--line); color: var(--soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--violet-bright); background: rgba(109, 94, 246, 0.08); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02; font-weight: 700; margin: 1rem 0 0;
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--citron), var(--violet-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  color: var(--muted); font-size: 1.1rem; line-height: 1.6;
  max-width: 34ch; margin: 1.2rem 0 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.2rem;
  font-family: "JetBrains Mono", monospace;
}
.hero-stat b { display: block; font-size: 1.5rem; color: var(--soft); }
.hero-stat span { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }

/* Console signature */
.console {
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), var(--ink));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: var(--muted);
}
.console-dot { width: 11px; height: 11px; border-radius: 50%; }
.console-body { padding: 1.2rem 1.3rem; font-family: "JetBrains Mono", monospace; font-size: 0.86rem; line-height: 1.75; min-height: 220px; }
.console-line { display: block; }
.console-user { color: var(--citron); }
.console-user::before { content: "you › "; color: var(--muted); }
.console-ai { color: var(--soft); }
.console-ai::before { content: "claude › "; color: var(--violet-bright); }
.cursor { display: inline-block; width: 9px; height: 1.1em; vertical-align: -0.15em; background: var(--citron); animation: blink 1s steps(2) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* ---------- Search ---------- */
.search-wrap { position: relative; max-width: 520px; }
.search-input {
  width: 100%; padding: 0.85rem 1rem 0.85rem 2.8rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; color: var(--soft); font-size: 0.98rem;
  font-family: inherit;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--violet-bright); box-shadow: 0 0 0 3px rgba(109, 94, 246, 0.2); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ---------- Category filter ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filter-chip {
  font-family: "JetBrains Mono", monospace; font-size: 0.78rem;
  padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  background: transparent; cursor: pointer; transition: all 0.15s ease;
}
.filter-chip:hover { color: var(--soft); border-color: var(--violet-bright); }
.filter-chip.is-active { background: var(--soft); color: var(--ink); border-color: var(--soft); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: 1.4rem; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--violet-bright);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.card-icon {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 11px; background: rgba(109, 94, 246, 0.12);
  color: var(--violet-bright); border: 1px solid rgba(109, 94, 246, 0.25);
}
.card-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.card-tagline { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.4rem; }

/* Power meter — a subtle nod to "superpowers" */
.meter { display: flex; align-items: center; gap: 0.5rem; }
.meter-track { width: 74px; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--citron)); }
.meter-num { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--muted); }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0.4rem 0 0; }
.section-lead { color: var(--muted); max-width: 52ch; line-height: 1.6; }
.link-arrow { color: var(--violet-bright); font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.link-arrow:hover { gap: 0.6rem; transition: gap 0.15s ease; }

/* ---------- Prompt cards ---------- */
.prompt-card {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); overflow: hidden;
}
.prompt-head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.prompt-body { padding: 1.1rem; font-family: "JetBrains Mono", monospace; font-size: 0.82rem; line-height: 1.7; color: var(--soft); white-space: pre-wrap; word-break: break-word; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "JetBrains Mono", monospace; font-size: 0.74rem;
  padding: 0.4rem 0.75rem; border-radius: 8px; cursor: pointer;
  background: rgba(109, 94, 246, 0.12); color: var(--violet-bright);
  border: 1px solid rgba(109, 94, 246, 0.3); transition: all 0.15s ease;
}
.copy-btn:hover { background: rgba(109, 94, 246, 0.22); }
.copy-btn.copied { background: var(--citron); color: #101010; border-color: var(--citron); }

/* ---------- Detail page ---------- */
.detail-hero { border-bottom: 1px solid var(--line); }
.breadcrumb { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--soft); }
.prose p { color: #C7C9E0; line-height: 1.75; }
.example-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.example-list li {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.9rem 1.1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: #C7C9E0;
}
.example-list li::before { content: "›"; color: var(--citron); font-weight: 700; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 0.45rem; color: var(--soft); }
.field input, .field textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--soft); font-family: inherit; font-size: 0.98rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet-bright); box-shadow: 0 0 0 3px rgba(109, 94, 246, 0.18); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.85rem; }
.form-note.ok { color: var(--citron); }
.form-note.err { color: #FF7BAC; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 3rem 2rem; background: rgba(25, 26, 46, 0.4); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-note { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin-top: 0.8rem; max-width: 30ch; }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-heading { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 0.3rem; font-family: "JetBrains Mono", monospace; }
.footer-col a { color: #C7C9E0; font-size: 0.92rem; }
.footer-col a:hover { color: var(--citron); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer-mono { font-family: "JetBrains Mono", monospace; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.5rem;
    transform: translateY(-120%); transition: transform 0.25s ease;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { padding: 0.2rem 0; }
  .nav-link { display: block; padding: 0.7rem 0; font-size: 1.05rem; }
  .nav-link.is-active::after { display: none; }
  .nav-cta { display: inline-block; margin-top: 0.6rem; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }