/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5 */
:root {
  color-scheme: dark;
  --bg: #060608;
  --paper: #0D0D12;
  --paper-2: #14141B;
  --line: rgba(255,255,255,0.09);
  --ink: #EDEDEF;
  --muted: #A7A7B3;
  --faint: #8E8E9A;
  --accent: #67E8F9;
  --accent-ink: #04222A;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --radius: 10px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --header-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
p, ul, ol, dl, blockquote { max-width: 68ch; }
p, blockquote, li { text-wrap: pretty; }
h1, h2, h3, h4, h5, h6 {
  font-style: normal;
  font-family: var(--font);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 22ch;
}
em, i { font-style: normal; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- accessibility focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: top 150ms ease;
}
.skip-link:focus-visible { top: 12px; }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
  min-width: 0;
}
main { flex: 1 1 auto; display: block; position: relative; z-index: 1; }
section { padding-block: 56px; }
.section-head { margin-bottom: 28px; max-width: 68ch; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.lede { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 62ch; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(6, 6, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.wordmark-mark {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 9px;
  background: url('../img/aios-core-logo.jpg') center/cover no-repeat, var(--paper-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  flex: none;
  overflow: hidden;
  transition: all 0.2s ease;
}
.wordmark:hover .wordmark-mark {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.65);
  transform: scale(1.05);
}
.wordmark:hover { color: var(--ink); }
.brand-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  margin-left: 2px;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.nav-list a {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
  transition: color 180ms ease;
}
.nav-list a:hover { color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-pill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 7px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), width 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
  z-index: 0;
}
.nav-cta { margin-left: 10px; flex: none; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--paper-2); }
.nav-toggle-bars { width: 18px; height: 12px; position: relative; display: block; }
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }

/* ---------- buttons: 8 states ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease, color 150ms ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--accent-ink);
}
.btn-secondary:hover, .btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--muted);
  color: var(--ink);
}
.btn-ghost { background: transparent; }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn[data-state="loading"] {
  cursor: wait;
  opacity: 0.85;
  pointer-events: none;
}
.btn[data-state="error"] { border-color: var(--danger); color: var(--ink); }
.btn[data-state="success"] { border-color: var(--success); color: var(--ink); }
.btn-primary[data-state="error"] { border-color: var(--danger); }
.btn-primary[data-state="success"] { border-color: var(--success); }
.btn-spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--accent-ink);
  border-top-color: transparent;
  animation: btn-spin 700ms linear infinite;
}
.btn-secondary .btn-spinner, .btn-ghost .btn-spinner { border-color: var(--muted); border-top-color: transparent; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-note { font-size: 13px; color: var(--faint); margin-top: 12px; max-width: 52ch; }

/* ---------- hero ---------- */
.hero { padding-block: 72px 48px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 700; margin-bottom: 18px; }
.hero .lede { margin-bottom: 8px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  max-width: none;
}
.hero-meta li {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }

/* ---------- coherence strip ---------- */
.strip { border-bottom: 1px solid var(--line); background: var(--paper); }
.strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.strip-grid li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: baseline;
  min-width: 0;
}
.strip-grid li:last-child { border-bottom: 0; }
.strip-k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.strip-v { color: var(--muted); font-size: 15px; min-width: 0; overflow-wrap: break-word; }

/* ---------- cards / grids ---------- */
.grid-3, .grid-2, .product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  max-width: none;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card:hover { border-color: var(--muted); }
.card-k {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.card h3 { font-size: 19px; font-weight: 650; }
.card p { color: var(--muted); font-size: 15px; }
.card-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.card-link:hover { color: var(--accent); }
.card-link::after { content: "→"; color: var(--accent); }
.principle-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }

/* ---------- manifesto / prose ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul { color: var(--muted); padding-left: 20px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.refusal-list { list-style: none; padding: 0; margin: 18px 0 0; max-width: none; }
.refusal-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 15px;
}
.refusal-list strong { color: var(--ink); display: block; margin-bottom: 2px; }
.commit-list { list-style: none; padding: 0; margin: 18px 0 0; max-width: none; }
.commit-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.commit-list strong { color: var(--ink); display: block; margin-bottom: 4px; }
.commit-list span { color: var(--muted); font-size: 15px; }

/* ---------- split / entry ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 14px; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.panel-accent { border-color: var(--accent); }
.panel h2, .panel h3 { margin-bottom: 10px; }
.panel p { color: var(--muted); font-size: 15px; margin-bottom: 12px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label small { font-weight: 400; color: var(--faint); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 13px;
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.field-error { font-size: 13px; color: var(--danger); display: none; }
.field-error.is-visible { display: block; }
.form-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
  background: var(--paper-2);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { border-color: var(--success); color: var(--ink); }
.form-status.is-error { border-color: var(--danger); color: var(--ink); }

/* ---------- final CTA ---------- */
.final-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 36px 24px;
  text-align: left;
}
.final-cta h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 10px; }
.final-cta p { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 24px; position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-block: 40px 28px;
}
.footer-brand p { color: var(--faint); font-size: 14px; margin-top: 10px; max-width: 36ch; }
.footer-col h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-base {
  border-top: 1px solid var(--line);
  padding-block: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--faint);
}
.footer-base a { color: var(--muted); }

