/* ==========================================================================
   React Router Route Links — landing page
   ========================================================================== */

:root {
  --bg:            #0b0d12;
  --bg-alt:        #10131a;
  --surface:       #151922;
  --surface-2:     #1b2029;
  --border:        #262d3a;
  --border-strong: #333b4b;

  --text:          #e7eaf0;
  --text-dim:      #a3adbe;
  --text-faint:    #6b7686;

  --accent:        #f44250;
  --accent-soft:   #ff6b76;
  --blue:          #4d9dff;
  --blue-soft:     #79b8ff;
  --green:         #4ec9b0;
  --amber:         #e5c07b;

  --code-string:   #ce9178;
  --code-keyword:  #c586c0;
  --code-comment:  #6a9955;
  --code-fn:       #dcdcaa;
  --code-type:     #4ec9b0;

  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     20px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --container: 1180px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-soft); }

code {
  font-family: var(--mono);
  font-size: .875em;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 5px;
  padding: .1em .38em;
  overflow-wrap: break-word;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #06121f;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: 0; color: #06121f; }

/* ------------------------------------------------------------- layout -- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 860px; }

.section { padding: 96px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { max-width: 660px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 0; }

.section-kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: .7rem;
}

.center { text-align: center; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Grid and flex children default to min-width:auto, which lets long code
   lines push their track wider than the viewport. Opt out explicitly. */
.grid > *,
.compare > *,
.install-grid > *,
.hero-grid > *,
.table-wrap > * { min-width: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, #ff5563, var(--accent));
  color: #fff;
  box-shadow: 0 6px 22px -8px rgba(244, 66, 80, .75);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(244, 66, 80, .9);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface-2); border-color: #47526a; color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-dim); border-color: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--text); }

.btn-sm { padding: .5rem .9rem; font-size: .87rem; }
.btn-lg { padding: .88rem 1.5rem; font-size: 1rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-center { justify-content: center; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 18, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 6px; }
.brand-accent { color: var(--accent); }

.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a {
  color: var(--text-dim);
  font-size: .92rem;
  font-weight: 500;
  transition: color .16s var(--ease);
}
.site-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; }

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

.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -40% 30% 40% -20%;
  background: radial-gradient(closest-side, rgba(244, 66, 80, .16), transparent 70%),
              radial-gradient(closest-side, rgba(77, 157, 255, .13), transparent 70%);
  background-position: 30% 40%, 80% 60%;
  background-size: 70% 100%, 60% 90%;
  background-repeat: no-repeat;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .38rem .9rem;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(78, 201, 176, .18);
}

.hero h1 { margin-bottom: 20px; }
.grad {
  background: linear-gradient(96deg, var(--accent-soft) 10%, var(--blue-soft) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 54ch;
}
.lede strong { color: var(--text); font-weight: 600; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  font-size: .88rem;
  color: var(--text-faint);
}
.hero-facts li { display: flex; align-items: center; gap: 6px; }
.hero-facts li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}
.hero-facts strong { color: var(--text-dim); font-weight: 600; }

/* -------------------------------------------------------------- demo -- */

.editor {
  background: #14171d;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 28px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255,255,255,.02) inset;
}

