/* Home page option E (home-e.html): option D's look (welcome.css,
   home-hero.css, home-d.css) with one console, one control section and
   motion drawn from what the product does. Only what option E adds is here. */

/* ---- header: Products opens a menu of three columns ---- */
/* Anchored to the sticky header, not the button, so it never runs off the
   right edge. */
.hd-dd.he-dd { position: static; }
.hd-dd-menu.he-mega {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  top: calc(100% - 6px); left: auto; right: clamp(16px, 3vw, 32px);
  width: min(760px, calc(100vw - 32px)); padding: 18px 8px;
  animation: he-drop 160ms ease-out;
}
.hd-dd-menu.he-mega[hidden] { display: none; }
@keyframes he-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.he-col { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.he-col + .he-col { border-left: 1px solid var(--line); }
.he-col-k { margin: 0 0 8px 10px; font: 10.5px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.nav-links .he-mega a { padding: 7px 10px; }
.he-mega b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.he-mega span { font: 12.5px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--mute); }
.he-pv { font: normal 9.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal-text); border: 1px solid currentColor; border-radius: 3px; padding: 2px 4px; }
@media (max-width: 900px) { .hd-dd-menu.he-mega { grid-template-columns: minmax(0, 1fr); width: min(320px, calc(100vw - 32px)); } .he-col + .he-col { border-left: 0; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; } }

/* ---- hero: the mark, the headline, one line, two actions ---- */
.he-hero { padding-bottom: clamp(28px, 4vw, 48px); }
.he-hero .hero-actions { align-items: center; }
.he-alt { font: 500 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; }
.he-alt:hover { color: var(--ink); border-color: var(--ink); }

/* ---- the console (home-e.js): the /try samples' first tasks ---- */
.ec-wrap { padding: 0 clamp(16px, 3vw, 32px) 24px; }
/* The console stands on a quiet grid, the way a product shot sits on a page. */
.ec-stage {
  max-width: 1320px; margin: 0 auto; padding: clamp(18px, 4vw, 56px);
  border: 1px solid var(--line); border-radius: 16px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--ground-2);
}
.ec-pause { margin: 0 0 0 8px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--paper); color: var(--ink-2); font: 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.ec-pause:hover { color: var(--ink); border-color: var(--ink); }
.ec-frame {
  max-width: 1240px; margin: 0 auto; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(17, 17, 17, 0.35);
  transition: opacity 180ms;
}
.ec-frame.switching { opacity: 0.55; }
.ec-frame .frame-tabs button { font: 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.ec-task { margin: 0; font: 12px/1.4 var(--mono); color: var(--mute); }
.ec-task::before { content: "Asked: "; color: var(--signal-text); }
.ec-frame .fr-steps li { transition: background 200ms, opacity 200ms; }
.ec-frame .fr-steps li.pending { opacity: 0.25; }
.ec-frame .fr-steps li.live { background: color-mix(in srgb, var(--signal) 10%, transparent); }
.ec-frame .fr-steps li { grid-template-columns: 128px minmax(0, 1fr) auto; }
.ec-frame .fr-steps .k { color: var(--ink); }
.ec-card { border: 1px solid var(--ink); border-radius: 7px; padding: 12px 14px 14px; background: var(--paper); }
.ec-card.pop { animation: ec-pop 380ms cubic-bezier(.2, .8, .2, 1.2); }
@keyframes ec-pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.ec-card-k { display: block; margin-bottom: 6px; font: 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-text); }
.ec-card-text { margin: 0 0 12px; font-size: 13.5px; color: var(--ink); }
.ec-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-acts .btn { height: 32px; cursor: pointer; }
.ec-approve.pulse { animation: ec-pulse 1.6s ease-out 2; }
@keyframes ec-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 91, 31, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(255, 91, 31, 0); } }
.ec-out { margin: 0; font-size: 14px; font-weight: 600; }
.ec-out.ok::before { content: "✓ "; color: var(--ok-text); }
.ec-out.no::before { content: "× "; color: var(--warn-text); }
.ec-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-size: 12.5px; color: var(--mute); }
.ec-try { font: 500 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-text); text-decoration: none; }
.ec-try:hover { text-decoration: underline; }
.ec-frame .fr-graph .edges path { stroke-dasharray: 4 5; animation: ec-flow 1.4s linear infinite; }
@keyframes ec-flow { to { stroke-dashoffset: -18; } }
html.motion-paused .ec-frame .fr-graph .edges path { animation: none; }
@media (max-width: 1000px) {
  .ec-frame .frame-body { grid-template-columns: minmax(0, 1fr); }
  .ec-frame .fr-side, .ec-frame .fr-graph { display: none; }
}
@media (max-width: 640px) {
  .ec-frame .frame-bar { flex-wrap: wrap; }
  .ec-frame .frame-tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .ec-frame .fr-steps li { grid-template-columns: minmax(0, 1fr) auto; }
  .ec-frame .fr-steps li > .k { grid-column: 1 / -1; }
}

/* ---- connectors: what the strip leaves out ---- */
.he-mq-note { max-width: 820px; margin: 18px auto 0; padding: 0 16px; text-align: center; font-size: 13.5px; color: var(--ink-2); }
.he-mq-note a { color: var(--signal-text); white-space: nowrap; }

