/* 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; }

/* Qiv's own page: deep workwear green, paper cream, brass for money, Qiv's mint for action. */
:root {
  --font: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --sf: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, serif;
  --hand: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
  --green: #0f3527;
  --green-deep: #081d15;
  --cream: #efe8da;
  --paper: #fbf8f1;
  --brass: #d4a24c;
  --mint: #47b38a;
  --coral: #e0705f;
  --ink: #f2ece0;
  --ink-rgb: 242, 236, 224;
  --soft: 0.8; /* the share of ink for words that support the bold ones */
  --ink-2: rgba(var(--ink-rgb), 0.74);
  --ink-3: rgba(var(--ink-rgb), 0.62);
  --line: rgba(var(--ink-rgb), 0.14);
  --chip: rgba(var(--ink-rgb), 0.08);
  --thumb: #f2ece0;
  --thumb-ink: #0b1f17;
  color-scheme: dark;
}
/* a light room's words: each chapter's words carry their own tone, so nothing re-styles the page mid-film */
body[data-tone="light"], [data-tone="light"] {
  color: #0d2219; /* (the colour itself, not only the tokens: text inherits the computed colour, not the token) */
  --ink: #0d2219;
  --ink-rgb: 13, 34, 25;
  --ink-2: rgba(var(--ink-rgb), 0.74);
  --ink-3: rgba(var(--ink-rgb), 0.64);
  --line: rgba(var(--ink-rgb), 0.13);
  --chip: rgba(var(--ink-rgb), 0.06);
  --thumb: #0d2219;
  --thumb-ink: #f6f1e6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--green-deep); }
body { font-family: var(--font); color: var(--ink); background: var(--green-deep); -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(--mint); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(71, 179, 138, 0.42); color: inherit; }

.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; }
.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; }

/* ——— nav: its ink is set every frame from the room under it (main.js), never by a timed transition ——— */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; height: 72px; padding: 0 clamp(24px, 3.4vw, 56px);
  display: flex; align-items: center; gap: 22px; color: rgb(var(--nav-ink, 242, 236, 224));
}
.nav-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 720; font-size: 16px; letter-spacing: -0.01em; }
.nav-logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 17px; height: 17px; }
.nav-logo i { border-radius: 3px; background: currentColor; opacity: 0.35; }
.nav-logo i:first-child { opacity: 1; background: #4bbc6b; }
.nav-app { display: inline-flex; align-items: center; gap: 9px; padding-left: 22px; font-weight: 700; font-size: 16px; box-shadow: inset 1px 0 0 rgba(var(--nav-ink, 242, 236, 224), 0.2); }
.nav-app img { width: 26px; height: 26px; border-radius: 7px; }
.nav-soon { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 620; }
.nav-soon i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* ——— the stage ——— */
.stage { position: fixed; inset: 0; overflow: hidden; }
.stage.fading { transition: opacity 0.2s ease; }
.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-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: each chapter's mood. Dark rooms are workwear green, light ones paper; each is a flat field with a
   gentle shift in tone and a neutral pool of studio light behind the device, never a coloured glow. ——— */
.room { visibility: hidden; }
.room > i { position: absolute; inset: 0; }
.room-hero { background: linear-gradient(172deg, #123d2d 0%, var(--green) 42%, #0b281d 78%, var(--green-deep) 100%); visibility: visible; }
.room-hero > i { background: radial-gradient(ellipse 34% 42% at 50% 60%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%); }
.room-tonight { background: linear-gradient(176deg, #0c120f, #080c0a 60%, #060908); }
.room-tonight > i { background: linear-gradient(160deg, rgba(64, 48, 24, calc(0.55 * (1 - var(--day, 0)))), rgba(64, 48, 24, 0) 46%); }
.room-tonight > b { position: absolute; inset: 0; background: linear-gradient(172deg, #123b2c, #0e3024 55%, #0a2219); opacity: var(--day, 0); }
.room-book { background: linear-gradient(168deg, #f4efe4, #ece4d3 60%, #e5dcc8); }
.room-book > i { background: radial-gradient(ellipse 40% 50% at 70% 48%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%); }
.room-onsite { background: linear-gradient(170deg, #154535, #0f3528 48%, #0a271d 80%, #081d15); }
.room-onsite > i { background: radial-gradient(ellipse 34% 44% at 32% 50%, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 70%); }
.room-pdf { background: linear-gradient(168deg, #17352b, #10291f 50%, #0b1e19 80%, #08171a); }
.room-pdf > i { background: radial-gradient(ellipse 40% 50% at 60% 48%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 70%); }
.room-desk { background: linear-gradient(170deg, #f3eee3, #e9e2d2 65%, #e2dac7); }
.room-desk > i { background: radial-gradient(ellipse 44% 50% at 34% 50%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%); }
.room-paid { background: linear-gradient(170deg, #173f30, #10301f 50%, #0b2419 80%, #081d15); }
.room-paid > i { background: radial-gradient(ellipse 38% 46% at 68% 50%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%); }
.room-watch { background: linear-gradient(170deg, #ece2cf, #e2d5bd 60%, #d9caae); }
.room-watch > i { background: radial-gradient(ellipse 40% 50% at 32% 48%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%); }
.room-platforms { background: linear-gradient(172deg, #133a2c, #0d2a20 50%, #0a2017 80%, #06140f); }
.room-platforms > i { background: radial-gradient(ellipse 44% 50% at 66% 50%, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 70%); }
.room-yours { background: linear-gradient(170deg, #f2ede2, #e8e0cf 65%, #dfd5c0); }
.room-yours > i { background: radial-gradient(ellipse 40% 50% at 32% 50%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%); }
.room-close { background: linear-gradient(176deg, #123d2d, var(--green) 50%, var(--green-deep)); }
.room-close > i { background: radial-gradient(ellipse 40% 40% at 50% 64%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%); }

/* ——— the chapters, along the bottom; ink set per frame like the nav ——— */
.rail {
  position: absolute; left: 50%; bottom: 20px; z-index: 6; transform: translateX(-50%);
  display: flex; gap: 20px; padding: 8px 16px; border-radius: 999px; visibility: hidden; color: rgb(var(--rail-ink, 242, 236, 224));
}
.rail button { position: relative; padding: 4px 0 7px; font-size: 12.5px; font-weight: 620; white-space: nowrap; color: rgba(var(--rail-ink, 242, 236, 224), 0.62); }
.rail button i { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: currentColor; transform-origin: 0 50%; transform: scaleX(0); opacity: 0.9; }
.rail button[aria-current="true"], .rail button:hover { color: rgb(var(--rail-ink, 242, 236, 224)); }
@media (max-width: 1180px) { .rail { gap: 14px; } .rail button { font-size: 11.5px; } }