.editor-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  height: 42px;
  background: #1b1f27;
  border-bottom: 1px solid var(--border);
}
.traffic { display: flex; gap: 7px; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.traffic i:nth-child(1) { background: #ff5f57; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: .8rem;
  padding: 10px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.tab:hover { color: var(--text-dim); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.editor-body { position: relative; padding: 16px 0 8px; min-height: 288px; }
.editor-file[hidden] { display: none; }

.code {
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.75;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}
.code .line { display: flex; padding: 0 18px; white-space: pre; }
.code .ln {
  flex: 0 0 34px;
  color: #4d5563;
  text-align: right;
  padding-right: 18px;
  user-select: none;
}
.code code { font-size: inherit; background: none; border: 0; padding: 0; white-space: pre; min-width: max-content; }
.code-sm { font-size: .8rem; }

.tk-kw { color: var(--code-keyword); }
.tk-str { color: var(--code-string); }
.tk-cmt { color: var(--code-comment); font-style: italic; }
.tk-fn { color: var(--code-fn); }
.tk-type { color: var(--code-type); }

/* a linked route string */
.rlink, .tk-link {
  color: var(--blue-soft);
  border-bottom: 1px solid rgba(121, 184, 255, .5);
  cursor: pointer;
  text-decoration: none;
  transition: color .14s var(--ease), background .14s var(--ease), border-color .14s var(--ease);
}
.rlink:hover, .tk-link:hover {
  color: #a6d0ff;
  border-bottom-color: var(--blue-soft);
  background: rgba(77, 157, 255, .12);
}
.tk-link { border-bottom-style: solid; }
.rlink.is-active, .tk-link.is-active {
  background: rgba(77, 157, 255, .2);
  border-bottom-color: #cfe6ff;
}

.rlink:focus-visible { outline-offset: 1px; }

/* one-time attention pulse on the demo links */
@keyframes link-pulse {
  0%   { background: rgba(77, 157, 255, 0); }
  35%  { background: rgba(77, 157, 255, .3); }
  100% { background: rgba(77, 157, 255, 0); }
}
.rlink.is-pulsing { animation: link-pulse 1.1s var(--ease) 2; }

/* peek definition popup */
.peek {
  position: absolute;
  z-index: 20;
  width: min(420px, calc(100% - 24px));
  left: 12px;
  top: 0;
  background: #1b1f27;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.9);
  overflow: hidden;
  animation: peek-in .16s var(--ease);
}
@keyframes peek-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.peek[hidden] { display: none; }

.peek-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #222732;
  border-bottom: 1px solid var(--border);
}
.peek-path {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peek-badge {
  flex: none;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.peek-body { padding: 10px 0; max-height: 190px; overflow: auto; }
.peek-code {
  margin: 0;
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
}
.peek-code .pl { display: block; padding: 0 14px; }
.peek-code .pl:hover { background: rgba(255,255,255,.04); }

.editor-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 18px 14px;
  font-size: .78rem;
  color: var(--text-faint);
}
.hint-plus { color: var(--text-faint); }
kbd {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .12rem .42rem;
}

.editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  background: #10131a;
  border-top: 1px solid var(--border);
  font-size: .74rem;
  color: var(--text-faint);
}
.status-item { display: flex; align-items: center; gap: 7px; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(78, 201, 176, .16);
}

/* ------------------------------------------------------------ compare -- */

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.compare-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.compare-before { border-color: rgba(244, 66, 80, .28); }
.compare-after  { border-color: rgba(78, 201, 176, .32); }

.compare-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.compare-label .x { color: var(--accent); font-size: 1rem; line-height: 1; }
.compare-label .check { color: var(--green); font-size: .95rem; line-height: 1; }

.compare-pane .code { font-size: .8rem; }
.compare-pane .code .line { padding: 0 2px; }

.compare-note {
  margin: 14px 0 0;
  font-size: .87rem;
  color: var(--text-faint);
}

/* ------------------------------------------------------------- cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-dim); font-size: .94rem; margin: 0; }
.card code { font-size: .8em; }

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(244, 66, 80, .1);
  border: 1px solid rgba(244, 66, 80, .22);
  color: var(--accent-soft);
  margin-bottom: 16px;
}

/* ------------------------------------------------------------ panels -- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.panel h3 { font-size: 1.22rem; }
.panel p { color: var(--text-dim); font-size: .95rem; }
.panel .code {
  margin-top: 18px;
  background: #12151c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 0;
}
.panel .code .line { padding: 0 14px; }

.panel-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-soft);
  background: rgba(77, 157, 255, .1);
  border: 1px solid rgba(77, 157, 255, .22);
  border-radius: 100px;
  padding: .25rem .7rem;
  margin-bottom: 14px;
}

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

.helpers {
  margin-top: 34px;
  text-align: center;
}
.helpers-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .38rem .85rem;
  font-size: .86rem;
  color: var(--text-dim);
}
.chip code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue-soft);
  font-size: .86em;
}
.chip-muted { color: var(--text-faint); }
.chip-muted code { color: var(--text-dim); }

/* ------------------------------------------------------------- table -- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--surface);
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.settings-table th {
  text-align: left;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.settings-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.settings-table tr:last-child td { border-bottom: 0; }
.settings-table td:first-child code { color: var(--blue-soft); }
.settings-table code { font-size: .82em; }

/* -------------------------------------------------------- code block -- */

.code-block {
  background: #12151c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-faint);
}
.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
}
.code-block pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: .84rem;
  white-space: pre;
}
.code-block-json { margin-top: 24px; }

