/* Forge landing — cinematic edition. The page is the showreel's language made interactive: ink-navy field,
   violet neon edges, Montserrat display type, and a canvas engine (motion/) that is literally the reel's
   renderer. Dark by design on every OS theme: this is the brand surface; the chat app keeps its own theming. */
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('motion/assets/jbmono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('motion/assets/jbmono-600.woff2') format('woff2'); }

#landing-view {
  /* Re-pin every token the shared components read, so an OS light theme can't wash the brand surface out. */
  --brand-ink-0: #03061a; --brand-ink-1: #060b1f; --brand-ink-2: #0a1128; --brand-ink-3: #121a3a; --brand-inset: #050816;
  --brand-line-subtle: rgba(129,140,248,.10); --brand-line: rgba(129,140,248,.18); --brand-line-strong: rgba(139,120,255,.34);
  --brand-text: #f4f3ff; --brand-text-2: #bcc0dc; --brand-text-3: #8a90b6;
  --bg: #040718; --bg-2: var(--brand-ink-1); --panel: var(--brand-ink-2); --raised: var(--brand-ink-3);
  --border: var(--brand-line); --border-strong: var(--brand-line-strong);
  --text: var(--brand-text); --muted: var(--brand-text-2); --faint: var(--brand-text-3);
  --shadow-md: 0 10px 28px rgba(2,4,20,.45);
  --lp-glass: rgba(9,15,36,.72); --lp-edge: rgba(139,120,255,.30); --lp-ease: cubic-bezier(.16,1,.3,1);
  background: #040718; color: var(--text); color-scheme: dark; position: relative; overflow-x: clip;
}
#landing-view .brand-logo--paper { display: inline-block !important; }
#landing-view .brand-logo--ink { display: none !important; }
.lp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp { position: relative; }
.lp-wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.lp-grain { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 60; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* --- Nav: floating glass over the field -------------------------------------- */
#landing-view .topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(4,7,24,.78), rgba(4,7,24,.42)); border-bottom: 1px solid rgba(139,120,255,.14);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
#landing-view .topbar-inner { max-width: 1240px; padding: 12px 32px; }
#landing-view .topnav a, #landing-view .topnav-link { color: var(--muted); transition: color .2s; }
#landing-view .topnav a:hover, #landing-view .topnav-link:hover { color: #fff; }
#landing-view .topnav.open { background: #060b1f; }

/* --- Hero --------------------------------------------------------------------- */
.lp-hero-wrap {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(1100px 700px at 82% 8%, rgba(98,44,238,.30), transparent 62%), radial-gradient(900px 600px at 6% 96%, rgba(79,30,225,.20), transparent 64%), #040718;
}
.lp-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1s ease; }
.lp-fx.on { opacity: 1; }
.lp-hero { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 72px; align-items: center; padding-top: 120px; padding-bottom: 96px; }
.lp-kicker { margin: 0 0 22px; font: 600 12.5px/1 var(--font-display); letter-spacing: .26em; text-transform: uppercase; color: var(--brand-violet-300); }
.lp-hero h1 { font-size: clamp(40px, 4.15vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 800; margin: 0 0 28px; text-wrap: balance; }
.lp-hero h1 span { display: block; background: linear-gradient(180deg, #fff 20%, #cbb8ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-hero h1 .grad { white-space: nowrap; background: linear-gradient(90deg, #9c6efe 0%, #c14bff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 28px rgba(156,110,254,.35)); }
.lp-sub { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; color: var(--muted); max-width: 46ch; margin: 0 0 38px; }
.lp-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.lp-ctas .btn { padding: 16px 30px; font-size: 15.5px; border-radius: 14px; }
.lp-ctas .btn-primary { box-shadow: 0 0 0 1px rgba(156,110,254,.55), 0 10px 40px rgba(98,44,238,.55), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .25s var(--lp-ease), box-shadow .25s; }
.lp-ctas .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(183,156,255,.8), 0 16px 56px rgba(116,67,240,.7), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { background: rgba(9,15,36,.5) !important; border-color: var(--lp-edge) !important; backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(116,67,240,.16) !important; }
.lp-sub-notice { color: var(--brand-warn); font-size: 13.5px; margin-top: -22px; }

.lp-hero-stack { position: relative; }
.lp-hero-mark { position: absolute; right: 7%; bottom: calc(100% + 26px); height: clamp(150px, 24vh, 260px); aspect-ratio: 439 / 560; pointer-events: none; }
.lp-composer {
  position: relative; border-radius: 26px; background: var(--lp-glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(170,140,255,.55);
  box-shadow: 0 0 0 1px rgba(116,67,240,.25), 0 0 44px rgba(116,67,240,.42), 0 40px 90px rgba(2,4,20,.7), inset 0 1px 0 rgba(150,130,255,.16);
  transition: box-shadow .3s, border-color .3s;
}
.lp-composer:focus-within { border-color: rgba(196,170,255,.9); box-shadow: 0 0 0 1px rgba(156,110,254,.5), 0 0 64px rgba(116,67,240,.65), 0 40px 90px rgba(2,4,20,.7), inset 0 1px 0 rgba(150,130,255,.2); }
.lp-composer-body { position: relative; }
.lp-composer textarea { display: block; width: 100%; resize: none; min-height: 190px; border: 0; background: none; color: var(--text); font: 500 19px/1.55 var(--font-sans); padding: 28px 28px 8px; outline: none; }
.lp-composer textarea::placeholder { color: transparent; }
.lp-ph { position: absolute; left: 28px; right: 28px; top: 28px; font: 500 19px/1.55 var(--font-sans); color: var(--text); pointer-events: none; transition: opacity .2s; }
.lp-ph.off { opacity: 0; }
.lp-ph span { white-space: pre-wrap; }
.lp-caret { display: inline-block; width: 3px; height: 1.15em; margin-left: 3px; vertical-align: -.2em; background: var(--brand-violet-300); animation: lpBlink 1.06s steps(1) infinite; }
@keyframes lpBlink { 50% { opacity: .12; } }
.lp-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px 16px 28px; font-size: 13px; color: var(--faint); }
.lp-send { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; color: #fff; cursor: pointer; font: 700 14.5px var(--font-display);
  background: linear-gradient(135deg, #4f1ee1, #7443f0); box-shadow: 0 8px 28px rgba(98,44,238,.55), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .25s var(--lp-ease), box-shadow .25s; }
.lp-send:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 40px rgba(116,67,240,.7), inset 0 1px 0 rgba(255,255,255,.3); }
.lp-send:active { transform: scale(.96); }
.lp-send b { font-weight: 700; }
.lp-scrollcue { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(183,156,255,.45); border-radius: 14px; opacity: .8; }
.lp-scrollcue i { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--brand-violet-300); animation: lpCue 1.8s var(--lp-ease) infinite; }
@keyframes lpCue { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* --- The run ------------------------------------------------------------------ */
.lp-run { position: relative; padding-top: 120px; }
.lp-run-head h2 { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; max-width: 20ch; margin: 0 0 64px; background: linear-gradient(180deg, #fff 30%, #cbb8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* pinned (desktop): 8 spans of scroll, one sticky canvas — the reel scrubbed by your scroll wheel */
.run-track { position: relative; height: calc(100vh + 8 * 120vh); height: calc(100svh + 8 * 120svh); }
.run-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #040718; }
#runCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.run-rail { position: absolute; right: clamp(14px, 2.2vw, 36px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.run-rail button { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: flex-end; gap: 14px; height: 30px; cursor: pointer; color: var(--faint); font: 600 11.5px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.run-rail button span { opacity: 0; transform: translateX(8px); transition: opacity .25s, transform .25s var(--lp-ease); pointer-events: none; }
.run-rail button:hover span, .run-rail button.on span, .run-rail button:focus-visible span { opacity: 1; transform: none; }
.run-rail button i { display: block; width: 22px; height: 4px; border-radius: 2px; background: rgba(139,120,255,.26); transition: width .35s var(--lp-ease), background .3s, box-shadow .3s; }
.run-rail button.done i { background: var(--brand-violet-500); }
.run-rail button.on { color: #fff; } .run-rail button.on i { width: 40px; background: var(--brand-violet-300); box-shadow: 0 0 14px rgba(183,156,255,.8); }
.run-rail button:focus-visible { outline: 2px solid var(--brand-violet-400); outline-offset: 4px; border-radius: 6px; }

/* stacked (phones, tablets, reduced motion): one card per scene, each plays once as it enters */
.run-cards { list-style: none; margin: 0 auto; padding-bottom: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.run-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px 26px 28px; border-radius: 24px; background: var(--lp-glass); border: 1px solid var(--lp-edge); box-shadow: 0 30px 70px rgba(2,4,20,.55), inset 0 1px 0 rgba(150,130,255,.12); overflow: hidden; }
.run-card:nth-child(1), .run-card:nth-child(2), .run-card:nth-child(7), .run-card:nth-child(8) { grid-column: 1 / -1; }
.run-chip { font: 600 12px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .3em; color: var(--brand-violet-300); }
.run-verb { margin: 14px 0 8px; font: 800 clamp(40px, 9vw, 72px)/.95 var(--font-display); letter-spacing: -.05em; background: linear-gradient(90deg, #fff, #cbb8ff 55%, #8f62f7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.run-verb .dot { -webkit-text-fill-color: #c14bff; color: #c14bff; }
.run-cap { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.5; max-width: 44ch; }
.run-card-cv { display: block; width: 100%; height: auto; border-radius: 16px; background: #060b1f; border: 1px solid rgba(139,120,255,.2); }
.run-body { margin: 0; color: var(--faint); font-size: 14.5px; line-height: 1.65; max-width: 62ch; }
/* mode switch: in pinned mode the cards stay in the DOM for screen readers / crawlers but leave the layout */
#run[data-mode="pinned"] .run-cards { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; margin: 0; }
#run:not([data-mode="pinned"]) .run-pinned { display: none; }

/* --- Features ----------------------------------------------------------------- */
.lp-features { padding-top: 112px; padding-bottom: 104px; }
.lp-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.lp-row { --mx: 50%; --my: 0%; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 30px 26px 32px; border-radius: 20px; background: var(--lp-glass); border: 1px solid var(--border); overflow: hidden;
  transition: transform .4s var(--lp-ease), border-color .3s, box-shadow .4s; }
.lp-row::before { content: ''; position: absolute; inset: 0; background: radial-gradient(320px 220px at var(--mx) var(--my), rgba(116,67,240,.28), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.lp-row:hover { transform: translateY(-4px); border-color: rgba(170,140,255,.55); box-shadow: 0 0 0 1px rgba(116,67,240,.22), 0 24px 60px rgba(2,4,20,.6), 0 0 36px rgba(116,67,240,.22); }
.lp-row:hover::before { opacity: 1; }
.lp-row > * { position: relative; }
.lp-row h3 { font-size: 18px; letter-spacing: -.015em; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.lp-row .f-icon { width: 50px; height: 50px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: var(--brand-violet-300); background: rgba(116,67,240,.20); border: 1px solid rgba(156,110,254,.5); box-shadow: 0 0 22px rgba(116,67,240,.25); }
.lp-row p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.lp-shots { max-width: none; padding: 0; margin-bottom: 104px; }
.lp-shots-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 max(32px, calc((100vw - 1240px) / 2)); }
.lp-shot { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.lp-shot img { display: block; max-height: 460px; border-radius: 16px; border: 1px solid var(--brand-line-strong); box-shadow: 0 0 40px rgba(116,67,240,.28); }
.lp-shot figcaption { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* --- Surfaces ----------------------------------------------------------------- */
.lp-surfaces { padding-bottom: 120px; }
.lp-surfaces h2, .lp-download h2, .lp-changelog h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.035em; font-weight: 800; margin: 0 0 36px; }
.lp-surfaces dl { margin: 0; }
.lp-surfaces dl > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 26px 0; border-top: 1px solid var(--border); transition: border-color .3s, padding-left .4s var(--lp-ease); }
.lp-surfaces dl > div:hover { border-top-color: rgba(170,140,255,.6); padding-left: 10px; }
.lp-surfaces dt { font: 700 20px var(--font-display); letter-spacing: -.015em; }
.lp-surfaces dd { margin: 0; color: var(--muted); }

/* --- Download: the outro slam, then the band ---------------------------------- */
.lp-download { position: relative; padding-bottom: 120px; }
.lp-outro { position: relative; height: clamp(300px, 46vw, 560px); margin-bottom: 8px; }
.lp-outro .lp-fx { mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.lp-download-body { position: relative; margin-top: -56px; text-align: center; }
.lp-download h2 { margin-bottom: 14px; }
.lp-sub-s { color: var(--muted); margin: 0 0 36px; }
.lp-dl { max-width: 860px; margin: 0 auto; text-align: left; border-radius: 24px; border: 1px solid rgba(170,140,255,.45); background: linear-gradient(100deg, rgba(18,4,80,.9), rgba(46,18,140,.8)); box-shadow: 0 0 60px rgba(98,44,238,.35), 0 40px 90px rgba(2,4,20,.6), inset 0 1px 0 rgba(255,255,255,.1); padding: 8px 30px; backdrop-filter: blur(14px); }
.lp-dl-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; padding: 20px 0; border-top: 1px solid var(--brand-line); }
.lp-dl-row:first-child { border-top: 0; }
.lp-dl-row .platform { font: 700 17px var(--font-display); }
.lp-dl-row .version { color: var(--muted); font: 400 13.5px 'JetBrains Mono', ui-monospace, monospace; }

.lp-dl-row-linux { grid-template-columns: 1fr auto auto; }
.lp-install { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 2px 0 18px; flex-wrap: wrap; }
.lp-install-hint { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.lp-install-cmd { flex: 1; min-width: 260px; margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(170,140,255,.35); background: rgba(10,4,40,.7); text-align: left; overflow-x: auto; }
.lp-install-cmd code { font: 400 13.5px 'JetBrains Mono', ui-monospace, monospace; color: #d8ccff; white-space: pre; }

.lp-changelog { padding-bottom: 110px; max-width: 840px; }
.lp-log { padding: 20px 0; border-top: 1px solid var(--border); }
.lp-log .version { font: 700 16px var(--font-display); }
.lp-log .date { color: var(--faint); font-size: 13px; margin-left: 10px; }
.lp-log p { margin: 6px 0 0; color: var(--muted); white-space: pre-line; }

.footer { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; max-width: 1240px; margin: 0 auto; padding: 28px 32px 36px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: left; }
.footer .footer-logo { height: 28px; }
.footer .footer-copy { margin-left: auto; }

/* --- Scroll reveals (JS adds .in; without JS everything is simply visible) ---- */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--lp-ease), transform .8s var(--lp-ease); }
.js .rv.in { opacity: 1; transform: none; }

/* --- Responsive --------------------------------------------------------------- */
@media (max-width: 980px) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-top: 104px; padding-bottom: 80px; }
  .lp-hero-copy, .lp-hero-stack { min-width: 0; }
  .lp-hero-stack { padding-top: 96px; }
  .lp-hero-mark { right: 4%; top: 0; bottom: auto; height: 88px; }
  .lp-surfaces dl > div { grid-template-columns: 1fr; gap: 10px; }
  .run-cards { grid-template-columns: 1fr; }
  .run-card:nth-child(n) { grid-column: auto; }
}
@media (max-width: 640px) {
  .lp-wrap { padding-left: 20px; padding-right: 20px; }
  .lp-hero { padding-top: 92px; }
  .lp-hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .lp-hero h1 .grad { white-space: normal; }
  .lp-kicker { letter-spacing: .2em; font-size: 11.5px; line-height: 1.5; }
  .lp-ctas .btn { width: 100%; justify-content: center; }
  .lp-composer textarea { min-height: 150px; font-size: 17px; padding: 22px 20px 6px; }
  .lp-ph { left: 20px; right: 20px; top: 22px; font-size: 17px; }
  .lp-composer-foot span { display: none; }
  .lp-composer-foot { padding: 8px 12px 14px; }
  .lp-send { width: 100%; justify-content: center; }
  .lp-run { padding-top: 80px; } .lp-run-head h2 { margin-bottom: 40px; }
  .run-card { padding: 20px 18px 22px; border-radius: 20px; }
  .lp-dl { padding: 4px 18px; } .lp-dl-row { grid-template-columns: 1fr auto; gap: 14px; } .lp-dl-row .version { display: none; }
  .footer { padding: 24px 20px 32px; } .footer .footer-copy { margin-left: 0; }
  .lp-scrollcue { display: none; }
}
@media (max-width: 640px) { #landing-view .topbar-inner { padding: 12px 18px; } }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .lp-caret, .lp-scrollcue i { animation: none; }
  .lp-row, .lp-send, .lp-ctas .btn-primary { transition: none; }
}
