/* Slab landing — DESIGN.MD concept style: near-black, giant display, purple→blue accent */
:root {
  --bg: #060607;
  --panel: #0e0e12;
  --panel-2: #121218;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --violet: #a855f7;
  --blue: #3b82f6;
  --grad: linear-gradient(100deg, #c084fc 0%, #818cf8 50%, #60a5fa 100%);
  --font-d: "Space Grotesk", system-ui, sans-serif;
  --font-i: "Fraunces", Georgia, serif;
  --font-m: "JetBrains Mono", ui-monospace, monospace;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-d);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(168, 85, 247, 0.35); }

.wrap { width: min(1160px, 92vw); margin: 0 auto; }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: #000; padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 6, 7, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand .mark { width: 30px; height: 30px; }
.links { display: flex; gap: 1.6rem; margin-left: auto; }
.links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 0.8rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem; cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
.mobile-links { display: none; flex-direction: column; padding: 0.5rem 4vw 1rem; gap: 0.2rem; border-top: 1px solid var(--line); }
.mobile-links a { text-decoration: none; padding: 0.7rem 0; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-links.open { display: flex; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-weight: 600; font-size: 0.95rem;
  padding: 0.72rem 1.35rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.white { background: #fff; color: #09090b; }
.btn.white:hover { background: #e4e4e7; }
.btn.outline { background: transparent; color: var(--ink); border-color: rgba(255,255,255,0.22); }
.btn.outline:hover { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.05); }
.btn.solid { background: #fff; color: #09090b; }
.btn.big { padding: 0.95rem 2rem; font-size: 1.02rem; }
.btn.sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 4.5rem 0 5rem; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 70%;
  background: radial-gradient(60% 55% at 50% 0%, rgba(139, 92, 246, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.1);
  padding: 0.5rem 1.1rem; border-radius: 999px; margin: 0 0 1.6rem;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.display {
  margin: 0; font-weight: 700;
  font-size: clamp(4.5rem, 19vw, 15rem);
  letter-spacing: -0.045em; line-height: 0.95;
  color: var(--ink);
}
.hero h1 {
  margin: 1.8rem 0 0; font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  letter-spacing: -0.03em; line-height: 1.08;
}
.grad {
  font-family: var(--font-i); font-style: italic; font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-right: 0.08em;
}
.lede {
  max-width: 620px; margin: 1.4rem auto 0;
  color: var(--muted); font-size: 1.08rem; line-height: 1.65;
}
.cta-row { display: flex; gap: 0.9rem; justify-content: center; margin-top: 2.1rem; flex-wrap: wrap; }
.stack-row {
  display: flex; align-items: center; justify-content: center; gap: 1.4rem;
  margin-top: 2.6rem; flex-wrap: wrap;
}
.stack-label { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.stack-marks { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.stack-marks span {
  color: var(--dim); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.01em;
  filter: grayscale(1); opacity: 0.75;
}

/* mock panel */
.mock { margin: 3.2rem auto 0; max-width: 1020px; text-align: left; }
.mock-head {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em;
  margin: 0 0 1.1rem 0.4rem;
}
.mock-head::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--grad);
}
.mock-body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(0.7rem, 2vw, 1.4rem);
  box-shadow: 0 40px 120px -30px rgba(139, 92, 246, 0.25), 0 20px 60px -20px rgba(0, 0, 0, 0.8);
}
.mock-body img { border-radius: 16px; width: 100%; }
.watermark {
  margin: 2.2rem 0 0; font-size: 0.85rem; letter-spacing: 0.3em;
  text-transform: lowercase; color: rgba(255,255,255,0.22);
}

/* ---------- sections ---------- */
.section { padding: 5.5rem 0; border-top: 1px solid var(--line); }
.sec-label {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet); margin: 0 0 1rem;
}
.sec-title {
  margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}
.sec-sub { color: var(--muted); max-width: 640px; font-size: 1.05rem; }
.sec-sub a { color: var(--ink); }
.mini-title { margin: 0.6rem 0 0.5rem; font-size: 1.35rem; letter-spacing: -0.02em; }
kbd, code {
  font-family: var(--font-m); font-size: 0.85em;
  background: rgba(255,255,255,0.07); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.15em 0.45em;
}

/* toolwall */
.toolwall { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.toolwall span {
  font-size: 0.95rem; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  padding: 0.55rem 1rem; border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toolwall span:hover { color: var(--ink); border-color: rgba(168,85,247,0.5); }

/* split + frames */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: center; margin-top: 2rem; }
.split > * { min-width: 0; }
.frame {
  margin: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.8rem;
}
.frame img { border-radius: 12px; width: 100%; }
.frame figcaption { color: var(--dim); font-size: 0.92rem; padding: 0.7rem 0.4rem 0.2rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0; margin: 1.4rem 0 0; }
.chips li {
  font-size: 0.88rem; color: #d8b4fe;
  border: 1px solid rgba(168,85,247,0.35); background: rgba(168,85,247,0.08);
  padding: 0.45rem 0.95rem; border-radius: 999px;
}

/* hopper */
.hopper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2.2rem; }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
}
.panel h3 { margin: 0 0 0.6rem; font-size: 1.1rem; letter-spacing: -0.015em; }
.panel p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.preds { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1rem 0 0; }
.preds li { font-family: var(--font-m); font-size: 0.8rem; color: var(--muted); border: 1px dashed var(--line); padding: 0.35rem 0.7rem; border-radius: 8px; }

/* terminal */
.term {
  display: flex; align-items: center; gap: 0.8rem; width: 100%;
  font-family: var(--font-m); font-size: 0.92rem; text-align: left;
  background: #0a0a0d; color: #e4e4e7; border: 1px solid var(--line);
  border-radius: 14px; padding: 1.1rem 1.3rem; cursor: pointer; margin-top: 1.4rem;
}
.term:hover { border-color: rgba(168,85,247,0.5); }
.term .prompt { color: var(--violet); font-weight: 600; }
.term code { background: none; border: none; padding: 0; color: inherit; overflow-x: auto; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.copy-hint {
  margin-left: auto; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--line); border-radius: 6px; padding: 0.25rem 0.6rem;
  flex-shrink: 0;
}

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 2.2rem; }

/* compare */
.table-wrap { overflow-x: auto; margin-top: 2.2rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 620px; }
th, td { text-align: left; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
td.hl, th.hl {
  background: rgba(168, 85, 247, 0.07);
  font-weight: 600; color: var(--ink);
}
th.hl { color: #d8b4fe; }
.fine { color: var(--dim); font-size: 0.88rem; margin-top: 1rem; }

/* download */
.grid.dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 2.2rem; }
.dl-card h3 { font-size: 1.25rem; }
.dl-btns { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.1rem; }
.dl-btns .btn { justify-content: flex-start; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; }
.foot { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.foot p { color: var(--dim); font-size: 0.92rem; margin: 0; flex: 1; min-width: 220px; }
.foot p a, .foot nav a { color: var(--muted); }
.foot nav { display: flex; gap: 1.4rem; margin-left: auto; }
.foot nav a { text-decoration: none; font-size: 0.92rem; }
.foot nav a:hover { color: var(--ink); }

/* toast */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translate(-50%, 20px);
  background: #fff; color: #09090b; font-weight: 600; font-size: 0.9rem;
  padding: 0.7rem 1.3rem; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 1.8rem; }
  .hopper-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .grid.dl { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .links { display: none; }
  .menu-btn { display: block; }
  .nav-cta .btn { display: none; }
  .section { padding: 4rem 0; }
  .hero { padding: 3rem 0 3.5rem; }
  .cta-row .btn { width: 100%; }
  .foot nav { margin-left: 0; }
}

/* ---------- simple pages (404 / privacy / terms) ---------- */
.page { padding: 5rem 0 6rem; }
.page-inner { max-width: 720px; }
.page-inner.center { text-align: center; margin: 0 auto; }
.page-inner.center .cta-row { justify-content: center; }
.display.sm { font-size: clamp(4rem, 14vw, 8rem); }
.page h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.1; margin: 1.2rem 0; }
.page .lede { margin-left: 0; }
.page-inner.center .lede { margin-left: auto; }
.prose p { color: var(--muted); }
.prose a { color: var(--ink); }
.page .cta-row { justify-content: flex-start; margin-top: 2.2rem; }

/* ---------- sticky mobile CTA ---------- */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0.7rem 4vw calc(0.7rem + env(safe-area-inset-bottom));
    background: rgba(6, 6, 7, 0.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform 0.3s ease;
  }
  .sticky-cta.show { transform: none; }
  .sticky-cta .btn { width: 100%; }
}

