/* The original graphite logo and its violet spark define VBAi's visual identity. */
:root {
  --paper: #111827;
  --surface: #182133;
  --ink: #f1effa;
  --muted: #abb6ca;
  --accent: #bb94ff;
  --accent-dark: #d8c2ff;
  --line: #303a4c;
  --button: #7542d6;
  --width: 1190px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: 5px; }
a:hover { color: var(--accent-dark); }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.045em; }
h1, h2 { font-weight: 650; }
h1 { font-size: clamp(43px, 4.5vw, 66px); }
h2 { font-size: clamp(32px, 3.5vw, 47px); }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
p + p { margin-top: 16px; }
strong { font-weight: 650; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: #8551ca; color: #fff; }
.container { max-width: var(--width); margin: auto; padding: 0 36px; }
.icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { color: var(--accent); font: 11px/1.6 Consolas, monospace; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 23px; }
.skip-link { position: fixed; top: -90px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 10px; }

/* The masthead leaves the large product identity to the opening scene. */
.site-header { background: #111827; border-bottom: 1px solid #ffffff0c; }
.header-inner { max-width: 1330px; margin: auto; padding: 17px 36px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; color: var(--ink); font-size: 29px; font-weight: 700; letter-spacing: -.07em; text-decoration: none; }
.brand img { flex-shrink: 0; }
.brand-ai { color: var(--accent); }
.header-inner nav { display: flex; gap: 27px; margin-left: auto; }
.header-inner nav a { color: var(--muted); font-size: 13px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.header-inner nav a[aria-current=page], .header-inner nav a:hover { color: var(--ink); }
.header-links { display: flex; align-items: center; gap: 22px; }
.language { color: var(--ink); font: 12px Consolas, monospace; text-decoration: none; padding: 6px 9px; border: 1px solid var(--line); }
.github-link { font-size: 13px; color: var(--ink); text-decoration: none; white-space: nowrap; }

/* Real application screenshots, with a subtle scene derived from the logo. */
.hero-stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 82% 38%, #4624693d, transparent 48%), linear-gradient(155deg, #111827, #162035); }
.hero-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#ffffff03 1px, transparent 1px), linear-gradient(90deg, #ffffff03 1px, transparent 1px); background-size: 78px 78px; mask-image: linear-gradient(90deg, transparent 15%, #000); }
.hero { position: relative; display: grid; grid-template-columns: 1.12fr 1fr; gap: 80px; align-items: center; padding-top: 57px; padding-bottom: 78px; }
.hero-identity { display: flex; align-items: center; gap: 15px; margin: 0 0 26px -6px; }
.hero-identity > span { font-size: 94px; font-weight: 750; letter-spacing: -.085em; line-height: 1; }
.hero-identity > .icon { width: 31px; height: 31px; margin-left: 1px; margin-top: -58px; fill: var(--accent); stroke: none; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 520px; margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 18px; background: var(--button); border: 1px solid #a66ff24a; border-radius: 5px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.button:hover { color: #fff; background: #8953e6; transform: translateY(-2px); }
.button.secondary { color: var(--ink); background: #ffffff04; border-color: #64718e70; }
.button.secondary:hover { background: #ffffff0b; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 11px; }
.hero-note a { color: inherit; text-decoration-color: #67738b; }
.hero-visual { position: relative; min-width: 0; padding-top: 45px; --tilt-x: 0deg; --tilt-y: 0deg; }
.hero-spark { position: absolute; right: -64px; top: -37px; width: 325px; height: 325px; color: #9c64fa; opacity: .15; transform: rotate(12deg); pointer-events: none; }
.hero-spark .icon { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.visual-label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 10px Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; color: #bbb0d8; margin: 0 0 18px 24px; }
.visual-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.hero-chat { position: relative; max-width: 312px; margin-left: 26px; background: #f7faff; border: 1px solid #aa88ed80; border-radius: 10px; overflow: hidden; box-shadow: -20px 25px 80px #070b1780, 0 0 0 7px #ffffff04; transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) rotate(-2deg); transition: transform .3s ease-out; }
.screenshot-link { display: block; color: inherit; }
.screenshot-viewport { position: relative; display: block; overflow: hidden; aspect-ratio: var(--frame-aspect); width: 100%; }
.screenshot-viewport > img { position: absolute; max-width: none; width: var(--image-width); left: var(--image-left); top: var(--image-top); height: auto; }
.hero-form { position: absolute; right: -30px; bottom: 82px; width: 224px; max-width: 224px; background: #fff; border: 1px solid #dbc0ff; border-radius: 7px; box-shadow: 0 16px 40px #03071270; overflow: hidden; transform: rotate(2deg); }
.floating-label { color: #382458; background: #ebe2fc; font-size: 10px; font-weight: 600; padding: 8px 12px; }
.hero-visual figcaption { position: relative; margin: 25px 0 0 26px; color: var(--muted); font-size: 11px; line-height: 1.6; max-width: 350px; }
.host-strip { border-top: 1px solid #7b639b28; border-bottom: 1px solid #7b639b28; padding: 23px 0; background: #101725; }
.host-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; justify-content: space-between; }
.host-label { color: var(--muted); font-size: 11px; }
.host-list { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 15px; font-weight: 600; }

/* Capabilities are an open editorial list, rather than a wall of cards. */
.section { padding-top: 91px; padding-bottom: 91px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 45px; margin-bottom: 44px; }
.section-heading h2 { max-width: 590px; }
.section-heading > p { max-width: 350px; color: var(--muted); font-size: 15px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.feature-card { position: relative; border-top: 1px solid var(--line); padding: 28px 0 32px 45px; }
.feature-marker { display: flex; align-items: center; gap: 10px; position: absolute; left: 0; top: 28px; }
.feature-index { font: 11px Consolas, monospace; color: #7f8ba3; }
.feature-icon { display: none; color: var(--accent); }
.feature-card h3 { font-size: 21px; }
.feature-card p { margin-top: 13px; color: var(--muted); font-size: 14px; }
.feature-card a { display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 550; text-decoration: none; }
.feature-card:hover .feature-index { color: var(--accent); }
.feature-card:hover .feature-icon { display: block; position: absolute; top: 29px; left: 0; }

/* Macro, exported components and Git are presented as one explicit workflow. */
.workflow-band { border-top: 1px solid #a48fc332; border-bottom: 1px solid #a48fc332; background: radial-gradient(ellipse at 100% 0, #64379d20, transparent 55%), #172032; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.story-text > p:not(.eyebrow) { color: var(--muted); margin-top: 25px; }
.github-stage { background: radial-gradient(ellipse at 0 30%, #7849b426, transparent 65%), #172032; }
.github-stage .story-grid { grid-template-columns: 1fr 1.12fr; gap: 52px; }
.github-stage .story-text > .eyebrow .icon { margin-right: 7px; }
.github-stage .screenshot-frame { border-color: #a989df70; }
.github-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.story-text > .github-note { font-size: 12px; line-height: 1.7; max-width: 460px; }
.macro-github { color: var(--ink); display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.macro-github .icon { color: var(--accent); }
.steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 23px; }
.step { display: flex; align-items: start; gap: 16px; }
.step-number { color: var(--accent); font: 12px Consolas, monospace; flex-shrink: 0; padding-top: 3px; }
.step h3 { font-size: 15px; letter-spacing: 0; line-height: 1.4; }
.step p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.text-link { display: inline-block; margin-top: 24px; font-size: 13px; font-weight: 550; text-decoration: none; }
.screenshot-frame { padding: 10px; background: #222c41; border: 1px solid #59627a70; border-radius: 8px; box-shadow: 0 20px 40px #060c1925; }
.screenshot-frame .screenshot-viewport { border-radius: 3px; }
.screenshot-frame figcaption { padding: 14px 4px 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.macro-map { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 430px; margin-top: 40px; padding-top: 25px; border-top: 1px dashed #7280a14d; font: 12px/1.8 Consolas, monospace; color: #c4b5e8; }
.macro-map .icon { width: 16px; color: #8593ad; }
.provider-list { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 32px 0 27px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.provider-chip { color: #d5dcea; font-size: 17px; font-weight: 600; }
.provider-chip.primary { color: var(--accent); }
.provider-note { max-width: 840px; color: var(--muted); font-size: 13px; }

/* The original logo closes the page with a clear download entry point. */
.download-stage { position: relative; overflow: hidden; border-top: 1px solid #9b67e342; background: linear-gradient(120deg, #222139, #1f1831, #151d2e); }
.getting-started { position: relative; display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: center; gap: 30px; padding-top: 58px; padding-bottom: 58px; }
.download-logo { width: 145px; transform: rotate(-6deg); }
.getting-started h2 { max-width: 610px; font-size: 32px; }
.getting-started p { color: var(--muted); margin-top: 17px; max-width: 630px; font-size: 14px; }
.getting-started .actions { margin-top: 0; flex-direction: column; }
.site-footer { background: #0f1623; padding: 35px 0; }
.footer-top { display: flex; align-items: center; gap: 26px; }
.footer-top p { color: var(--muted); font-size: 13px; }
.footer-top > a:last-child { margin-left: auto; font-size: 12px; text-decoration: none; white-space: nowrap; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; border-top: 1px solid #ffffff0c; margin-top: 23px; padding-top: 22px; }
.footer-bottom p { color: #8593ab; font-size: 11px; max-width: 450px; }
.footer-bottom a { color: inherit; }

/* Guide pages retain the identity, with comfortable reading widths. */
.page-intro { padding: 60px 0 46px; max-width: 850px; }
.page-intro h1 { font-size: clamp(42px, 4.5vw, 62px); }
.page-intro .lead { color: var(--muted); margin-top: 24px; font-size: 18px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; gap: 65px; align-items: start; padding-bottom: 80px; }
.article h2 { font-size: 30px; margin-bottom: 21px; }
.article h3 { font-size: 18px; margin: 28px 0 12px; }
.article section + section { margin-top: 44px; padding-top: 35px; border-top: 1px solid var(--line); }
.article p, .article li { color: var(--muted); }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 10px; }
.notice { border-left: 3px solid #d7aa57; background: #3c302429; padding: 21px 23px; margin: 28px 0; }
.notice h3 { margin: 0 0 10px; color: #ebc481; font-size: 16px; }
.notice p { color: #d5bb92; font-size: 14px; }
.article .screenshot-frame { margin: 27px 0; }
.article .screenshot-frame.compact { max-width: 620px; }
.article .portrait-example { max-width: 400px; }
.article .form-example { max-width: 320px; }
.aside-card { position: sticky; top: 24px; border-top: 2px solid #9a6adc; padding: 20px 0; }
.aside-card h2 { font-size: 16px; letter-spacing: 0; margin-bottom: 15px; }
.aside-card a { display: block; padding: 7px 0; font-size: 13px; }
.aside-card p { margin-top: 19px; color: var(--muted); font-size: 12px; }
.article blockquote { margin: 23px 0; border-left: 3px solid var(--accent); background: #9f64e510; padding: 18px 23px; color: #dfd0f5; font-size: 18px; line-height: 1.7; }
.article code { padding: 2px 5px; background: var(--surface); font: 13px/1.5 Consolas, monospace; overflow-wrap: anywhere; }
.provider-table { width: 100%; border-collapse: collapse; margin: 0 0 35px; font-size: 14px; }
.provider-table th { text-align: left; color: var(--ink); font-weight: 600; }
.provider-table th, .provider-table td { padding: 16px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.provider-table td { color: var(--muted); }
.not-found { text-align: center; padding: 110px 32px; min-height: 65vh; }
.not-found p { max-width: 550px; margin: 22px auto; color: var(--muted); }

.image-dialog { max-width: min(96vw, 1250px); max-height: 95vh; padding: 14px; border: 1px solid #7b5ca2; border-radius: 9px; background: var(--paper); color: var(--ink); }
.image-dialog::backdrop { background: #040813df; }
.dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 3px 12px; font-size: 13px; }
.dialog-close { padding: 5px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); cursor: pointer; font-size: 13px; }
.dialog-image { width: min(88vw, calc((90vh - 80px) * var(--frame-aspect)), var(--native-width)); margin: auto; }

/* Progressive motion: no script or reduced-motion preference leaves content visible. */
.motion-ready [data-reveal].revealed { animation: section-reveal .85s cubic-bezier(.2,.7,.3,1) var(--reveal-delay, 0ms) backwards; }
.motion-ready [data-reveal]:focus-within { animation: none; }
@keyframes section-reveal {
  from { opacity: .35; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-enter {
  from { opacity: .2; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes chat-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes form-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}
@keyframes identity-spark {
  0%, 100% { transform: rotate(0) scale(1); }
  50% { transform: rotate(30deg) scale(1.2); }
}
@keyframes spark-drift {
  0%, 100% { transform: translateY(0) rotate(12deg) scale(1); opacity: .16; }
  50% { transform: translateY(-24px) rotate(32deg) scale(1.08); opacity: .3; }
}
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .hero-copy > * { animation: hero-enter .9s cubic-bezier(.2,.7,.3,1) backwards; }
  .motion-ready .hero-copy > .hero-identity { animation-delay: .1s; }
  .motion-ready .hero-copy > h1 { animation-delay: .2s; }
  .motion-ready .hero-copy > .lead { animation-delay: .3s; }
  .motion-ready .hero-copy > .actions { animation-delay: .4s; }
  .motion-ready .hero-copy > .hero-note { animation-delay: .5s; }
  .motion-ready .hero-identity > .icon { animation: identity-spark 5s ease-in-out infinite; }
  .motion-ready .hero-spark { animation: spark-drift 7s ease-in-out infinite; }
  .motion-ready .hero-chat { animation: chat-float 7s ease-in-out 1s infinite; }
  .motion-ready .hero-form { animation: form-float 5.5s ease-in-out .5s infinite; }
  .motion-ready .hero-visual:hover .hero-chat,
  .motion-ready .hero-visual:hover .hero-form,
  .motion-ready .hero-visual:focus-within .hero-chat,
  .motion-ready .hero-visual:focus-within .hero-form { animation-play-state: paused; }
  .motion-ready .scene-paused .hero-spark,
  .motion-ready .scene-paused .hero-chat,
  .motion-ready .scene-paused .hero-form,
  .motion-paused .hero-copy > *,
  .motion-paused .hero-identity > .icon,
  .motion-paused .hero-spark,
  .motion-paused .hero-chat,
  .motion-paused .hero-form { animation-play-state: paused; }
}
@media (max-width: 1100px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-links { margin-left: auto; }
  .header-inner nav { width: 100%; order: 3; margin: 0; gap: 24px; padding: 5px 0; overflow: auto; }
  .hero { gap: 35px; }
  .hero-identity > span { font-size: 85px; }
  .hero-form { right: -3px; max-width: 190px; }
  .hero-chat { max-width: 280px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 38px; }
  .story-grid { gap: 40px; }
  .github-stage .story-grid { gap: 35px; }
  .getting-started { grid-template-columns: 100px minmax(0, 1fr); }
  .download-logo { width: 100px; }
  .getting-started .actions { grid-column: 2; flex-direction: row; }
}
@media (max-width: 760px) {
  .container { padding-left: 23px; padding-right: 23px; }
  .header-inner { flex-wrap: wrap; gap: 12px; padding: 12px 23px; }
  .header-links { margin-left: auto; gap: 16px; }
  .header-inner nav { width: 100%; order: 3; margin: 0; gap: 20px; padding: 5px 0; overflow: auto; }
  .header-inner nav a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; padding-top: 35px; padding-bottom: 48px; gap: 10px; }
  .hero-identity { margin-bottom: 22px; }
  .hero-identity img { width: 84px; }
  .hero-identity > span { font-size: 78px; }
  .hero-identity > .icon { width: 25px; height: 25px; margin-top: -46px; }
  .hero .lead { font-size: 16px; }
  .hero-visual { max-width: 480px; width: 100%; margin: 16px auto 0; padding: 25px 0 0; }
  .hero-spark { width: 240px; height: 240px; right: -35px; }
  .hero-chat { max-width: 272px; margin-left: 12px; }
  .visual-label { margin-left: 12px; }
  .hero-form { right: 2px; max-width: 180px; bottom: 70px; }
  .hero-visual figcaption { margin-left: 12px; max-width: 330px; }
  .host-inner { gap: 16px; }
  .host-list { gap: 19px; font-size: 14px; }
  .section { padding-top: 57px; padding-bottom: 57px; }
  .section-heading { display: block; margin-bottom: 32px; }
  .section-heading > p { margin-top: 20px; max-width: none; }
  .feature-grid { column-gap: 28px; }
  .feature-card { padding-left: 30px; }
  .feature-card h3 { font-size: 19px; }
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .github-stage .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .provider-list { gap: 14px 22px; }
  .provider-chip { font-size: 15px; }
  .getting-started { grid-template-columns: 80px minmax(0, 1fr); gap: 22px; padding-top: 40px; padding-bottom: 40px; }
  .download-logo { width: 80px; }
  .getting-started h2 { font-size: 28px; }
  .getting-started .actions { grid-column: 1 / -1; }
  .getting-started p { font-size: 13px; }
  .footer-top { flex-wrap: wrap; gap: 14px; }
  .footer-top > a:last-child { margin-left: 0; }
  .footer-bottom { display: block; }
  .footer-bottom p + p { margin-top: 12px; }
  .page-intro { padding-top: 40px; }
  .page-intro .lead { font-size: 16px; }
  .article-layout { grid-template-columns: 1fr; }
  .aside-card { order: -1; position: static; }
  .aside-card a { display: inline-block; margin-right: 20px; }
  .article h2 { font-size: 28px; }
  .provider-table { font-size: 13px; }
  .provider-table th, .provider-table td { padding: 13px 7px; }
}
@media (max-width: 430px) {
  .feature-grid { grid-template-columns: 1fr; }
  .header-inner nav { gap: 19px; }
  .hero-identity > span { font-size: 70px; }
  .hero-identity img { width: 75px; }
  .hero-visual { margin-top: 20px; }
  .hero-chat { max-width: 247px; margin-left: 4px; }
  .hero-form { max-width: 150px; right: 0; }
  .hero-visual figcaption { margin-left: 4px; }
  .visual-label { margin-left: 4px; font-size: 9px; letter-spacing: .06em; }
  .floating-label { font-size: 9px; padding: 7px 8px; }
  .actions .button { font-size: 12px; padding-left: 13px; padding-right: 13px; }
  .hero-note { font-size: 10px; }
  .macro-map { font-size: 10px; }
  .getting-started { grid-template-columns: 64px minmax(0, 1fr); gap: 17px; }
  .download-logo { width: 64px; }
  .getting-started h2 { font-size: 25px; }
  .image-dialog { padding: 8px; }
  .dialog-toolbar { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .hero-chat { transition: none; }
  .hero-copy > *, .hero-identity > .icon, .hero-spark, .hero-chat, .hero-form { animation: none !important; }
  .motion-ready [data-reveal] { animation: none; }
}
