/* --------------------------------------------------------------------------
   Parabola — puzzlebox.dev
   -------------------------------------------------------------------------- */

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

:root {
  --bg: #07070b;
  --bg-soft: #0a0b11;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5fa;
  --muted: #9aa4b8;
  --muted-2: #7c8598;
  --accent: #dfe7ff;
  --glow: rgba(150, 175, 255, 0.5);

  --maxw: 1120px;
  --radius: 16px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(92, 112, 190, 0.13), transparent 62%),
    radial-gradient(900px 520px at 100% 2%, rgba(120, 90, 165, 0.06), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fine film grain for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(150, 175, 255, 0.3); color: #fff; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid #b8c6ff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- helpers ---------- */

.container {
  width: min(100% - 3rem, var(--maxw));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: #07070b;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- reveal animation ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

.hero-inner > .reveal:nth-child(1) { transition-delay: 0.03s; }
.hero-inner > .reveal:nth-child(2) { transition-delay: 0.1s; }
.hero-inner > .reveal:nth-child(3) { transition-delay: 0.18s; }
.hero-inner > .reveal:nth-child(4) { transition-delay: 0.28s; }
.hero-inner > .reveal:nth-child(5) { transition-delay: 0.38s; }
.hero-inner > .reveal:nth-child(6) { transition-delay: 0.48s; }

.feature-grid .feature:nth-child(2) { transition-delay: 0.06s; }
.feature-grid .feature:nth-child(3) { transition-delay: 0.12s; }
.feature-grid .feature:nth-child(4) { transition-delay: 0.06s; }
.feature-grid .feature:nth-child(5) { transition-delay: 0.12s; }
.feature-grid .feature:nth-child(6) { transition-delay: 0.18s; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled {
  background: rgba(7, 7, 11, 0.74);
  border-bottom-color: var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.nav-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.015em;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 9px rgba(185, 205, 255, 0.45));
}
.brand-name { line-height: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}
.nav-gh .icon { width: 1.1em; height: 1.1em; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.88rem 1.35rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.1;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.25s ease,
    color 0.18s ease;
  will-change: transform;
}
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary {
  color: #08080d;
  background: linear-gradient(180deg, #ffffff 0%, #e8edf9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 32px -8px rgba(150, 175, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 44px -10px rgba(150, 175, 255, 0.55);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-sm { padding: 0.56rem 0.98rem; font-size: 0.86rem; border-radius: 10px; }
.btn-lg { padding: 1.02rem 1.6rem; font-size: 1rem; border-radius: 13px; }

/* ---------- shared section bits ---------- */

.section {
  position: relative;
  padding: clamp(72px, 9vw, 118px) 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #a9b6d6;
}
.kicker .icon { width: 1.15em; height: 1.15em; color: #c5d2f2; }
.kicker-center { justify-content: center; }

h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}
.section-head p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: #dfe7fb;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.08em 0.4em;
  border-radius: 5px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(126px, 15vh, 172px) 0 clamp(72px, 9vh, 104px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  top: -34%;
  left: 50%;
  width: 1600px;
  height: 1600px;
  max-width: 140vw;
  max-height: 140vw;
  transform: translateX(-50%);
  background: radial-gradient(
    closest-side,
    rgba(122, 146, 230, 0.16),
    rgba(122, 146, 230, 0.055) 46%,
    transparent 72%
  );
}

.bg-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.hero-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 24px rgba(180, 205, 255, 0.4));
  animation: markBreathe 7s ease-in-out infinite;
}

@keyframes markBreathe {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(180, 205, 255, 0.32)); }
  50% { filter: drop-shadow(0 0 34px rgba(192, 212, 255, 0.55)); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.5rem;
  row-gap: 0.15rem;
  padding: 0.48rem 0.92rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: #c2cce5;
}
.eb-item, .eb-sep { white-space: nowrap; }

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #93e6bd;
  box-shadow: 0 0 9px rgba(110, 220, 165, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

h1 {
  margin: 1.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7.2vw, 5.3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(180deg, #ffffff 0%, #d7e0ff 52%, #9fb2ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lede {
  max-width: 620px;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.72;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2.2rem;
}

.platform-note {
  margin-top: 1.35rem;
  color: var(--muted-2);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.platform-note .sep { margin: 0 0.55rem; opacity: 0.6; }

/* ---------- features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  position: relative;
  overflow: hidden;
  padding: 1.7rem 1.65rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition:
    border-color 0.3s ease,
    transform 0.3s var(--ease),
    box-shadow 0.3s ease;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 140px at 24% -20%, rgba(150, 175, 255, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 50px -28px rgba(20, 30, 70, 0.9);
}
.feature:hover::before { opacity: 1; }

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #cfe0ff;
}
.feature-icon .icon { width: 20px; height: 20px; }

.feature h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.66;
}

/* ---------- CLI ---------- */

.section-cli {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background:
    radial-gradient(820px 460px at 78% 45%, rgba(118, 140, 220, 0.07), transparent 65%);
}

.cli-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.12fr;
  gap: clamp(2rem, 5vw, 4.2rem);
  align-items: center;
}
.cli-grid > * { min-width: 0; }

.cli-copy h2 { max-width: 12ch; }
.cli-copy > p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.cli-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.cli-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.cli-list-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(130, 220, 170, 0.1);
  color: #8ce0ad;
}
.cli-list-icon .icon { width: 12px; height: 12px; }
.cli-list-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.28rem;
}
.cli-list code {
  display: inline-block;
  font-size: 0.8rem;
  color: #b9c4dc;
  background: transparent;
  border: 0;
  padding: 0;
}

.cli-note {
  margin-top: 1.2rem;
  color: var(--muted-2);
  font-size: 0.86rem;
}

.terminal-wrap { position: relative; }
.terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #0b0c13 0%, #07080d 100%);
  box-shadow:
    0 40px 90px -35px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(500px 200px at 80% -10%, rgba(140, 165, 255, 0.09), transparent 70%);
  pointer-events: none;
}

