/* ── Page-specific styles (canonical "Stacked" layout) ─────────────
   Hero (manifesto), sticky-stack principles, and the pinned
   IDE → TUI → ADE horizontal slide-in argument. Lifted from the
   design handoff's inline <style>; the only change from the
   prototype is the principle art slot (web component → <img>). */

/* ── Hero · Manifesto / engineering notebook ───────────────────── */
.heroA { position: relative; padding: 0; border-bottom: 1px solid var(--cf-line); }
.heroA-top { border-bottom: 1px solid var(--cf-line); background: var(--cf-surface); }
.heroA-top .wrap { display: flex; align-items: center; gap: 16px; height: 52px; }
.heroA-top .grow { flex: 1; }
.heroA-colo { font-size: var(--cf-size-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--cf-ink-3); }
.heroA-colo b { color: var(--cf-ink); font-weight: 700; }
.heroA-colo .live { color: var(--cf-rust); display: inline-flex; align-items: center; gap: 6px; }
.heroA-colo .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cf-rust); animation: cf-pulse 1.4s infinite; }

.heroA-body { padding: clamp(64px, 10vw, 132px) 0 clamp(56px, 8vw, 104px); position: relative; }
.heroA-body::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  right: max(24px, calc((100% - min(1180px, 100% - 64px)) / 2 - 1px));
  width: 1px; background: repeating-linear-gradient(var(--cf-line) 0 6px, transparent 6px 24px); opacity: .7;
}
.heroA-eyebrow {
  font-size: var(--cf-size-eyebrow); letter-spacing: var(--cf-track-eyebrow-wide); text-transform: uppercase;
  color: var(--cf-ink-3); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px;
}
.heroA-eyebrow .mk { display: flex; }
.heroA-h1 { font-size: clamp(34px, 6.3vw, 80px); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; margin: 0; max-width: none; text-wrap: balance; }
.heroA-wordmark { display: block; height: clamp(46px, 8vw, 96px); width: auto; margin: 0 0 .18em -.04em; }
.heroA-stmt { display: block; }
.heroA-h1 .accent { color: var(--cf-rust); }
.heroA-h1 .cur { display: inline-block; width: .5ch; height: .92em; transform: translateY(.08em); background: var(--cf-rust); margin-left: .12em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.heroA-tag { font-size: clamp(14px, 1.7vw, 19px); line-height: 1.5; color: var(--cf-ink-2); margin: 34px 0 0; max-width: 54ch; text-wrap: pretty; }
.heroA-tag b { color: var(--cf-ink); font-weight: 700; }
.heroA-cta { margin-top: 40px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.heroA-fade { opacity: 1; transform: none; transition: opacity .7s var(--cf-ease), transform .7s var(--cf-ease); }
html.js-anim .heroA.reveal:not(.in) .heroA-fade { opacity: 0; transform: translateY(14px); }
html.reveal-done .heroA-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce){ .heroA-fade{opacity:1;transform:none} .heroA-h1 .cur{animation:none} }

/* ── Sticky-stack principles ───────────────────────────────────── */
.pstack { position: relative; background: var(--cf-page); }
.ppanel {
  position: sticky; top: 0; min-height: 100vh;
  display: flex; align-items: center;
  background: var(--cf-page);
  border-top: 1.4px solid var(--cf-ink);
  box-shadow: 0 -22px 50px rgba(26,24,21,.07);
  overflow: hidden;
}
.ppanel::before { /* faint graph paper, like the workflow canvas */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background:
    linear-gradient(rgba(106,94,68,.06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(106,94,68,.06) 1px, transparent 1px) 0 0 / 24px 24px;
}
.ppanel-inner, .ppanel-grid { position: relative; width: min(1180px, 100% - 64px); margin-inline: auto; padding: 88px 0; }
.ppanel-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ppanel-grid.flip { grid-template-columns: 1.08fr 1fr; }
.ppanel-grid.flip .ppanel-text { order: 2; }
.ppanel-grid.flip .ppanel-art { order: 1; }

/* intro panel */
.ppanel-intro .ppanel-inner { text-align: left; max-width: 900px; }
.pstack-eyebrow { font-size: var(--cf-size-eyebrow); letter-spacing: var(--cf-track-eyebrow-wide); text-transform: uppercase; color: var(--cf-ink-3); font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.pstack-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--cf-rust); }
.pstack-title { font-size: clamp(36px, 7vw, 96px); font-weight: 700; letter-spacing: -.035em; line-height: 1.0; margin: 22px 0 0; text-wrap: balance; }
.pstack-sub { font-size: clamp(13px, 1.4vw, 16px); line-height: 1.6; color: var(--cf-ink-2); margin: 24px 0 0; max-width: 52ch; }
.pstack-cue { margin-top: 40px; display: inline-flex; align-items: center; gap: 10px; font-size: var(--cf-size-meta); letter-spacing: .14em; text-transform: uppercase; color: var(--cf-ink-3); }
.pstack-cue .chev { display: inline-block; width: 12px; height: 12px; border-right: 1.6px solid var(--cf-rust); border-bottom: 1.6px solid var(--cf-rust); transform: rotate(45deg); animation: cue 1.6s var(--cf-ease) infinite; }
@keyframes cue { 0%,100%{transform:rotate(45deg) translate(0,0);opacity:1} 50%{transform:rotate(45deg) translate(3px,3px);opacity:.4} }

/* principle panel text */
.ppanel-num { font-size: var(--cf-size-eyebrow); letter-spacing: var(--cf-track-eyebrow-wide); text-transform: uppercase; color: var(--cf-ink-3); font-weight: 700; }
.ppanel-num b { color: var(--cf-rust); }
.ppanel-h { font-size: clamp(26px, 3.6vw, 50px); font-weight: 700; letter-spacing: -.028em; line-height: 1.08; margin: 18px 0 0; text-wrap: balance; }
.ppanel-h .accent { color: var(--cf-rust); }
.ppanel-p { font-size: clamp(14px, 1.5vw, 18px); line-height: 1.6; color: var(--cf-ink-2); margin: 22px 0 0; max-width: 42ch; text-wrap: pretty; }
.ppanel-p b { color: var(--cf-ink); font-weight: 700; }

/* art slot — production: a plain <img> fills the framed slot */
.ppanel-art { border: 1.4px solid var(--cf-ink); aspect-ratio: 4 / 3; max-height: 62vh; width: 100%; background: var(--cf-card); position: relative; overflow: hidden; }
.ppanel-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppanel-art .tag { position: absolute; left: 10px; bottom: 9px; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--cf-ink-3); pointer-events: none; background: rgba(245,241,232,.78); padding: 2px 5px; }

