/* Components: header, buttons, cards, lists, pricing, forms, docs, footer. */

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(8, 11, 16, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: background var(--t), border-color var(--t), box-shadow var(--t); }
.site-header.is-scrolled { background: rgba(8, 11, 16, .88); border-bottom-color: var(--border); box-shadow: 0 12px 32px -20px rgba(0, 0, 0, .8); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: var(--s-2); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font: 800 1.05rem/1 var(--font-head); letter-spacing: .14em; }
.brand__logo { height: 34px; width: auto; }
.footer-brand .brand__logo { height: 38px; }
.site-nav > ul { display: flex; align-items: center; gap: var(--s-1); }
.site-nav a, .menu-btn { text-decoration: none; color: var(--muted); padding: .5rem .9rem; border-radius: var(--r-sm); font-size: 1rem; transition: color var(--t); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.site-nav a:hover, .menu-btn:hover, .site-nav a[aria-current] { color: var(--text); }
.menu-btn .icon { transform: rotate(90deg); transition: transform var(--t) var(--ease); }
.has-menu { position: relative; }
.has-menu::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; } /* hover bridge to the menu */
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; padding: var(--s-1); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s 220ms; }
.has-menu:hover .menu, .has-menu:focus-within .menu, .menu-btn[aria-expanded="true"] + .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.has-menu:hover .menu-btn .icon, .menu-btn[aria-expanded="true"] .icon { transform: rotate(90deg) translateX(2px); }
.menu a { display: flex; align-items: center; gap: .8rem; padding: .7rem; transition: background var(--t); }
.menu a:hover { background: rgba(255, 255, 255, .05); }
.menu small { display: block; color: var(--muted); font-size: var(--fs-small); }
.menu strong { display: block; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--border-strong); border-radius: var(--r-sm); cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: transform var(--t) var(--ease); }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 879px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--s-2) var(--s-3) var(--s-3); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav a, .menu-btn { padding: .8rem .5rem; width: 100%; }
  .menu-btn .icon { margin-left: auto; }
  .menu { position: static; opacity: 1; visibility: visible; transform: none; transition: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 var(--s-2); }
  .menu-btn { display: none; }
  .nav-cta .btn { margin-top: var(--s-1); width: 100%; }
}
@media (scripting: none) and (max-width: 879px) { .site-nav { display: block; position: static; } .nav-toggle { display: none; } .header-row { flex-wrap: wrap; } }

/* ---------- Buttons ---------- */
/* Hover lift uses `translate`, so it never fights GSAP's `transform` tweens. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: var(--r-sm); font: 600 1rem/1.2 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: translate var(--t) var(--ease), background-color var(--t), border-color var(--t), box-shadow var(--t), color var(--t); }
.btn .icon { transition: translate var(--t) var(--ease); }
.btn:hover .icon { translate: 3px 0; }
.btn-sm { padding: .55rem 1rem; font-size: .95rem; }
.btn-primary { background: var(--p1); color: var(--p-on); }
.site-nav .btn-primary { background: var(--p1); color: var(--p-on); padding: .55rem 1rem; }
.site-nav .btn-primary:hover { color: var(--p-on); } /* beats .site-nav a:hover */
.btn-primary:hover { translate: 0 -1px; box-shadow: 0 10px 28px -10px var(--p1); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--p1); background: rgba(255, 255, 255, .03); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4.5rem, 11vw, 9rem) var(--section-space); }
/* Glow layer is oversized and faded at the bottom, so the section edge never shows a hard cut. */
.hero::before { content: ''; position: absolute; inset: -10% -5% 0; pointer-events: none;
  background: radial-gradient(circle at 12% 30%, rgba(155, 232, 0, .13), transparent 42%), radial-gradient(circle at 88% 20%, rgba(65, 54, 255, .2), transparent 42%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000, transparent 75%); }
