/*
 * Landing page design system.
 *
 * Editorial/technical direction: a violet-to-amber pair on near-black, generous
 * type scale contrast, and a single decorative device — the stepping canvas in
 * the hero. Amber is reserved semantically for "this breakpoint was overridden",
 * the same meaning it carries inside the plugin, so the page teaches the colour
 * before the product uses it.
 */

:root {
  --bg: #0c0e12;
  --bg-raised: #14171d;
  --bg-raised-2: #1b1f27;
  --fg: #f4f5f7;
  --fg-dim: rgba(244, 245, 247, 0.6);
  --fg-dimmer: rgba(244, 245, 247, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --warm: #f5a623;
  --green: #3fce8f;

  --text-hero: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem);
  --text-h2: clamp(1.5rem, 1.1rem + 1.5vw, 2.3rem);
  --text-h3: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --text-body: clamp(0.98rem, 0.94rem + 0.2vw, 1.06rem);

  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--text-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

a {
  color: #c3b2ff;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .brand {
  font-weight: 680;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
}

.nav .spacer {
  flex: 1;
}

.nav a.link {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13.5px;
}

.nav a.link:hover {
  color: var(--fg);
}

/* On a phone there is no room for the full set; the brand and the demo link
   are the two that matter. */
@media (max-width: 640px) {
  .nav a.link:not(:last-child) {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 200ms var(--ease),
    background 200ms var(--ease),
    border-color 200ms var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: #8f73ff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  background: var(--bg-raised-2);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 2rem + 6vw, 6.5rem) 0 var(--space-section);
  display: grid;
  gap: clamp(2.5rem, 1rem + 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: center;
}

/* Grid items default to min-content width, so a wide child (the stage bar)
   would push the whole column past the viewport instead of shrinking. */
.hero > * {
  min-width: 0;
}

@media (min-width: 940px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.34);
  color: #c3b2ff;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  font-weight: 700;
}

h1 .accent {
  background: linear-gradient(100deg, var(--accent) 10%, var(--warm) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--fg-dim);
  font-size: clamp(1rem, 0.95rem + 0.45vw, 1.2rem);
  max-width: 52ch;
  margin: 0 0 30px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.cta-note {
  color: var(--fg-dimmer);
  font-size: 12.5px;
  width: 100%;
  margin-top: 4px;
}

/* ---------- Hero stage: the stepping canvas ---------- */
.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg-raised-2) 100%);
  padding: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 2px 12px;
}

.pip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--fg-dim);
  border: 1px solid transparent;
  position: relative;
}

.pip svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pip[data-on='true'] {
  background: var(--accent);
  color: #fff;
}

/* The override dot: same meaning, same colour as inside the plugin. */
.pip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warm);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.pip[data-override='true'] .dot {
  opacity: 1;
}

.viewport {
  background: #0f172a;
  border-radius: 9px;
  overflow: hidden;
  height: 288px;
  display: grid;
  place-items: center;
  padding: 20px;
}

.mock {
  width: 100%;
  max-width: var(--mock-w, 100%);
  transition: max-width 700ms var(--ease);
}

.mock-title {
  font-size: var(--mock-title, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mock-color, #fff);
  margin: 0 0 10px;
  transition:
    font-size 700ms var(--ease),
    color 700ms var(--ease);
  line-height: 1.12;
}

.mock-sub {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: 16px;
  width: 76%;
}

.mock-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: var(--mock-cols, repeat(3, 1fr));
  transition: grid-template-columns 700ms var(--ease);
}

.mock-card {
  height: 52px;
  border-radius: 7px;
  background: #eef2f7;
}

.stage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  font-size: 12px;
  color: var(--fg-dim);
  flex-wrap: wrap;
}

.stage-foot code {
  color: var(--warm);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stage-foot button {
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg-dim);
  border-radius: 6px;
  padding: 4px 10px;
}

.stage-foot button:hover {
  color: var(--fg);
}

/* ---------- Sections ---------- */
section {
  padding-block: var(--space-section);
  border-top: 1px solid var(--line);
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  line-height: 1.14;
}

.section-lede {
  color: var(--fg-dim);
  max-width: 60ch;
  margin: 0 0 44px;
}

/* ---------- Problem ---------- */
.problem {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.problem li {
  list-style: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.problem b {
  display: block;
  margin-bottom: 6px;
  color: #ff8f8f;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.problem span {
  color: var(--fg-dim);
  font-size: 14.5px;
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tile {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition:
    border-color 220ms var(--ease),
    transform 220ms var(--ease);
}

.tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.tile--wide {
  grid-column: span 2;
}

@media (max-width: 700px) {
  .tile--wide {
    grid-column: span 1;
  }
}

.tile .num {
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.tile h3 {
  font-size: var(--text-h3);
  margin: 12px 0 8px;
  letter-spacing: -0.01em;
}

.tile p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14.5px;
}

.tile code {
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: #e6ddff;
}

/* ---------- Options table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 620px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-dimmer);
  background: var(--bg-raised);
}

tbody tr:last-child td {
  border-bottom: none;
}

td code,
th code {
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e6ddff;
}

td.dim {
  color: var(--fg-dim);
}

/* ---------- Demo cards ---------- */
.demos {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.demo {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--fg);
  text-decoration: none;
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease);
}

.demo:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--bg-raised-2);
}

.demo strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.demo span {
  color: var(--fg-dim);
  font-size: 14px;
}

/* ---------- CTA + footer ---------- */
.cta {
  text-align: center;
}

.cta h2 {
  margin-bottom: 10px;
}

.cta .section-lede {
  margin-inline: auto;
  margin-bottom: 30px;
}

footer {
  padding: 36px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--fg-dimmer);
  font-size: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

footer .spacer {
  flex: 1;
}

/* ---------- Scroll reveal ----------
   The hidden state only exists when JS can undo it, so the page is fully
   readable with scripting off or broken. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  .js .reveal {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .btn:hover,
  .tile:hover,
  .demo:hover {
    transform: none;
  }
}
