/* ============ Hospitally — shared styles ============ */
/* Page: light paper + ink. Product surfaces (devices, panels, the demo app) use the dark scope below. */
:root {
  --bg: #f4f2fa;
  --bg-2: #ffffff;
  --bg-3: #e9e5f4;
  --line: rgba(23, 17, 47, 0.08);
  --line-2: rgba(23, 17, 47, 0.15);
  --ink: #17112f;
  --ink-2: #3d3657;
  --muted: #76708b;
  --dim: #a6a1b8;
  --accent: #7563f0;
  --accent-2: #a99cf2;
  --clay: #ff4f6d;
  --sage: #2fcf8e;
  --sky: #3aa9ff;
  --plum: #a57bff;
  --rose: #ff7ab6;
  --radius: 18px;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
.dk, body.app, .ui, .papp, .home, .ipad, .iphone, .duo, .duo-flat, .modern, .term, .console, .prose pre {
  --bg: #110d22;
  --bg-2: #17122c;
  --bg-3: #1f1938;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f3f1fa;
  --ink-2: #cbc6db;
  --muted: #8b85a0;
  --dim: #4c4663;
  color-scheme: dark;
}
.dk, .papp, .iphone, .ipad, .duo-flat { color: var(--ink); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
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: clip;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.serif { font-family: var(--sans); font-weight: inherit; font-style: normal; color: var(--muted); }
.mono { font-family: var(--mono); }
.brass { color: var(--accent); }
.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- Nav (floating pills) ---------- */
.nav {
  position: fixed; top: 14px; left: 16px; right: 16px; z-index: 50;
  height: 50px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav .brand, .nav .nav-links, .nav .nav-cta { height: 50px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); border-radius: 999px; box-shadow: 0 0 0 1px rgba(23,17,47,0.06), 0 10px 30px -14px rgba(17,17,40,0.28); }
.nav .brand { padding: 0 20px 0 14px; }
.nav .nav-links { padding: 0 24px; align-items: center; }
.nav .nav-cta { padding: 5px; }
.nav .btn { height: 40px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 20px; letter-spacing: -0.03em; }
.brand b { color: var(--accent); font-weight: 500; }
.brand-mark { width: 40px; height: 20px; color: var(--accent); flex: none; }
.dk .brand-mark, body.app .brand-mark { color: var(--accent-2); }
.nav-links { display: flex; gap: 26px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 4px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; white-space: nowrap;
  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: var(--bg); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.nav .btn-ghost { border-color: transparent; }
.nav .btn-ghost:hover { background: var(--bg-3); }
.btn-brass { background: var(--accent); color: #fff; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.nav-burger { display: none; background: none; border: 0; padding: 8px; }

@media (max-width: 1000px) {
  .nav { left: 10px; right: 10px; top: 10px; }
  .nav .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 420px) {
  .nav .brand { padding: 0 16px 0 12px; }
  .nav .btn { padding: 0 15px; font-size: 13.5px; }
}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.h-display {
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 500; margin: 14px 0 0;
}
.h-section {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.04; letter-spacing: -0.04em; 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; } }

/* ---------- HERO ---------- */
.hero { padding: 150px 0 40px; text-align: center; overflow: hidden; }
.hero-copy > * { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.hero-pill { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 15px; border-radius: 999px; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line), 0 8px 20px -14px rgba(17,17,40,.3); font-size: 13.5px; color: var(--ink-2); }
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(117,99,240,.16); }
.h-hero { font-size: clamp(44px, 7.6vw, 112px); line-height: .98; letter-spacing: -.055em; font-weight: 500; margin: 24px 0 0; }
.h-hero span { color: var(--muted); }
.hero .lede { margin: 24px auto 0; }
.hero-btns { display: flex; gap: 10px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-stage { position: relative; width: min(1080px, calc(100% - 32px)); margin: 72px auto 0; aspect-ratio: 1080 / 720; container-type: inline-size; perspective: 2400px; animation: rise 1.2s .3s cubic-bezier(.2,.7,.2,1) both; }
.hero-pad { position: absolute; left: 3%; top: 0; transform-origin: 50% 90%; will-change: transform; }
.hero-pad .ipad { --w: 80cqw; }
.hero-phone { position: absolute; right: 1%; top: 17%; will-change: transform; }
.hero-phone .iphone { --w: 23cqw; }
@media (max-width: 700px) {
  .hero { padding-top: 120px; }
  .hero-stage { width: calc(100% - 24px); aspect-ratio: 100 / 84; margin-top: 48px; }
  .hero-pad { left: 0; }
  .hero-pad .ipad { --w: 86cqw; }
  .hero-phone { right: 0; top: 22%; }
  .hero-phone .iphone { --w: 29cqw; }
}

/* ---------- STATEMENT + scroll-revealed paragraphs ---------- */
.statement { height: 260vh; }
.st-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; }
.st-text, .pain { margin: 0; font-size: clamp(30px, 4.3vw, 62px); line-height: 1.13; letter-spacing: -.045em; font-weight: 500; max-width: 1120px; }
.w { opacity: .14; }
.tk {
  --s: 1; display: inline-grid; place-items: center; width: 1.04em; height: 1.04em; margin: 0 .03em;
  border-radius: .28em; vertical-align: -.17em; color: #fff;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 .045em 0 rgba(255,255,255,.5), inset 0 -.07em .12em rgba(0,0,0,.2), 0 .14em .3em -.08em rgba(17,17,40,.4);
  transform: rotate(var(--r, 0deg)) scale(var(--s));
}
.tk svg { width: 56%; height: 56%; }
.tk.ink { --c1: #55555d; --c2: #17171a; }
.tk.clay { --c1: #ff8a9c; --c2: #f0304f; }
.tk.accent { --c1: #8b95ff; --c2: #3a49f0; }
.tk.sage { --c1: #6de7b6; --c2: #13b173; }
.tk.sky { --c1: #7fcbff; --c2: #1684ea; }
.tk.plum { --c1: #c9adff; --c2: #8150f2; }
.tk.amber { --c1: #ffd978; --c2: #f29a12; }
.tk.rose { --c1: #ff9fcb; --c2: #f0478f; }

/* ---------- CHAPTERS (one issue per sticky scene) ---------- */
.ch { height: 360vh; }
.ch-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.ch-meta { position: absolute; top: 88px; left: 0; right: 0; z-index: 2; }
.ch-meta .wrap { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ch-meta b { color: var(--ink); font-weight: 500; }
.ch-meta .ln { flex: 1; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.ch-meta .ln i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.ch-a { position: absolute; inset: 0; display: flex; align-items: center; padding-top: 40px; will-change: transform, opacity; }
.tag { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.tag.bad { color: var(--clay); }
.tag.good { color: var(--accent); }
.pain { margin-top: 22px; }
.ch-b { position: absolute; inset: 0; padding: 128px 0 36px; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.ch-b.live { pointer-events: auto; }
.ch-b > .wrap {
  height: 100%; display: grid; column-gap: 64px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: ". dev" "head dev" "foot dev" ". dev";
}
.fix-head { grid-area: head; }
.fix-foot { grid-area: foot; }
.dev-col { grid-area: dev; container-type: size; display: grid; place-items: center; min-height: 0; }
.dev-col .ipad { --w: min(98cqw, 122cqh); }
.dev-col .iphone { --w: min(62cqw, 45cqh); }
.dev-col .duo-flat { --w: min(92cqw, 80cqh); }
.dev-wrap { will-change: transform; }
.fix-head h3 { font-size: clamp(28px, 3.1vw, 46px); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; margin: 14px 0 0; }
.fix-head p { color: var(--ink-2); margin: 12px 0 0; font-size: 16.5px; max-width: 440px; }
.feats { list-style: none; margin: 20px 0 0 -12px; padding: 0; display: grid; gap: 2px; }
.feat-i { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; padding: 9px 12px; border-radius: 14px; cursor: pointer; opacity: 0; transition: background .3s, box-shadow .3s; }
.feat-i .n { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 500 11px/1 var(--mono); background: var(--bg-3); color: var(--muted); transition: background .3s, color .3s; }
.feat-i b { font-weight: 500; font-size: 16px; letter-spacing: -.01em; line-height: 24px; }
.feat-i .d { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1); }
.feat-i .d > span { overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.45; }
.feat-i.on { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line), 0 14px 30px -20px rgba(17,17,40,.35); }
.feat-i.on .n { background: var(--accent); color: #fff; }
.feat-i.on .d { grid-template-rows: 1fr; }
.feat-i.on .d > span { padding-top: 2px; }
.fix-row { display: flex; gap: 22px; align-items: center; margin-top: 18px; }
.before { font-size: 13px; color: var(--muted); border-left: 2px solid var(--clay); padding-left: 12px; max-width: 280px; }
.before b { color: var(--clay); font-weight: 500; display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 3px; }

/* Dial (draggable gauge) */
.dial-wrap { flex: none; display: grid; justify-items: center; gap: 2px; }
.dial { position: relative; width: 124px; height: 124px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.dial:active { cursor: grabbing; }
.dial svg { width: 100%; height: 100%; overflow: visible; }
.dial .trk, .dial .val { fill: none; stroke-width: 9; stroke-linecap: round; }
.dial .trk { stroke: var(--bg-3); }
.dial .val { stroke: var(--dc); }
.dial .ticks line { stroke: var(--line-2); stroke-width: 1.4; stroke-linecap: round; }
.dial .knob circle { fill: #fff; stroke: var(--dc); stroke-width: 3; filter: drop-shadow(0 2px 3px rgba(17,17,40,.3)); }
.dial-read { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; }
.dial-read b { font-size: 23px; font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.dial-read span { font-size: 10px; color: var(--muted); max-width: 74px; line-height: 1.2; margin-top: 5px; }
.dial-hint { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }

/* Hotspots on the device screen */
.hs-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.hs-ring {
  position: absolute; border-radius: 12px; opacity: 0;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px rgba(117,99,240,.3), 0 0 0 3000px rgba(4,4,12,.46);
  transition: left .55s cubic-bezier(.2,.8,.2,1), top .55s cubic-bezier(.2,.8,.2,1), width .55s cubic-bezier(.2,.8,.2,1), height .55s cubic-bezier(.2,.8,.2,1), opacity .4s;
}
.hs-dot {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.94); color: #111113; font: 600 11.5px/24px var(--sans); text-align: center;
  pointer-events: auto; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  transform: scale(0); transition: transform .45s cubic-bezier(.3,1.6,.5,1), background .3s, color .3s;
}
.hs-dot.in { transform: scale(1); }
.hs-dot.on { background: var(--accent); color: #fff; }
.hs-dot.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent-2); animation: hsPulse 1.6s ease-out infinite; }
@keyframes hsPulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

/* Chapter rail */
.ch-rail { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.ch-rail.show { opacity: 1; pointer-events: auto; }
.ch-rail a { font-family: var(--mono); font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 8px; padding: 3px 0; transition: color .3s; }
.ch-rail a::before { content: ""; width: 10px; height: 1px; background: currentColor; transition: width .3s, background .3s; }
.ch-rail a:hover { color: var(--ink-2); }
.ch-rail a.on { color: var(--ink); }
.ch-rail a.on::before { width: 22px; background: var(--accent); }
@media (max-width: 1400px) { .ch-rail { display: none; } }

@media (max-width: 900px) {
  .ch-meta { top: 74px; }
  .ch-a { padding-top: 20px; }
  .pain { font-size: clamp(25px, 7vw, 34px); margin-top: 16px; }
  .st-text { font-size: clamp(27px, 7.4vw, 38px); }
  .ch-b { padding: 106px 0 14px; }
  .ch-b > .wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head" "dev" "foot"; row-gap: 12px; }
  .fix-head h3 { font-size: 25px; margin-top: 8px; }
  .fix-head p, .before, .dial-hint { display: none; }
  .fix-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
  .feats { margin: 0; }
  .feat-i { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); }
  .feat-i:not(.on) { display: none; }
  .fix-row { margin: 0; }
  .dial { width: 86px; height: 86px; }
  .dial-read b { font-size: 17px; }
  .dial-read span { display: none; }
}

/* ---------- Device frames (realistic) ---------- */
.iphone, .ipad, .duo-flat { position: relative; flex: none; font-size: calc(var(--w) / 100); width: 100em; }
.dv-glass { position: absolute; background: #030303; }
.dv-glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 60; background: linear-gradient(115deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.035) 32%, transparent 32.2%); }
.dv-screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0a0a0b; isolation: isolate; }
.scr-fit { position: absolute; left: 0; top: 0; transform-origin: 0 0; font-size: 12px; overflow: hidden; }
.ib { position: absolute; display: block; }

/* iPhone Pro, natural titanium (71.5 × 149.6 mm) */
.iphone {
  --w: 300px; height: 209.2em; border-radius: 16.8em;
  background: linear-gradient(90deg, #77736d 0%, #dcd7cf 1.8%, #aca79f 4%, #cdc8c0 30%, #d6d1c9 50%, #cdc8c0 70%, #aca79f 96%, #dcd7cf 98.2%, #77736d 100%);
  box-shadow: inset 0 0 0 .22em rgba(255,255,255,.55), inset 0 0 .4em .55em rgba(0,0,0,.1), 0 1.5em 3em -1.2em rgba(18,18,40,.4), 0 9em 16em -5em rgba(20,20,60,.45);
}
.iphone .dv-glass { inset: 1.25em; border-radius: 15.6em; padding: 1.55em; box-shadow: inset 0 0 0 .16em #242426; }
.iphone .dv-screen { border-radius: 14.1em; }
.iphone .ib { width: 1.1em; border-radius: .5em; background: linear-gradient(90deg, #8c8881, #dcd7cf 55%, #99958e); box-shadow: 0 .1em .25em rgba(0,0,0,.25); }
.iphone .ib-a { left: -.75em; top: 37em; height: 10em; }
.iphone .ib-u { left: -.75em; top: 54em; height: 19em; }
.iphone .ib-d { left: -.75em; top: 77em; height: 19em; }
.iphone .ib-p { right: -.75em; top: 61em; height: 30em; }
.iphone .ib-c { right: -.45em; width: .8em; top: 124em; height: 17em; background: linear-gradient(90deg, #a39e97, #6c6964); }
.island { position: absolute; z-index: 50; top: 3.3em; left: 50%; width: 32em; height: 9.4em; margin-left: -16em; border-radius: 5em; background: #000; }
.island::after { content: ""; position: absolute; right: 2.8em; top: 50%; width: 3.6em; height: 3.6em; margin-top: -1.8em; border-radius: 50%; background: radial-gradient(circle at 38% 38%, #3a4468, #0b0d18 55%, #000); }
.hind { position: absolute; z-index: 50; bottom: 2.3em; left: 50%; width: 36em; margin-left: -18em; height: 1.5em; border-radius: 1em; background: rgba(255,255,255,.82); }
.sbar { position: absolute; z-index: 50; font-size: 5.2em; top: .78em; left: 1.8em; right: 1.45em; height: 1.2em; display: flex; align-items: center; justify-content: space-between; color: #fff; }
.sbar b { font-weight: 600; letter-spacing: -.01em; }
.sbar span { display: flex; gap: .3em; align-items: center; }
.sbar svg { height: .66em; width: auto; fill: currentColor; }
.sbar svg:last-child { height: .72em; }

/* iPad Pro 13", silver, landscape (281.6 × 215.5 mm) */
.ipad {
  --w: 720px; height: 76.53em; border-radius: 5.9em;
  background: linear-gradient(160deg, #eef0f2 0%, #b8bbc0 24%, #e0e2e5 50%, #a4a7ac 78%, #d6d8db 100%);
  box-shadow: inset 0 0 0 .12em rgba(255,255,255,.75), inset 0 0 .25em .3em rgba(0,0,0,.08), 0 1.5em 3em -1.5em rgba(18,18,40,.32), 0 7em 13em -4em rgba(20,20,60,.4);
}
.ipad .dv-glass { inset: .42em; border-radius: 5.5em; padding: 2.75em; box-shadow: inset 0 0 0 .1em #2a2a2c; }
.ipad .dv-screen { border-radius: 2.9em; }
.ipad .cam { position: absolute; top: 1.02em; left: 50%; width: .8em; height: .8em; margin-left: -.4em; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #3a4468, #07080d 65%); }
.ipad .ib { top: -.3em; height: .45em; border-radius: .3em; background: linear-gradient(#d9dbde, #9a9da2); }
.ipad .ib-t1 { left: 9em; width: 8em; }
.ipad .ib-t2 { right: 9em; width: 5.5em; }
.ipad .ib-t3 { right: 15.5em; width: 5.5em; }

/* iPhone Duo (concept book-style foldable), graphite, unfolded */
.duo-flat {
  --w: 460px; height: 117em; border-radius: 8.6em;
  background: linear-gradient(90deg, #36363b 0%, #7a7a82 1.4%, #4a4a50 3.4%, #56565c 47%, #2a2a2e 50%, #56565c 53%, #4a4a50 96.6%, #7a7a82 98.6%, #36363b 100%);
  box-shadow: inset 0 0 0 .2em rgba(255,255,255,.2), 0 1.5em 3em -1.2em rgba(18,18,40,.4), 0 8em 15em -5em rgba(20,20,60,.45);
}
.duo-flat .dv-glass { inset: .9em; border-radius: 7.8em; padding: 1.7em; box-shadow: inset 0 0 0 .14em #242426; }
.duo-flat .dv-screen { border-radius: 6.4em; }
.duo-flat .hinge { position: absolute; left: 50%; width: 8em; margin-left: -4em; height: 1em; border-radius: .5em; background: linear-gradient(90deg, #26262a, #8d8d95 50%, #26262a); }
.duo-flat .hinge.t { top: -.45em; }
.duo-flat .hinge.b { bottom: -.45em; }
.duo-flat .ib { right: -.6em; width: 1em; border-radius: .5em; background: linear-gradient(90deg, #4c4c52, #9a9aa2 55%, #55555b); }
.duo-flat .ib-p { top: 30em; height: 14em; }
.duo-flat .ib-u { top: 48em; height: 20em; }
.fold-crease { position: absolute; z-index: 44; top: 0; bottom: 0; left: 50%; width: 7em; margin-left: -3.5em; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.045) 38%, rgba(0,0,0,.32) 50%, rgba(255,255,255,.045) 62%, transparent); }
.punch { position: absolute; z-index: 50; top: 2.6em; left: 75%; width: 3.4em; height: 3.4em; margin-left: -1.7em; border-radius: 50%; background: radial-gradient(circle at 38% 38%, #3a4468, #000 62%); }

/* ---------- 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: #101012; }
.ui-side { background: #0a0a0b; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; }
.ui-side .logo { width: 26px; height: 13px; color: var(--accent-2); 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(117,99,240,0.14); color: var(--accent); }
.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(117,99,240,0.15); color: var(--accent-2); }
.ui-chip.clay { background: rgba(255,79,109,0.16); color: #ff97a8; }
.ui-chip.sage { background: rgba(47,207,142,0.16); color: #8ce8c0; }
.ui-chip.sky { background: rgba(58,169,255,0.16); color: #9bd4ff; }
.ui-chip.plum { background: rgba(165,123,255,0.16); color: #cdb8ff; }
.ui-row { display: grid; gap: 10px; }
.ui-card { background: #17171a; 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: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.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: #151517; }
.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: #37373d; color: var(--ink-2) !important; }
.st-ooo { background: #5a4f63; color: #e8def0 !important; }
.st-prog { background: var(--accent); }
.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(28,28,32,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: #26262b; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.h { background: var(--accent); color: #ffffff; 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(117,99,240,0.35); background: rgba(117,99,240,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(--accent); color: #ffffff; 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: 16px; right: 16px; 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%, #7563f0 0%, #241b4d 45%, #0e0b1e 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, #241b4d, #110d22); box-shadow: inset 0 0 0 1px rgba(117,99,240,0.45), 0 0 22px rgba(117,99,240,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: #101012; 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(--accent); }

/* 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: #030303; padding: 9px; border: 3px solid #6c6c73; box-shadow: inset 0 0 0 1px #222226; }
.duo-half.left .duo-face { border-radius: 38px 4px 4px 38px; padding-right: 0; border-right: 0; background: linear-gradient(#030303, #030303) padding-box, linear-gradient(90deg, #3a3a3f, #8a8a92 4%, #55555b) border-box; }
.duo-half.right .duo-face.front { border-radius: 4px 38px 38px 4px; padding-left: 0; border-left: 0; background: linear-gradient(#030303, #030303) padding-box, linear-gradient(90deg, #55555b, #8a8a92 96%, #3a3a3f) border-box; }
.duo-face.back { transform: rotateY(180deg); border-radius: 38px 4px 4px 38px; background: linear-gradient(#030303, #030303) padding-box, linear-gradient(90deg, #3a3a3f, #8a8a92 4%, #55555b) border-box; }
.duo-body { filter: drop-shadow(0 30px 40px rgba(20,20,60,.35)); }
.duo-scr { position: relative; width: 100%; height: 100%; overflow: hidden; background: #101012; }
.duo-half.left .duo-scr { border-radius: 29px 0 0 29px; }
.duo-half.right .front .duo-scr { border-radius: 0 29px 29px 0; }
.duo-face.back .duo-scr { border-radius: 29px; }
.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(117,99,240,0.6); background: rgba(117,99,240,0.06); }
.flow-node .n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bg-3); color: var(--accent); }
.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: #0a0a0b; 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(--accent-2); } .s { color: #8ce8c0; } .n { color: #9bd4ff; } .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(117,99,240,0.1); color: var(--accent); }
.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(117,99,240,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(--accent); }
.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(23,17,47,0.06); padding: 2px 6px; border-radius: 6px; color: var(--accent); }
.prose pre { background: #0a0a0b; 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(117,99,240,0.3); background: rgba(117,99,240,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(58,169,255,0.16); color: #1668c9; }
.verb.post { background: rgba(47,207,142,0.18); color: #0b8a57; }
.verb.patch { background: rgba(117,99,240,0.14); color: var(--accent); }
.verb.hook { background: rgba(165,123,255,0.16); color: #6a3fe0; }
@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; }
}