.hero > .container { position: relative; z-index: 1; display: grid; gap: var(--s-3); }
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: hero-drift 22s ease-in-out infinite alternate; will-change: transform; }
}
@keyframes hero-drift { to { transform: translate3d(2.5%, 3%, 0) scale(1.06); } }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 34rem; }
.hero--center > .container { justify-items: center; text-align: center; }
.hero--center h1 { max-width: 18ch; }
.hero--compact { padding-bottom: var(--s-4); }

/* ---------- Product cards ---------- */
.product-card { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: grid; gap: var(--s-3); align-content: start; position: relative; isolation: isolate; transition: border-color var(--t), box-shadow var(--t), translate var(--t) var(--ease); }
.product-card:hover { border-color: color-mix(in srgb, var(--p1) 45%, transparent); box-shadow: 0 0 60px -18px var(--p1); translate: 0 -2px; }

/* Pointer spotlight (position set by motion.js; invisible without it). */
.product-card::after, .feature-card::after, .price-card::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 400ms var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--p1) 9%, transparent), transparent 60%); }
.product-card:hover::after, .feature-card:hover::after, .price-card:hover::after { opacity: 1; }
.product-card__head { display: flex; align-items: center; gap: var(--s-2); }
.product-card__lead { font: 600 1.35rem/1.3 var(--font-head); color: var(--text); }
.product-card .btn { justify-self: start; }

.feature-card { padding: var(--s-4) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); display: grid; gap: var(--s-2); align-content: start; position: relative; isolation: isolate; transition: border-color var(--t); }
.feature-card:hover { border-color: var(--border-strong); }
.feature-card__ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--p1); background: var(--p-glow); border: 1px solid color-mix(in srgb, var(--p1) 25%, transparent); }
.feature-card h3 { font-size: 1.3rem; }
.feature-card p { font-size: 1rem; }

.tick-list { display: grid; gap: .6rem; }
.tick-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text); font-size: 1rem; }
.tick-list .icon { color: var(--p1); margin-top: calc((1.65em - 16px) / 2); flex: none; } /* centred on the first text line */
.dot-list { display: grid; gap: .45rem; }
.dot-list li { font-size: 1rem; color: var(--muted); padding-left: 1.1rem; position: relative; }
.dot-list li::before { content: ''; position: absolute; left: 0; top: calc(.825em - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--p1); }

/* ---------- Relationship diagram ---------- */
.relation { display: grid; gap: var(--s-4); justify-items: center; }
.relation__root { padding: .7rem 1.6rem; border: 1px solid var(--border-strong); border-radius: 999px; font: 800 1rem var(--font-head); letter-spacing: .16em; background: var(--surface-2); position: relative; z-index: 1; }
/* Wires root → branches. Branch centres in a 2-col grid: 25% ∓ gap/4. */
.relation__wire { --gap: var(--s-3); position: relative; width: min(100%, 760px); height: 56px; margin-block: calc(-1 * var(--s-4)); }
.relation__wire span { position: absolute; display: block; }
.relation__stem { left: 50%; top: 0; width: 1px; height: 50%; transform-origin: top; background: var(--border-strong); }
.relation__bar { top: 50%; height: 1px; left: calc(25% - var(--gap) / 4); right: calc(25% - var(--gap) / 4); background: linear-gradient(90deg, var(--sweep-1), var(--sentinel-1)); opacity: .7; }
.relation__drop { top: 50%; width: 1px; height: 50%; transform-origin: top; }
.relation__drop--a { left: calc(25% - var(--gap) / 4); background: var(--sweep-1); opacity: .7; }
.relation__drop--b { right: calc(25% - var(--gap) / 4); background: var(--sentinel-1); opacity: .7; }
@media (max-width: 719px) { .relation__bar, .relation__drop { display: none; } .relation__stem { height: 100%; } }
.relation__branches { display: grid; gap: var(--s-3); width: min(100%, 760px); position: relative; } /* same width as .relation__wire */
.relation__branch { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-align: center; display: grid; gap: .3rem; }
.relation__branch h3 { color: var(--p1); letter-spacing: .1em; text-transform: uppercase; font-size: 1.1rem; }
.relation__branch p { margin-inline: auto; font-size: 1rem; }
.relation__branch b { display: block; color: var(--text); font-weight: 500; font-size: .95rem; }
@media (min-width: 720px) { .relation__branches { grid-template-columns: 1fr 1fr; } }

