/* /aerisOS next, round 3: black, greys and white, one accent at a time; hairlines; editorial type (the E:mergence design style).
   The film owns scrolling and rests on sections (data-scroll="film"); the install section scrolls natively (data-scroll="native"). */
@font-face { font-family: Inter; src: url(/assets/charles-page/assets/InterVariable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #06080a; --ink: #f3f1ec; --muted: #b9bdc1; --dim: #8a9096; --rule: rgba(243, 241, 236, .10); --rule-strong: rgba(243, 241, 236, .22);
  --lime: #9be11e; --cyan: #3fe0c8; --acc: var(--cyan);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 88px); --ease: cubic-bezier(.2, .8, .2, 1);
  /* the live demo window: one source of truth, read by the film (film.js reads #window's rect) */
  --win-x: max(24px, 4vw); --win-top: clamp(96px, 13svh, 136px); --win-bottom: 76px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-synthesis: none; font-feature-settings: "cv11", "ss01";
  background: var(--bg); color: var(--ink);
}
@media (max-width: 640px) { :root { --win-x: 10px; --win-top: 118px; --win-bottom: 64px; } }
@media (max-height: 520px) and (orientation: landscape) { :root { --win-x: 12px; --win-top: 10px; --win-bottom: 10px; --win-side: 148px; } }
* { box-sizing: border-box; }
html, body { margin: 0; overscroll-behavior-x: none; }
html:root { scroll-padding-top: 0; }
.installation [id] { scroll-margin-top: 72px; }
body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
/* the film owns scrolling: nothing native moves while data-scroll="film" (the landing's body { touch-action: none }) */
html[data-scroll="film"], html[data-scroll="film"] body { overflow: hidden; height: 100%; overscroll-behavior: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
::selection { background: var(--ink); color: #000; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 50; padding: 12px 14px; border-radius: 6px; background: var(--ink); color: #000; font-weight: 500; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ------------------------------------------------------------------ the page and the stage */
.page { position: relative; }
html[data-scroll="film"] .page { position: fixed; inset: var(--hdr, 0px) 0 0 0; touch-action: none; will-change: transform; }   /* under the site's sticky header; no overflow clip: the install block below the stage shows as the stage slides away */
.stage { position: relative; height: calc(100vh - var(--hdr, 0px)); height: calc(100svh - var(--hdr, 0px)); overflow: hidden; overflow: clip; background: var(--bg); z-index: 1;
  container-type: size;
  --avail-h: calc(100cqh - var(--win-top) - var(--win-bottom));
  --ww: min(100cqw - 2 * var(--win-x), var(--avail-h) * 1.6);
  --wh: calc(var(--ww) / 1.6);
  --wy: calc(var(--win-top) + (var(--avail-h) - var(--wh)) / 2);
  --wx: calc((100cqw - var(--ww)) / 2); }
html[data-scroll="film"] .stage { height: 100%; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; pointer-events: none; }
html[data-mode="still"] #gl { display: none; }

/* the live login: under the canvas, revealed through the canvas's alpha; the live page itself once sealed */
.window { position: absolute; left: var(--wx); top: var(--wy); width: var(--ww); height: var(--wh); z-index: 1; border-radius: 10px; overflow: hidden; overflow: clip; background: #000; }
.window iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; pointer-events: none; }
html[data-sealed="1"] .window iframe, html[data-mode="still"] .window iframe { pointer-events: auto; }
html[data-sealed="1"] .window, html[data-mode="still"] .window { z-index: 3; }
.shield { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: stretch; padding: 0; border: 0; background: rgba(6, 8, 10, .22); color: var(--ink); font: 500 13px/1.2 Inter, sans-serif; cursor: pointer; }
.shield > span:last-child { flex: 1; padding: 7px 12px; text-align: center; background: rgba(6, 8, 10, .86); border-bottom: 1px solid var(--rule-strong); }
.shield .dot { display: none; }
.shield[hidden] { display: none; }

/* ------------------------------------------------------------------ sections */
.sec { position: absolute; inset: 0; z-index: 5; display: grid; padding: 0 var(--gutter); opacity: var(--o, 0); pointer-events: none; }
.sec.off { visibility: hidden; }
.sec > * { transform: translate3d(0, var(--y, 0px), 0); }
.sec a, .sec button { pointer-events: auto; }
.acc-lime { --acc: var(--lime); }
.acc-cyan { --acc: var(--cyan); }
h1, h2 { margin: 0; font-weight: 400; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; }
.copy .sub, .copy .lede { margin: 16px 0 0; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.55; color: var(--muted); letter-spacing: -.01em; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 11px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.eyebrow .n { color: var(--acc); }
.eyebrow .sep { color: var(--rule-strong); }

/* the opening: Charles alone above one line */
.sec-opening { grid-template-rows: 1fr auto; justify-items: center; align-items: end; text-align: center; padding-bottom: max(56px, 8svh); }
.core-slot { grid-row: 1; width: 100%; align-self: stretch; min-height: 0; }                               /* Charles is drawn in WebGL at this slot's centre (still mode inlines him here) */
.sec-opening .copy { grid-row: 2; width: min(760px, 100%); }
.sec-opening .eyebrow { justify-content: center; }
.sec-opening h1 { font-size: clamp(38px, 5.6vw, 76px); }
.sec-opening .sub { max-width: 560px; margin-inline: auto; }
.cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 500 10px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--dim); opacity: var(--cue, 1); transition: opacity .6s var(--ease); }
.cue-line { display: block; width: 1px; height: 28px; background: linear-gradient(var(--rule-strong), transparent); animation: cue 2.6s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(.4); transform-origin: top; opacity: .3 } 50% { transform: scaleY(1); opacity: 1 } 100% { transform: scaleY(.4); opacity: .3 } }
@media (max-width: 640px) { .sec-opening { padding-bottom: max(44px, 6svh); } .cue { display: none; } }

/* the selling sections: copy on one side, the illustration on the other */
.sec-two { grid-template-columns: minmax(280px, 40%) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 72px); align-items: center; padding-top: 56px; padding-bottom: 40px; }
.sec-two .copy { max-width: 560px; }
.sec-two h2 { font-size: clamp(26px, 2.7vw, 42px); }
.sec-two .lede { font-size: clamp(14px, 1.12vw, 16.5px); line-height: 1.5; }
.facts { margin: 22px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 11px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.facts dd { margin: 0; font-size: clamp(13px, .95vw, 14.5px); line-height: 1.5; color: var(--muted); }
.fig { position: relative; width: 100%; height: min(72cqh, 640px); align-self: center; }
.fig svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 960px), (orientation: portrait) {
  .sec-two { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 38%) minmax(0, 1fr); row-gap: 12px; align-items: start; padding-top: 64px; padding-bottom: 24px; }
  .sec-two .fig { grid-row: 1; height: 100%; align-self: stretch; }
  .sec-two .copy { grid-row: 2; align-self: center; max-width: 560px; }
  .sec-two h2 { font-size: clamp(24px, 6.4vw, 32px); }
  .sec-two .lede { font-size: 14px; margin-top: 12px; }
  .eyebrow { margin-bottom: 12px; }
  .facts { margin-top: 14px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 0; }
  .facts dd { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .skip-install { display: none; }
}
@media (max-height: 920px) and (orientation: portrait) { .facts > div:nth-child(3) { display: none; } }
@media (max-height: 780px) and (orientation: portrait) { .sec-two .lede { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } }
@media (max-height: 700px) and (orientation: portrait) { .sec-two { grid-template-rows: minmax(0, 34%) minmax(0, 1fr); } .sec-two .lede { -webkit-line-clamp: 3; } }
@media (max-height: 520px) and (orientation: landscape) {
  .sec-two { grid-template-columns: minmax(260px, 46%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; padding-top: 44px; padding-bottom: 12px; column-gap: 24px; }
  .sec-two .copy { grid-row: 1; grid-column: 1; align-self: center; }
  .sec-two .fig { grid-row: 1; grid-column: 2; height: 100%; align-self: stretch; }
  .sec-two h2 { font-size: 22px; } .sec-two .lede { font-size: 12.5px; margin-top: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .facts > div:nth-child(3) { display: none; } .facts dd { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .eyebrow { margin-bottom: 8px; } .facts { margin-top: 8px; } .facts > div { padding: 5px 0; grid-template-columns: 7.5em minmax(0, 1fr); } .facts dd { font-size: 11.5px; line-height: 1.35; } .facts dt { font-size: 10px; }
  .fig { height: 100%; }
  .sec-opening h1 { font-size: 34px; } .sec-opening .sub { font-size: 13px; }
}

/* the diagrams: hairlines, one accent, real type. Lines trace in with the timeline (inline stroke-dashoffset from illus.js). */
.fig .ln { fill: none; stroke: var(--rule-strong); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
.fig .slot { stroke: rgba(243, 241, 236, .14); }
.fig .acc { stroke: var(--acc); }
.fig .link, .fig .track, .fig .row { stroke: var(--rule); }
.fig .deck, .fig .canon, .fig .desk { stroke: var(--rule-strong); }
.fig .lane { stroke: rgba(243, 241, 236, .3); }
.fig .ret { stroke: none; }
.fig .reply { stroke: var(--rule); }
.fig .dash { stroke-dasharray: 3 4; stroke-dashoffset: 0; opacity: 0; }
.fig .now { stroke-dasharray: none; stroke-dashoffset: 0; opacity: .75; }
.fig .ln.hot { stroke: var(--ink); }
.fig .lbl { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); opacity: 0; transition: fill .25s; }
.fig .lbl.dim { fill: var(--dim); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.fig .lbl.hot { fill: var(--acc); }
.fig .val { fill: var(--ink); font: 500 11px/1 var(--mono); letter-spacing: .04em; opacity: 0; }
.fig .pct { opacity: 0; transition: opacity .2s; } .fig .pct.hot { opacity: 1; }
.fig .mark { fill: var(--acc); } .fig .mark.dim { fill: var(--dim); }
.fig .rec { fill: var(--dim); opacity: 0; transition: fill .3s; } .fig .rec.hot { fill: var(--acc); }
.fig .fill { stroke: var(--acc); stroke-width: 3; fill: none; stroke-linecap: butt; opacity: .85; }
.fig .dimfill { stroke: var(--rule-strong); stroke-width: 3; fill: none; }
.fig .mfill { fill: rgba(243, 241, 236, .16); transition: fill .35s; } .fig .mfill.hot { fill: var(--acc); }
.fig .wave { stroke-width: 1.25; }
.fig .check { stroke-width: 1.5; }
html[data-mode="still"] .fig .ln { stroke-dashoffset: 0; } html[data-mode="still"] .fig .lbl, html[data-mode="still"] .fig .rec, html[data-mode="still"] .fig .dash, html[data-mode="still"] .fig .val { opacity: 1; }
html[data-mode="still"] .fig .mark, html[data-mode="still"] .fig .now { display: none; }

/* the demo: copy above the live window, controls under it */
.sec-demo { padding: 0; display: block; }
.copy-demo { position: absolute; left: var(--wx); width: var(--ww); bottom: calc(100cqh - var(--wy) + 14px); display: flex; flex-direction: column; justify-content: flex-end; }
.copy-demo .eyebrow { margin-bottom: 10px; }
.copy-demo h2 { font-size: clamp(22px, 2.2vw, 30px); }
.copy-demo .sub { margin-top: 6px; font-size: 14px; }
.status { display: inline-flex; align-items: center; gap: 9px; }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--acc); }
html[data-demo="loading"] .status-dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3 } }
.dock { position: absolute; z-index: 6; left: var(--wx); width: var(--ww); top: calc(var(--wy) + var(--wh)); height: min(var(--win-bottom), 100cqh - var(--wy) - var(--wh)); display: flex; align-items: center; justify-content: flex-end; gap: 4px 28px; pointer-events: none; }
html[data-phase="demo"] .dock, html[data-phase="after"] .dock, html[data-mode="still"] .dock { pointer-events: auto; }
.ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font: 500 14px/1 Inter, sans-serif; text-decoration: none; cursor: pointer; transition: color .12s; }
.ctl:hover { color: var(--ink); }
.ctl-acc { color: var(--lime); }
@media (max-width: 640px) { .dock { justify-content: space-between; gap: 0 12px; } .ctl { font-size: 13px; } #open-demo { display: none; } .copy-demo .eyebrow { display: none; } .copy-demo h2 { font-size: 22px; } .copy-demo .sub { font-size: 13px; } }
@media (max-height: 520px) and (orientation: landscape) {
  /* the whole height for the demo (the tip says "best in landscape"); copy hidden, controls in a column beside the window */
  .stage { --ww: min(100cqw - 2 * var(--win-x) - var(--win-side), var(--avail-h) * 1.6); --wx: var(--win-x); }
  .copy-demo { display: none; }
  .dock { left: calc(var(--wx) + var(--ww) + 14px); width: calc(100cqw - var(--wx) - var(--ww) - 24px); top: var(--wy); height: var(--wh); flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 0 0 48px; }   /* centred in the window's height, clear of the site's chat button at the bottom right */
  .ctl { font-size: 12.5px; min-height: 36px; }
  #open-demo { display: inline-flex; }
  .shield-port { display: none; }
}
@media not ((max-height: 520px) and (orientation: landscape)) { .shield-land { display: none; } }

/* ------------------------------------------------------------------ section index: frameless, fixed at the right edge */
.index { position: fixed; z-index: 20; right: 18px; top: calc(50% + var(--hdr, 0px) / 2); transform: translateY(-50%); display: flex; flex-direction: column; gap: 0; }
.index a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 44px; min-width: 44px; text-decoration: none; color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.index .l { position: absolute; right: calc(100% + 4px); opacity: 0; transform: translateX(6px); transition: opacity .18s var(--ease), transform .18s var(--ease); white-space: nowrap; pointer-events: none; }
.index .n { position: relative; padding-right: 18px; }
.index .n::after { content: ""; position: absolute; right: 0; top: 50%; width: 10px; height: 1px; background: currentColor; transition: width .18s var(--ease), background .18s; }
.index:hover .l, .index a:focus-visible .l { opacity: 1; transform: none; }
.index a[aria-current] { color: var(--ink); }
.index a[aria-current] .n::after { width: 14px; background: var(--ink); }
html[data-phase="demo"] .index { opacity: 0; pointer-events: none; transition: opacity .3s; }
.skip-install { position: fixed; z-index: 20; left: 18px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: color .12s, opacity .3s; }
.skip-install:hover { color: var(--ink); }
html[data-phase="demo"] .skip-install, html[data-phase="after"] .skip-install, html[data-scroll="native"] .skip-install { opacity: 0; pointer-events: none; }
@media (max-width: 640px), ((max-height: 520px) and (orientation: landscape)) {
  .index { right: 6px; top: calc(var(--hdr, 0px) + 6px); transform: none; flex-direction: row; gap: 0; }
  .index .l { display: none; }
  .index a { min-height: 44px; min-width: 34px; justify-content: center; }
  .index .n { padding: 0 0 6px; }
  .index .n::after { right: 50%; top: auto; bottom: 0; width: 8px; margin-right: -4px; }
  .index a[aria-current] .n::after { width: 12px; margin-right: -6px; }
  .skip-install { display: none; }
  html[data-phase="handoff"] .index { opacity: 0; pointer-events: none; transition: opacity .3s; }
}
@media (max-width: 360px) { .index a { min-width: 32px; } }

/* loader */
.loader { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); transition: opacity .9s var(--ease), visibility 0s linear .9s; }
html[data-film="ready"] .loader, html[data-mode="still"] .loader { opacity: 0; visibility: hidden; }
.loader-label { font: 500 11px/1 var(--mono); letter-spacing: .32em; color: var(--dim); }
.loader-bar { width: 140px; height: 1px; background: var(--rule); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--ink); transition: transform .25s var(--ease); }
.fps { position: fixed; z-index: 100; left: 8px; top: calc(var(--hdr, 0px) + 8px); padding: 6px 8px; border-radius: 4px; background: rgba(0, 0, 0, .7); color: #cfe; font: 11px/1.45 var(--mono); white-space: pre; pointer-events: none; }

/* ------------------------------------------------------------------ still version (reduced motion or no WebGL): the same page in flow */
html[data-clean="1"] .sec .copy, html[data-clean="1"] .index, html[data-clean="1"] .skip-install, html[data-clean="1"] .dock, html[data-clean="1"] .cue { display: none !important; }
html[data-mode="still"] .stage { height: auto; overflow: visible; container-type: normal; }   /* size containment would collapse the stage to nothing in flow */
html[data-mode="still"] .sec-demo { container-type: size; }                                    /* the window tokens (cq units) resolve against the demo section instead */
html[data-mode="still"] .sec { position: relative; inset: auto; min-height: calc(100svh - var(--hdr, 0px)); opacity: 1; pointer-events: auto; }
html[data-mode="still"] .sec > * { transform: none; }
html[data-mode="still"] .sec-demo { height: calc(100svh - var(--hdr, 0px)); }
html[data-mode="still"] .core-slot { display: flex; align-items: center; justify-content: center; }
html[data-mode="still"] .core-slot svg { width: min(44vmin, 360px); height: auto; }
html[data-mode="still"] .cue { display: none; }
html[data-mode="still"] .fig { height: 100%; min-height: 240px; }
html[data-mode="still"] .sec-two { height: calc(100svh - var(--hdr, 0px)); }

/* ------------------------------------------------------------------ after the film: install, in plain HTML */
.after { position: relative; z-index: 2; background: var(--bg); padding: 0 0 24px; --card: rgba(8, 10, 12, .86); }
#gl-after { position: sticky; top: 0; display: block; width: 100%; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; z-index: 0; pointer-events: none; }
html[data-mode="still"] #gl-after { display: none; }
.after > :not(canvas) { position: relative; z-index: 1; }
.after .installation { padding-top: clamp(56px, 9vw, 120px); }
.after .er-lock { margin-left: 0; }
.after .installation .wrap.hero { padding-bottom: 8px; }
.after .installation, .site-footer { width: min(100% - var(--gutter) * 2, 1180px); margin-inline: auto; }
.after .installation .wrap { width: 100%; }
.after .installation h2 { font-weight: 400; letter-spacing: -.03em; }
.after #install-title { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; }
.installation .eyebrow { display: block; }
.site-footer { position: relative; z-index: 2; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 28px 0 40px; border-top: 1px solid var(--rule); color: var(--dim); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--ink); }
body:has(.frank-chat-toggle) .dock { padding-right: 84px; }
@media (max-width: 640px) { body:has(.frank-chat-toggle) .dock { justify-content: flex-start; gap: 0 22px; padding-right: 76px; } }
.installation .er-lock { padding: clamp(20px, 5vw, 40px); width: 100%; max-width: 720px; }
.installation .er-lock::before { display: none; }
/* downloads granted (film/gate.js): the generated install section takes over and the pre-launch intro steps aside */
html[data-downloads="open"] #install-intro { display: none; }
#downloads .installation { padding-top: clamp(40px, 6vw, 80px); }
.after .installation.pre-launch { padding-bottom: 24px; }