.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: .74rem;
  font-weight: 600;
  padding: .28rem .6rem;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.copy-btn:hover { background: var(--surface-2); color: var(--text); border-color: #47526a; }
.copy-btn.is-copied {
  color: #0b0d12;
  background: var(--green);
  border-color: var(--green);
}

.code-block-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
}
.code-block-inline pre { padding: 0; flex: 1 1 auto; min-width: 0; }
.code-block-inline pre code { font-size: .82rem; white-space: nowrap; }

/* ------------------------------------------------------------ install -- */

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.install-card h3 { font-size: 1.12rem; }
.install-card p { color: var(--text-dim); font-size: .93rem; }
.install-card .code-block { margin-top: 16px; }
.install-card .btn { margin-top: 6px; }

.install-note {
  margin-top: 26px;
  text-align: center;
  color: var(--text-faint);
  font-size: .9rem;
}

/* ---------------------------------------------------------------- faq -- */

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .18s var(--ease);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  font-size: .96rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color .16s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue-soft); }
.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: .93rem;
}

/* ---------------------------------------------------------------- cta -- */

.cta-section { padding: 92px 0; }
.cta-section h2 { margin-bottom: .4em; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 34px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .95rem;
}
.footer-brand img { border-radius: 5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
.footer-links a { color: var(--text-dim); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-faint); font-size: .86rem; margin: 0; }

/* ------------------------------------------------------- reveal anim -- */

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(.985);
  filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease),
              filter .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* ============================================================ MOTION == */

/* --- scroll progress --------------------------------------------------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  box-shadow: 0 0 14px rgba(77, 157, 255, .55);
  will-change: transform;
}

/* --- header ------------------------------------------------------------ */
.site-header {
  transition: transform .4s var(--ease), background .3s var(--ease),
              box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(11, 13, 18, .92);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .95);
  border-bottom-color: var(--border-strong);
}
.brand img { transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }

/* --- hero atmosphere --------------------------------------------------- */
.hero-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(64px);
  opacity: .55;
  will-change: transform;
}
.hero-orb-a {
  width: 420px; height: 420px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(244, 66, 80, .34), transparent 66%);
  animation: orb-a 17s ease-in-out infinite alternate;
}
.hero-orb-b {
  width: 460px; height: 460px;
  right: -140px; bottom: -180px;
  background: radial-gradient(circle, rgba(77, 157, 255, .3), transparent 66%);
  animation: orb-b 21s ease-in-out infinite alternate;
}
@keyframes orb-a {
  to { transform: translate3d(140px, 90px, 0) scale(1.18); }
}
@keyframes orb-b {
  to { transform: translate3d(-120px, -80px, 0) scale(1.12); }
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .65;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 74%);
  animation: grid-pan 26s linear infinite;
}
@keyframes grid-pan {
  to { background-position: 64px 64px, 64px 64px; }
}

/* --- scroll cue -------------------------------------------------------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  z-index: 2;
  color: var(--text-faint);
}
.scroll-cue:hover { color: var(--text-dim); }
.scroll-cue-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.scroll-cue-track {
  display: grid;
  justify-items: center;
  padding-top: 6px;
  width: 22px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
}
.scroll-cue-dot {
  width: 4px; height: 8px;
  border-radius: 100px;
  background: var(--accent-soft);
  animation: scroll-dot 1.9s var(--ease) infinite;
}
@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 0; }
  25%  { opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* --- hero entrance ----------------------------------------------------- */