/* ---------- image loading states ---------- */
.frame img, .mock-body img { background: #101014; transition: opacity 0.5s ease; }
.frame img.is-loading, .mock-body img.is-loading { opacity: 0; }
.frame, .mock-body { position: relative; }
.frame:has(img.is-loading)::after, .mock-body:has(img.is-loading)::after {
  content: ""; position: absolute; inset: 0.8rem; border-radius: 12px;
  background: linear-gradient(100deg, #101014 40%, #181822 50%, #101014 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  pointer-events: none;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- ambient hero glow ---------- */
.hero { position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; top: -22%; left: 50%;
  width: min(920px, 130vw); height: 540px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(139, 92, 246, 0.20), transparent 70%),
    radial-gradient(closest-side at 72% 62%, rgba(59, 130, 246, 0.14), transparent 70%);
  filter: blur(10px);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-inner { position: relative; }
@keyframes drift {
  from { transform: translateX(-55%); }
  to   { transform: translateX(-45%) translateY(34px); }
}

/* ---------- marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 1rem 0; background: rgba(255, 255, 255, 0.015); }
.marquee-track { display: flex; width: max-content; animation: scrollx 38s linear infinite; }
.mq { display: flex; align-items: center; }
.mq span { padding: 0 1.4rem; font-size: 0.88rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.mq b { color: #33333e; font-weight: 400; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2.2rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num, .stat .free { display: block; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat .free { background: linear-gradient(100deg, var(--vio), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { display: block; margin-top: 0.5rem; color: var(--dim); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-top: 1px solid var(--line); padding: 1.6rem 1rem; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; }
}

/* ---------- playground palette ---------- */
.palette { max-width: 660px; margin: 2.6rem auto 0; border: 1px solid var(--line); border-radius: 18px; background: #0b0b0f; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 1.05rem; }
.palette-input input::placeholder { color: var(--dim); }
.palette-list { list-style: none; margin: 0; padding: 0.6rem; max-height: 336px; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 0.98rem; }
.palette-list li .k { color: var(--vio); font-size: 0.85rem; }
.palette-list li.on { background: rgba(139, 92, 246, 0.14); color: var(--ink); }
.palette-list li.empty { cursor: default; color: var(--dim); }
.palette-list li.empty a { color: var(--ink); }
.palette-count { margin: 0; padding: 0.7rem 1.3rem; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- faq ---------- */
.faq { max-width: 720px; margin: 2.6rem auto 0; }
.faq details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.8rem; background: #0b0b0f; }
.faq summary { padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--vio); font-size: 1.35rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 1.3rem 1.25rem; color: var(--muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero::before, .marquee-track { animation: none; }
}
