/* home.css -- homepage sections added 2026-11 (How it works, company-wide keys,
   the landscape) plus the centred header and the demo CTA fix. Loads after
   styles.css; every new class starts with v4- so nothing collides. */
:root { --v4-red: #d9534f; --v4-red-soft: rgba(217,83,79,.1); --hdr: 75px; }
html { scroll-padding-top: calc(var(--hdr) + 8px); }

/* header: brand | centred section links | demo + theme */
header.v4-header { position: sticky; top: 0; z-index: 60; background: var(--ground); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
header.v4-header .v4-right { justify-self: end; display: flex; align-items: center; gap: 18px; }
header.v4-header nav.v4-nav { justify-self: center; gap: 24px; }
header.v4-header a.brand { color: var(--ink); display: flex; align-items: center; gap: 12px; }
header.v4-header nav.v4-nav a.on { color: var(--ink); }

.v4-how, .v4-land, .v4-key { position: relative; z-index: 1; border-top: 1px solid var(--rule); padding: 88px 56px; text-align: left; }
.v4-head { max-width: 1180px; margin: 0 auto 28px; }
.v4-head h2 { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -.03em; margin: 14px 0 12px; color: var(--ink); }
.v4-head p { color: var(--body); font-size: 18px; line-height: 1.55; max-width: 720px; margin: 0; }
.v4-ot { font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 4px 8px; }
h2 .hl, h3 .hl { white-space: normal; }

/* ---- How it works: page scroll walks the steps (wide screens) ---- */
.v4-how { padding: 0; height: 440vh; }
.v4-pin { position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 24px 56px; }
.v4-how .v4-head { margin-bottom: 18px; width: 100%; }
.v4-chips { max-width: 1180px; width: 100%; margin: 0 auto 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.v4-chips button { display: inline-flex; align-items: center; gap: 8px; font: 600 14px Archivo, sans-serif; color: var(--body); background: none; border: 1px solid var(--rule-strong); border-radius: 22px; padding: 7px 14px 7px 8px; cursor: pointer; }
.v4-chips i { font: 500 11px "IBM Plex Mono", monospace; font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.v4-chips button.on { border-color: var(--ember); color: var(--ink); box-shadow: 0 0 12px var(--ember-glow); }
.v4-chips button.on i { background: var(--ember); color: #1a1208; }
.v4-reel { width: calc(100% + 112px); margin: 0 -56px; }
.v4-track { display: flex; gap: 24px; will-change: transform; }
.v4-step { --w: min(620px, 72vw, calc((100vh - 440px) * 1.5)); flex: 0 0 var(--w); background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, opacity .3s; opacity: .4; cursor: pointer; }
.v4-step.on { border-color: var(--ember); opacity: 1; cursor: default; box-shadow: 0 0 60px -24px var(--ember-glow); }
.v4-media { aspect-ratio: 16 / 9; background: #f6f4ee; border-bottom: 1px solid var(--rule); overflow: hidden; position: relative; }
.v4-media > img, .v4-media video { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.v4-media.pad { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; }
.v4-txt { padding: 18px 22px 22px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; }
.v4-txt h3 { grid-column: 1 / -1; font-size: 21px; letter-spacing: -.02em; margin: 2px 0 0; color: var(--ink); }
.v4-txt ul { grid-column: 1 / -1; margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.v4-txt li { color: var(--body); font-size: 15px; line-height: 1.5; padding-left: 20px; position: relative; }
.v4-txt li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 2px; background: var(--ember); }
.v4-txt .btn-solid { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.v4-n { font: 500 12px "IBM Plex Mono", monospace; color: var(--muted); justify-self: end; }
.v4-who { justify-self: start; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--rule-strong); color: var(--body); border-radius: 4px; padding: 3px 8px; }
.v4-who.emp { border-color: #6aa5c9; color: #8cc0e0; }
.v4-who.bld { border-color: var(--ember); color: var(--ember-text); }
.v4-who.it { border-color: #7fb069; color: #9cc98a; }
:root[data-theme="light"] .v4-who.emp { color: #2c6d93; } :root[data-theme="light"] .v4-who.it { color: #4f7f3a; }

/* step 1: tile -> GitHub -> Azure resources, lit up as you scroll */
.v4-build .v4-b { transition: opacity .35s, transform .35s, filter .35s; opacity: .22; filter: grayscale(1); transform: scale(.96); }
.v4-build[data-stage="0"] .v4-b0, .v4-build[data-stage="1"] .v4-b0, .v4-build[data-stage="1"] .v4-b1,
.v4-build[data-stage="2"] .v4-b { opacity: 1; filter: none; transform: none; }
.v4-arr { color: #c9c2b2; font-size: 22px; transition: color .3s; }
.v4-build[data-stage="1"] .v4-arr:nth-of-type(1), .v4-build[data-stage="2"] .v4-arr { color: var(--ember); }
.v4-b0 { position: relative; width: 26%; flex: none; }
.v4-b0 img { width: 100%; height: auto; display: block; border-radius: 9% / 9%; box-shadow: 0 0 0 1px rgba(232,135,60,.45), 0 0 26px -2px var(--ember-glow), 0 14px 30px -14px rgba(0,0,0,.35); animation: v4tile 3.2s ease-in-out infinite; }
@keyframes v4tile { 50% { box-shadow: 0 0 0 1.5px rgba(232,135,60,.7), 0 0 40px 2px var(--ember-glow), 0 14px 30px -14px rgba(0,0,0,.35); } }
.v4-pulse { position: absolute; inset: 0; border-radius: 9% / 9%; border: 2px solid var(--ember); animation: v4p 1.8s ease-out infinite; }
.v4-build:not([data-stage="0"]) .v4-pulse { display: none; }
@keyframes v4p { to { transform: scale(1.12); opacity: 0; } }
.v4-b1 { display: grid; gap: 8px; justify-items: center; width: 22%; flex: none; }
.v4-b1 .gh { width: 100%; height: auto; }
.v4-repo { font: 500 10.5px "IBM Plex Mono", monospace; color: #1c1b17; background: #fff; border: 1px solid #e6e1d6; border-radius: 6px; padding: 5px 7px; text-align: center; }
.v4-b2 { display: grid; gap: 5px; flex: 1; min-width: 0; }
.v4-auto { font: 600 10.5px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #b4531d; padding: 0 2px 2px; }
.v4-b2 .v4-az { padding: 4px 9px; }
.v4-b2 .v4-az img, .v4-b2 .v4-az svg { width: 19px; height: 19px; }
.v4-az { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #e6e1d6; border-radius: 8px; padding: 6px 9px; color: #1c1b17; }
.v4-az img, .v4-az svg { width: 22px; height: 22px; object-fit: contain; flex: none; }
.v4-az svg { fill: none; stroke: #2b6cb0; stroke-width: 1.6; }
.v4-az b { font: 600 12.5px Archivo, sans-serif; line-height: 1.2; }

.v4-grant { position: absolute; right: 14px; bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #1f6f6a; color: #1c1b17; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); display: grid; gap: 8px; font-size: 14px; }
.v4-grant div { display: flex; gap: 6px; }
.v4-grant span { font: 600 12px Archivo, sans-serif; border: 1px dashed #d8d2c4; border-radius: 14px; padding: 4px 10px; color: #5b584f; }
.v4-grant span.on { border: 1px solid #1f6f6a; background: #e3efec; color: #1f6f6a; }
.v4-tok div span.on { font-family: "IBM Plex Mono", monospace; }
.v4-grant small { font: 500 11.5px "IBM Plex Mono", monospace; color: #1f6f6a; }

/* ---- company-wide keys ---- */
.v4-map { max-width: 1180px; margin: 0 auto; position: relative; display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 90px; align-items: center; }
.v4-col { display: grid; gap: 10px; position: relative; z-index: 1; }
.v4-col h4 { margin: 0 0 4px; font: 500 11.5px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.v4-node { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 11px 14px; color: var(--ink); font-size: 15px; display: flex; align-items: center; gap: 12px; }
.v4-node b { font-weight: 600; }
.v4-node small { display: block; font: 400 12px "IBM Plex Mono", monospace; color: var(--muted); margin-top: 2px; }
.v4-node svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v4-node .ic, .v4-node .pi { flex: none; display: grid; place-items: center; color: var(--ember-text); }
.v4-node .ic { width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--ember) 12%, transparent); }
.v4-node .ic.az img { width: 24px; height: 24px; object-fit: contain; }
.v4-node .pi { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ember); }
.v4-node .pi img { width: 26px; height: 26px; object-fit: contain; }
.v4-node.person { padding: 16px 14px; }
.v4-node.svc { border-color: color-mix(in srgb, var(--ember) 45%, var(--rule)); }
.v4-node.out { border-style: dashed; }
.v4-node.out .ic { background: none; border: 1px solid var(--rule-strong); color: var(--ink); }
.v4-vault { font: 500 12px "IBM Plex Mono", monospace; color: var(--ember-text); display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ember); border-radius: 20px; padding: 5px 10px; box-shadow: 0 0 18px -4px var(--ember-glow); background: var(--ground); }
.v4-vault img { width: 18px; height: 18px; }
.v4-cta { max-width: 1180px; margin: 76px auto 0; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.v4-point { position: relative; display: inline-block; }
.v4-scribble { position: absolute; left: calc(100% + 4px); top: -40px; width: 420px; pointer-events: none; }
.v4-scribble svg { width: 190px; height: 100px; overflow: visible; fill: none; stroke: var(--ember); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--ember-glow)) drop-shadow(0 0 14px var(--ember-glow)); }
.v4-scribble svg path:first-child { stroke-dasharray: 260; stroke-dashoffset: 260; animation: v4draw 1.1s ease-out .3s forwards; }
.v4-scribble em { position: absolute; left: 200px; top: -14px; font: 700 38px "Caveat", "Segoe Print", cursive; font-style: normal; color: var(--ember-text); transform: rotate(-6deg); white-space: nowrap; text-shadow: 0 0 12px var(--ember-glow); }
@keyframes v4draw { to { stroke-dashoffset: 0; } }

/* ---- the landscape ---- */
.v4-land { background-color: var(--surface); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 28px 28px; background-position: -1px -1px; }
.v4-landmap { max-width: 1180px; margin: 0 auto; position: relative; display: grid; grid-template-columns: .95fr 1.05fr; gap: 110px; align-items: center; }
.v4-bads { display: grid; gap: 18px; position: relative; z-index: 1; }
.v4-bad { position: relative; background: var(--ground); border: 1px solid var(--v4-red); border-radius: 12px; padding: 20px 22px 20px 150px; min-height: 130px; }
.v4-bad h3 { font-size: 23px; letter-spacing: -.015em; margin: 10px 0 6px; color: var(--ink); text-decoration: line-through; text-decoration-color: rgba(217,83,79,.7); text-decoration-thickness: 1.5px; }
.v4-bad p { color: var(--body); margin: 0; font-size: 14.5px; line-height: 1.5; }
.v4-bad .v4-ot { color: var(--v4-red); border-color: var(--v4-red); }
.v4-x { position: absolute; top: -11px; right: -11px; width: 26px; height: 26px; border-radius: 50%; background: var(--v4-red); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.v4-art { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 112px; height: 60px; fill: none; stroke: var(--v4-red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--v4-red-soft); border-radius: 10px; padding: 4px; }
.v4-art .dash { stroke-dasharray: 3 4; animation: v4flow 1.6s linear infinite; }
.v4-good { position: relative; z-index: 1; background: var(--ground); border: 1px solid var(--ember); border-radius: 16px; padding: 28px; box-shadow: 0 0 0 1px var(--ember) inset, 0 0 70px -6px var(--ember-glow); }
.v4-good .v4-ot { color: var(--ember-text); border-color: var(--ember); }
.v4-good h3 .hl { white-space: nowrap; }
.v4-good > .btn-solid { display: table; margin: 0 auto; }
.v4-good h3 { font-size: 28px; letter-spacing: -.025em; line-height: 1.15; margin: 14px 0 20px; color: var(--ink); }
.v4-tenant { position: relative; border: 2px dashed var(--ember); border-radius: 14px; padding: 26px 22px 22px; margin-bottom: 22px; background: color-mix(in srgb, var(--ember) 5%, transparent); }
.v4-azlogo { position: absolute; top: 12px; left: 12px; width: 34px; height: auto; }
.v4-ring { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; justify-items: center; align-items: center; max-width: 340px; margin: 0 auto; }
.v4-ring > img, .v4-ring > svg { width: 44px; height: 44px; object-fit: contain; padding: 10px; box-sizing: content-box; background: #fff; border-radius: 12px; border: 1px solid #e6e1d6; }
.v4-ring > svg { fill: none; stroke: #2b6cb0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.v4-core { grid-area: 2 / 2; width: 104px; height: 104px; border-radius: 16px; background: var(--ember); display: grid; place-items: center; box-shadow: 0 0 30px var(--ember-glow); }
.v4-core .mark { width: 50px; height: 50px; background: var(--ground); }
.v4-core .mark i { background: var(--ember); }
.v4-core .mark i:first-child { top: 13px; right: 13px; width: 22px; height: 6px; }
.v4-core .mark i:last-child { bottom: 13px; left: 13px; width: 6px; height: 22px; }

/* ---- wires ---- */
.v4-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.v4-wires path { fill: none; stroke: var(--rule-strong); stroke-width: 1.3; }
.v4-wires path.live { stroke: var(--ember); stroke-dasharray: 4 7; animation: v4flow 1.4s linear infinite; opacity: .85; }
.v4-landwires path { stroke-width: 2; }
.v4-landwires path.live { stroke: url(#v4g); stroke-dasharray: 6 8; opacity: 1; }
@keyframes v4flow { to { stroke-dashoffset: -22; } }

/* ---- pinned sections sit under the frozen header ---- */
.story-live.pinned .hero-stage { top: var(--hdr); min-height: calc(100svh - var(--hdr)); }
.walk.live .walk-stage { top: var(--hdr); height: calc(100svh - var(--hdr)); }

/* ---- See it in action: the button sits under the screenshot, no gap ---- */
.walk-stage .demo-cta { margin-top: 6px; }
.walk.live .demo-shot { width: min(1080px, 100%, calc((100svh - 250px - var(--hdr)) * 1.6744)); }

/* ---- pricing: the trial card's sandbox button reads as the main ask ---- */
.plan[data-plan="trial"] .btn-solid { width: 100%; text-align: center; }

/* ---- hand-written hooks (Caveat, slanted, ember glow) ---- */
.v4-hand { font: 700 44px/0.95 "Caveat", "Segoe Print", cursive; color: var(--ember-text); text-shadow: 0 0 12px var(--ember-glow), 0 0 28px var(--ember-glow); transform: rotate(-7deg); display: inline-block; white-space: nowrap; }
.v4-hand small { display: block; font-size: .78em; margin-left: 1.6em; }
.v4-hand-svg { overflow: visible; fill: none; stroke: var(--ember); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--ember-glow)) drop-shadow(0 0 14px var(--ember-glow)); }
/* How it works: "Enterprise App Scaffolding in 3 clicks!" points at the Build card */
.v4-how .v4-head { position: relative; }
.v4-hook { position: absolute; right: 10px; top: 6px; pointer-events: none; }
.v4-hook .v4-hand-svg { position: absolute; left: -250px; top: 60px; width: 380px; height: 170px; }

/* ---- Build with me: promo strip above the header (dismissible, home.js) ---- */
.v4-promo { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 9px 20px; background: linear-gradient(90deg, color-mix(in srgb, var(--ember) 16%, var(--ground)), color-mix(in srgb, var(--ember) 8%, var(--ground))); border-bottom: 1px solid color-mix(in srgb, var(--ember) 45%, var(--rule)); font-size: 14.5px; color: var(--ink); }
.v4-promo[hidden] { display: none; }
.v4-promo .tag { font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #1a1208; background: var(--ember); border-radius: 4px; padding: 3px 7px; }
.v4-promo a { color: var(--ember-text); font-weight: 600; white-space: nowrap; }
.v4-promo a:hover { color: var(--ink); }
.v4-promo .x { margin-left: 6px; color: var(--muted); background: none; border: 0; font-size: 16px; cursor: pointer; }
/* ---- Build with me: ticket in the hero ---- */
.v4-ticket { position: relative; margin-top: 6px; border: 1.5px dashed var(--ember); border-radius: 14px; padding: 16px 18px; max-width: 540px; background: color-mix(in srgb, var(--ember) 6%, transparent); box-shadow: 0 0 40px -18px var(--ember-glow); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; }
.v4-ticket .k { grid-column: 1 / -1; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ember-text); }
.v4-ticket b { color: var(--ink); font-size: 18px; letter-spacing: -.01em; }
.v4-ticket p { margin: 2px 0 0; color: var(--body); font-size: 14px; line-height: 1.45; }
.v4-ticket p a { text-decoration: underline; text-underline-offset: 2px; }
.v4-ticket .btn-line { white-space: nowrap; }
.v4-ticket .v4-hand { position: absolute; right: -40px; top: -40px; font-size: 30px; pointer-events: none; }
@media (max-width: 1100px) {
  .v4-hook { position: static; margin: 0 0 6px; }
  .v4-hook .v4-hand-svg { display: none; }
  .v4-hook .v4-hand { font-size: 32px; transform: rotate(-4deg); }
  .v4-promo { flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; text-align: center; }
  .v4-ticket { grid-template-columns: 1fr; }
  .v4-ticket .v4-hand { display: none; }
}

/* ---- pricing: trial card "who is it for" picker ---- */
.v4-who-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.v4-who-pick button { font: 500 12px "IBM Plex Mono", monospace; color: var(--body); background: none; border: 1px solid var(--rule-strong); border-radius: 16px; padding: 6px 11px; cursor: pointer; }
.v4-who-pick button[aria-pressed="true"] { border-color: var(--ember); color: var(--ink); box-shadow: 0 0 10px var(--ember-glow); }

/* ---- narrow screens ---- */
@media (max-width: 1100px) {
  :root { --hdr: 104px; }
  header.v4-header { grid-template-columns: 1fr auto; }
  header.v4-header nav.v4-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; gap: 20px; padding-bottom: 2px; }
  .v4-scribble { display: none; }
}
@media (max-width: 960px) {
  .v4-how, .v4-land, .v4-key { padding: 64px 24px; }
  .v4-how { height: auto; }
  .v4-reel { width: 100%; margin: 0; }
  .v4-pin { position: static; height: auto; overflow: visible; padding: 0; }
  .v4-chips { display: none; }
  .v4-track { flex-direction: column; transform: none !important; }
  .v4-step { flex: none; opacity: 1; --w: auto; }
  .v4-build .v4-b { opacity: 1; filter: none; transform: none; }
  .v4-landmap { grid-template-columns: 1fr; gap: 40px; }
  .v4-map { grid-template-columns: 1fr 1fr; gap: 30px; }
  .v4-map .v4-col:last-child { grid-column: 1 / -1; }
  .v4-wires { display: none; }
  .v4-bads::after { content: "\2193"; text-align: center; color: var(--ember); font-size: 26px; display: block; }
}
@media (max-width: 640px) {
  .v4-how, .v4-land, .v4-key { padding: 52px 16px; }
  .v4-map { grid-template-columns: 1fr; }
  .v4-col + .v4-col::before { content: "\2193"; display: block; text-align: center; color: var(--ember); font-size: 20px; margin: -8px 0 2px; }
  .v4-bad { padding: 92px 18px 18px; }
  .v4-art { top: 18px; transform: none; }
  .v4-media.v4-build { aspect-ratio: auto; flex-wrap: wrap; }
  .v4-b0 { width: 38%; } .v4-b1 { width: 40%; } .v4-b2 { flex-basis: 100%; }
  .v4-build .v4-arr:nth-of-type(2) { display: none; }
  .v4-grant { right: 8px; bottom: 8px; padding: 8px 10px; font-size: 12.5px; }
  .v4-ring > img, .v4-ring > svg { width: 34px; height: 34px; padding: 8px; }
  .v4-core { width: 62px; height: 62px; }
}
@media (prefers-reduced-motion: reduce) { .v4-b0 img { animation: none; } .v4-pulse, .v4-wires path.live, .v4-art .dash { animation: none; } .v4-scribble svg path:first-child { animation: none; stroke-dashoffset: 0; } }

/* ---- pricing page ---- */
.v4-pricepage { display: block; padding: 0; text-align: initial; }
.v4-pricepage .pricing { border-top: 0; }
