/* ============ Hospitally — shared styles ============ */
:root {
  --bg: #0e0d0b;
  --bg-2: #15130f;
  --bg-3: #1c1914;
  --line: rgba(243, 236, 226, 0.09);
  --line-2: rgba(243, 236, 226, 0.16);
  --ink: #f4eee4;
  --ink-2: #cfc6b8;
  --muted: #8b8275;
  --dim: #4a443c;
  --brass: #dcaa5e;
  --brass-2: #f1c983;
  --clay: #e36a3c;
  --sage: #82b98a;
  --sky: #74a3dc;
  --plum: #b48ad6;
  --rose: #e38a9c;
  --radius: 18px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
.mono { font-family: var(--mono); }
.brass { color: var(--brass); }
.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: rgba(14, 13, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 21px; letter-spacing: -0.02em; }
.brand b { color: var(--brass); font-weight: 600; }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 30px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: var(--ink); color: #15130f; }
.btn-ghost { color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-brass { background: var(--brass); color: #1a140a; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.nav-burger { display: none; background: none; border: 0; padding: 8px; }

@media (max-width: 900px) {
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass);
}
.h-display {
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.02; letter-spacing: -0.035em; font-weight: 500; margin: 14px 0 0;
}
.h-section {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; margin: 14px 0 0;
}
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 640px; margin: 20px 0 0; }
.sec-pad { padding: 140px 0; }
@media (max-width: 700px) { .sec-pad { padding: 90px 0; } }

/* ---------- STORY (amenu-style cinematic paragraph) ---------- */
.story { height: 460vh; }
.story-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.story-glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 30% 40%, rgba(220,170,94,0.10), transparent 70%),
    radial-gradient(35% 30% at 72% 62%, rgba(227,106,60,0.08), transparent 70%);
  pointer-events: none;
}
.ruler {
  position: absolute; left: 32px; right: 32px; top: 50%;
  height: 240px; transform: translateY(-58%);
  pointer-events: none;
}
.ruler-line { position: absolute; left: 0; right: 0; top: 28px; height: 14px; border-bottom: 1px solid var(--line-2);
  background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px);
  background-size: calc(100% / 68) 8px; background-repeat: repeat-x; background-position: 0 100%; }
.ruler-dash { position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px dashed var(--line-2); }
.ruler-label { position: absolute; top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.playhead { position: absolute; top: 0; bottom: -80px; width: 1px; background: var(--clay); left: 0; }
.playhead::before { content: ""; position: absolute; top: 34px; left: -6px; border: 6px solid transparent; border-top: 9px solid var(--clay); }
.playhead-time { position: absolute; top: -20px; left: 8px; font-family: var(--mono); font-size: 11px; color: var(--clay); white-space: nowrap; }

.story-text {
  position: relative; z-index: 2;
  width: min(1040px, calc(100% - 32px));
  text-align: center;
  font-size: clamp(26px, 4.2vw, 60px);
  line-height: 1.2; letter-spacing: -0.03em; font-weight: 500;
  margin: 0;
}
.story-text .w { color: var(--dim); transition: color .25s linear; }
.story-text .w.on { color: var(--ink); }
.slot {
  display: inline-block; vertical-align: middle;
  width: 1.7em; height: 0.95em; margin: -0.1em 0.12em 0; border-radius: 0.2em;
}
.slot.wide { width: 2.3em; }
.slot.xwide { width: 3.1em; }

.floater {
  position: absolute; left: 0; top: 0; z-index: 3;
  border-radius: 16px; overflow: hidden;
  will-change: transform, width, height;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  background: var(--bg-3);
}
.floater .big, .floater .small { position: absolute; inset: 0; }
.floater .small { opacity: 0; display: grid; place-items: center; }
.story-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.story-hint i { width: 1px; height: 26px; background: linear-gradient(var(--brass), transparent); display: block; animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1);transform-origin:top} 51%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }
.story-cta { position: absolute; bottom: 12%; left: 50%; transform: translate(-50%, 20px); opacity: 0; display: flex; gap: 12px; z-index: 4; transition: opacity .4s, transform .4s; }
.story-cta.show { opacity: 1; transform: translate(-50%, 0); }

