/* ── Landing ──────────────────────────────────────── */
#machine { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; transition: opacity .8s ease; }
.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 70% at 70% 45%, transparent 40%, rgba(3, 5, 10, .55) 75%, rgba(3, 5, 10, .95) 100%),
    linear-gradient(180deg, transparent 70%, rgba(3, 5, 10, .6));
}
body.faded #machine { opacity: .16; }
main { position: relative; z-index: 1; }

.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg); transition: opacity .6s ease, visibility .6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader img { animation: loaderSpin 2.4s cubic-bezier(.6, 0, .4, 1) infinite; border-radius: 14px; }
.loader-text { font-size: 12px; letter-spacing: .3em; color: var(--muted); }
.loader-bar { width: 180px; height: 2px; background: var(--line2); overflow: hidden; border-radius: 2px; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--chrome); transition: width .2s; }
@keyframes loaderSpin { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(360deg); } }

/* Hero */
.hero {
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative;
  padding: calc(var(--header-h) + 30px) clamp(20px, 6vw, 90px) 80px;
}
.hero-copy { max-width: 560px; }
.hero-title {
  margin: 14px 0 6px; font: 700 clamp(84px, 14vw, 196px)/.86 var(--display); letter-spacing: .04em;
  filter: drop-shadow(0 12px 40px rgba(92, 225, 255, .14));
}
.hero-sub { font: 600 clamp(20px, 2.3vw, 27px)/1.25 var(--display); margin: 16px 0 12px; letter-spacing: .01em; }
.hero-sub em { font-style: normal; color: var(--accent); }
.hero-lead { color: var(--muted); font-size: 16.5px; max-width: 470px; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 40px; }
.hero-stats div { display: grid; gap: 3px; }
.hero-stats b { font-size: 22px; font-weight: 500; }
.hero-stats span { color: var(--dim); font-size: 12.5px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-size: 11px; letter-spacing: .26em;
  color: var(--muted); text-transform: uppercase; display: grid; justify-items: center; gap: 10px;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(180deg, transparent, var(--accent)); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.ready .reveal { opacity: 1; transform: none; }
.ready .reveal:nth-child(2) { transition-delay: .08s; }
.ready .reveal:nth-child(3) { transition-delay: .16s; }
.ready .reveal:nth-child(4) { transition-delay: .24s; }
.ready .reveal:nth-child(5) { transition-delay: .32s; }
.ready .reveal:nth-child(6) { transition-delay: .4s; }

/* Systems */
.systems { position: relative; }
.sys-rail {
  position: fixed; left: clamp(14px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); z-index: 5;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
body.in-systems .sys-rail { opacity: 1; pointer-events: auto; }
.rail-head, .rail-hint { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.rail-hint { margin-top: 14px; max-width: 120px; line-height: 1.7; }
.sys-rail ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line2); }
.sys-rail button {
  all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 7px 12px; margin-left: -1px;
  border-left: 2px solid transparent; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--dim); transition: color .25s, border-color .25s;
}
.sys-rail button i { font-style: normal; color: var(--dim); font-size: 10px; }
.sys-rail button:hover { color: var(--text); }
.sys-rail button.on { color: var(--text); border-left-color: var(--accent); }
.sys-rail button.on i { color: var(--accent); }