/* ---------- Product picker (homepage CTA) ---------- */
.pick { display: grid; gap: var(--s-2); width: min(100%, 640px); margin-top: var(--s-1); }
@media (min-width: 640px) { .pick { grid-template-columns: 1fr 1fr; } }
.pick__item { display: flex; align-items: center; gap: 1rem; padding: 1.125rem 1.25rem; border-radius: var(--r-md); text-align: left; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--p1) 28%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 11%, var(--surface)), var(--surface) 70%);
  transition: border-color var(--t), box-shadow var(--t), translate var(--t) var(--ease); }
.pick__item:hover { border-color: color-mix(in srgb, var(--p1) 60%, transparent); box-shadow: 0 0 44px -14px var(--p1); translate: 0 -2px; }
.pick__item .mark { width: 48px; height: 48px; flex: none; }
.pick__item strong { display: block; font: 700 1.1rem/1.3 var(--font-head); }
.pick__item small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.pick__item > .icon { margin-left: auto; flex: none; color: var(--p1); transition: translate var(--t) var(--ease); }
.pick__item:hover > .icon { translate: 3px 0; }

/* ---------- Principles ---------- */
.principle { padding-top: var(--s-3); display: grid; gap: .6rem; align-content: start; position: relative; }
.principle::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--text), var(--border-strong) 40%); opacity: .5; transform-origin: left; transition: transform 1.1s var(--ease) .15s; }
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .reveal.principle:not(.is-visible)::before, .motion-fallback .reveal.principle:not(.is-visible)::before { transform: scaleX(0); }
}
.principle h3 { font-size: 1.2rem; }
.principle p { font-size: 1rem; }

/* ---------- Sentinel flow ---------- */
.flow { display: grid; gap: var(--s-2); counter-reset: step; padding: 0; list-style: none; }
.flow li { padding: var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); display: grid; gap: .3rem; position: relative; }
.flow li strong { font: 800 .95rem var(--font-head); letter-spacing: .14em; color: var(--p1); }
.flow li span { color: var(--muted); font-size: .95rem; }
@media (min-width: 1024px) {
  .flow { grid-template-columns: repeat(5, 1fr); }
  .flow li:not(:last-child)::after { content: ''; position: absolute; right: -13px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--p1); border-right: 2px solid var(--p1); transform: translateY(-50%) rotate(45deg); }
}
@media (max-width: 1023px) { .flow li:not(:last-child)::after { content: ''; position: absolute; left: 50%; bottom: -13px; width: 10px; height: 10px; border-bottom: 2px solid var(--p1); border-right: 2px solid var(--p1); transform: translateX(-50%) rotate(45deg); } }

.callout { padding: var(--s-3); border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--p1) 35%, transparent); background: var(--p-glow); display: flex; gap: var(--s-2); align-items: flex-start; }
.callout .icon { color: var(--p1); flex: none; margin-top: .2rem; }
.callout p { color: var(--text); font-size: 1.05rem; }
.split { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* ---------- Scanner mock ---------- */
.scanner { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); overflow: hidden; font-size: 1rem; position: relative; }
.scanner__beam { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; opacity: 0;
  background: linear-gradient(transparent, color-mix(in srgb, var(--p1) 14%, transparent) 85%, color-mix(in srgb, var(--p1) 60%, transparent)); }
.scanner__bar { padding: .7rem var(--s-3); border-bottom: 1px solid var(--border); font: 500 .8rem var(--font-mono); color: var(--muted); }
.scanner li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: .9rem var(--s-3); border-bottom: 1px solid var(--border); }
.scanner li:last-child { border-bottom: 0; }
.pill { font: 700 .72rem/1 var(--font-body); letter-spacing: .08em; padding: .4rem .65rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill--ok { color: var(--ok); } .pill--warn { color: var(--warn); } .pill--bad { color: var(--bad); }

/* ---------- Pricing ---------- */
.tabs { display: inline-flex; padding: 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); gap: 4px; position: relative; isolation: isolate; }
.tabs button { border: 0; background: none; padding: .6rem 1.4rem; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; line-height: 1.2; transition: color var(--t); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
/* Sliding indicator (motion.js); buttons drop their own background when it exists. */
.tabs__ind { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--text); pointer-events: none; }
.tabs--ind button[aria-selected="true"] { background: none; }

