/* Landing-only components: aurora hero, live pipeline sandbox, bento, tabs, timeline, configurator, command palette.
   Everything is class-driven (CSP forbids inline styles); dynamic values go through CSS custom properties set from JS. */

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: .08s; }
.js .reveal[data-d="2"] { transition-delay: .16s; }
.js .reveal[data-d="3"] { transition-delay: .24s; }

/* Spotlight cards: radial light follows the pointer */
.glow { position: relative; isolation: isolate; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; transition: border-color .25s, transform .25s; }
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
}
.glow:hover { border-color: var(--line-strong); }
.glow:hover::before { opacity: 1; }

/* Hero */
.home-hero { position: relative; padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); overflow: clip; }
.home-hero::before, .home-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: -1; }
.home-hero::before { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%); animation: float-a 16s ease-in-out infinite; }
.home-hero::after { width: 460px; height: 460px; right: -100px; top: 40px; background: radial-gradient(circle, color-mix(in srgb, var(--aurora) 60%, transparent), transparent 70%); animation: float-b 19s ease-in-out infinite; }
@keyframes float-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 40px); } }
@keyframes float-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 50px); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 10px; width: fit-content; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 14px 6px 10px; font-size: .85rem; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--aurora); box-shadow: 0 0 0 0 var(--aurora); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--aurora) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 16px; height: 16px; color: var(--aurora); flex: none; }

/* Pipeline sandbox */
.sandbox { position: relative; border-radius: 22px; padding: 1px; background: conic-gradient(from var(--angle), transparent 0 55%, var(--accent), var(--aurora), transparent 90%); animation: spin 7s linear infinite; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
@keyframes spin { to { --angle: 360deg; } }
.sandbox-in { border-radius: 21px; background: color-mix(in srgb, var(--surface-strong) 92%, transparent); padding: clamp(14px, 2vw, 22px); display: grid; gap: 14px; box-shadow: var(--shadow); }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sb-title { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.sb-title .dots { display: inline-flex; gap: 5px; }
.sb-title .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 .86rem var(--font-body); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; min-height: 38px; }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: linear-gradient(100deg, var(--accent), var(--aurora)); color: var(--accent-ink); border-color: transparent; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.col { min-width: 0; display: grid; gap: 8px; align-content: start; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 220px; }
.col h4 { margin: 0; font: 500 .72rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.col:last-child h4 { color: var(--aurora); }
.card-deal { text-align: left; border: 1px solid var(--line); background: var(--surface-strong); color: var(--ink); border-radius: 10px; padding: 8px 9px; font: inherit; font-size: .76rem; line-height: 1.3; display: grid; gap: 3px; cursor: pointer; min-width: 0; overflow-wrap: anywhere; animation: enter .45s cubic-bezier(.2,.8,.2,1); transition: border-color .2s, transform .2s; }
.card-deal:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-deal b { font-weight: 650; overflow-wrap: anywhere; }
.card-deal small { color: var(--muted); font-family: var(--font-mono); font-size: .68rem; }
.card-deal.won { border-color: color-mix(in srgb, var(--aurora) 60%, transparent); background: var(--signal-soft); cursor: default; }
@keyframes enter { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
.robot-log { background: color-mix(in srgb, #000 55%, var(--surface-strong)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 500 .74rem/1.55 var(--font-mono); color: var(--muted); height: 118px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
:root[data-theme="light"] .robot-log { background: #0f1c2a; color: #b7c6d8; }
.robot-log p { max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: enter .3s ease-out; }
.robot-log .ok { color: var(--aurora); }
.robot-log .hi { color: var(--accent); }
.sb-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); }
.sb-foot b { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
.sb-hint { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .col { min-height: 150px; } }

/* Marquee of channels */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); -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; gap: 14px; width: max-content; padding-block: 16px; animation: scroll-x 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { white-space: nowrap; font-family: var(--font-mono); font-size: .86rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; background: var(--surface); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* Section heads */
.head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 780px; }

/* Bento services */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.bento > article { padding: clamp(20px, 2.4vw, 30px); display: grid; gap: 12px; align-content: start; }
.bento .s2 { grid-column: span 2; } .bento .s3 { grid-column: span 3; } .bento .s4 { grid-column: span 4; }
@media (max-width: 980px) { .bento .s2, .bento .s3, .bento .s4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento > article { grid-column: 1 / -1 !important; } }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); }
.ico svg { width: 22px; height: 22px; }
.bento p { color: var(--muted); font-size: .98rem; }
.bento ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.bento li { display: flex; gap: 8px; }
.bento li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); }
.bento details { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: .92rem; }
.bento summary { cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.bento summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
.bento details[open] summary::after { content: "−"; }
.bento details p { margin-top: 8px; font-size: .92rem; }
.tag-new { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--aurora); background: var(--signal-soft); border-radius: 6px; padding: 2px 8px; width: fit-content; }

/* Tabs: for whom */
.tabs { display: grid; gap: 22px; }
.tablist { display: flex; flex-wrap: wrap; gap: 8px; }
.tabpanel { display: none; }
.tabpanel.on { display: grid; animation: enter .4s ease-out; }
.scenario { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .scenario { grid-template-columns: minmax(0, 1fr); } }
.scenario > div { padding: 22px; display: grid; gap: 10px; align-content: start; }
.scenario h3 { font-size: 1.05rem; }
.scenario .eyebrow { color: var(--muted); }
.scenario p { color: var(--muted); font-size: .96rem; }
.scenario .res { border-color: color-mix(in srgb, var(--aurora) 45%, var(--line)); }
.scenario .res .eyebrow { color: var(--aurora); }

