:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #111214;
  --muted: #676a70;
  --line: #dedfda;
  --soft: #ecece8;
  --accent: #565cff;
  --dark: #111214;
  --dark-soft: #1b1c20;
  --max: 1180px;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(17, 18, 20, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 16px; color: white; background: var(--ink); border-radius: 10px; transition: top .2s ease; }
.skip-link:focus { top: 16px; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease; }
.site-header.scrolled { background: rgba(247, 247, 245, .92); border-color: var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 680; letter-spacing: -.02em; }
.brand svg, .footer-brand svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.desktop-nav { display: flex; gap: 30px; color: #4d5055; font-size: 14px; }
.desktop-nav a, .header-link { transition: color .2s ease; }
.desktop-nav a:hover, .header-link:hover { color: var(--accent); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.menu-button { display: none; width: 40px; height: 40px; border: 0; background: transparent; padding: 10px; }
.menu-button span { display: block; width: 20px; height: 1px; margin: 5px 0; background: currentColor; transition: transform .2s ease; }
.mobile-nav { display: none; }

.hero { width: min(var(--max), calc(100% - 48px)); min-height: 800px; margin: 0 auto; padding: 150px 0 94px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(540px, 1.1fr); align-items: center; gap: 72px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(86, 92, 255, .1); }
.hero h1 { max-width: 720px; margin: 24px 0 24px; font-size: clamp(58px, 6.3vw, 98px); line-height: .96; letter-spacing: -.067em; font-weight: 650; }
.hero-copy > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 19px; line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 650; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--ink); border-color: var(--ink); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); }
.button.secondary { background: transparent; }
.button.secondary:hover { background: var(--surface); }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: #777a80; font-size: 12px; }
.hero-note span:not(:last-child)::after { content: ""; display: inline-block; width: 3px; height: 3px; margin-left: 20px; vertical-align: middle; border-radius: 50%; background: #bbbdb8; }

.runtime-demo { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.demo-topbar { height: 52px; padding: 0 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.demo-topbar b { color: var(--accent); }
.demo-body { min-height: 400px; padding: 50px 34px; display: grid; grid-template-columns: 1fr 70px .76fr 70px 1fr; align-items: center; }
.runtime-column, .image-column { opacity: .38; transition: opacity .55s ease, transform .55s ease; }
.runtime-column.active, .image-column.active { opacity: 1; transform: translateY(-4px); }
.runtime-column > small, .image-column > small { display: block; margin-bottom: 16px; color: #8a8c91; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.stack { display: grid; gap: 7px; }
.stack div { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf8; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.stack b { color: var(--accent); font-weight: 500; }
.state-route { position: relative; height: 1px; margin: 0 10px; background: var(--line); }
.state-route .state-dot { position: absolute; top: -4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); opacity: 0; }
.runtime-demo.phase-1 .state-route:first-of-type .state-dot { animation: route 2.4s ease-in-out infinite; }
.runtime-demo.phase-2 .state-route.second .state-dot { animation: route 2.4s ease-in-out infinite; }
.cont-file { aspect-ratio: 1 / 1.12; display: grid; place-content: center; text-align: center; border: 1px solid rgba(86, 92, 255, .35); border-radius: 18px; background: rgba(86, 92, 255, .06); }
.cont-file span { color: var(--accent); font: 700 29px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.04em; }
.cont-file small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.demo-footer { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.demo-footer div { display: flex; gap: 6px; }
.demo-footer i { width: 20px; height: 3px; background: var(--line); border-radius: 10px; transition: background .3s ease; }
.demo-footer i.active { background: var(--accent); }
@keyframes route { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(52px); opacity: 0; } }

.principles { min-height: 74px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #73767b; font-size: 12px; letter-spacing: .04em; }
.section { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 112px 0; }
.intro-section { display: grid; grid-template-columns: .38fr 1.25fr; column-gap: 68px; }
.intro-section .section-kicker { padding-top: 14px; }
.large-statement { margin: 0; font-size: clamp(48px, 6vw, 84px); line-height: 1.03; letter-spacing: -.056em; font-weight: 560; }
.section-lead { grid-column: 2; max-width: 690px; margin: 34px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 52px; }
.section-heading h2 { margin: 14px 0 0; font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -.05em; font-weight: 580; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.step { position: relative; padding: 28px 36px 12px 0; }
.step + .step { padding-left: 36px; border-left: 1px solid var(--line); }
.step > span { color: #989a9e; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.step-icon { position: relative; width: 100%; height: 150px; margin: 34px 0 24px; display: grid; place-content: center; border-radius: 16px; background: var(--soft); }
.freeze-icon i, .resume-icon i { display: block; width: 110px; height: 18px; margin: 5px; border: 1px solid #bfc1c6; border-radius: 5px; background: white; }
.freeze-icon b { position: absolute; inset: 50% 24px auto; height: 1px; background: var(--accent); box-shadow: 0 0 12px rgba(86, 92, 255, .65); }
.file-icon b { display: grid; place-content: center; width: 92px; height: 108px; color: var(--accent); border: 1px solid rgba(86, 92, 255, .4); border-radius: 13px; background: white; font: 700 18px ui-monospace, SFMono-Regular, Menlo, monospace; }
.resume-icon b { position: absolute; width: 134px; height: 134px; border: 1px solid rgba(86, 92, 255, .35); border-radius: 50%; }
.resume-icon i { width: 90px; }
.step h3 { margin: 0 0 10px; font-size: 25px; letter-spacing: -.03em; }
.step p { max-width: 310px; margin: 0; color: var(--muted); line-height: 1.62; }

.architecture { color: white; background: var(--dark); }
.architecture-inner { width: min(var(--max), calc(100% - 48px)); min-height: 680px; margin: 0 auto; padding: 112px 0; display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 100px; }
.section-kicker.light { color: #8e9199; }
.architecture h2 { margin: 18px 0 24px; font-size: clamp(48px, 5.5vw, 76px); line-height: 1.02; letter-spacing: -.055em; font-weight: 560; }
.architecture-copy p { max-width: 540px; color: #a9abb2; font-size: 17px; line-height: 1.68; }
.architecture-copy a { display: inline-block; margin-top: 18px; color: white; font-size: 14px; border-bottom: 1px solid #4d5058; padding-bottom: 4px; }
.frame-model { position: relative; overflow: hidden; padding: 24px; border: 1px solid #30323a; border-radius: 24px; background: var(--dark-soft); }
.frame-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #30323a; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.frame-header small { color: #7c7f88; }
.frame-model dl { margin: 0; }
.frame-model dl div { min-height: 66px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; border-bottom: 1px solid #2b2d34; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.frame-model dt { color: #8e919a; }
.frame-model dd { margin: 0; color: white; }
.frame-pulse { position: absolute; left: 0; right: 0; top: 24%; height: 1px; background: var(--accent); opacity: .45; animation: frameScan 7s ease-in-out infinite; }
@keyframes frameScan { 0%, 100% { transform: translateY(0); opacity: 0; } 10% { opacity: .55; } 90% { opacity: .55; } 100% { transform: translateY(320px); opacity: 0; } }

.live-heading { align-items: end; }
.live-heading p { max-width: 620px; margin: 16px 0 0; color: var(--muted); line-height: 1.6; }
.live-tools { display: flex; align-items: center; gap: 14px; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.live-indicator.ready i { background: #36a564; }
.live-indicator.stale i { background: #d29427; }
.refresh-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; }
.refresh-button:hover { background: white; }
.refresh-button.loading { opacity: .5; }
.api-message { margin: -20px 0 24px; padding: 14px 16px; color: #705d20; border: 1px solid #e4d8a5; border-radius: 12px; background: #fff9df; font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-card { min-height: 170px; padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.stat-card:hover { transform: translateY(-3px); border-color: #c5c7c1; }
.stat-card:nth-child(1), .stat-card:nth-child(2) { grid-column: span 1; }
.stat-card.wide { grid-column: span 2; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { margin: auto 0 8px; overflow: hidden; font-size: clamp(24px, 2.5vw, 39px); line-height: 1; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { overflow: hidden; color: #8a8d92; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-title { margin: 58px 0 16px; display: flex; align-items: center; justify-content: space-between; }
.workflow-title h3 { margin: 0; font-size: 20px; }
.workflow-title a { color: var(--muted); font-size: 13px; }
.workflow-list { border-top: 1px solid var(--line); }
.workflow-row { min-height: 112px; display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); transition: background .2s ease; }
.workflow-row:hover { background: rgba(255,255,255,.55); }
.workflow-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.workflow-status i, .job-pill i { width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.workflow-status.success i, .job-pill i.success { background: #36a564; }
.workflow-status.failure i, .job-pill i.failure { background: #d45a52; }
.workflow-status.pending i, .job-pill i.pending { background: #d29427; }
.workflow-main h4 { margin: 0 0 7px; font-size: 16px; }
.workflow-main p { margin: 0; color: var(--muted); font-size: 12px; }
.job-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.job-pill { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 10px; }
.workflow-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 16px; color: #8a8d92; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.workflow-skeleton { height: 112px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); background-size: 200% 100%; animation: skeleton 1.6s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }
.rate-note { margin-top: 15px; color: #999b9f; font-size: 10px; }

.scope { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: stretch; }
.scope-main { padding: 24px 0; }
.scope-main h2 { max-width: 760px; margin: 18px 0 24px; font-size: clamp(44px, 5vw, 68px); line-height: 1.05; letter-spacing: -.052em; font-weight: 570; }
.scope-main > p { max-width: 700px; color: var(--muted); font-size: 17px; line-height: 1.68; }
.scope-links { display: flex; gap: 24px; margin-top: 28px; font-size: 13px; }
.scope-links a { border-bottom: 1px solid #bfc1bc; padding-bottom: 4px; }
.license-card { min-height: 410px; padding: 30px; display: flex; flex-direction: column; border-radius: 24px; color: white; background: var(--ink); transition: transform .2s ease; }
.license-card:hover { transform: translateY(-4px); }
.license-card > span { color: #8d9097; font-size: 11px; letter-spacing: .13em; }
.mit-mark { margin: auto 0; color: white; font-size: clamp(90px, 11vw, 150px); font-weight: 620; line-height: .8; letter-spacing: -.11em; text-shadow: 5px 5px 0 var(--accent); }
.license-card p { margin: 0 0 12px; color: #a9abb1; }
.license-card b { font-size: 13px; }

.final-cta { min-height: 540px; display: grid; place-items: center; padding: 80px 24px; color: white; text-align: center; background: var(--ink); }
.final-cta span { color: #9b9da4; font-size: 13px; }
.final-cta h2 { margin: 18px 0 34px; font-size: clamp(58px, 8vw, 112px); line-height: .94; letter-spacing: -.07em; font-weight: 560; }
.button.light { color: var(--ink); background: white; border-color: white; }
.button.light:hover { color: white; background: var(--accent); border-color: var(--accent); }
.site-footer { width: min(var(--max), calc(100% - 48px)); min-height: 140px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; color: var(--muted); font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; }
.footer-links { display: flex; gap: 24px; }
.site-footer p { justify-self: end; margin: 0; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 22px; }
  .desktop-nav, .header-link { display: none; }
  .menu-button { display: block; }
  .mobile-nav { position: fixed; inset: 72px 0 auto; display: grid; padding: 24px; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .mobile-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .hero { min-height: 0; padding-top: 132px; grid-template-columns: 1fr; gap: 60px; }
  .hero h1 { font-size: clamp(58px, 11vw, 88px); }
  .runtime-demo { max-width: 720px; }
  .principles { flex-wrap: wrap; justify-content: flex-start; padding-top: 22px; padding-bottom: 22px; }
  .intro-section { grid-template-columns: 1fr; }
  .section-lead { grid-column: 1; }
  .architecture-inner { grid-template-columns: 1fr; gap: 60px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-card:nth-child(1), .stat-card:nth-child(2) { grid-column: span 1; }
  .stat-card.wide { grid-column: span 2; }
  .scope { grid-template-columns: 1fr; gap: 30px; }
  .license-card { min-height: 340px; }
  .site-footer { grid-template-columns: 1fr; padding: 38px 0; }
  .site-footer p { justify-self: start; }
}

@media (max-width: 700px) {
  .hero, .section, .architecture-inner, .site-footer { width: min(100% - 32px, var(--max)); }
  .hero { padding-top: 116px; padding-bottom: 72px; }
  .hero h1 { font-size: clamp(51px, 15vw, 70px); }
  .hero-copy > p { font-size: 17px; }
  .hero-note { display: none; }
  .runtime-demo { border-radius: 20px; }
  .demo-body { min-height: 490px; padding: 30px 22px; grid-template-columns: 1fr; gap: 14px; }
  .state-route { width: 1px; height: 34px; margin: 0 auto; }
  .state-route .state-dot { left: -4px; }
  .runtime-demo.phase-1 .state-route:first-of-type .state-dot, .runtime-demo.phase-2 .state-route.second .state-dot { animation-name: routeVertical; }
  .runtime-column > small, .image-column > small { margin-bottom: 9px; text-align: center; }
  .stack { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .stack div { min-height: 46px; padding: 7px; display: grid; justify-content: initial; }
  .stack span { overflow: hidden; text-overflow: ellipsis; }
  .cont-file { width: 100px; margin: auto; }
  @keyframes routeVertical { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(29px); opacity: 0; } }
  .principles { padding-left: 16px; padding-right: 16px; }
  .section { padding: 78px 0; }
  .large-statement { font-size: 45px; }
  .section-lead { font-size: 16px; }
  .section-heading { display: block; margin-bottom: 34px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .step-icon { height: 130px; }
  .architecture-inner { min-height: 0; padding: 82px 0; }
  .architecture h2 { font-size: 47px; }
  .frame-model { padding: 18px; }
  .live-heading { display: block; }
  .live-tools { justify-content: space-between; margin-top: 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card.wide { grid-column: span 1; }
  .stat-card { min-height: 142px; }
  .workflow-row { padding: 20px 0; grid-template-columns: 1fr; gap: 10px; }
  .workflow-meta { grid-template-columns: repeat(3, 1fr); }
  .scope-main h2 { font-size: 45px; }
  .final-cta { min-height: 440px; }
  .final-cta h2 { font-size: 66px; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