@media (max-width: 860px) {
  .ppanel-grid { grid-template-columns: 1fr; }
  .ppanel-art { max-height: 42vh; }
  .ppanel-inner, .ppanel-grid { padding: 96px 0 64px; }
}
@media (prefers-reduced-motion: reduce){
  .pstack-cue .chev{animation:none}
  /* parity with the ADE/features treatment: don't scroll-cover under reduced motion */
  .ppanel{ position: static; box-shadow: none; }
}

/* ── ADE argument (pinned, horizontal slide-ins) ───────────────── */
.ade { position: relative; height: 320vh; background: var(--cf-page); }
.ade-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.ade-pane {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cf-page); will-change: transform;
}
.ade-pane[data-i="0"] { z-index: 1; }
.ade-pane[data-i="1"] { z-index: 2; transform: translateX(100%); }
.ade-pane[data-i="2"] { z-index: 3; transform: translateX(100%); }

/* sharp UI scene fills the pane behind the frosted card */
.ade-scene {
  position: absolute; inset: 0; overflow: hidden;
  padding: clamp(22px, 4vw, 60px);
  display: grid; gap: 12px;
  filter: blur(3px);
  background:
    linear-gradient(rgba(106,94,68,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(106,94,68,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--cf-page);
}
/* ~20% cream frosting over the background so it stays clearly secondary */
.ade-pane::after { content: ""; position: absolute; inset: 0; background: rgba(245,241,232,.2); z-index: 1; pointer-events: none; }
/* (Prototype-only generic scene primitives — .sp/.rw/.cl/.lr/.dot and the
   .ide/.tui/.ade2 grid layouts — were removed: the shipped panes use only
   the richer .vscode / .terminal / .shot scenes defined below.) */

/* real cyboflow UI screenshot (TUI pane) */
.ade-scene.shot { padding: 0; display: block; gap: 0; }
.ade-scene.shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }

/* VS Code-style LIGHT IDE (pane 0) */
.ade-scene.vscode { padding: 0; gap: 0; grid-template-columns: 46px 220px 1fr; grid-template-rows: 1fr 22px; background: #ffffff; color: #333; }
.vscode .vs-activity { grid-row: 1 / span 2; grid-column: 1; background: #2c2c2c; display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 13px 0; }
.vscode .vs-activity .vsi { width: 22px; height: 22px; border-radius: 3px; border: 1.6px solid #8a8a8a; opacity: .6; }
.vscode .vs-activity .vsi.on { opacity: 1; border-color: #fff; }
.vscode .vs-side { grid-row: 1; grid-column: 2; background: #f3f3f3; padding: 8px 0; overflow: hidden; border-right: 1px solid #e7e7e7; }
.vscode .vs-side-h { font-size: 9px; letter-spacing: .12em; color: #6f6f6f; padding: 4px 14px 9px; }
.vscode .vs-tree { display: flex; flex-direction: column; }
.vscode .vs-f { font-size: 11.5px; padding: 2.5px 14px; color: #3b3b3b; white-space: nowrap; }
.vscode .vs-f.folder { font-weight: 600; }
.vscode .vs-f.ind { padding-left: 30px; }
.vscode .vs-f.on { background: #e4e6f1; color: #1a1a1a; }
.vscode .vs-f .ic { color: #7a7a7a; display: inline-block; width: 10px; }
.vscode .vs-editor { grid-row: 1; grid-column: 3; background: #ffffff; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.vscode .vs-tabs { display: flex; background: #ececec; height: 32px; flex: none; }
.vscode .vs-tab { display: flex; align-items: center; padding: 0 16px; font-size: 11.5px; color: #6f6f6f; background: #ececec; border-right: 1px solid #e0e0e0; }
.vscode .vs-tab.on { background: #ffffff; color: #222; box-shadow: inset 0 1.5px 0 var(--cf-rust); }
.vscode .vs-code { padding: 10px 0; font-size: 12.5px; line-height: 1.6; font-family: var(--cf-font); overflow: hidden; }
.vscode .vs-row { display: flex; gap: 16px; padding: 0 18px; white-space: nowrap; }
.vscode .vs-row .gut { width: 18px; text-align: right; color: #b9b9b9; flex: none; }
.vscode .vs-status { grid-row: 2; grid-column: 1 / -1; background: #007acc; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 10px; color: #fff; }
.vscode .vs-k{color:#0000ff}.vscode .vs-s{color:#a31515}.vscode .vs-c{color:#008000}.vscode .vs-fn{color:#795e26}.vscode .vs-t{color:#267f99}.vscode .vs-p{color:#333}

/* cream terminal (TUI pane) — matches the cyboflow terminal */
.ade-scene.terminal { padding: 0; gap: 0; grid-template-columns: 1fr; grid-template-rows: 1fr; background: #f5f1e8; }
.terminal .tm-bar { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; background: linear-gradient(var(--cf-surface), var(--cf-surface-dim)); border-bottom: 1px solid var(--cf-line); }
.terminal .tm-bar .tl { display: flex; gap: 6px; }
.terminal .tm-bar .tl i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.terminal .tm-bar .tl i:nth-child(1){background:#ff5f57}.terminal .tm-bar .tl i:nth-child(2){background:#febc2e}.terminal .tm-bar .tl i:nth-child(3){background:#28c840}
.terminal .tm-title { font-size: 10px; letter-spacing: .04em; color: var(--cf-ink-3); }
.terminal .tm-body { padding: 16px 18px; font-family: var(--cf-font); font-size: 12.5px; line-height: 1.75; color: var(--cf-ink); overflow: hidden; }
.terminal .tm-line { white-space: nowrap; }
.terminal .tm-pr { color: var(--cf-rust); font-weight: 700; }
.terminal .tm-cmd { color: var(--cf-ink); font-weight: 700; }
.terminal .tm-ok { color: var(--cf-green); }
.terminal .tm-run { color: var(--cf-rust); }
.terminal .tm-dim { color: var(--cf-ink-3); }
.terminal .tm-cur { display: inline-block; width: 8px; height: 14px; background: var(--cf-rust); vertical-align: -2px; animation: blink 1.05s steps(1) infinite; }

/* card fill — slightly raised so the headline reads over the busy light scenes */
.ade-pane[data-i="0"] .ade-card, .ade-pane[data-i="1"] .ade-card { background: rgba(245,241,232,.62); }

/* frosted centered card holds the headline */
.ade-card {
  position: relative; z-index: 2;
  width: min(72%, 920px);
  /* hug the content (so the headline + sub never spill outside the box),
     but keep a dramatic minimum and never exceed the viewport */
  height: auto; min-height: min(62%, 560px); max-height: 88%;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 4.2vw, 60px);
  background: rgba(245,241,232,.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  backdrop-filter: blur(12px) saturate(1.05);
  border: 1.4px solid var(--cf-ink);
  box-shadow: var(--cf-shadow-modal);
}
.ade-inner { text-align: center; width: 100%; }
.ade-kicker {
  font-size: var(--cf-size-eyebrow); letter-spacing: var(--cf-track-eyebrow-wide); text-transform: uppercase;
  color: var(--cf-ink-3); font-weight: 700; display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px;
}
.ade-kicker::before { content: ""; width: 18px; height: 1px; background: var(--cf-rust); }
.ade-kicker.accent { color: var(--cf-rust); }
.ade-h { font-size: clamp(32px, min(7vw, 9vh), 100px); font-weight: 700; letter-spacing: -.045em; line-height: .97; margin: 0; text-wrap: balance; }
.ade-h .accent { color: var(--cf-rust); }
.ade-sub { font-size: clamp(13px, 1.5vw, 19px); line-height: 1.5; color: var(--cf-ink-2); margin: 24px auto 0; max-width: 46ch; text-wrap: pretty; }

/* pane 2 — dark, to accentuate the conclusion */
.ade-pane[data-i="2"] .ade-scene { background:
  linear-gradient(rgba(245,241,232,.04) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgba(245,241,232,.04) 1px, transparent 1px) 0 0 / 24px 24px,
  #1a1815; }
.ade-pane[data-i="2"]::after { background: rgba(26,24,21,.2); }
.ade-pane[data-i="2"] .ade-card { background: rgba(22,20,17,.74); border-color: var(--cf-page); -webkit-backdrop-filter: blur(16px) saturate(1.05); backdrop-filter: blur(16px) saturate(1.05); }
.ade-pane[data-i="2"] .ade-h { color: var(--cf-page); }
.ade-pane[data-i="2"] .ade-sub { color: rgba(245,241,232,.72); }

@media (prefers-reduced-motion: reduce){
  .ade { height: auto; }
  .ade-sticky { position: static; height: auto; }
  .ade-pane { position: relative; inset: auto; min-height: 100vh; transform: none !important; }
}