/* floater inner designs */
.fl-ipad { background: linear-gradient(160deg, #221e18, #15120e); }
.fl-ipad .big { padding: 14px; font-size: 11px; }
.mini-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.mini-kpi { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 7px; }
.mini-kpi b { display: block; font-size: 17px; letter-spacing: -0.02em; }
.mini-kpi span { color: var(--muted); font-size: 9px; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 52px; margin-top: 10px; }
.mini-bars i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(var(--brass), rgba(220,170,94,0.3)); }
.fl-rooms { background: #191612; }
.room-grid-mini { position: absolute; inset: 12px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.room-grid-mini i { border-radius: 4px; }
.fl-hk { background: linear-gradient(135deg, #20301f, #141a13); }
.fl-stock { background: #1b1813; }
.fl-group { background: linear-gradient(135deg, #3a1d10, #1c120c); }
.fl-loyal { background: linear-gradient(135deg, #2b2233, #16121b); }
.fl-phone { background: #121110; }

/* ---------- DAY (sticky chapters) ---------- */
.day { background: var(--bg); transition: background-color 1s ease; }
.day-intro { padding: 160px 0 60px; text-align: center; }
.day-intro .lede { margin-inline: auto; }
.day-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 60px; }
.day-steps { padding-bottom: 30vh; }
.step {
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.25; transition: opacity .5s ease;
}
.step.active { opacity: 1; }
.step-time { font-family: var(--mono); color: var(--brass); font-size: 13px; letter-spacing: .1em; display: flex; align-items: center; gap: 12px; }
.step-time::after { content: ""; flex: 1; max-width: 120px; height: 1px; background: linear-gradient(90deg, var(--brass), transparent); }
.step h3 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -0.03em; line-height: 1.08; font-weight: 500; margin: 16px 0 14px; }
.step p { color: var(--ink-2); font-size: 17px; margin: 0 0 18px; max-width: 460px; }
.step ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 460px; }
.step li { display: flex; gap: 12px; color: var(--ink-2); font-size: 15px; }
.step li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--brass); }
.step .vs { margin-top: 20px; font-size: 13px; color: var(--muted); border-left: 2px solid var(--clay); padding-left: 12px; max-width: 460px; }
.step .vs b { color: var(--clay); font-weight: 500; }

.day-stage { position: relative; }
.stage-sticky { position: sticky; top: 64px; height: calc(100vh - 64px); display: grid; place-items: center; }
.clock-row { position: absolute; top: 5vh; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; }
.big-clock { font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.big-clock b { font-size: 22px; color: var(--ink); font-weight: 500; letter-spacing: -0.02em; }
.sun { width: 10px; height: 10px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 18px var(--brass); transition: background .8s, box-shadow .8s; }
.day-rail { display: flex; gap: 6px; }
.day-rail i { width: 18px; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .3s, width .3s; }
.day-rail i.on { background: var(--brass); width: 30px; }

/* ---------- Device frames ---------- */
.ipad {
  position: relative;
  width: min(100%, 720px); aspect-ratio: 4 / 3;
  border-radius: 34px; padding: 14px;
  background: linear-gradient(145deg, #2d2a26, #121110 60%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 60px 120px -40px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(255,255,255,0.05);
}
.ipad-screen { position: relative; width: 100%; height: 100%; border-radius: 22px; overflow: hidden; background: #0b0a09; }
.iphone {
  position: relative; width: 280px; aspect-ratio: 9 / 19.5;
  border-radius: 52px; padding: 11px;
  background: linear-gradient(145deg, #3a3631, #121110 55%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 60px 120px -40px rgba(0,0,0,0.85);
}
.iphone-screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #0b0a09; }
.island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 34%; height: 25px; border-radius: 20px; background: #000; z-index: 20; }

.screen { position: absolute; inset: 0; opacity: 0; transform: scale(1.015); transition: opacity .6s ease, transform .8s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.screen.on { opacity: 1; transform: none; }

/* ---------- App UI kit (used in devices + app demo) ---------- */
.ui { position: absolute; inset: 0; display: grid; grid-template-columns: 54px 1fr; font-size: 11px; color: var(--ink); background: #100f0d; }
.ui-side { background: #0b0a09; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; }
.ui-side .logo { width: 24px; height: 24px; margin-bottom: 8px; }
.ui-side i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.ui-side i.on { background: rgba(220,170,94,0.14); color: var(--brass); }
.ui-side svg { width: 15px; height: 15px; }
.ui-main { padding: 16px 18px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ui-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ui-head h4 { margin: 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 600; }
.ui-head small { color: var(--muted); font-size: 10.5px; display: block; font-weight: 400; margin-top: 1px; }
.ui-chip { font-size: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--ink-2); white-space: nowrap; }
.ui-chip.brass { background: rgba(220,170,94,0.15); color: var(--brass-2); }
.ui-chip.clay { background: rgba(227,106,60,0.16); color: #f39a73; }
.ui-chip.sage { background: rgba(130,185,138,0.16); color: #a9d8b0; }
.ui-chip.sky { background: rgba(116,163,220,0.16); color: #a9c8ef; }
.ui-chip.plum { background: rgba(180,138,214,0.16); color: #d2b6ea; }
.ui-row { display: grid; gap: 10px; }
.ui-card { background: #171512; border: 1px solid var(--line); border-radius: 13px; padding: 12px; min-width: 0; }
.ui-card h5 { margin: 0 0 8px; font-size: 11px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi b { font-size: 24px; letter-spacing: -0.03em; font-weight: 600; display: block; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 10px; }
.kpi em { font-style: normal; font-size: 10px; color: var(--sage); }
.kpi em.down { color: var(--clay); }
.bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brass); }
.list { display: grid; gap: 7px; }
.li { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; background: rgba(255,255,255,0.025); min-width: 0; }
.li .av { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 9px; font-weight: 600; color: #15130f; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 500; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t span { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rooms { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rm { aspect-ratio: 1.25; border-radius: 5px; font-size: 8px; display: grid; place-items: center; font-family: var(--mono); color: rgba(0,0,0,0.65); font-weight: 600; transition: background .5s; }
.st-clean { background: var(--sage); }
.st-dirty { background: var(--clay); }
.st-insp { background: var(--sky); }
.st-occ { background: #3a352e; color: var(--ink-2) !important; }
.st-ooo { background: #5a4f63; color: #e8def0 !important; }
.st-prog { background: var(--brass); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 9.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.spark { width: 100%; height: 60px; }
.toast {
  position: absolute; right: 16px; top: 16px; z-index: 5; width: 230px;
  background: rgba(30,27,22,0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px;
  display: flex; gap: 10px; align-items: flex-start; font-size: 10.5px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
  animation: toastIn .7s cubic-bezier(.2,.8,.2,1) both .5s;
}
.toast b { display: block; font-size: 11px; margin-bottom: 2px; }
.toast span { color: var(--muted); }
.toast .ic { width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
.screen:not(.on) .toast { animation: none; opacity: 0; }

.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; padding: 8px 11px; border-radius: 14px; font-size: 11px; line-height: 1.4; }
.msg.g { background: #2a2620; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.h { background: var(--brass); color: #1b1409; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-family: var(--mono); font-size: 9px; padding: 0; }
.action-card { border: 1px solid rgba(220,170,94,0.35); background: rgba(220,170,94,0.07); border-radius: 12px; padding: 10px; display: grid; gap: 6px; }
.action-card .row { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 10.5px; }
.action-card .btns { display: flex; gap: 6px; margin-top: 4px; }
.action-card .btns span { flex: 1; text-align: center; padding: 6px; border-radius: 8px; font-size: 10px; background: rgba(255,255,255,0.06); }
.action-card .btns span.go { background: var(--brass); color: #1b1409; font-weight: 600; }

.tl { position: relative; display: grid; gap: 4px; }
.tl-row { display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: center; font-size: 10px; }
.tl-row span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 16px; background: rgba(255,255,255,0.03); border-radius: 4px; }
.tl-track i { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; font-style: normal; font-size: 8px; padding-left: 5px; color: rgba(0,0,0,.7); display: flex; align-items: center; overflow: hidden; white-space: nowrap; }

/* ---------- Showcase (devices, Apple-style) ---------- */
.showcase { height: 520vh; }
.show-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 64px; }
.show-caption { position: relative; flex: none; width: 100%; height: 210px; margin-top: 4vh; text-align: center; padding: 0 16px; z-index: 5; }
.show-caption .cap { position: absolute; left: 0; right: 0; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.show-caption .cap.on { opacity: 1; transform: none; }
.show-caption h2 { font-size: clamp(30px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; margin: 10px 0 0; }
.show-caption p { color: var(--muted); margin: 12px auto 0; max-width: 520px; font-size: 16px; }
.stage-box { position: relative; flex: 1; width: 100%; min-height: 0; }
.stage { position: absolute; left: 50%; top: 0; width: 1100px; height: 640px; transform-origin: 50% 0; }
.stage > .dev { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }

.home {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 0%, #5b3b1f 0%, #241810 45%, #0d0b09 100%);
  padding: 58px 18px 20px;
}
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
.app-ic { display: grid; justify-items: center; gap: 5px; font-size: 9px; color: rgba(255,255,255,0.85); }
.app-ic i { width: 100%; aspect-ratio: 1; border-radius: 23%; display: block; }
.app-ic.hosp i { background: linear-gradient(145deg, #2a241c, #0f0d0b); box-shadow: inset 0 0 0 1px rgba(220,170,94,0.45), 0 0 22px rgba(220,170,94,0.35); display: grid; place-items: center; }
.app-ic.hosp i svg { width: 60%; height: 60%; }
.home-dock { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 76px; border-radius: 30px; background: rgba(255,255,255,0.12); backdrop-filter: blur(20px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 14px; }
.home-dock i { border-radius: 23%; display: block; }
.home-time { position: absolute; top: 14px; left: 28px; font-size: 12px; font-weight: 600; }
.launch { position: absolute; inset: 0; transform-origin: var(--ox, 50%) var(--oy, 50%); will-change: transform, opacity, border-radius; overflow: hidden; }

/* Phone app screen */
.papp { position: absolute; inset: 0; background: #100f0d; padding: 52px 16px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
.papp h4 { margin: 0; font-size: 22px; letter-spacing: -0.03em; font-weight: 600; }
.papp .sub { color: var(--muted); font-size: 11px; margin-top: -6px; }
.papp .tabbar { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 0 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.papp .tabbar span.on { color: var(--brass); }

/* Duo foldable */
.duo { width: 460px; height: 540px; perspective: 2200px; }
.duo-body { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.duo-half { position: absolute; top: 0; width: 50%; height: 100%; transform-style: preserve-3d; }
.duo-half.left { left: 0; }
.duo-half.right { left: 50%; transform-origin: 0 50%; will-change: transform; }
.duo-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: linear-gradient(145deg, #34302b, #141210 60%); padding: 10px; }
.duo-half.left .duo-face { border-radius: 36px 6px 6px 36px; padding-right: 0; }
.duo-half.right .duo-face.front { border-radius: 6px 36px 36px 6px; padding-left: 0; }
.duo-face.back { transform: rotateY(180deg); border-radius: 36px 6px 6px 36px; }
.duo-scr { position: relative; width: 100%; height: 100%; overflow: hidden; background: #100f0d; }
.duo-half.left .duo-scr { border-radius: 28px 0 0 28px; }
.duo-half.right .front .duo-scr { border-radius: 0 28px 28px 0; }
.duo-face.back .duo-scr { border-radius: 28px; }
.duo-inner { position: absolute; top: 0; width: 440px; height: 100%; }
.duo-half.left .duo-inner { left: 0; }
.duo-half.right .duo-inner { left: -220px; }
.duo-crease { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.08), rgba(255,255,255,0)); z-index: 3; pointer-events: none; }
.duo-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0.6), transparent); opacity: 0; z-index: 4; }
.duo-island { position: absolute; top: 12px; left: 50%; width: 22px; height: 22px; border-radius: 50%; background: #000; transform: translateX(-50%); z-index: 6; }

@media (max-width: 700px) { .show-caption { height: 190px; } .show-caption p { font-size: 14px; } }

/* ---------- Versus ---------- */
.versus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.term {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2);
  background: #05080a; font-family: var(--mono); font-size: 12px; color: #6fe38a;
  box-shadow: inset 0 0 80px rgba(111,227,138,0.05);
}
.term-bar { display: flex; gap: 6px; padding: 10px 12px; background: #0d1114; border-bottom: 1px solid #1d2428; color: #62707a; font-size: 11px; align-items: center; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3237; }
.term pre { margin: 0; padding: 18px; line-height: 1.55; white-space: pre; overflow-x: auto; text-shadow: 0 0 6px rgba(111,227,138,0.4); }
.term .cursor { display: inline-block; width: 8px; height: 14px; background: #6fe38a; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.modern { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); position: relative; min-height: 360px; }
.modern .ui { position: absolute; }
.cmp { width: 100%; border-collapse: collapse; margin-top: 56px; font-size: 15px; }
.cmp th, .cmp td { text-align: left; padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.cmp td:first-child { color: var(--ink); font-weight: 500; width: 22%; }
.cmp td:nth-child(2) { color: var(--muted); width: 36%; }
.cmp td:nth-child(3) { color: var(--ink-2); }
.cmp td:nth-child(3)::before { content: "✓ "; color: var(--sage); }
.table-scroll { overflow-x: auto; }
@media (max-width: 860px) {
  .versus-grid { grid-template-columns: 1fr; }
  .cmp { font-size: 14px; min-width: 640px; }
}

/* ---------- Integration ---------- */
.integ-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; margin-top: 56px; align-items: start; }
.flow { display: grid; gap: 10px; }
.flow-node { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); transition: border-color .3s, background .3s; }
.flow-node.lit { border-color: rgba(220,170,94,0.6); background: rgba(220,170,94,0.06); }
.flow-node .n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,0.05); color: var(--brass); }
.flow-node b { display: block; font-weight: 500; }
.flow-node span { color: var(--muted); font-size: 13.5px; }
.flow-arrow { height: 16px; margin-left: 35px; border-left: 1px dashed var(--line-2); }
.console { border-radius: 18px; border: 1px solid var(--line-2); background: #0a0908; overflow: hidden; }
.console-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.console-tabs button { background: none; border: 0; padding: 7px 12px; border-radius: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.console-tabs button.on { background: rgba(255,255,255,0.06); color: var(--ink); }
.console-body { padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; min-height: 380px; max-height: 460px; overflow: auto; }
.console-body pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
.log-line { display: flex; gap: 10px; opacity: 0; transform: translateY(4px); animation: logIn .35s ease forwards; }
@keyframes logIn { to { opacity: 1; transform: none; } }
.log-line .ts { color: var(--dim); flex: none; }
.k { color: var(--brass-2); } .s { color: #a9d8b0; } .n { color: #a9c8ef; } .c { color: var(--dim); } .m { color: var(--plum); }
.run-btn { margin: 0 18px 18px; }
.disclaimer { font-size: 12.5px; color: var(--muted); margin-top: 22px; max-width: 720px; }
@media (max-width: 900px) { .integ-grid { grid-template-columns: 1fr; } }

/* ---------- Features grid ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.feat { border: 1px solid var(--line); border-radius: 20px; padding: 26px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.feat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(220,170,94,0.1); color: var(--brass); }
.feat h4 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.02em; font-weight: 500; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr; } }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-top: 56px; }
.stat { background: var(--bg); padding: 30px 26px; }
.stat b { display: block; font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.04em; font-weight: 500; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; display: block; margin-top: 10px; }
.stats-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 160px 0; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 100%, rgba(220,170,94,0.18), transparent 70%); pointer-events: none; }
.cta .lede { margin-inline: auto; }
.cta-btns { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 50px 0 60px; color: var(--muted); font-size: 13.5px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }
.legal { margin-top: 26px; font-size: 12px; color: var(--dim); max-width: 860px; }

/* ---------- Doc pages (analysis / developers) ---------- */
.doc-hero { padding: 150px 0 50px; border-bottom: 1px solid var(--line); }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 60px; padding: 60px 0 120px; }
.toc { position: sticky; top: 90px; align-self: start; display: grid; gap: 8px; font-size: 13.5px; }
.toc a { color: var(--muted); }
.toc a:hover, .toc a.on { color: var(--brass); }
.prose { max-width: 780px; }
.prose h2 { font-size: 32px; letter-spacing: -0.03em; font-weight: 500; margin: 70px 0 16px; line-height: 1.15; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16.5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.prose td { color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 6px; color: var(--brass-2); }
.prose pre { background: #0a0908; border: 1px solid var(--line); border-radius: 14px; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.prose pre code { background: none; padding: 0; color: inherit; }
.callout { border: 1px solid rgba(220,170,94,0.3); background: rgba(220,170,94,0.06); border-radius: 14px; padding: 16px 18px; margin: 22px 0; }
.callout p { margin: 0; font-size: 15px; }
.score { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; align-items: center; margin: 8px 0; font-size: 14px; color: var(--ink-2); }
.score .bar { height: 8px; }
.score .bar i.old { background: var(--clay); }
.endpoint { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 14px; margin: 26px 0 8px; }
.verb { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.verb.get { background: rgba(116,163,220,0.18); color: #a9c8ef; }
.verb.post { background: rgba(130,185,138,0.18); color: #a9d8b0; }
.verb.patch { background: rgba(220,170,94,0.18); color: var(--brass-2); }
.verb.hook { background: rgba(180,138,214,0.18); color: #d2b6ea; }
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; grid-template-columns: 1fr 1fr; }
  .prose table { display: block; overflow-x: auto; }
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* ---------- Mobile: day section ---------- */
@media (max-width: 900px) {
  .day-grid { grid-template-columns: 1fr; gap: 0; }
  .day-stage { order: -1; position: sticky; top: 64px; z-index: 3; height: 46vh; margin: 0 -16px; padding: 0 16px; background: linear-gradient(var(--day-bg, var(--bg)) 85%, transparent); }
  .stage-sticky { position: relative; top: 0; height: 46vh; }
  .clock-row { top: 8px; }
  .ipad { width: min(100%, 440px); border-radius: 22px; padding: 8px; margin-top: 26px; }
  .ipad-screen { border-radius: 15px; }
  .ipad .ui { font-size: 7px; grid-template-columns: 34px 1fr; }
  .ipad .ui-main { padding: 8px 9px; gap: 6px; }
  .ipad .ui-side { gap: 6px; padding: 8px 0; }
  .ipad .ui-side i { width: 20px; height: 20px; }
  .ipad .ui-side svg { width: 11px; height: 11px; }
  .ipad .ui-head h4 { font-size: 11px; }
  .ipad .kpi b { font-size: 14px; }
  .ipad .ui-card { padding: 6px; border-radius: 8px; }
  .ipad .toast { display: none; }
  .step { min-height: 70vh; padding: 20px 0; }
  .day-steps { padding-bottom: 10vh; }
}
