/* Maja website. A dark room lit by one screen. Same graphite base and leaf-emerald accent as the app. */

@font-face { font-family: Figtree; src: url(assets/fonts/Figtree-Variable.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

/* ---- Tokens ---------------------------------------------------------------------------------- */

:root {
  --bg: #151515; --bg2: #1a1a1a; --card: #1e1e1e; --panel: #262626; --line: #2a2a2a; --ctrl: #3d3d3d;
  --ink: #ececec; --muted: #a0a0a0; --accent: #2f6b52; --accentHi: #3a8064; --accentInk: #fbfbfb;
  --accentText: #b8d8c0; --dot: #8fc3cb;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --win: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --wrap: 1280px; --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* The monitor: a fixed height that widens with the screen shape, capped by the page width. */
  --maxW: min(1360px, calc(100vw - var(--gutter) * 2));
  --H: min(660px, max(340px, calc(100svh - 450px)), calc(var(--maxW) / 1.7778));
  color-scheme: dark;
}

/* ---- Base ------------------------------------------------------------------------------------ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ctrl) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; caret-color: var(--accentText); }
::selection { background: var(--accent); color: var(--accentInk); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accentText); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accentInk); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.fine { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Maja is in beta: a quiet outlined tag beside the version, never as loud as the Download button. */
.beta { display: inline-block; padding: 0 8px; border: 1px solid rgba(184, 216, 192, .45); border-radius: 99px; color: var(--accentText); font-size: 12px; font-weight: 600; line-height: 20px; letter-spacing: .02em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); flex: none; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.title { font-weight: 600; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }

/* ---- Buttons --------------------------------------------------------------------------------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 10px; border: 0; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-go { background: var(--accent); color: var(--accentInk); }
.btn-go:hover { background: var(--accentHi); }
.btn-line { background: transparent; border: 1px solid var(--ctrl); color: var(--ink); }
.btn-line:hover { border-color: #5a5a5a; background: rgba(255, 255, 255, .04); }
.btn-line[aria-pressed="true"] { border-color: var(--accentText); color: var(--accentText); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 16px; }

/* ---- Top bar --------------------------------------------------------------------------------- */

.bar { position: sticky; top: 0; z-index: 50; background: rgba(21, 21, 21, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.bar.is-scrolled { border-bottom-color: var(--line); }
.bar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.bar-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.bar-nav a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .15s; }
.bar-nav a:not(.btn):hover { color: var(--ink); }

/* ---- The room -------------------------------------------------------------------------------- */

.room { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(20px, 3vh, 40px) 0 clamp(48px, 8vh, 88px); }

/* The screen's light falling on the room: the playing scene, blurred, spilling out around the monitor. */
.halo { position: absolute; z-index: -1; left: 50%; top: 46%; width: calc(min(calc(var(--H) * var(--ar)), var(--maxW)) * 1.5); height: calc(var(--H) * 1.75); transform: translate(-50%, -50%); pointer-events: none; transition: opacity 1.2s var(--ease), width .9s var(--ease); }
.halo span { position: absolute; inset: 0; background: center / cover no-repeat; filter: blur(80px) saturate(1.4); opacity: 0; transition: opacity 1.6s var(--ease); mask-image: radial-gradient(closest-side, #000 25%, transparent); -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent); }
.halo span.is-on { opacity: .38; }
/* A fullscreen game covers the screen, so the room goes dark with it. */
.room.is-gaming .halo { opacity: .08; }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: end; margin-bottom: clamp(18px, 3vh, 30px); }
.intro-copy { display: grid; gap: 10px; }
.hero-title { font-weight: 640; font-size: clamp(34px, 3.2vw, 46px); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.intro-side { display: grid; padding-bottom: 4px; }
.lede { font-size: clamp(16px, 1.25vw, 18px); color: #c9c9c9; max-width: 58ch; }
.intro-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

/* ---- Monitor --------------------------------------------------------------------------------- */

.monitor-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.monitor {
  width: min(calc(var(--H) * var(--ar)), var(--maxW));
  padding: clamp(5px, .7vw, 10px);
  background: #0b0b0b; border-radius: clamp(8px, 1vw, 14px);
  border: 1px solid #262626;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 2px 0 #303030 inset;
  transition: width .9s var(--ease);
}
.screen {
  position: relative; overflow: hidden; container-type: size;
  height: min(var(--H), calc(var(--maxW) / var(--ar) - 2 * clamp(5px, .7vw, 10px)));
  border-radius: 3px; background: #0e0e0e;
  transition: height .9s var(--ease);
  font-family: var(--win);
}
.layer { position: absolute; inset: 0; }
.still span { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1s var(--ease); }
.still span.is-on { opacity: 1; }
.live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; }
.live video.is-on { opacity: 1; }

.stand { display: flex; flex-direction: column; align-items: center; }
.stand i { width: clamp(48px, 7vw, 96px); height: clamp(16px, 2.6vh, 30px); background: linear-gradient(#202020, #2b2b2b); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.stand b { width: clamp(150px, 20vw, 270px); height: 9px; border-radius: 5px 5px 1px 1px; background: linear-gradient(#3a3a3a, #262626 40%); box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 10px 18px -6px rgba(0, 0, 0, .9); }
/* The desk the monitor stands on: a lit edge that the controls line up along. */
.desk-top { width: min(1400px, 100vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16) 18%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, .16) 82%, transparent); }

/* Desktop icons and taskbar scale with the screen, like a real desktop would. */
.desk-icons { position: absolute; left: 1.4cqh; top: 1.6cqh; display: grid; gap: 2.4cqh; z-index: 2; }
.desk-icons li { width: 11cqh; display: grid; justify-items: center; gap: .6cqh; color: #fff; font-size: max(7px, 2cqh); line-height: 1.2; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.desk-icons svg, .desk-icons img { width: 6.4cqh; height: 6.4cqh; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.desk-icons img { border-radius: 1.2cqh; }

.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: max(26px, 7.4cqh); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28, 28, 28, .82); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, .07); color: #f2f2f2;
}
.tb-apps { display: flex; align-items: center; gap: 2.2cqh; height: 100%; }
.tb-start { width: 3.4cqh; height: 3.4cqh; fill: #6db7ff; }
.tb-search { display: flex; align-items: center; gap: 1cqh; height: 4.6cqh; padding: 0 3.6cqh 0 1.6cqh; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: max(8px, 1.9cqh); color: #cfcfcf; }
.tb-search svg { width: 2.2cqh; height: 2.2cqh; fill: none; stroke: currentColor; stroke-width: 2.4; }
.tb-app { width: 3.6cqh; height: 3.6cqh; }
.tb-maja { position: relative; display: grid; place-items: center; width: 5.6cqh; height: 5.6cqh; border-radius: 1cqh; background: rgba(255, 255, 255, .07); }
.tb-maja img { width: 3.6cqh; height: 3.6cqh; border-radius: .7cqh; }
.tb-maja::after { content: ""; position: absolute; bottom: .2cqh; width: 1.8cqh; height: .45cqh; border-radius: 1px; background: #9fd0ff; }
.tb-clock { position: absolute; right: 2cqh; display: grid; justify-items: end; font-size: max(8px, 1.8cqh); line-height: 1.3; font-variant-numeric: tabular-nums; }

/* The "game": a fullscreen app covering the desktop, taskbar and all. */
.game { position: absolute; inset: 0; z-index: 4; display: grid; place-items: end center; padding-bottom: 14cqh; background: radial-gradient(120% 90% at 50% 40%, #1d2320, #070807 70%); animation: game-in .5s var(--ease); }
.game[hidden] { display: none; }
.game-load { display: grid; justify-items: center; gap: 1.8cqh; color: #c9d1cc; font-size: max(9px, 2.2cqh); letter-spacing: .02em; }
.game-progress { display: block; width: 34cqh; height: .6cqh; border-radius: 1px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.game-progress b { display: block; height: 100%; width: 40%; background: #c9d1cc; animation: load 2.4s var(--ease) infinite; }
@keyframes game-in { from { opacity: 0; transform: scale(1.02); } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Windows-style notification from Maja. */
.toast {
  position: absolute; right: 2cqh; bottom: calc(max(26px, 7.4cqh) + 2cqh); z-index: 5;
  display: flex; gap: 1.6cqh; align-items: flex-start; width: min(78cqw, 62cqh); padding: 2cqh 2.2cqh;
  background: rgba(36, 36, 36, .94); border: 1px solid rgba(255, 255, 255, .08); border-radius: 1.4cqh;
  box-shadow: 0 1.6cqh 4cqh rgba(0, 0, 0, .5); color: #f2f2f2; font-size: max(9px, 2cqh); line-height: 1.35;
  opacity: 0; transform: translateY(2cqh); transition: opacity .4s var(--ease), transform .5s var(--ease); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: none; }
.game:not([hidden]) ~ .toast { bottom: 2cqh; }
.toast img { width: 4.4cqh; height: 4.4cqh; border-radius: .8cqh; flex: none; }
.toast > span { display: grid; gap: .4cqh; }
.toast b { font-weight: 600; }
.toast span span { color: #c4c4c4; }

/* ---- Controls on the desk -------------------------------------------------------------------- */

.desk { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px 48px; align-items: end; margin-top: clamp(20px, 3vh, 36px); }
.ctl { display: grid; gap: 10px; }
.ctl-label { font-size: 13px; color: var(--muted); }
.ctl-scene { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; }
.ctl-scene .ctl-label { grid-column: 1 / -1; }

.scenes { display: flex; gap: 10px; }
.scenes button { position: relative; width: 84px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 7px; background: center / cover no-repeat var(--panel); cursor: pointer; opacity: .55; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.scenes button::after { content: ""; position: absolute; inset: -4px; border-radius: 10px; border: 2px solid transparent; transition: border-color .2s var(--ease); }
.scenes button:hover { opacity: .85; }
.scenes button[aria-checked="true"] { opacity: 1; }
.scenes button[aria-checked="true"]::after { border-color: var(--ink); }
.scene-name { display: grid; gap: 2px; min-width: 0; }
.scene-name b { font-size: 16px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status.is-paused .dot { background: var(--muted); }

/* For scenes that follow the clock: one line under the controls. */
.time-note { grid-column: 1 / -1; grid-row: 2; font-size: 14px; color: var(--muted); max-width: 70ch; }
.time-note[hidden] { display: none; }

.seg { display: inline-flex; padding: 3px; border-radius: 11px; border: 1px solid var(--ctrl); }
.seg button { height: 40px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--panel); color: var(--ink); }

/* ---- Collection ------------------------------------------------------------------------------ */

.collection { padding: clamp(80px, 12vh, 140px) 0 clamp(64px, 10vh, 120px); }
.col-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 64px; align-items: end; margin-bottom: 40px; }
.col-head p { max-width: 46ch; }
.panoramas { display: grid; gap: clamp(20px, 3vw, 32px); }
/* Each scene as a bare ultrawide panorama whose light spills into the room around it. */
.panoramas { gap: clamp(48px, 7vw, 88px); }
.pano { position: relative; isolation: isolate; display: grid; gap: 18px; }
.pano-view { position: relative; aspect-ratio: 32 / 9; }
.pano-view::before { content: ""; position: absolute; inset: 6% 4%; z-index: -1; background: var(--img) center / cover no-repeat; filter: blur(70px) saturate(1.5); opacity: .45; }
.pano img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; border-radius: 2px; }
.pano-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; }
.pano-text { display: grid; gap: 8px; max-width: 64ch; }
.pano h3 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.015em; }
.pano-about { font-size: 16px; color: #c9c9c9; }
.pano-facts { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.play-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ctrl); text-underline-offset: .3em; transition: text-decoration-color .2s var(--ease); }
.play-link:hover { text-decoration-color: var(--ink); }
.play-link .i { width: 16px; height: 16px; }

/* ---- Download -------------------------------------------------------------------------------- */

.download { padding: clamp(72px, 11vh, 128px) 0; border-top: 1px solid var(--line); }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px 80px; align-items: start; }
.dl-main { display: grid; justify-items: start; gap: 20px; }
.dl-main .muted { max-width: 44ch; }
.dl-mark { border-radius: 12px; }
.dl-main .btn { margin-top: 8px; }
.dl-side { display: grid; gap: 28px; padding-top: 8px; }
.reqs { display: grid; }
.reqs div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.reqs div:first-child { border-top: 1px solid var(--line); }
.reqs dt { color: var(--muted); font-size: 15px; }
.reqs dd { font-size: 15px; }
.note { display: flex; gap: 12px; font-size: 15px; color: var(--muted); max-width: 52ch; }
.note .i { margin-top: 3px; color: var(--dot); }
.note b { color: var(--ink); font-weight: 600; }

/* ---- Footer ---------------------------------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); }
.foot-inner { min-height: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; }
.foot .brand { font-size: 17px; }

/* ---- Smaller screens ------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .intro { grid-template-columns: 1fr; }
  .intro-cta { align-items: flex-start; }
  .desk { grid-template-columns: 1fr auto; }
  .ctl-scene { grid-column: 1 / -1; }
  .col-head, .dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --H: calc(var(--maxW) / 1.7778); }
  body { font-size: 16px; }
  .bar-nav a:not(.btn) { display: none; }
  .desk { grid-template-columns: 1fr; gap: 24px; }
  .seg { display: flex; }
  .seg button { flex: 1; }
  .ctl-game .btn { width: 100%; }
  .intro-cta { align-items: flex-start; }
  .pano-view { aspect-ratio: 16 / 9; }

  .reqs div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