.hero-copy .eyebrow,
.hero-copy .lede,
.hero-copy .cta-row,
.hero-copy .hero-facts {
  animation: rise-in .9s var(--ease) both;
}
.hero-copy .eyebrow { animation-delay: .05s; }
.hero-copy .lede { animation-delay: .5s; }
.hero-copy .cta-row { animation-delay: .66s; }
.hero-copy .hero-facts { animation-delay: .8s; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero-demo {
  animation: hero-demo-in 1.05s var(--ease) both .3s;
}
@keyframes hero-demo-in {
  from { opacity: 0; transform: translateY(34px) rotateX(7deg) scale(.965); }
  to   { opacity: 1; transform: none; }
}

/* --- split-word headline reveal --------------------------------------- */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.word + .word { margin-left: .24em; }
.word-inner {
  display: inline-block;
  transform: translateY(112%) rotate(2.5deg);
  opacity: 0;
  will-change: transform, opacity;
}
.split.is-in .word-inner {
  animation: word-up .88s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 52ms);
}
@keyframes word-up {
  to { transform: none; opacity: 1; }
}

.grad {
  background-size: 220% 100%;
  animation: grad-shift 7s ease-in-out infinite;
}
@keyframes grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* --- marquee ----------------------------------------------------------- */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 17px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 44s;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
  flex: none;
}
.marquee-item {
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--text-faint);
  white-space: nowrap;
  transition: color .25s var(--ease);
}
.marquee-item:nth-child(4n + 1) { color: var(--text-dim); }
.marquee:hover .marquee-item { color: var(--text-dim); }
.marquee-sep {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.marquee-ghost {
  padding: 30px 0;
  background: var(--bg-alt);
  border-bottom: 0;
}
.marquee-ghost .marquee-group { gap: 42px; padding-right: 42px; }
.marquee-ghost .marquee-item {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: rgba(231, 234, 240, .14);
}
.marquee-ghost .marquee-sep {
  color: rgba(244, 66, 80, .5);
  font-size: clamp(1rem, 2vw, 1.5rem);
}

/* --- card spotlight ---------------------------------------------------- */
.card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s var(--ease);
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(244, 66, 80, .14),
    transparent 62%
  );
}
.card:hover::before { opacity: 1; }
.card-icon { transition: transform .45s var(--ease), background .35s var(--ease); }
.card:hover .card-icon { transform: translateY(-3px) rotate(-6deg); }

/* --- button sheen ------------------------------------------------------ */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  transition: left .65s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::after { left: 150%; }

/* --- editor tilt + status pulse --------------------------------------- */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform .3s var(--ease), box-shadow .4s var(--ease);
  will-change: transform;
}
.status-dot { animation: status-pulse 2.4s var(--ease) infinite; }
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(78, 201, 176, .16); }
  50%      { box-shadow: 0 0 0 6px rgba(78, 201, 176, .05); }
}

/* --- code line stagger ------------------------------------------------- */
.editor-file.is-active .code .line {
  animation: line-in .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + .55s);
}
@keyframes line-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: none; }
}

/* --- faq open ---------------------------------------------------------- */
.faq details p { animation: faq-in .35s var(--ease); }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
}

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

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero-copy { max-width: 680px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 760px) {
  .section { padding: 68px 0; }
  .grid-3, .grid-2, .compare, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 56px 0 72px; }
  .cta-row .btn { flex: 1 1 100%; }
  .hero-facts { gap: 8px 18px; }
  .footer-links { margin-left: 0; }
  .editor-hint { font-size: .74rem; }
  .code { font-size: .78rem; }
  .tab { padding: 10px 8px; font-size: .74rem; }
  .scroll-cue { display: none; }
  .marquee { padding: 13px 0; }
  .marquee-group { gap: 24px; padding-right: 24px; }
  .marquee-item { font-size: .84rem; }
  .marquee-ghost { padding: 20px 0; }
  .marquee-ghost .marquee-group { gap: 28px; padding-right: 28px; }
}

/* very narrow screens: drop the decorative window controls so both file
   tabs still fit without horizontal scrolling */
@media (max-width: 400px) {
  .traffic { display: none; }
  .editor-titlebar { gap: 8px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .word-inner { opacity: 1; transform: none; }
  .hero-copy > *,
  .hero-demo,
  .editor-file.is-active .code .line { animation: none; opacity: 1; transform: none; }
  .hero-orb,
  .hero-grid-lines,
  .marquee-track,
  .grad { animation: none !important; }
  .hero-orb { opacity: .35; }
  [data-tilt] { transform: none !important; }
}