/* ---- control: the dial, then each control once ---- */
section.ectl { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 9vw, 112px) clamp(16px, 3vw, 32px) 0; }
.ectl-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.ed { background: var(--ink); color: var(--paper); border-radius: 12px; padding: clamp(20px, 3vw, 32px); }
.ed-gauge { display: block; width: min(320px, 100%); margin: 0 auto; }
.ed-gauge .arc { fill: none; stroke: #3a3a37; stroke-width: 14; stroke-linecap: round; }
.ed-gauge .arc-on { fill: none; stroke: var(--signal); stroke-width: 14; stroke-linecap: round; }
.ed-gauge .tick { stroke: #8a8a83; stroke-width: 2; }
.ed-gauge .lbl { font: 10px var(--mono); fill: #a3a39c; text-anchor: middle; }
.ed-needle { transform-origin: 160px 150px; transform: rotate(0deg); transition: transform 700ms cubic-bezier(.3, 1.4, .5, 1); }
.ed-needle line { stroke: var(--paper); stroke-width: 3; stroke-linecap: round; }
.ed-needle circle { fill: var(--signal); }
.ed-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 18px 0 14px; }
.ed-levels button { padding: 8px 6px; border: 1px solid #444; border-radius: 5px; background: transparent; color: #cfcfc8; font: 10.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.ed-levels button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.ed-name { margin: 0; font: 600 15px/1.3 var(--sans); }
.ed-text { margin: 6px 0 0; min-height: 4.6em; font-size: 14px; color: #cfcfc8; }
.ed-ex { margin: 0 0 10px; font: 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #a3a39c; }

.er-k { margin-top: 18px; }
.er { list-style: none; margin: 0; padding: 0; border-top: 1px solid #333; font: 12px/1.4 var(--mono); }
.er li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #333; color: #cfcfc8; opacity: 0.25; transform: translateX(-6px); transition: opacity 300ms, transform 300ms; }
.er li.on { opacity: 1; transform: none; }
.er b { font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; }
.er-ok { color: #4ade80; } .er-hold { color: var(--signal); } .er-no { color: #f87171; }
.ed-gauge .arc-on { transition: stroke-dashoffset 700ms ease; }
.ectl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.ectl-grid .card h3 { margin-top: 14px; }

/* the audit chain: each block takes the hash of the one before */
.ea-chain { display: flex; align-items: center; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.ea-chain li { flex: 1 1 0; min-width: 0; padding: 6px; border: 1.4px solid var(--ink); border-radius: 4px; background: var(--paper); font: 9px/1.3 var(--mono); color: var(--mute); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.2; transition: opacity 260ms, border-color 260ms; }
.ea-chain li + li { margin-left: 14px; position: relative; overflow: visible; }
.ea-chain li + li::before { content: ""; position: absolute; left: -15px; top: 50%; width: 14px; border-top: 1.4px solid var(--ink); }
.ea-chain li.on { opacity: 1; }
.ea-chain li:last-child.on { border-color: var(--signal); color: var(--signal-text); }

/* the model chain: a call falls to the next model when one is down */
.em { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; font: 10px/1.3 var(--mono); }
.em li { display: flex; align-items: center; gap: 8px; }
.em li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.4px solid var(--ink); background: var(--paper); }
.em li:first-child::before { background: var(--signal); border-color: var(--signal); animation: em-beat 2.4s ease-in-out infinite; }
@keyframes em-beat { 50% { transform: scale(1.5); } }
html.motion-paused .em li:first-child::before { animation: none; }
.em span { color: var(--mute); }

/* ---- run it your way ---- */
section.eway { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 9vw, 112px) clamp(16px, 3vw, 32px) 0; }
.eway .deploy-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eway .tile i { font: normal 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal-text); }

/* ---- SAP, short ---- */
section.esap { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 9vw, 112px) clamp(16px, 3vw, 32px) 0; }
.esap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.esap-routes { display: grid; gap: 12px; }

/* ---- build your own agent: the console's steps ---- */
.eb-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 0 0 28px; padding: 0; list-style: none; counter-reset: eb; }
.eb-steps li { position: relative; padding: 18px 14px 0 0; border-top: 2px solid var(--line-2); opacity: 0.35; transition: opacity 300ms, border-color 300ms; }
.eb-steps li::before { counter-increment: eb; content: "0" counter(eb); display: block; font: 11px var(--mono); letter-spacing: 0.14em; color: var(--mute); }
.eb-steps li.on { opacity: 1; border-color: var(--ink); }
.eb-steps li:last-child.on { border-color: var(--signal); }
.eb-steps b { display: block; margin: 6px 0 4px; font-size: 14.5px; font-weight: 600; }
.eb-steps span { font-size: 13px; color: var(--ink-2); }
.eb-dev { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-2); }
.eb-dev code { font: 12.5px var(--mono); background: var(--ground-2); padding: 1px 5px; border-radius: 3px; }

@media (max-width: 1000px) {
  .ectl-top, .esap-grid { grid-template-columns: minmax(0, 1fr); }
  .ectl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eway .deploy-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
}
@media (max-width: 560px) {
  .ectl-grid, .eway .deploy-row { grid-template-columns: minmax(0, 1fr); }
  .eb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .ec-card.pop, .ec-approve.pulse, .em li:first-child::before, .ec-frame .fr-graph .edges path { animation: none; }
  .ed-needle { transition: none; }
}
