/* Vertex (fictional SaaS example) — shared styles for every page.
   Tokens: ink #06080d, mint #7fe0d6, amber #f4b76b. Type: Bricolage Grotesque / Inter / JetBrains Mono. */
:root {
  color-scheme: dark;
  --bg: #06080d; --bg-2: #0b1018; --bg-3: #111824;
  --fg: #eef2f7; --muted: #9aa5b5; --line: rgba(214, 228, 245, .14);
  --glass: rgba(255, 255, 255, .05);
  --mint: #7fe0d6; --amber: #f4b76b; --ice: #f3f7ff; --bad: #ff8f8f;
  --display: "Bricolage Grotesque", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--mint); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }

/* Demo notice */
.demo { position: relative; z-index: 20; background: var(--bg-2); border-bottom: 1px solid rgba(214, 228, 245, .1); color: #b4bfcd; font: 13px/1.4 var(--body); }
.demo .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; padding-block: 8px; }
.demo a { color: #fff; font-weight: 600; }

/* Nav */
.nav-wrap { position: sticky; top: 0; z-index: 15; padding-block: 14px; padding-left: var(--gl); padding-right: var(--gr); }
.hero .nav-wrap { position: relative; }
.nav { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px; border-radius: 16px; background: rgba(11, 16, 24, .72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.15rem/1 var(--display); letter-spacing: -.01em; }
.logo svg { flex: none; }
.nav__links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links a { display: block; padding: 8px 12px; border-radius: 10px; font-size: .9rem; color: var(--muted); transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--fg); background: rgba(255, 255, 255, .06); }
.nav__right { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px; font-size: .88rem; font-weight: 600; background: var(--fg); color: var(--bg); transition: transform .3s var(--ease); white-space: nowrap; }
.nav__cta:hover { transform: translateY(-1px); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 2px; margin: 4px auto; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { flex-wrap: wrap; }
  .nav__links { display: none; order: 3; width: 100%; flex-direction: column; padding: 6px 0 4px; border-top: 1px solid var(--line); margin-top: 6px; }
  .nav.open .nav__links { display: flex; }
  .nav__links a { padding: 12px 10px; font-size: 1rem; }
}

/* Buttons */
.btn-glow { --angle: 0deg; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: 14px; font: 600 .98rem/1 var(--body); color: var(--fg); white-space: nowrap; cursor: pointer;
  background: rgba(127, 224, 214, .08); border: 1px solid rgba(127, 224, 214, .35);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 10px 40px rgba(127, 224, 214, .18), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s; }
.btn-glow::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--mint) 70%, var(--amber) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rim 4s linear infinite; }
.btn-glow:hover { transform: translateY(-2px); background: rgba(127, 224, 214, .14); box-shadow: 0 0 0 4px rgba(127, 224, 214, .08), 0 18px 60px rgba(127, 224, 214, .3); }
.btn-glow:active { transform: scale(.98); transition-duration: .1s; }
.btn-glow svg { transition: transform .35s var(--ease); }
.btn-glow:hover svg { transform: translateX(3px); }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rim { to { --angle: 360deg; } }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 20px; border-radius: 14px; border: 1px solid var(--line); color: var(--fg); font-weight: 500; transition: background .2s, border-color .2s; cursor: pointer; background: transparent; font-size: .95rem; }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); border-color: rgba(214, 228, 245, .28); }
.btn-text { padding: 15px 8px; font-weight: 500; font-size: .95rem; color: var(--muted); transition: color .2s; }
.btn-text:hover { color: var(--fg); }

