/* Home page (owner 2026-10-14): the radar sweeps and lights each station; "Walk the plant".
   Influence from makoro.co / finzoai.app, our own look. CSS only, one moving thing at a time, off with reduced motion. */

/* ── the radar: nodes hold still, a beam sweeps, each node pulses as the beam passes ── */
.radar-live .rotor, .radar-live .node-inner { animation: none !important; }
.radar-live .orbit-sweep { opacity: .35; }
.radar-beam {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg 300deg,
    color-mix(in srgb, var(--accent) 6%, transparent) 330deg,
    color-mix(in srgb, var(--accent) 26%, transparent) 359deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 24%, #000 25%);
  mask: radial-gradient(circle, transparent 24%, #000 25%);
  animation: radar-turn var(--radar-t, 8s) linear infinite;
}
@keyframes radar-turn { to { transform: rotate(360deg); } }
.radar-live .node-ic { position: relative; }
.radar-live .node-inner { position: relative; }
.radar-live .node-inner::before {
  content: ""; position: absolute; left: 50%; top: 25px; width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 50%; border: 2px solid var(--accent); opacity: 0; pointer-events: none;
  animation: radar-ping var(--radar-t, 8s) ease-out infinite; animation-delay: var(--hit, 0s);
}
.radar-live .node-label { animation: radar-label var(--radar-t, 8s) ease-out infinite; animation-delay: var(--hit, 0s); }
@keyframes radar-ping { 0% { opacity: .9; transform: scale(1); } 9% { opacity: 0; transform: scale(1.9); } 100% { opacity: 0; } }
@keyframes radar-label { 0%, 6% { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); } 14%, 100% { color: var(--text); } }
.radar-live .orbit-core { animation: core-breathe 4s ease-in-out infinite; }
@keyframes core-breathe { 50% { box-shadow: 0 0 120px color-mix(in srgb, var(--accent) 48%, transparent), 0 24px 48px var(--shadow); } }

