/* Mona Sans, served from this site (variable: weight 200–900, width 75–125%), in three subsets */
@font-face { font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; src: url("/assets/fonts/mona-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; src: url("/assets/fonts/mona-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; src: url("/assets/fonts/mona-sans-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --font: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --sf: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --ink: #f4f1ea;
  --ink-rgb: 244, 241, 234;
  --soft: 0.8; /* the share of ink for words that support the bold ones */
  --ink-2: rgba(var(--ink-rgb), 0.72);
  --ink-3: rgba(var(--ink-rgb), 0.58);
  --line: rgba(var(--ink-rgb), 0.14);
  --chip: rgba(var(--ink-rgb), 0.08);
  --thumb: #f4f1ea;
  --thumb-ink: #0b0b0c;
  color-scheme: dark;
}
/* any element can carry its own tone: the nav's two ends and the rail flip as a room's iris reaches them */
[data-tone="dark"] {
  --ink: #f4f1ea;
  --ink-rgb: 244, 241, 234;
  --ink-2: rgba(var(--ink-rgb), 0.72);
  --ink-3: rgba(var(--ink-rgb), 0.58);
  --line: rgba(var(--ink-rgb), 0.14);
  --chip: rgba(var(--ink-rgb), 0.08);
  --thumb: #f4f1ea;
  --thumb-ink: #0b0b0c;
}
[data-tone="light"] {
  --ink: #111216;
  --ink-rgb: 17, 18, 22;
  --ink-2: rgba(var(--ink-rgb), 0.72);
  --ink-3: rgba(var(--ink-rgb), 0.6);
  --line: rgba(var(--ink-rgb), 0.12);
  --chip: rgba(var(--ink-rgb), 0.06);
  --thumb: #111216;
  --thumb-ink: #ffffff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #060607; }
body { font-family: var(--font); color: var(--ink); background: #060607; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--thumb-ink); }
.skip:focus { top: 16px; }
#runway { width: 1px; }

/* ——— nav ——— */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; height: 72px; padding: 0 clamp(28px, 6.4vw, 120px);
  display: flex; align-items: center; justify-content: space-between; color: var(--ink);
}
.nav-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 720; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.nav nav { margin-right: -14px; }
.nav-logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 18px; height: 18px; }
.nav-logo i { border-radius: 3px; background: currentColor; opacity: 0.35; }
.nav-logo i:first-child { opacity: 1; background: #4bbc6b; }
.nav nav { display: flex; gap: 6px; }
.nav nav a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 560; color: var(--ink-2); transition: color 0.2s, background-color 0.2s; }
.nav nav a:hover { color: var(--ink); background: var(--chip); }

/* ——— the stage ——— */
.stage { position: fixed; inset: 0; overflow: hidden; }
.rooms, .room, .gl, .glass-layer, .air, .words { position: absolute; inset: 0; }
.gl { z-index: 2; }
.glass-layer { z-index: 3; pointer-events: none; }
.air { z-index: 4; pointer-events: none; }
.words { z-index: 5; pointer-events: none; }
.words > * { pointer-events: auto; }

/* the HTML on a device's glass */
.glass { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; visibility: hidden; contain: layout paint; backface-visibility: hidden; }
.glass-z { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.glass-in { position: absolute; inset: 0; }
.glass-island { position: absolute; left: 0; top: 11px; z-index: 29; width: 126px; height: 37px; border-radius: 19px; background: #000; opacity: 0; pointer-events: none; }
.glass-punch { position: absolute; left: 0; top: 13px; z-index: 29; width: 12px; height: 12px; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 1.5px #16171b; opacity: 0; pointer-events: none; }
/* the iPhone Duo's inner display, half by half, with a soft shadow down the crease */
.glass-duo .glass-crease { position: absolute; top: 0; bottom: 0; width: 14px; z-index: 28; pointer-events: none; }
.glass-duo-left .glass-crease { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)); }
.glass-duo-right .glass-crease { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)); }
.app-duo-half { right: auto; bottom: auto; }
.glass-sheen { position: absolute; inset: -10% -60%; pointer-events: none; z-index: 30; background: linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.07) 47%, rgba(255, 255, 255, 0.02) 52%, transparent 58%); }
.app { position: absolute; inset: 0; overflow: hidden; font-family: var(--sf); transform-origin: 0 0; }
/* a morphing piece: placed by its frame, origin at its top-left */
.mp { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* rooms */
.room { visibility: hidden; }
.room > i { position: absolute; inset: 0; }
.room-hero { background: #060607; visibility: visible; }
.room-hero > i { background: radial-gradient(ellipse 36% 44% at 50% 56%, color-mix(in oklab, var(--c, #6fa27d) 20%, transparent), transparent 72%), radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255, 255, 255, 0.045), transparent 70%); }
.room-ghim { background: #0a0b0a; }
.room-ghim > i { background: radial-gradient(ellipse 46% 56% at 68% 46%, rgba(46, 204, 113, 0.12), transparent 70%), radial-gradient(ellipse 70% 50% at 10% 100%, rgba(97, 144, 240, 0.08), transparent 70%); }
.room-qiv { background: linear-gradient(160deg, #0f3527, #081d15 70%); }
.room-qiv > i { background: radial-gradient(ellipse 46% 52% at 32% 50%, rgba(127, 224, 181, 0.13), transparent 70%); }
.room-neuron { background: linear-gradient(180deg, #e9eef7, #f2f5fa 50%, #e3e9f2); }
.room-neuron > i { background: radial-gradient(ellipse 50% 50% at 85% 10%, rgba(148, 178, 224, 0.45), transparent 70%), radial-gradient(ellipse 50% 50% at 0% 100%, rgba(148, 178, 224, 0.25), transparent 70%); }
.room-perpush { background: radial-gradient(ellipse 120% 80% at 70% 0%, #17204a, #060812 60%); }
.room-perpush > i { background: radial-gradient(ellipse 40% 46% at 32% 60%, rgba(232, 101, 31, 0.2), transparent 70%); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.room-focus { background: #050505; }
.room-focus > i { background: radial-gradient(ellipse 70% 80% at 66% 110%, color-mix(in oklab, var(--c, #ff453a) 66%, transparent), transparent 70%), radial-gradient(ellipse 40% 50% at 66% 48%, color-mix(in oklab, var(--c, #ff453a) 16%, transparent), transparent 70%); }
.room-topleft { background: linear-gradient(170deg, #f3f7f3, #eaf2ec 60%, #f6f1e0); }
.room-topleft > i { background: radial-gradient(ellipse 46% 50% at 34% 48%, rgba(148, 227, 153, 0.22), transparent 70%); }
.room-close { background: #060607; }
.room-close > i { background: radial-gradient(ellipse 60% 50% at 50% 70%, rgba(255, 255, 255, 0.06), transparent 70%); }

/* the chapters, along the bottom */
.rail {
  position: absolute; left: 50%; bottom: 22px; z-index: 6; transform: translateX(-50%);
  display: flex; gap: 22px; padding: 8px 16px; border-radius: 999px; visibility: hidden;
}
.rail button { position: relative; padding: 4px 0 7px; font-size: 12.5px; font-weight: 620; color: var(--ink-3); }
.rail button i { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); opacity: 0.85; }
.rail button[aria-current="true"], .rail button:hover { color: var(--ink); }