.sys { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0 clamp(20px, 6vw, 90px) 0 clamp(170px, 17vw, 250px); }
.sys-card {
  max-width: 430px; padding: 26px 26px 24px; border-radius: 18px; border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(10, 15, 24, .78), rgba(6, 10, 17, .7));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: .25; transform: translateY(18px); transition: opacity .5s, transform .5s, border-color .5s;
}
.sys.on .sys-card { opacity: 1; transform: none; border-color: rgba(92, 225, 255, .35); }
.sys-code { font: 500 12px/1 var(--mono); letter-spacing: .24em; color: var(--accent); }
.sys-card h3 { font: 700 34px/1 var(--display); letter-spacing: .08em; margin: 12px 0 4px; }
.sys-card h4 { font: 600 15px/1.3 var(--sans); color: var(--muted); margin: 0 0 14px; }
.sys-card p { color: #c3ccd9; margin: 0 0 16px; }
.sys-stat { display: inline-flex; gap: 8px; align-items: center; font: 500 12px/1 var(--mono); color: var(--text); padding: 8px 10px; border-radius: 8px; background: rgba(92, 225, 255, .07); border: 1px solid rgba(92, 225, 255, .2); }

/* Bands */
.band { position: relative; padding: clamp(80px, 11vw, 140px) 0; background: linear-gradient(180deg, rgba(3, 5, 10, .86), rgba(3, 5, 10, .94)); border-top: 1px solid var(--line); }
.h2 { font: 700 clamp(34px, 4.6vw, 58px)/1.02 var(--display); letter-spacing: .02em; margin: 14px 0 18px; }
.h2.sm { font-size: clamp(28px, 3.4vw, 42px); }
.h3 { font: 700 26px/1.1 var(--display); margin: 10px 0 14px; letter-spacing: .03em; }
.lead { color: var(--muted); font-size: 16.5px; max-width: 560px; margin: 0 0 24px; }
.row-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

.keys-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 15, 24, .7); display: grid; gap: 4px; position: relative; padding-left: 50px; }
.ticks li::before { content: ''; position: absolute; left: 20px; top: 22px; width: 14px; height: 14px; border-radius: 4px; background: var(--chrome); box-shadow: 0 0 18px rgba(92, 225, 255, .35); }
.ticks b { font-weight: 600; }
.ticks span { color: var(--muted); font-size: 14px; }

.stroke-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: s; }
.stroke-list li { padding: 22px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 15, 24, .7); display: grid; gap: 8px; align-content: start; position: relative; overflow: hidden; }
.stroke-list li::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--chrome); opacity: .5; transform: scaleX(0); transform-origin: left; transition: transform .7s; }
.stroke-list li.seen::after { transform: scaleX(1); }
.stroke-list i { font-style: normal; color: var(--accent); font-size: 12px; letter-spacing: .2em; }
.stroke-list b { font: 700 20px/1 var(--display); letter-spacing: .05em; }
.stroke-list span { color: var(--muted); font-size: 14px; }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.examples > span { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line2); color: var(--muted); }
.demo-chat { padding: 0; overflow: hidden; min-height: 400px; }
.dc-top { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; letter-spacing: .1em; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dc-body { padding: 18px; display: grid; gap: 12px; align-content: start; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; animation: toastIn .3s ease-out; }
.bubble.me { justify-self: end; background: var(--panel2); border: 1px solid var(--line2); border-bottom-right-radius: 4px; }
.bubble.ai { justify-self: start; background: rgba(92, 225, 255, .07); border: 1px solid rgba(92, 225, 255, .22); border-bottom-left-radius: 4px; }
.typing::after { content: '▍'; animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

.rw-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.rw-big { display: grid; justify-items: center; gap: 4px; }
.rw-big b { font: 700 clamp(110px, 16vw, 220px)/.9 var(--display); }
.rw-big span { color: var(--muted); letter-spacing: .24em; text-transform: uppercase; font-size: 12px; }

.ca-box { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 30px; }
.ca-full { display: block; font-size: clamp(12px, 1.6vw, 16px); color: var(--text); word-break: break-all; padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.ca-actions { display: flex; gap: 10px; }
a.disabled { opacity: .45; pointer-events: none; }

@media (max-width: 980px) {
  .keys-grid, .demo-grid, .rw-grid { grid-template-columns: 1fr; gap: 34px; }
  .stroke-list { grid-template-columns: 1fr 1fr; }
  .rw-big { justify-items: start; }
}
@media (max-width: 760px) {
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .hero-copy { background: linear-gradient(180deg, rgba(3, 5, 10, 0), rgba(3, 5, 10, .85) 56px); padding-top: 40px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .hero-stats { gap: 18px; }
  .sys { align-items: flex-end; padding: 0 16px 9vh; }
  .sys-card { max-width: none; }
  .sys-rail { top: auto; bottom: 0; left: 0; right: 0; transform: none; background: rgba(3, 5, 10, .9); border-top: 1px solid var(--line); padding: 8px 10px; backdrop-filter: blur(10px); }
  .rail-head, .rail-hint { display: none; }
  .sys-rail ol { display: flex; overflow-x: auto; border-left: 0; margin: 0; gap: 4px; scrollbar-width: none; }
  .sys-rail button { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 10px; font-size: 11px; }
  .sys-rail button.on { border-bottom-color: var(--accent); }
  .sys-rail button i { display: none; }
  .stroke-list { grid-template-columns: 1fr; }
  .ca-actions { width: 100%; }
  .ca-actions .btn { flex: 1; }
}