/* ── walk the plant ── */
.plant { --pc-ink: var(--text, #1c1c1c); }
.plant-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.plant-copy h2 { margin: 8px 0 12px; }
.plant-rail { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: none; }
.plant-rail li button {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid transparent; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left;
  transition: background .25s, color .25s, border-color .25s;
}
.plant-rail .pr-n { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); }
.plant-rail li.on button { background: var(--card); border-color: var(--line); color: var(--pc-ink); box-shadow: 0 8px 24px var(--shadow); }
.plant-rail li.on .pr-n { color: var(--accent); }
.plant-rail li.done .pr-n::after { content: " ✓"; color: var(--accent); }

.plant-stage { position: relative; min-height: 420px; }
.pc {
  position: absolute; inset: 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px 22px 18px; box-shadow: 0 24px 60px var(--shadow); display: flex; flex-direction: column; gap: 14px;
  opacity: 0; transform: translateY(14px) scale(.985); pointer-events: none; transition: opacity .45s ease, transform .45s ease;
}
.pc.on { opacity: 1; transform: none; pointer-events: auto; }
.pc header { display: flex; justify-content: space-between; align-items: center; }
.pc-tag { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pc-live { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); position: relative; }
.pc-live.ai { background: var(--accent); color: #fff; }
.pc-live.pulse::before { content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 1px solid var(--accent); opacity: 0; }
.pc.on .pc-live.pulse::before { animation: live-ring 1.8s ease-out infinite; }
@keyframes live-ring { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
.pc-say { margin: auto 0 0; font-size: 14px; color: var(--muted); }

.f { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.f:last-of-type { border-bottom: 0; }
.f b { font-variant-numeric: tabular-nums; color: var(--pc-ink); }
.f span { color: var(--muted); }

/* the document being read: a scan line passes, the fields light up one by one */
.doc { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.doc-h { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; opacity: 0;
  background: var(--accent); box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.pc.on .scan-line { animation: scan-down 1.6s ease-in-out .2s 1 forwards; }
@keyframes scan-down { 0% { top: 0; opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.doc .f { opacity: .35; transition: opacity .3s; }
.pc.on .doc .f { animation: field-lit .3s ease forwards; }
.pc.on .doc .f:nth-of-type(1) { animation-delay: .45s; } .pc.on .doc .f:nth-of-type(2) { animation-delay: .7s; }
.pc.on .doc .f:nth-of-type(3) { animation-delay: .95s; } .pc.on .doc .f:nth-of-type(4) { animation-delay: 1.2s; }
@keyframes field-lit { to { opacity: 1; } }
.f-hi b { color: var(--accent); }
.tick { font-style: normal; color: var(--accent); margin-left: 4px; }

/* the outcome card pops in after the reading */
.result { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.result .ok { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; flex: none; }
.pop { opacity: 0; transform: translateY(8px) scale(.97); }
.pc.on .pop { animation: pop-in .45s cubic-bezier(.2, .9, .3, 1.25) 1.8s forwards; }
.pc.on .mini.d1 { animation-delay: .5s; } .pc.on .mini.d2 { animation-delay: .9s; } .pc.on .mini.d3 { animation-delay: 1.3s; }
@keyframes pop-in { to { opacity: 1; transform: none; } }

/* stores: the QR scan and the move */
.qr-move { display: flex; align-items: center; gap: 16px; }
.qr { width: 64px; height: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px; border-radius: 10px; border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.qr i { background: var(--pc-ink); border-radius: 3px; }
.qr::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0; }
.pc.on .qr::after { animation: scan-down 1s ease-in-out .2s 2 forwards; }
.bays { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.bay { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); }
.bay-to { border-color: var(--accent); color: var(--accent); }
.pc.on .bay-to { animation: pop-in .4s ease 1.1s both; }
.mv { color: var(--accent); }

/* production: the status swaps */
.run { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.swap { position: relative; display: inline-grid; min-width: 86px; text-align: right; font-weight: 600; font-size: 13px; }
.swap em { grid-area: 1 / 1; font-style: normal; transition: opacity .4s, transform .4s; }
.swap .b { opacity: 0; transform: translateY(6px); color: var(--accent); }
.pc.on .swap .a { animation: swap-out .4s ease 1.2s forwards; }
.pc.on .swap .b { animation: swap-in .4s ease 1.3s forwards; }
.pc.on .run:nth-child(2) .a, .pc.on .run:nth-child(2) .b { animation-delay: 1.6s; }
.pc.on .run:nth-child(3) .a, .pc.on .run:nth-child(3) .b { animation-delay: 2s; }
@keyframes swap-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes swap-in { to { opacity: 1; transform: none; } }
.yield { display: grid; grid-template-columns: auto auto auto auto; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.yield b { color: var(--pc-ink); font-variant-numeric: tabular-nums; }

/* dispatch: the papers come out */
.docs-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini { padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mini b { color: var(--pc-ink); font-size: 13px; }

/* accounts: the bank line meets its invoice */
.match { display: grid; gap: 0; }
.m-line { display: flex; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.m-line b { font-variant-numeric: tabular-nums; }
.m-link { height: 26px; position: relative; }
.m-link i { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.pc.on .m-link i { animation: link-grow .5s ease .8s forwards; }
@keyframes link-grow { to { transform: scaleY(1); } }
.pc.on .m-inv { animation: inv-hit .5s ease 1.3s forwards; }
@keyframes inv-hit { to { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--card)); } }

/* desktop: the section stays pinned while the scroll walks the stations */
@media (min-width: 901px) {
  .pc-js .plant { height: 440vh; padding: 0; }
  .pc-js .plant-pin { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; }
}
/* phone: no pinning; the stations stack and each comes alive as it scrolls in */
@media (max-width: 900px) {
  .plant-grid { grid-template-columns: 1fr; gap: 24px; }
  .plant-rail { display: none; }
  .plant-stage { min-height: 0; display: grid; gap: 16px; }
  .pc { position: relative; inset: auto; opacity: 1; transform: none; pointer-events: auto; }
}
/* motion off: everything shown, finished, still */
@media (prefers-reduced-motion: reduce) {
  .radar-beam, .radar-live .node-inner::before, .radar-live .node-label, .radar-live .orbit-core { animation: none !important; }
  .plant .pc, .plant .pc * { animation: none !important; transition: none !important; }
  .plant .pop, .plant .doc .f, .plant .swap .b { opacity: 1 !important; transform: none !important; }
  .plant .swap .a { opacity: 0 !important; }
  .plant .m-link i { transform: none !important; }
}

/* ── AI at work (owner 2026-10-14): the agents that run every day, on the ink band ── */
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.ai-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px;
  border: 1px solid var(--ink-line-2); background: color-mix(in srgb, var(--ink-text) 4%, transparent);
  opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease, border-color .3s; }
.ai-work.on .ai-card { opacity: 1; transform: none; }
.ai-work.on .ai-card:nth-child(2) { transition-delay: .08s; } .ai-work.on .ai-card:nth-child(3) { transition-delay: .16s; }
.ai-work.on .ai-card:nth-child(4) { transition-delay: .24s; } .ai-work.on .ai-card:nth-child(5) { transition-delay: .32s; }
.ai-work.on .ai-card:nth-child(6) { transition-delay: .40s; }
.ai-card:hover { border-color: color-mix(in srgb, var(--ember) 55%, transparent); }
.ai-card header { display: flex; justify-content: space-between; align-items: center; }
.ai-when { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ember); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 60%, transparent); animation: ai-live 2.4s ease-out infinite; }
.ai-card:nth-child(2n) .ai-dot { animation-delay: .8s; } .ai-card:nth-child(3n) .ai-dot { animation-delay: 1.6s; }
@keyframes ai-live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.ai-card h3 { color: var(--ink-text); font-size: 19px; margin: 2px 0 0; }
.ai-card p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.ai-out { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-out span { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-text); padding: 5px 10px; border-radius: 8px; border: 1px dashed var(--ink-line-2); }
.ai-foot { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 14px; color: var(--ink-muted); }
.ai-foot b { color: var(--ink-text); }
@media (max-width: 980px) { .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ai-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ai-card { opacity: 1 !important; transform: none !important; transition: none !important; } .ai-dot { animation: none !important; } }
/* overflow-x:hidden on html and body turns body into a scroll container and breaks the sticky plant walk;
   clip hides sideways overflow the same way without creating one */
html, body { overflow-x: clip; }

/* AI catalogue (owner 2026-10-14): five departments + how we start; proof strip of running agents below */
.ai-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.ai-list li { display: flex; flex-direction: column; gap: 3px; }
.ai-list b { color: var(--ink-text); font-size: 15.5px; font-weight: 600; }
.ai-list span { color: var(--ink-muted); font-size: 14px; line-height: 1.55; }
.ai-start { background: color-mix(in srgb, var(--ember) 12%, transparent); border-color: color-mix(in srgb, var(--ember) 45%, transparent); }
.ai-start .btn { align-self: flex-start; margin-top: auto; }
.ai-proof { margin-top: 36px; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--ink-line-2); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.ai-proof-l { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--ink-text); font-weight: 600; font-size: 14.5px; }
.ai-proof ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-proof li { font-size: 13px; color: var(--ink-muted); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--ink-line); }
.ai-proof li b { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 11.5px; color: var(--ember); margin-right: 6px; }
.ai-foot { justify-content: flex-start; }
/* seven areas + how we start: the start card runs the full width as a closing row */
.ai-start { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 10px 28px; }
.ai-start header { grid-column: 1 / -1; }
.ai-start h3 { margin: 0; }
.ai-start .btn { margin: 0; }
.ai-ind { margin: 22px 0 0; color: var(--ink-muted); font-size: 14.5px; }
.ai-ind a { color: var(--ink-text); border-bottom: 1px solid var(--ember); }
@media (max-width: 900px) { .ai-start { grid-template-columns: 1fr; } }
.closing-sub { max-width: 560px; margin: 14px auto 0; color: var(--ink-muted); }