/* Timeline */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 38px; list-style: none; margin: 0; --tl: 0; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline::after { content: ""; position: absolute; left: 13px; top: 6px; width: 2px; height: calc((100% - 12px) * var(--tl)); background: linear-gradient(var(--accent), var(--aurora)); border-radius: 2px; box-shadow: 0 0 14px var(--glow); }
.timeline li { position: relative; padding: 18px 20px; display: grid; gap: 8px; }
.timeline li::before { content: attr(data-n); position: absolute; left: -38px; top: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-strong); color: var(--accent); font: 500 .72rem var(--font-mono); }
.timeline li.done::before { background: linear-gradient(135deg, var(--accent), var(--aurora)); color: var(--accent-ink); border-color: transparent; }
.timeline h3 { font-size: 1.15rem; }
.timeline p { color: var(--muted); font-size: .96rem; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .86rem; color: var(--muted); }
.tl-meta b { color: var(--ink); font-weight: 600; }
.process-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.process-grid > .stack { position: sticky; top: 100px; }
@media (max-width: 900px) { .process-grid { grid-template-columns: minmax(0, 1fr); } .process-grid > .stack { position: static; } }

/* AI block */
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .ai-grid { grid-template-columns: minmax(0, 1fr); } }
.ai-grid > div { padding: 22px; display: grid; gap: 8px; align-content: start; }
.ai-grid p { color: var(--muted); font-size: .96rem; }
.callout { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 16px 20px; color: var(--muted); font-size: .94rem; background: var(--surface); }

/* Configurator */
.cfg { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .cfg { grid-template-columns: minmax(0, 1fr); } }
.cfg > div { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 16px; align-content: start; }
.cfg fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.cfg legend { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: .9rem; min-height: 40px; transition: border-color .2s, background .2s; }
.opt input:checked + span { background: linear-gradient(100deg, var(--accent), var(--aurora)); color: var(--accent-ink); border-color: transparent; font-weight: 650; }
.opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.opt input:not(:checked):hover + span { border-color: var(--accent); }
.range { display: grid; gap: 8px; }
.range input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.range output { font-family: var(--font-mono); color: var(--accent); }
.summary { white-space: pre-wrap; font: 500 .84rem/1.6 var(--font-mono); color: var(--ink); background: color-mix(in srgb, #000 40%, var(--surface-strong)); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-height: 190px; overflow-wrap: anywhere; }
:root[data-theme="light"] .summary { background: #0f1c2a; color: #dbe6f2; }
.stages-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.stages-bar span { font-family: var(--font-mono); font-size: .72rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.stages-bar span.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Tariff teaser */
.teaser { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: clamp(22px, 3vw, 38px); }
@media (max-width: 860px) { .teaser { grid-template-columns: minmax(0, 1fr); } }
.teaser ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.teaser li { display: flex; gap: 10px; color: var(--muted); }
.teaser li svg { width: 18px; height: 18px; color: var(--aurora); flex: none; margin-top: 4px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 4px 20px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; color: var(--muted); }

/* About + contacts */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.panel { padding: clamp(18px, 2.4vw, 28px); }
.contact-list { display: grid; gap: 4px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row small { display: block; color: var(--muted); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.contact-row a.big { font-size: 1.3rem; font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-row a.big:hover { color: var(--accent); }
.copy { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 10px; min-height: 40px; padding: 6px 14px; font: 600 .86rem var(--font-body); cursor: pointer; transition: border-color .2s, background .2s; }
.copy:hover { border-color: var(--accent); background: var(--accent-soft); }
.copy.done { border-color: var(--aurora); color: var(--aurora); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--surface-strong); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 18px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 60; box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Command palette */
dialog.palette { border: 1px solid var(--line-strong); border-radius: 18px; padding: 0; background: var(--surface-strong); color: var(--ink); width: min(620px, calc(100% - 32px)); max-height: min(560px, 80vh); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .75); margin-top: 12vh; overflow: hidden; }
dialog.palette::backdrop { background: rgba(2, 5, 12, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pal-in { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: min(560px, 80vh); }
.pal-in input { width: 100%; font: 500 1.05rem var(--font-body); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; outline: none; }
.pal-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.pal-list li button { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 11px 14px; border-radius: 10px; cursor: pointer; }
.pal-list li button small { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; }
.pal-list li button[aria-selected="true"], .pal-list li button:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pal-empty { padding: 20px; color: var(--muted); }

/* Back to top / floating call on mobile */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: none; }
@media (max-width: 760px) { .fab { display: inline-flex; box-shadow: 0 14px 34px -8px var(--glow); } }

/* Automation flow nodes */
.flow { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; counter-reset: n; }
.node { padding: 18px; display: grid; gap: 8px; align-content: start; position: relative; overflow: visible; }
.node b { font-weight: 650; line-height: 1.3; }
.node:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -27px; width: 26px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--aurora)); box-shadow: 0 0 10px var(--glow); }
.node:not(:last-child)::before { content: ""; position: absolute; top: calc(50% - 4px); right: -29px; width: 8px; height: 8px; border-top: 2px solid var(--aurora); border-right: 2px solid var(--aurora); transform: rotate(45deg); background: none; opacity: 1; z-index: 2; }
.flow .eyebrow { color: var(--muted); }
.flow .node:first-child .eyebrow { color: var(--accent); }
@media (max-width: 900px) { .flow { grid-template-columns: minmax(0, 1fr); gap: 22px; } .node:not(:last-child)::after { top: auto; bottom: -23px; right: auto; left: 50%; width: 2px; height: 22px; } .node:not(:last-child)::before { top: auto; bottom: -25px; right: auto; left: calc(50% - 4px); transform: rotate(135deg); } }