/* ---------- product page bits ---------- */
.hero, .page-hero { position: relative; overflow: hidden; }
.hero .container, .page-hero .container { position: relative; z-index: 1; }
.page-hero { padding-block: 56px 28px; }
.page-hero h1 { font-size: clamp(30px, 5vw, 48px); margin-bottom: 14px; }
.check-list { list-style: none; padding: 0; margin: 16px 0 0; max-width: none; }
.check-list li {
  padding: 12px 0 12px 28px;
  position: relative;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--paper-2);
  white-space: nowrap;
  margin-bottom: 16px;
  max-width: 100%;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.status-dot.is-soon { background: var(--warning); }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-base { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 960px) {
  section { padding-block: 72px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .hero-split .container { grid-template-columns: 1.05fr 0.95fr; gap: 36px; }
  .page-hero-split .container { grid-template-columns: 1.05fr 0.95fr; gap: 36px; }
  .strip-grid { grid-template-columns: repeat(3, 1fr); }
  .strip-grid li { border-bottom: 0; border-left: 1px solid var(--line); padding: 6px 0 6px 24px; grid-template-columns: 1fr; gap: 6px; }
  .strip-grid li:first-child { border-left: 0; padding-left: 0; }
  .final-cta { padding: 48px; }
}
@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 16px;
    gap: 8px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 12px; font-size: 15px; }
  .nav-cta { margin-left: 0; }
  .nav-cta .btn { width: 100%; }
}

/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5 */
/* ---------- ultimate layer: motion tokens, media slots, touch signatures ---------- */
/* All color references use locked tokens only. No new palette. */
:root {
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-d: 500ms;
  --scrim: rgba(6, 6, 8, 0.55);
}

/* ---------- split heroes (best-way contained composition) ---------- */
.hero-split .container, .page-hero-split .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
}
.hero-copy, .page-hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(32px, 5.4vw, 56px); font-weight: 700; margin-bottom: 18px; font-style: normal; }

/* ---------- media frame: poster-first, video enhances ---------- */
.media-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 16 / 9;
}
.media-frame img, .media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame video { opacity: 0; transition: opacity 400ms ease; }
.media-frame.is-playing video { opacity: 1; }
.media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--scrim) 100%);
  pointer-events: none;
}
.media-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--scrim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  pointer-events: none;
}
.media-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--ink);
  background: var(--scrim);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.media-toggle:hover { border-color: var(--muted); }
.media-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.media-toggle:active { transform: translateY(1px); }

/* ---------- scroll reveal (JS-gated, motion-safe) ---------- */
.reveal { opacity: 1; }
.js-motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--reveal-d) ease, transform var(--reveal-d) var(--ease-spring); }
.js-motion .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- magnetic + tilt (pointer/touch, transform-only) ---------- */
.js-motion .magnetic { transition: transform 180ms var(--ease-spring); will-change: transform; }
.js-motion .tilt { transition: transform 200ms var(--ease-spring), border-color 150ms ease; will-change: transform; }

/* ---------- X-ray reveal (computers signature) ---------- */
.xray { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); min-width: 0; }
.xray-layer { display: block; width: 100%; }
.xray-truth { position: absolute; inset: 0; clip-path: circle(0px at var(--xr-x, 50%) var(--xr-y, 50%)); pointer-events: none; }
.xray.is-active .xray-truth { clip-path: circle(120px at var(--xr-x, 50%) var(--xr-y, 50%)); }
.xray-range { width: 100%; margin-top: 10px; accent-color: var(--accent); min-height: 44px; }
.xray-hint { font-size: 13px; color: var(--faint); margin-top: 8px; }

/* ---------- stepper (automations signature) ---------- */
.stepper { display: grid; gap: 12px; }
.stepper-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.stepper-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 20px; }
.stepper-panel[hidden] { display: none; }
.stepper-panel h3 { margin-bottom: 8px; }
.stepper-panel p { color: var(--muted); font-size: 15px; }

