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

/* Focus: one Pomodoro round, played by the scroll. Night rooms for focus, daylight rooms for breaks. */
:root {
  --font: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --sf-round: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  /* the session colours, the app's own defaults */
  --tomato: #ff453a;
  --gold: #ffd60a;
  --fern: #30d158;
  --night: #050505;
  --ink: #f5f2ec;
  --ink-rgb: 245, 242, 236;
  --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.6);
  --line: rgba(var(--ink-rgb), 0.14);
  --chip: rgba(var(--ink-rgb), 0.08);
  --thumb: #f5f2ec;
  --thumb-ink: #0b0b0c;
  --acc: var(--tomato);
  color-scheme: dark;
}
/* daylight: the break rooms, where the ink turns dark */
.words[data-tone="light"] {
  --ink: #15120a;
  --ink-rgb: 21, 18, 10;
  --ink-2: rgba(var(--ink-rgb), 0.76);
  --ink-3: rgba(var(--ink-rgb), 0.64);
  --line: rgba(var(--ink-rgb), 0.16);
  --chip: rgba(var(--ink-rgb), 0.08);
  --thumb: #15120a;
  --thumb-ink: #fff9e0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--night); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
html[data-tone="light"] { scrollbar-color: rgba(21, 18, 10, 0.3) transparent; }
body { font-family: var(--font); color: var(--ink); background: var(--night); -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; }
::selection { background: var(--tomato); color: #fff; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 8px; }

.skip { position: fixed; left: 16px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--thumb-ink); font-weight: 600; }
.skip:focus { top: 16px; }
#runway { width: 1px; }

/* ——— nav: the studio, the app, the session clock, the App Store ——— */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; height: clamp(72px, 5.2vh, 92px); padding: 0 clamp(24px, 3.4vw, 72px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.nav-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 720; font-size: clamp(16px, 0.9vw, 21px); letter-spacing: -0.01em; opacity: 0.78; }
.nav-mark:hover { opacity: 1; }
.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: 16px; font-weight: 740; font-size: clamp(16px, 0.9vw, 21px); letter-spacing: -0.01em; box-shadow: inset 1px 0 0 currentColor; }
.nav-app img { width: 26px; height: 26px; border-radius: 7px; }
.nav-get { justify-self: end; border-radius: 9px; }
.nav-get img { height: clamp(38px, 2.6vh, 46px); width: auto; }
.nav-get:hover img { filter: brightness(1.25); }
/* the clock of the session you are in */
.nav-clock {
  display: inline-flex; align-items: center; gap: 9px; min-height: clamp(38px, 2.6vh, 46px); padding: 9px 16px 9px 11px; border-radius: 999px;
  font-variant-numeric: tabular-nums; font-size: clamp(14.5px, 0.8vw, 18px); letter-spacing: -0.01em; white-space: nowrap;
  background: rgba(var(--nc-rgb, 245, 242, 236), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--nc-rgb, 245, 242, 236), 0.12);
}
.nav-clock svg { width: 20px; height: 20px; transform: rotate(-90deg); overflow: visible; }
.nc-trk { fill: none; stroke: rgba(var(--nc-rgb, 245, 242, 236), 0.14); stroke-width: 3; }
.nc-arc { fill: none; stroke: var(--nc-c, var(--tomato)); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100 200; }
.nc-name { font-weight: 680; }
.nc-time { font-weight: 560; opacity: 0.82; min-width: 3.1em; }
.nav-clock[data-ink="light"] { color: #f5f2ec; --nc-rgb: 245, 242, 236; }
.nav-clock[data-ink="dark"] { color: #15120a; --nc-rgb: 21, 18, 10; }
.nav-l[data-ink="dark"] { color: #15120a; }
.nav-l[data-ink="light"] { color: #f5f2ec; }

/* ——— the stage ——— */
.stage { position: fixed; inset: 0; overflow: hidden; }
.stage.is-jumping, .words.is-jumping { opacity: 0 !important; transition: opacity 0.2s ease-out; }
.stage.is-landing { transition: opacity 0.26s ease-out; }
.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; color: var(--ink); }
.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 session's light, rich when it starts and draining as it runs ——— */
.room { visibility: hidden; overflow: hidden; }
.room > i, .room > b { position: absolute; inset: 0; will-change: opacity, transform; }
.room-night { background: #050505; visibility: visible; }
.room-night > i { background: radial-gradient(ellipse 50% 46% at 68% 100%, rgba(255, 69, 58, 0.1), transparent 70%); }
/* focus: night, with tomato light rising from the floor; the light layer's opacity and height are the clock */
.room-focus { background: #050505; }
.room-focus > i {
  inset: -10% 0 0; transform-origin: 50% 100%;
  background:
    radial-gradient(ellipse 58% 62% at 68% 104%, rgba(255, 69, 58, 0.62), rgba(255, 69, 58, 0.18) 46%, transparent 72%),
    linear-gradient(to top, rgba(140, 22, 16, 0.55), rgba(70, 10, 8, 0.18) 38%, transparent 64%);
}
.room-focus > b { background: radial-gradient(ellipse 30% 36% at 68% 52%, rgba(255, 69, 58, 0.1), transparent 70%); }
.room > u { position: absolute; inset: -10% 0 0; opacity: 0; transform-origin: 50% 100%; will-change: opacity, transform; }
.room-focus > u {
  background:
    radial-gradient(ellipse 58% 62% at 68% 104%, color-mix(in srgb, var(--tint, #ff453a) 62%, transparent), color-mix(in srgb, var(--tint, #ff453a) 18%, transparent) 46%, transparent 72%),
    linear-gradient(to top, color-mix(in srgb, var(--tint, #ff453a) 34%, rgba(0, 0, 0, 0.3)), transparent 60%);
}
/* short breaks: daylight gold, deepening as the break runs */
.room-short { background: #f2c40c; }
.room-short > i { background: radial-gradient(ellipse 70% 70% at 64% 58%, #ffdc3a, rgba(255, 220, 58, 0) 72%); }
.room-short > b { background: linear-gradient(to bottom, #c99a00, #b88b00 60%, #a77d00); opacity: 0; }
/* the long break: green, the end of the round */
.room-long { background: #28b04a; }
.room-long > i { background: radial-gradient(ellipse 70% 70% at 64% 56%, #43cd68, rgba(67, 205, 104, 0) 72%); }
.room-long > b { background: linear-gradient(to bottom, #1f9a3d, #1a8a36); opacity: 0; }

/* ——— the round, along the bottom: one dot per session, the current one ringed ——— */
.rail {
  position: fixed; left: 50%; bottom: 18px; z-index: 41; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; visibility: hidden;
}
.rail-dot { position: relative; width: 30px; height: 34px; display: grid; place-items: center; border-radius: 999px; }
.rail-dot i, .rail-dot > svg, .rail-dot .cup { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.rail-dot i { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--rd-bg); box-shadow: 0 0 0 1.5px var(--rd-ring); transform-origin: 50% 50%; }
.rail-dot > svg { width: 30px; height: 30px; margin: -15px 0 0 -15px; transform: rotate(-90deg); overflow: visible; }
.rail-dot > svg circle { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.rail-dot .cup { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; }
.rail-dot .cup svg { display: block; width: 100%; height: 100%; }
.rail-tip {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 6px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 620; opacity: 0;
  background: rgba(20, 18, 12, 0.92); color: #f5f2ec; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.rail-dot:hover .rail-tip, .rail-dot:focus-visible .rail-tip { opacity: 1; }
.rail[data-ink="light"] { --rd-ring: rgba(245, 242, 236, 0.78); --rd-wait: #6e6e73; }
.rail[data-ink="dark"] { --rd-ring: rgba(21, 18, 10, 0.72); --rd-wait: rgba(21, 18, 10, 0.32); }

/* ——— the curtain, and the text version ——— */
.curtain { position: fixed; inset: 0; z-index: 35; background: var(--night); pointer-events: none; }
.outline {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.outline:target, .outline:focus-within {
  position: fixed; inset: 0; z-index: 70; width: auto; height: auto; overflow: auto; clip-path: none; white-space: normal;
  padding: 72px max(24px, calc(50vw - 340px)) 96px; background: #0b0b0b; color: #f5f2ec; font-size: 17px; line-height: 1.55;
}
.outline h1 { font-size: 40px; font-weight: 820; font-stretch: 115%; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 16px; text-wrap: balance; }
.outline h2 { font-size: 26px; font-weight: 780; font-stretch: 110%; letter-spacing: -0.02em; margin: 44px 0 6px; }
.outline h3 { font-size: 19px; font-weight: 720; margin: 22px 0 4px; }
.outline ul { padding-left: 20px; display: grid; gap: 4px; }
.outline a { text-decoration: underline; text-underline-offset: 3px; }
.outline .ol-close { position: fixed; right: 24px; top: 20px; padding: 8px 14px; border-radius: 999px; background: #f5f2ec; color: #0b0b0b; text-decoration: none; font-weight: 650; }
