/* SwernAI website. Brand: crimson #D92332, charcoal #2B2B2E, white, on #0E0E10. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #0e0e10;
  --bg-2: #121215;
  --raised: #16161a;
  --line: #26262d;
  --line-2: #34343d;
  --text: #f4f4f6;
  --muted: #a3a3ae;
  --faint: #8a8a96;
  --crimson: #d92332;
  --crimson-hi: #ff4d5c;
  --crimson-glow: rgb(217 35 50 / 0.45);
  --charcoal: #2b2b2e;
  --radius: 18px;
  --wrap: 1160px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson-hi); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--crimson); color: #fff; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 16px; }
.btn-primary { background: var(--crimson); color: #fff; box-shadow: 0 0 0 0 var(--crimson-glow), 0 8px 30px -8px var(--crimson-glow); }
.btn-primary:hover { background: #e52b3b; transform: translateY(-1px); box-shadow: 0 0 0 6px rgb(217 35 50 / .15), 0 12px 40px -8px var(--crimson-glow); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgb(255 255 255 / .02); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: #55555f; background: rgb(255 255 255 / .06); transform: translateY(-1px); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgb(14 14 16 / .72); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.nav-inner { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; height: 76px; display: flex; align-items: center; gap: 28px; }
/* Header and footer use the same lockup at the same size, on the same left edge as the content. */
.nav-brand, .footer-brand { display: flex; align-items: center; flex: none; }
.nav-brand img, .footer-brand img { height: 32px; width: auto; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; padding: 110px 0 120px; }
.hero::before { /* radial crimson haze */
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -2;
  background: radial-gradient(60% 50% at 50% 42%, rgb(217 35 50 / .22), transparent 70%),
              radial-gradient(40% 30% at 50% 45%, rgb(255 255 255 / .05), transparent 70%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: -1;
  background-image:
    linear-gradient(rgb(217 35 50 / .28) 1px, transparent 1px),
    linear-gradient(90deg, rgb(217 35 50 / .28) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(62deg); transform-origin: 50% 0;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: floor 3.2s linear infinite;
}
@keyframes floor { to { background-position: 0 64px, 0 0; } }

.hero-inner { position: relative; text-align: center; width: min(900px, calc(100% - 40px)); }
.hero-inner::before { /* soft backdrop so the particle stream never fights the text */
  content: ""; position: absolute; inset: 34% -6% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(14 14 16 / .85), rgb(14 14 16 / .5) 60%, transparent);
}
.hero-mark { width: min(360px, 70vw); margin: 0 auto 26px; overflow: visible; }
.hero-mark path { fill: none; stroke-linecap: round; }
.mark-shadow { stroke: rgb(255 255 255 / .07); stroke-width: 12; }
.mark-line { stroke: #fff; stroke-width: 11; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.1s var(--ease) .2s forwards; }
.mark-comet { stroke: url(#comet); stroke-width: 11; stroke-dasharray: .07 .93; stroke-dashoffset: 1; opacity: 0; animation: comet 3.6s linear 2.3s infinite, fadein .6s ease 2.3s forwards; }
.mark-dot { fill: var(--crimson); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: dot .7s cubic-bezier(.34, 1.56, .64, 1) 2.1s forwards; filter: drop-shadow(0 0 6px var(--crimson)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes comet { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes dot { to { transform: scale(1); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; margin-bottom: 26px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgb(255 255 255 / .03); backdrop-filter: blur(8px);
  font-size: 13px; color: var(--muted); letter-spacing: .01em;
}
/* "Solve." in the badge, set like the logo's red "ai" and its round dot */
.brand-word { color: var(--crimson-hi); font-weight: 700; white-space: nowrap; }
.brand-dot { display: inline-block; width: .3em; height: .3em; margin-left: .1em; border-radius: 50%; background: currentColor; vertical-align: .08em; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 0 var(--crimson-glow); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(217 35 50 / 0); } 100% { box-shadow: 0 0 0 0 rgb(217 35 50 / 0); } }

.hero h1 { font-size: clamp(44px, 7.4vw, 92px); }
.shine {
  background: linear-gradient(100deg, #fff 20%, var(--crimson-hi) 40%, #fff 60%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s ease-in-out 2.6s infinite;
}
@keyframes shine { 0% { background-position: 100% 0; } 50%, 100% { background-position: 0 0; } }
.lede { max-width: 620px; margin: 24px auto 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--crimson); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* hero entrance (only when JS is on, so the text is never hidden without it) */
.js .hero .eyebrow, .js .hero h1, .js .hero .lede, .js .hero-cta { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.js .hero .eyebrow { animation-delay: .9s; }
.js .hero h1 { animation-delay: 1.05s; }
.js .hero .lede { animation-delay: 1.25s; }
.js .hero-cta { animation-delay: 1.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- marquee ---------- */
.marquee { display: flex; overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { flex: none; display: flex; gap: 0; margin: 0; padding: 0; list-style: none; animation: marquee 38s linear infinite; }
.marquee-track li { padding: 18px 28px; white-space: nowrap; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 28px; }
.marquee-track li::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--crimson); opacity: .8; margin-left: 28px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- sections ---------- */
.section { padding: clamp(90px, 12vw, 150px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--crimson-hi); font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.section h2 { font-size: clamp(34px, 4.6vw, 58px); max-width: 16ch; }
.section h2 em { font-style: normal; color: var(--crimson-hi); }
.section-lede { margin-top: 18px; max-width: 560px; color: var(--muted); font-size: 18px; }
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.split-rev { grid-template-columns: .9fr 1.1fr; }

/* steps */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 8px; }
.step { display: flex; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font: 600 13px/1.9 var(--mono); color: var(--crimson-hi); }
.step h3 { font-size: 22px; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* terminal demo */
.terminal {
  margin: 0; position: relative; border-radius: var(--radius); background: linear-gradient(180deg, #17171c, #111114);
  border: 1px solid var(--line-2); box-shadow: 0 40px 120px -40px rgb(217 35 50 / .35), 0 0 0 1px rgb(255 255 255 / .02) inset;
  overflow: hidden; min-height: 400px;
}
.terminal::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(255 255 255 / .018) 0 1px, transparent 1px 3px); }
.term-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c33; }
.term-bar i:first-child { background: var(--crimson); }
.term-bar span { margin-left: 10px; font: 500 12px var(--mono); color: var(--faint); }
.term-body { padding: 22px; display: grid; gap: 16px; font-size: 14px; }
.term-ask { display: flex; gap: 12px; align-items: baseline; }
.term-you { flex: none; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.term-typed { min-height: 1.6em; }
.term-typed.typing::after, .term-code code.typing::after { content: "▍"; color: var(--crimson-hi); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-plan { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: opacity .5s, transform .5s var(--ease); }
.term-plan:not(.show) { opacity: 0; transform: translateY(8px); }
.term-label { padding: 9px 14px; font: 500 12px var(--mono); color: var(--muted); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .02); }
.term-code { margin: 0; padding: 14px; min-height: 150px; font: 13px/1.65 var(--mono); color: #d9d9e0; white-space: pre-wrap; }
.tok-k { color: #ff7a85; } .tok-s { color: #9fe3b0; } .tok-f { color: #8fc7ff; } .tok-c { color: var(--faint); }
.term-gate { display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: opacity .4s; }
.term-gate:not(.show) { opacity: 0; }
.term-approve { cursor: default; pointer-events: none; }
.term-wait { font: 500 12px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.term-wait::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f0b429; box-shadow: 0 0 10px #f0b429; }
.term-gate.done .term-wait::before { background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.term-approve.ready { animation: ready 1.4s var(--ease) infinite; }
@keyframes ready { 0%, 100% { box-shadow: 0 0 0 0 rgb(217 35 50 / .55); } 50% { box-shadow: 0 0 0 10px rgb(217 35 50 / 0); } }
.term-approve.pressed { transform: scale(.96); background: #b81d2a; }
.term-out { font: 13px/1.7 var(--mono); color: #9fe3b0; min-height: 3.4em; }
.term-out.live div { animation: line-in .4s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateY(18px); } }

/* cards */
.grid { margin-top: 54px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--line);
  overflow: hidden; transition: transform .4s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card-icon { width: 40px; height: 40px; padding: 9px; margin-bottom: 22px; border-radius: 12px; fill: none; stroke: var(--crimson-hi); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; background: rgb(217 35 50 / .1); border: 1px solid rgb(217 35 50 / .25); }
/* spotlight that follows the pointer (JS sets --x / --y) */
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), rgb(217 35 50 / .16), transparent 60%);
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgb(255 77 92 / .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* safety orb */
.orb { position: relative; aspect-ratio: 1; width: min(420px, 100%); margin-inline: auto; display: grid; place-items: center; }
.orb::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgb(217 35 50 / .35), transparent 70%); filter: blur(20px); }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid rgb(255 255 255 / .1); }
.orb-ring.r1 { inset: 0; border-style: dashed; border-color: rgb(217 35 50 / .35); animation: spin 40s linear infinite; }
.orb-ring.r2 { inset: 12%; border-top-color: var(--crimson-hi); border-width: 2px; animation: spin 7s linear infinite; }
.orb-ring.r3 { inset: 24%; border-right-color: rgb(255 255 255 / .5); animation: spin 11s linear infinite reverse; }
.orb-icon { position: relative; width: 26%; height: auto; border-radius: 22%; box-shadow: 0 20px 60px -10px var(--crimson-glow); }
@keyframes spin { to { rotate: 360deg; } }
.checks { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 18px; }
.checks li { position: relative; padding-left: 36px; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 7px;
  background: rgb(217 35 50 / .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4d5c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid rgb(217 35 50 / .3);
}

/* learning flow */
.flow { list-style: none; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.flow::before { /* the track */
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 34px; height: 2px;
  background: linear-gradient(90deg, var(--line-2), var(--line-2));
}
.flow::after { /* a pulse that travels along the track */
  content: ""; position: absolute; top: 31px; left: 12.5%; width: 60px; height: 8px; border-radius: 8px;
  background: linear-gradient(90deg, transparent, var(--crimson-hi), transparent); filter: drop-shadow(0 0 8px var(--crimson));
  animation: travel 3.4s var(--ease) infinite;
}
@keyframes travel { from { transform: translateX(-30px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateX(calc(var(--track, 700px) - 30px)); opacity: 0; } }
.flow li { position: relative; display: grid; justify-items: center; text-align: center; gap: 14px; }
.flow-node {
  position: relative; z-index: 1; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line-2); font: 600 12px var(--mono); letter-spacing: .04em; color: var(--text);
  box-shadow: 0 0 0 6px var(--bg);
}
.flow li:last-child .flow-node { border-color: var(--crimson); box-shadow: 0 0 0 6px var(--bg), 0 0 30px -4px var(--crimson-glow); }
.flow-text { color: var(--muted); font-size: 15px; max-width: 18ch; }

/* CTA */
.cta { padding: 40px 0 clamp(90px, 12vw, 140px); }
.cta-panel {
  position: relative; overflow: hidden; text-align: center; padding: clamp(56px, 8vw, 96px) 24px; border-radius: 28px;
  background: radial-gradient(80% 120% at 50% 0%, rgb(217 35 50 / .35), transparent 60%), var(--raised);
  border: 1px solid rgb(217 35 50 / .3);
}
.cta-panel::before {
  content: ""; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, rgb(217 35 50 / .25), transparent 30%);
  animation: spin 9s linear infinite; z-index: 0;
}
.cta-panel::after { content: ""; position: absolute; inset: 1px; border-radius: 27px; background: radial-gradient(80% 120% at 50% 0%, rgb(217 35 50 / .2), transparent 60%), var(--raised); z-index: 0; }
.cta-panel > * { position: relative; z-index: 1; }
.cta-panel h2 { font-size: clamp(36px, 5vw, 64px); }
.cta-panel p { margin: 16px auto 32px; color: var(--muted); max-width: 46ch; font-size: 18px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; color: var(--faint); font-size: 13px; }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .split, .split-rev { grid-template-columns: 1fr; }
  .split-rev .orb { order: 2; width: min(320px, 80%); }
  .grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav nav { margin-left: 0; }
  .nav-inner { justify-content: space-between; height: 68px; }
  .nav-brand img, .footer-brand img { height: 28px; }
  body { font-size: 16px; }
  .grid, .grid-4 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .flow::before, .flow::after { display: none; }
  .terminal { min-height: 0; }
  .term-body { padding: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- reduced motion: everything settles in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark-line { stroke-dashoffset: 0; }
  .mark-comet { display: none; }
  .mark-dot { transform: none; }
  .js .hero .eyebrow, .js .hero h1, .js .hero .lede, .js .hero-cta, .js .reveal { opacity: 1; transform: none; }
  .shine { color: #fff; background: none; }
  .hero-canvas { display: none; }
}