/* ---------- permission demo (agents signature) ---------- */
.demo { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 22px; display: grid; gap: 14px; }
.demo-note { font-size: 13px; color: var(--faint); }
.demo-req { border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); padding: 16px; }
.demo-req p { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.demo-req strong { color: var(--ink); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.audit-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: none; }
.audit-log li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper-2);
  overflow-wrap: break-word;
}
.audit-log li[data-verdict="allow"] { border-color: var(--success); }
.audit-log li[data-verdict="deny"] { border-color: var(--danger); }
.audit-log li[data-verdict="allow"]::before { content: "ALLOW · "; color: var(--success); }
.audit-log li[data-verdict="deny"]::before { content: "DENY · "; color: var(--danger); }

/* ---------- scroll progress hairline (philosophy) ---------- */
.scroll-progress { position: sticky; top: var(--header-h); z-index: 40; height: 2px; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- spotlight borders (Linear / Framer style) ---------- */
.card, .panel, .demo, .demo-req {
  position: relative;
}
.spotlight {
  position: relative;
  overflow: hidden;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(103, 232, 249, 0.45),
    transparent 65%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.spotlight:hover::before {
  opacity: 1;
}

/* ---------- ambient particle canvas ---------- */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ---------- view transitions ---------- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 160ms cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}
::view-transition-new(root) {
  animation: 220ms cubic-bezier(0.16, 1, 0.3, 1) both vt-fade-in;
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: scale(0.995); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: scale(1.005); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- analog film grain overlay ---------- */
#film-grain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---------- celestial ambient light beam ---------- */
.ambient-beam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 480px;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(103, 232, 249, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- engineering coordinate grid ---------- */
.tech-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 30%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 30%, #000 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- traveling border beam (Awwwards / Linear) ---------- */
.border-beam {
  position: relative;
  overflow: hidden;
}
.border-beam::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--beam-angle, 0deg) at 50% 50%,
    transparent 0deg,
    transparent 280deg,
    rgba(103, 232, 249, 0.8) 320deg,
    rgba(103, 232, 249, 1) 340deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
  animation: border-beam-spin 8s linear infinite;
}
@property --beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes border-beam-spin {
  to {
    --beam-angle: 360deg;
  }
}

/* ---------- header controls (Cmd+K pill & audio toggle) ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.cmd-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}
.cmd-trigger-btn:hover {
  border-color: rgba(103, 232, 249, 0.4);
  color: var(--ink);
  background: rgba(103, 232, 249, 0.06);
}
.cmd-key {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(103, 232, 249, 0.2);
}
.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
  flex: none;
}
.audio-toggle-btn:hover {
  border-color: rgba(103, 232, 249, 0.4);
  color: var(--accent);
}
.audio-toggle-btn.is-active {
  color: var(--accent);
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(103, 232, 249, 0.08);
}
.audio-toggle-btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- command palette HUD (dialog) ---------- */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 84px 16px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
}
.cmd-palette-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.cmd-palette {
  background: #0D0D12;
  border: 1px solid rgba(103, 232, 249, 0.3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cmd-palette-backdrop.is-open .cmd-palette {
  transform: translateY(0) scale(1);
}
.cmd-search-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.cmd-search-row svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
}
.cmd-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
}
.cmd-search-input::placeholder {
  color: var(--muted);
}
.cmd-esc-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--line);
}
.cmd-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  list-style: none;
  margin: 0;
}
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 100ms ease, color 100ms ease;
}
.cmd-item.is-selected, .cmd-item:hover {
  background: rgba(103, 232, 249, 0.12);
  color: #67E8F9;
}
.cmd-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cmd-item-icon {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}
.cmd-item-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.cmd-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
}
.cmd-shortcuts {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- mission control telemetry ticker ---------- */
.telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  margin-top: 28px;
  background: rgba(13, 13, 18, 0.85);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.telemetry-node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.telemetry-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: telemetry-blink 2s ease-in-out infinite;
}
@keyframes telemetry-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* ---------- copy toast notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #0D0D12;
  border: 1px solid rgba(103, 232, 249, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
  pointer-events: auto;
}
.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .media-frame video { display: none; }
  .media-frame img { opacity: 1 !important; }
  .xray-truth { clip-path: none !important; }
  .scroll-progress { display: none; }
  .border-beam::after { display: none; }
  .telemetry-pulse { animation: none; }
  #film-grain { opacity: 0.015; }
}