.term-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; opacity: 0.8; }
.term-dot-r { background: #e06666; }
.term-dot-y { background: #d7b45f; }
.term-dot-g { background: #64bf88; }
.term-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.term-body {
  position: relative;
  z-index: 1;
  padding: 1.3rem 1.4rem 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: clamp(0.76rem, 1.05vw, 0.88rem);
  line-height: 1.85;
  color: #c9d2e6;
}
.term-body > div { white-space: nowrap; }
.term-gap { height: 0.55em; }
.prompt { color: #8fd6a8; }
.cmd { color: #eef2fc; }
.out { color: #8b95ab; }
.ok { color: #8ce0ad; }

.cursor {
  display: inline-block;
  width: 7px;
  height: 1.02em;
  background: #8fd6a8;
  vertical-align: -0.16em;
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- download panel ---------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.6rem, 6vw, 4.6rem) clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(720px 320px at 50% -12%, rgba(130, 150, 235, 0.17), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 46px 110px -48px rgba(0, 0, 0, 0.85);
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}
.cta-inner { position: relative; z-index: 1; }
.cta-panel h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.cta-panel > .cta-inner > p {
  max-width: 33rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}
.cta-panel .cta-row { margin-top: 2.3rem; }

.build-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2.2rem;
}
.build-label { color: var(--muted-2); font-size: 0.84rem; }

.copy-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  max-width: 100%;
}
.copy-cmd:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}
.copy-cmd code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-icon { display: grid; grid-template-areas: "a"; place-items: center; }
.copy-icon .icon { grid-area: a; width: 15px; height: 15px; }
.copy-icon .icon-check { display: none; }
.copy-cmd.copied { color: #8ce0ad; border-color: rgba(140, 224, 173, 0.35); }
.copy-cmd.copied .icon-copy { display: none; }
.copy-cmd.copied .icon-check { display: block; }

.build-note {
  margin-top: 1rem;
  color: var(--muted-2);
  font-size: 0.8rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.012));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.9fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p {
  margin: 1rem 0 0;
  max-width: 17rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.footer-by { color: var(--muted-2) !important; font-size: 0.84rem !important; }

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a94ad;
}
.footer-col a {
  display: block;
  margin-bottom: 0.62rem;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-size: 0.82rem;
}
.footer-motto { font-style: italic; opacity: 0.85; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .cli-grid { grid-template-columns: 1fr; gap: 2.6rem; }
  .cli-copy h2 { max-width: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 2 / 4; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner { height: 66px; }
  .hero { padding-top: 118px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
  h1 { letter-spacing: -0.028em; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.5rem; }
  .footer-col:last-child { grid-column: auto; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 2.2rem); }
  .feature-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .platform-note { font-size: 0.76rem; }
  .build-row { flex-direction: column; }
  .copy-cmd code { max-width: 74vw; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-mark, .pulse-dot, .cursor { animation: none; }
  .btn, .feature, .copy-cmd { transition: none; }
}
