/* PlantOps home: a dark control-room read on the plant floor. Charcoal panels, safety orange, scenes built from the real app. */
.home {
  --h-bg: #070B12; --h-bg-2: #0B111C; --h-panel: #0F1724; --h-panel-2: #131D2D; --h-line: #1E2A3C; --h-line-2: #2A3950;
  --h-text: #E8EDF4; --h-muted: #8E9BAE; --h-dim: #5F6D82;
  --h-pass: #2FBF71; --h-fail: #FF5A4A; --h-warn: #F2B134;
  background: var(--h-bg); color: var(--h-text);
}
.home main { overflow: hidden; }
.home .top { position: sticky; top: 0; z-index: 20; background: rgba(7, 11, 18, .72); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.home .top.scrolled { border-bottom-color: var(--h-line); }
.home .foot { margin-top: 0; background: #05080D; border-top: 1px solid var(--h-line); }
.home h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 16px; }
.home h3 { color: #fff; }
.home .lede { color: var(--h-muted); font-size: clamp(17px, 1.6vw, 19px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--h-pass); box-shadow: 0 0 0 0 rgba(47, 191, 113, .6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(47, 191, 113, 0); } }
.home section { padding: clamp(60px, 7.5vw, 104px) 0; position: relative; }
.h-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.h-split.flip > :first-child { order: 2; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.ticks li { padding-left: 30px; position: relative; color: var(--h-muted); }
.ticks li strong { color: #fff; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 6px; background: rgba(255, 122, 26, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23FF7A1A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="2"] { transition-delay: .12s; }
[data-reveal="3"] { transition-delay: .24s; }

/* ---------- Hero ---------- */
.h-hero { padding: clamp(28px, 4.5vw, 64px) 0 0 !important; min-height: calc(100svh - 65px); display: flex; flex-direction: column; justify-content: space-between; }
.h-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--h-line) 1px, transparent 1px), linear-gradient(90deg, var(--h-line) 1px, transparent 1px); background-size: 56px 56px; opacity: .35; mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 75%); }
.h-glow { position: absolute; width: 720px; height: 720px; right: -160px; top: -220px; background: radial-gradient(circle, rgba(255, 122, 26, .18), transparent 62%); filter: blur(10px); pointer-events: none; }
.h-hero-in { position: relative; display: grid; grid-template-columns: .92fr 1.08fr; gap: 48px; align-items: center; flex: 1; }
.h-hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 24px; color: #fff; font-weight: 700; }
.h-hero h1 .hl { color: var(--brand); position: relative; white-space: nowrap; }
.h-hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .09em; background: var(--brand); border-radius: 4px; transform: scaleX(0); transform-origin: left; animation: underline 1s .6s cubic-bezier(.7, 0, .2, 1) forwards; }
@keyframes underline { to { transform: scaleX(1); } }
.h-sub { color: var(--h-muted); font-size: clamp(17px, 1.7vw, 20px); max-width: 36em; margin: 0 0 30px; }
.home .btn { padding: 14px 24px; font-size: 16px; transition: transform .2s, box-shadow .2s, background .2s; }
.home .btn.primary { box-shadow: 0 10px 30px -10px rgba(255, 122, 26, .6); }
.home .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 122, 26, .75); }
.home .btn.ghost { border-color: var(--h-line-2); }
.home .btn.ghost:hover { background: var(--h-panel-2); }
.home .note { color: var(--h-dim); }