/* Generic sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--line); }
.kicker { font: 500 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mint); margin: 0 0 14px; }
.h2 { margin: 0 0 16px; font: 700 clamp(2rem, 4.2vw, 3.2rem)/1.05 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.lead { margin: 0; max-width: 40em; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.1rem); text-wrap: pretty; }
.grad { background: linear-gradient(105deg, var(--ice) 0%, var(--ice) 38%, var(--mint) 66%, var(--amber) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 56px); }
.page-head h1 { margin: 0 0 16px; font: 700 clamp(2.5rem, 6vw, 4.4rem)/1 var(--display); letter-spacing: -.035em; text-wrap: balance; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; padding: 26px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); border: 1px solid var(--line); overflow: hidden; }
.card h3 { margin: 14px 0 8px; font: 700 1.25rem/1.2 var(--display); letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(127, 224, 214, .1); border: 1px solid rgba(127, 224, 214, .25); color: var(--mint); }
.card.amber .ico { background: rgba(244, 183, 107, .1); border-color: rgba(244, 183, 107, .3); color: var(--amber); }

/* Code blocks */
.code { position: relative; border-radius: 16px; background: #0a0f17; border: 1px solid var(--line); overflow: hidden; }
.code__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); font: 500 .76rem/1 var(--mono); color: var(--muted); }
.code pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font: 400 .86rem/1.7 var(--mono); color: #d7deea; tab-size: 2; }
.code .k { color: var(--mint); } .code .s { color: var(--amber); } .code .c { color: #66748a; } .code .f { color: #a9c7ff; }
.copy-btn { flex: none; border: 0; cursor: pointer; padding: 7px 10px; border-radius: 8px; font: 500 .74rem/1 var(--mono); color: var(--muted); background: rgba(255, 255, 255, .06); transition: color .2s, background .2s; }
.copy-btn:hover { color: var(--fg); background: rgba(255, 255, 255, .12); }

/* Split layout */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); }
.steps li::before { content: "0" counter(s); display: block; font: 500 .8rem/1 var(--mono); color: var(--mint); margin-bottom: 14px; }
.steps b { display: block; font: 700 1.15rem/1.25 var(--display); margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: 40px; }
.stats div { background: var(--bg); padding: 22px; }
.stats b { display: block; font: 700 clamp(1.6rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 8px; color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.note { margin-top: 12px; font: 400 .76rem/1.5 var(--mono); color: #7d889a; }

/* CTA band */
.band { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(32px, 6vw, 64px); border: 1px solid rgba(127, 224, 214, .25);
  background: radial-gradient(90% 140% at 100% 0%, rgba(127, 224, 214, .16), transparent 55%), radial-gradient(80% 120% at 0% 100%, rgba(244, 183, 107, .12), transparent 55%), var(--bg-2); }
.band .ctas { margin-top: 26px; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Table */
.table-wrap { margin-top: 36px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .95rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { font: 500 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--mint); } td.no { color: #7d889a; }

/* Pricing */
.toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); margin-top: 26px; }
.toggle button { border: 0; cursor: pointer; padding: 9px 16px; border-radius: 9px; font: 500 .9rem/1 var(--body); color: var(--muted); background: transparent; }
.toggle button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.toggle .save { font: 500 .72rem/1 var(--mono); color: var(--amber); margin-left: 6px; }
.toggle button[aria-pressed="true"] .save { color: #8a5a17; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }
.plan { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); }
.plan.pop { border-color: rgba(127, 224, 214, .45); background: linear-gradient(180deg, rgba(127, 224, 214, .09), rgba(255, 255, 255, .02)); box-shadow: 0 20px 60px rgba(127, 224, 214, .1); }
.plan__name { display: flex; justify-content: space-between; align-items: center; font: 700 1.2rem/1 var(--display); }
.tag { font: 500 .72rem/1 var(--mono); padding: 6px 9px; border-radius: 999px; background: var(--mint); color: var(--bg); }
.price { font: 700 2.8rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price small { font: 400 .9rem/1 var(--body); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; color: #cfd7e3; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: rgba(127, 224, 214, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%237fe0d6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.plan .btn-glow, .plan .btn-ghost { margin-top: auto; width: 100%; }

/* FAQ */
.faq { margin-top: 32px; display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.3rem/1 var(--mono); color: var(--mint); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* Docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 96px; }
.docs nav { position: sticky; top: 96px; font-size: .92rem; }
.docs nav p { font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #7d889a; margin: 22px 0 10px; }
.docs nav p:first-child { margin-top: 0; }
.docs nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); border-left: 2px solid transparent; }
.docs nav a:hover { color: var(--fg); background: rgba(255, 255, 255, .04); }
.docs nav a.on { color: var(--fg); border-left-color: var(--mint); background: rgba(127, 224, 214, .06); }
.docs article h2 { font: 700 1.8rem/1.15 var(--display); letter-spacing: -.02em; margin: 56px 0 12px; scroll-margin-top: 96px; }
.docs article h2:first-child { margin-top: 0; }
.docs article p { color: #c5cedb; max-width: 44em; }
.docs article .code { margin: 18px 0; }
.docs code.i { font: 400 .86em/1 var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--fg); }
.tabs { display: flex; gap: 4px; }
.tabs button { border: 0; cursor: pointer; padding: 6px 10px; border-radius: 7px; font: 500 .76rem/1 var(--mono); color: var(--muted); background: transparent; }
.tabs button[aria-selected="true"] { color: var(--bg); background: var(--mint); }
.callout { margin: 18px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(244, 183, 107, .35); background: rgba(244, 183, 107, .07); color: #e8d6bd; font-size: .95rem; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .docs nav p { display: none; }
  .docs nav a { white-space: nowrap; border-left: 0; }
}

/* Changelog */
.log { list-style: none; margin: 0; padding: 0 0 96px; max-width: 860px; }
.log li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); }
.log time { font: 500 .82rem/1.4 var(--mono); color: var(--muted); }
.log .ver { display: inline-block; margin-top: 8px; font: 500 .76rem/1 var(--mono); padding: 6px 9px; border-radius: 999px; border: 1px solid rgba(127, 224, 214, .35); color: var(--mint); }
.log h2 { margin: 0 0 10px; font: 700 1.4rem/1.2 var(--display); letter-spacing: -.01em; }
.log ul { margin: 10px 0 0; padding-left: 18px; color: #c5cedb; }
.log ul li { display: list-item; padding: 3px 0; border: 0; }
.pill { display: inline-block; font: 500 .7rem/1 var(--mono); padding: 4px 7px; border-radius: 6px; margin-right: 8px; vertical-align: 2px; }
.pill.new { background: rgba(127, 224, 214, .15); color: var(--mint); }
.pill.fix { background: rgba(244, 183, 107, .15); color: var(--amber); }
.pill.perf { background: rgba(169, 199, 255, .15); color: #a9c7ff; }
@media (max-width: 640px) { .log li { grid-template-columns: 1fr; gap: 10px; } }

/* Forms */
.form { display: grid; gap: 18px; padding: clamp(22px, 4vw, 34px); border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(214, 228, 245, .2); background: #070b12; color: var(--fg); font: 400 1rem/1.2 var(--body); }
.field input:focus, .field select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(127, 224, 214, .2); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.err { margin: 0; min-height: 1em; font-size: .85rem; color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: #c5cedb; }
.check input { margin-top: 4px; accent-color: var(--mint); }
.success { display: none; padding: 22px; border-radius: 16px; border: 1px solid rgba(127, 224, 214, .4); background: rgba(127, 224, 214, .08); }
.success.show { display: block; }
.success h2 { margin: 0 0 8px; font: 700 1.4rem/1.2 var(--display); }
.success p { margin: 0; color: #c5cedb; }
.small { font-size: .85rem; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 48px 36px; color: var(--muted); font-size: .9rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot h4 { margin: 0 0 12px; font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #7d889a; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a:hover { color: var(--fg); }
.foot__base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .82rem; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__grid > div:first-child { grid-column: 1 / -1; } }

/* Reveal on scroll (added by JS only, so content is visible without it) */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: rgba(11, 16, 24, .96); }
}

/* Phones and touch screens: frosted-glass blur over the live 3D canvas forces the browser to
   re-blur every frame, which is the main source of lag on mobile. Use solid glass there instead. */
html { -webkit-tap-highlight-color: transparent; }
#stage { touch-action: pan-y; }
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .hero .nav, .hero .btn-glow, .hero .install, .hero .eyebrow { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero .nav { background: rgba(11, 16, 24, .94); }
  .hero .btn-glow { background: rgba(16, 36, 40, .96); }
  .hero .install { background: rgba(11, 16, 24, .94); }
  .hero .in { filter: none; }
}
/* Fallback ring: rotate a pre-rendered layer instead of re-blurring it every frame */
.fallback { will-change: transform; }
@media (hover: none), (pointer: coarse), (max-width: 760px) { .fallback { filter: none; box-shadow: 0 0 60px rgba(127, 224, 214, .3); } }