.price-panel { margin-top: var(--s-6); }
.price-panel[hidden] { display: none; }
.price-panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem var(--s-2); margin-bottom: var(--s-3); }
.price-panel__head h2 { font-size: 1.6rem; line-height: 1.2; }
.price-panel__head span { color: var(--muted); font-size: .8125rem; line-height: 1; border: 1px solid var(--border-strong); padding: .45rem .75rem; border-radius: 999px; }

.price-card { position: relative; isolation: isolate; padding: var(--s-4); background: linear-gradient(180deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: var(--s-3); transition: border-color var(--t), translate var(--t) var(--ease); }
.price-card:hover { border-color: color-mix(in srgb, var(--p1) 35%, transparent); translate: 0 -2px; }
.price-card h3 { font-size: 1.375rem; line-height: 1.2; }
.prices { display: grid; border-block: 1px solid var(--border); }
.prices li { display: grid; gap: .5rem; padding-block: 1.125rem; }
.prices li + li { border-top: 1px solid var(--border); }
.prices__label { font: 600 .75rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prices__value { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; }
.price__amount { font: 800 2.25rem/1 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -.03em; color: var(--text); }
.prices small { color: var(--muted); font-size: .9375rem; line-height: 1; }
.price-card .tick-list { flex: 1; align-content: start; }
.price-card .btn { width: 100%; }
.price-card__buy { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.price-card__buy .btn { padding-inline: .75rem; }
.price-panel__head--sub { margin-top: var(--s-8); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-2); max-width: 560px; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 500; font-size: 1rem; }
.field input, .field textarea { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: .8rem 1rem; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.notice { padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); border: 1px solid; font-size: 1rem; }
.notice--ok { color: var(--ok); } .notice--err { color: var(--bad); }
.notice[hidden] { display: none; }

/* ---------- Docs ---------- */
.docs { display: grid; gap: var(--s-6); padding-block: var(--s-8); }
.docs__nav { font-size: 1rem; }
.docs__nav h2 { font: 600 .8rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-1); }
.docs__nav a { display: block; padding: .35rem 0; color: var(--muted); text-decoration: none; }
.docs__nav a:hover { color: var(--p1); }
.docs__body { min-width: 0; }
.docs__body section { padding-block: var(--s-4); border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.docs__body h1 { margin-bottom: var(--s-3); }
.docs__body h2 { font-size: 1.6rem; margin-bottom: var(--s-2); }
.docs__body p + p, .docs__body p + ul { margin-top: var(--s-2); }
.docs__body ul { margin-top: var(--s-2); max-width: var(--measure); }
.badge { display: inline-block; font: 600 .75rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .6rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); margin-top: var(--s-2); }
@media (min-width: 900px) {
  .docs { grid-template-columns: 240px 1fr; }
  .docs__nav { position: sticky; top: 100px; align-self: start; }
}
.prose { display: grid; gap: var(--s-2); max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; margin-top: var(--s-3); }
.todo { color: var(--warn); font-family: var(--font-mono); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-top: var(--s-8); }
.footer-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); padding-bottom: var(--s-6); }
.footer-brand { grid-column: 1 / -1; display: grid; gap: var(--s-2); }
.footer-brand p { font-size: 1rem; }
.site-footer h2 { font: 600 .8rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.site-footer li a { display: inline-block; padding: .25rem 0; color: var(--text); text-decoration: none; font-size: 1rem; }
.site-footer li a:hover { color: var(--p1); }
.footer-base { padding-block: var(--s-3); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-small); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