/* Browser-frame device: cycles real app screenshots */
.h-device { position: relative; justify-self: center; width: min(620px, 92vw); }
.browser { position: relative; border-radius: 16px; background: linear-gradient(180deg, #171F2E, #0C121C); box-shadow: 0 0 0 1px #2A3645 inset, 0 50px 100px -30px rgba(0, 0, 0, .9), 0 0 80px -24px rgba(255, 122, 26, .22); overflow: hidden; transform: perspective(1400px) rotateX(2deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: perspective(1400px) rotateX(2deg) translateY(0); } 50% { transform: perspective(1400px) rotateX(2deg) translateY(-10px); } }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #121A28; border-bottom: 1px solid #202C3E; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2A3645; flex: none; }
.browser-bar .url { margin-left: 8px; flex: 1; height: 20px; border-radius: 6px; background: #0B111C; display: flex; align-items: center; padding: 0 10px; font: 500 11.5px var(--mono); color: var(--h-dim); overflow: hidden; white-space: nowrap; }
.screen { position: relative; overflow: hidden; aspect-ratio: 1470 / 746; background: #F5F7FA; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.015); transition: opacity .9s, transform 1.4s; }
.screen img.on { opacity: 1; transform: none; }
.toast { position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: rgba(15, 23, 36, .92); border: 1px solid var(--h-line-2); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9); font-size: 13.5px; color: var(--h-text); white-space: nowrap; opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .5s, transform .5s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 3; }
.toast.on { opacity: 1; transform: none; }
.toast b { font-family: var(--mono); font-weight: 500; }
.toast i { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; }
.toast .ok { background: rgba(47, 191, 113, .18); color: var(--h-pass); }
.toast .bad { background: rgba(255, 90, 74, .18); color: var(--h-fail); }
.toast .mid { background: rgba(242, 177, 52, .18); color: var(--h-warn); }
.toast.t1 { left: -12px; top: 10%; }
.toast.t2 { right: -18px; top: 44%; }
.toast.t3 { left: 6%; bottom: -14px; }

/* Marquee */
.marquee { border-block: 1px solid var(--h-line); background: #080D15; overflow: hidden; padding: 18px 0 !important; }
.marquee .run { display: flex; gap: 48px; width: max-content; animation: marquee 44s linear infinite; font: 500 15px var(--mono); color: var(--h-dim); text-transform: uppercase; letter-spacing: .08em; }
.marquee .run span::before { content: "◆"; color: var(--brand); margin-right: 48px; font-size: 10px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Change-request stage tracker ---------- */
.stage-stage { background: linear-gradient(180deg, var(--h-panel), #0B121D); border: 1px solid var(--h-line); border-radius: 22px; padding: 24px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.stage-head b { color: #fff; font-size: 15px; }
.stage-head span { font: 500 12px var(--mono); color: var(--h-dim); }
.stage-track { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; align-items: start; }
.stage-track::before { content: ""; position: absolute; left: 14px; right: 14px; top: 13px; height: 2px; background: var(--h-line-2); }
.stage-fill { position: absolute; left: 14px; top: 13px; height: 2px; width: 0; background: var(--brand); transition: width 2s cubic-bezier(.4, 0, .2, 1); box-shadow: 0 0 10px rgba(255, 122, 26, .6); }
.stage-stage.play .stage-fill { width: var(--w, 0%); }
.stg { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.stg i { width: 28px; height: 28px; border-radius: 50%; background: var(--h-panel-2); border: 2px solid var(--h-line-2); display: grid; place-items: center; font: 700 12px var(--mono); color: var(--h-dim); transition: background .4s, border-color .4s, color .4s, transform .4s; }
.stg span { font-size: 11.5px; color: var(--h-dim); max-width: 9em; line-height: 1.25; transition: color .4s; }
.stg.done i { background: var(--brand); border-color: var(--brand); color: #1A0D00; transform: scale(1.08); }
.stg.done span { color: var(--h-muted); }
.stg.now i { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px rgba(255, 122, 26, .16); }
.stg.now span { color: #fff; font-weight: 600; }
.stage-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip { font: 600 12px var(--mono); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--h-line-2); color: var(--h-muted); }
.chip.on { border-color: var(--h-pass); color: var(--h-pass); background: rgba(47, 191, 113, .1); }

/* ---------- Audit checklist ---------- */
.chk-stage { background: linear-gradient(180deg, var(--h-panel), #0B121D); border: 1px solid var(--h-line); border-radius: 22px; padding: 22px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); }
.chk-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.chk-head b { color: #fff; font-size: 15px; }
.chk-head span { font: 500 12px var(--mono); color: var(--h-dim); }
.chk-rows { display: grid; gap: 7px; }
.chk { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 12px; background: var(--h-panel-2); border: 1px solid var(--h-line); transition: border-color .3s, background .3s; }
.chk .ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #1A2535; color: var(--h-dim); transition: background .3s, color .3s, transform .3s; }
.chk .nm { font-size: 14px; color: #fff; font-weight: 600; }
.chk .rd { font: 500 12px var(--mono); color: var(--h-fail); text-align: right; opacity: 0; transition: opacity .3s; }
.chk.ok .ic { background: rgba(47, 191, 113, .18); color: var(--h-pass); transform: scale(1.1); }
.chk.bad { border-color: rgba(255, 90, 74, .5); background: rgba(255, 90, 74, .06); }
.chk.bad .ic { background: rgba(255, 90, 74, .2); color: var(--h-fail); transform: scale(1.1); }
.chk.bad .rd { opacity: 1; }
.chk-foot { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--h-muted); opacity: 0; transition: opacity .4s; }
.chk-foot.on { opacity: 1; }
.chk-foot b { color: var(--h-fail); font-family: var(--mono); }

/* ---------- NCMR root cause + cost ---------- */
.nc-stage { background: var(--h-panel); border: 1px solid var(--h-line); border-radius: 22px; padding: 22px; }
.nc-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.nc-stat { background: var(--h-panel-2); border: 1px solid var(--h-line); border-radius: 14px; padding: 14px; }
.nc-stat small { display: block; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--h-dim); }
.nc-stat strong { display: block; font: 600 clamp(20px, 2.4vw, 28px) var(--mono); color: #fff; margin-top: 4px; }
.nc-stat.warn strong { color: var(--h-warn); }
.nc-bars { display: grid; gap: 14px; }
.nc-row b { display: flex; justify-content: space-between; font: 500 13px var(--font); color: var(--h-muted); margin-bottom: 6px; }
.nc-row b span { color: #fff; font-family: var(--mono); font-weight: 600; }
.nc-track { height: 10px; border-radius: 6px; background: var(--h-panel-2); border: 1px solid var(--h-line); overflow: hidden; }
.nc-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--brand), #C9570C); transition: width 1.3s cubic-bezier(.3, .8, .3, 1); }
.nc-stage.play .nc-fill { width: var(--w); }

/* ---------- Mesh: one shared record ---------- */
.mesh { background: var(--h-panel); border: 1px solid var(--h-line); border-radius: 22px; padding: 14px; }
.mesh svg { width: 100%; height: auto; display: block; }
.mesh .link { stroke: var(--h-line-2); stroke-width: 2; fill: none; }
.mesh .flow { stroke: var(--brand); stroke-width: 2.5; fill: none; stroke-dasharray: 6 14; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.mesh .node rect { fill: var(--h-panel-2); stroke: var(--h-line-2); }
.mesh .node.hub rect { stroke: var(--brand); }
.mesh .node text { font: 600 12px var(--font); fill: #fff; }
.mesh .node .sub { font: 500 10.5px var(--mono); fill: var(--h-dim); }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.feat { position: relative; background: var(--h-panel); border: 1px solid var(--h-line); border-radius: 20px; padding: 24px; overflow: hidden; transition: transform .25s, border-color .25s; }
.feat::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 122, 26, .12), transparent 60%); opacity: 0; transition: opacity .3s; }
.feat:hover { transform: translateY(-3px); border-color: var(--h-line-2); }
.feat:hover::before { opacity: 1; }
.feat svg { width: 28px; height: 28px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.feat h3 { font-size: 16.5px; margin: 0 0 6px; }
.feat p { margin: 0; color: var(--h-muted); font-size: 14px; position: relative; }

/* ---------- Screens reel ---------- */
.reel { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 26px; scrollbar-width: thin; scrollbar-color: var(--h-line-2) transparent; }
.reel figure { flex: none; width: min(380px, 80vw); margin: 0; scroll-snap-align: center; }
.reel .frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--h-line-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); transition: transform .3s; }
.reel figure:hover .frame { transform: translateY(-6px); }
.reel img { display: block; }
.reel figcaption { color: var(--h-muted); font-size: 13.5px; margin-top: 10px; }

/* ---------- Deployment ---------- */
.dep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.dep { background: var(--h-panel); border: 1px solid var(--h-line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; }
.dep.featured { border-color: var(--brand); box-shadow: 0 22px 46px -28px rgba(255, 122, 26, .45); position: relative; }
.dep .flag { position: absolute; top: -11px; left: 22px; font: 700 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #1A0D00; background: var(--brand); padding: 4px 10px; border-radius: 999px; }
.dep h3 { font-size: 19px; margin-bottom: 6px; }
.dep .sub { color: var(--h-muted); font-size: 14px; min-height: 42px; }
.dep .ticks { margin: 16px 0 20px; flex: 1; }
.dep .ticks li { font-size: 14px; }
.dep .btn { text-align: center; }

/* ---------- Closing ---------- */
.close { text-align: center; }
.close h2 { font-size: clamp(34px, 5.6vw, 64px); }
.close .lede { margin: 0 auto 30px; }
.close::before { content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 500px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(255, 122, 26, .14), transparent 65%); pointer-events: none; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .h-hero-in, .h-split { grid-template-columns: 1fr; }
  .h-split.flip > :first-child { order: 0; }
  .h-device { margin-top: 10px; }
  .toast.t1, .toast.t2, .toast.t3 { left: 0; right: 0; margin: 0 auto; }
  .feat-grid, .dep-grid { grid-template-columns: 1fr 1fr; }
  .nc-top { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .feat-grid, .dep-grid { grid-template-columns: 1fr; }
  .stage-track { grid-template-columns: repeat(4, 1fr); row-gap: 18px; }
  .stage-track::before, .stage-fill { display: none; }
  .toast { font-size: 12px; padding: 9px 11px; }
  .chk { grid-template-columns: 22px 1fr; }
  .chk .rd { grid-column: 2; text-align: left; }
}

/* Motion is decoration: without it every scene shows its finished state. */
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .browser { transform: none; }
  .h-hero h1 .hl::after { transform: none; }
  .stage-fill { width: var(--w, 0%); }
  .nc-fill { width: var(--w); }
}
