/* RefyOS website: design A ("Studio") with design B ("Night") as the dark appearance. */

@font-face {
  font-family: "Sima Sans";
  src: url("../assets/fonts/SimaSans-var.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-alt: #f2f2f5;
  --card: #ffffff;
  --card-line: #e3e3e8;
  --ink: #1d1d1f;
  --ink-2: #5c5c63;
  --ink-3: #86868f;
  --line: #e3e3e8;
  --red: #c3081d;
  --red-soft: #fdecee;
  --kicker: #c3081d;
  --link: #0a66d8;
  --btn-bg: #0a66d8;
  --btn-ink: #fff;
  --btn-shadow: none;
  --nav-bg: rgba(251, 251, 253, .78);
  --nav-line: rgba(0, 0, 0, .07);
  --menu-bg: #fbfbfd;
  --mark: #7a0f14;
  --shot-shadow: 0 40px 80px -30px rgba(20, 30, 60, .45), 0 0 0 1px rgba(0, 0, 0, .06);
  --tint-blue: linear-gradient(160deg, #eaf3ff, #fff 70%);
  --tint-red: linear-gradient(160deg, #fff4f4, #fff 70%);
  --tint-amber: linear-gradient(160deg, #fff6ea, #fff 70%);
  --type-bg: #1d1d1f;
  --type-ink: #fff;
  --glow: transparent;
  --done: #1a8a3a;
  --dock-bg: rgba(255, 255, 255, .55);
  --radius: 22px;
}

/* B's night look, used for the dark appearance: the system's choice by default,
   or the visitor's pick for this visit (data-theme on <html>, set by main.ts). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d14; --bg-alt: #10131c; --card: rgba(255, 255, 255, .055); --card-line: rgba(255, 255, 255, .10);
    --ink: #f4f4f7; --ink-2: #a3a6b4; --ink-3: #6f7283; --line: rgba(255, 255, 255, .10);
    --red: #e3263a; --red-soft: rgba(227, 38, 58, .14); --kicker: #ffb35c; --link: #ffb35c;
    --btn-bg: linear-gradient(180deg, #ef3b4e, #c3081d); --btn-ink: #fff;
    --btn-shadow: 0 10px 30px -6px rgba(227, 38, 58, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
    --nav-bg: rgba(14, 16, 26, .66); --nav-line: rgba(255, 255, 255, .08); --menu-bg: #12141f;
    --mark: #fff; --shot-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
    --tint-blue: linear-gradient(160deg, rgba(90, 150, 255, .12), rgba(255, 255, 255, .03) 70%);
    --tint-red: linear-gradient(160deg, rgba(227, 38, 58, .14), rgba(255, 255, 255, .03) 70%);
    --tint-amber: linear-gradient(160deg, rgba(255, 179, 92, .12), rgba(255, 255, 255, .03) 70%);
    --type-bg: linear-gradient(160deg, #1d2030, #12141d); --type-ink: #fff;
    --glow: rgba(227, 38, 58, .28); --done: #5fd38a; --dock-bg: rgba(255, 255, 255, .07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d14; --bg-alt: #10131c; --card: rgba(255, 255, 255, .055); --card-line: rgba(255, 255, 255, .10);
  --ink: #f4f4f7; --ink-2: #a3a6b4; --ink-3: #6f7283; --line: rgba(255, 255, 255, .10);
  --red: #e3263a; --red-soft: rgba(227, 38, 58, .14); --kicker: #ffb35c; --link: #ffb35c;
  --btn-bg: linear-gradient(180deg, #ef3b4e, #c3081d); --btn-ink: #fff;
  --btn-shadow: 0 10px 30px -6px rgba(227, 38, 58, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
  --nav-bg: rgba(14, 16, 26, .66); --nav-line: rgba(255, 255, 255, .08); --menu-bg: #12141f;
  --mark: #fff; --shot-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
  --tint-blue: linear-gradient(160deg, rgba(90, 150, 255, .12), rgba(255, 255, 255, .03) 70%);
  --tint-red: linear-gradient(160deg, rgba(227, 38, 58, .14), rgba(255, 255, 255, .03) 70%);
  --tint-amber: linear-gradient(160deg, rgba(255, 179, 92, .12), rgba(255, 255, 255, .03) 70%);
  --type-bg: linear-gradient(160deg, #1d2030, #12141d); --type-ink: #fff;
  --glow: rgba(227, 38, 58, .28); --done: #5fd38a; --dock-bg: rgba(255, 255, 255, .07);
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  font-family: "Sima Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { max-width: 1080px; margin: 0 auto; }
.mark {
  display: inline-block; flex: none; background: currentColor;
  -webkit-mask: url("../assets/brand/refy-mark.svg") center / contain no-repeat;
  mask: url("../assets/brand/refy-mark.svg") center / contain no-repeat;
}
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

/* ---------- top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg); border-bottom: 1px solid var(--nav-line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-in { max-width: 1080px; margin: 0 auto; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 13.5px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 16px; letter-spacing: -.01em; margin-right: auto; }
.brand .mark { width: 26px; height: 26px; color: var(--mark); }
.nav-items { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-items > li > a, .nav-items > li > button {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 8px; color: var(--ink-2);
}
.nav-items > li > a:hover, .nav-items > li > button:hover, .nav-items > li > button[aria-expanded="true"] { color: var(--ink); }
.nav-items .chev { width: 8px; height: 8px; transition: transform .2s; }
.nav-items button[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: 18px; }
.theme-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.theme-btn:hover { color: var(--ink); background: var(--card-line); }
.theme-btn svg { width: 17px; height: 17px; }
.pill { display: inline-flex; align-items: center; padding: 7px 15px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-ink); font-weight: 650; font-size: 13px; box-shadow: var(--btn-shadow); }
.menu-btn { display: none; width: 36px; height: 36px; border-radius: 8px; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }

/* mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: 52px; z-index: 49;
  background: var(--menu-bg); border-bottom: 1px solid var(--nav-line);
  backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.mega.open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }
.mega-in { max-width: 1080px; margin: 0 auto; padding: 30px 22px 26px; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 28px; }
.mega h4 { font-size: 12px; font-weight: 650; color: var(--ink-3); margin-bottom: 10px; }
.mega a.item { display: block; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; }
.mega a.item:hover { background: var(--card-line); }
.mega a.item b { display: block; font-size: 15px; font-weight: 650; }
.mega a.item span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.mega .more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--link); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 84px 22px 0; position: relative; overflow-x: clip; }
.hero::before { content: ""; position: absolute; left: 50%; top: 0; width: 1100px; height: 700px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.hero > * { position: relative; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--red); background: var(--red-soft); padding: 6px 12px; border-radius: 999px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero h1 { font-size: clamp(46px, 8vw, 96px); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 22px 0 18px; }
.hero h1 span { background: linear-gradient(100deg, #d0142a, #ef6a2c 60%, #d07a22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.45; color: var(--ink-2); max-width: 650px; margin: 0 auto; }
.ctas { display: flex; gap: 14px; justify-content: center; margin: 34px 0 56px; flex-wrap: wrap; }
.btn { padding: 13px 24px; border-radius: 999px; font-weight: 650; font-size: 16px; }
.btn.primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: var(--btn-shadow); }
.btn.ghost { color: var(--link); }
.btn.ghost::after { content: " ›"; }
.shot { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.shot img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shot-shadow); }

/* ---------- sections ---------- */
section { padding: 120px 22px; }
section.alt { background: var(--bg-alt); }
.kicker { font-size: 15px; font-weight: 700; color: var(--kicker); margin-bottom: 10px; }
h2 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; max-width: 780px; }
.sub { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); line-height: 1.5; max-width: 660px; margin-top: 16px; }
.sub a, .credit a { color: var(--link); }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 56px; }
.tile { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 30px; overflow: hidden; position: relative; min-height: 230px; }
.tile h3 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 8px; }
.tile p { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.tile .more { display: inline-block; margin-top: 14px; color: var(--link); font-weight: 600; font-size: 15px; }
.tile .more::after { content: " ›"; }
.t-wide { grid-column: span 4; } .t-mid { grid-column: span 3; } .t-small { grid-column: span 2; } .t-third { grid-column: span 2; }
.ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; }
.ic svg { width: 22px; height: 22px; }
.tile.dock { background: var(--tint-blue); padding-bottom: 112px; }
.dockbar { position: absolute; left: 30px; right: 30px; bottom: 26px; height: 58px; border-radius: 18px; background: var(--dock-bg); border: 1px solid var(--card-line); box-shadow: 0 10px 30px -10px rgba(0, 40, 120, .35); display: flex; gap: 10px; align-items: center; padding: 0 12px; backdrop-filter: blur(10px); }
.dockbar i { width: 40px; height: 40px; border-radius: 10px; display: block; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.tile.type { background: var(--type-bg); color: var(--type-ink); border-color: transparent; }
.tile.type p { color: #b5b5bd; }
.tile.type .big { font-size: 112px; font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-top: 8px; }
.tile.appear { padding: 0; display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.tile.appear img { width: 100%; height: 100%; object-fit: cover; }
.tile.appear .cap { position: absolute; left: 30px; top: 28px; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.tile.appear .cap p { color: rgba(255, 255, 255, .92); }
.tile.lic { background: var(--tint-red); }
.badge { display: inline-block; font-size: 13px; font-weight: 600; border: 1px solid var(--card-line); border-radius: 8px; padding: 5px 9px; margin: 14px 6px 0 0; background: var(--card); }

/* apps */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 52px; align-items: start; }
.app { margin: 0; }
.app .win { border-radius: 14px; overflow: hidden; box-shadow: var(--shot-shadow); background: #222; }
.app .win { aspect-ratio: 4 / 3; }
.app .win img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.app figcaption { padding: 20px 4px 0; }
.app h3 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 6px; }
.app p { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.fine { margin-top: 34px; font-size: 13px; color: var(--ink-3); line-height: 1.55; max-width: 760px; }

/* hardware */
.hw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
.hw .tile { min-height: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; margin-bottom: 12px; color: var(--done); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.wip { color: var(--kicker); }
.hw-note { margin-top: 28px; padding: 22px 26px; border-radius: 18px; background: var(--tint-amber); border: 1px solid var(--card-line); display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hw-note p { color: var(--ink-2); font-size: 16px; }
.hw-note b { color: var(--ink); }

/* roadmap */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.step { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 24px; }
.step b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 650; margin-bottom: 8px; }
.step strong { font-size: 18px; }
.step.done b { color: var(--done); } .step.now b { color: var(--red); }
.step p { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }

/* credit */
.credit { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: center; }
.credit .quote { font-size: clamp(26px, 3vw, 32px); font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
.credit .quote span { color: var(--red); }
.credit p { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.credit p + p { margin-top: 14px; }
.credit strong { color: var(--ink); }

/* download */
.dl { text-align: center; position: relative; overflow: hidden; }
.dl::before { content: ""; position: absolute; left: 50%; top: 45%; width: 900px; height: 500px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.dl > * { position: relative; }
.dl img { width: 120px; margin: 0 auto; }
.dl h2, .dl .sub { margin-left: auto; margin-right: auto; }
.dl h2 { margin-top: 18px; }

/* footer: sitemap like the nav */
footer { border-top: 1px solid var(--line); padding: 48px 22px 40px; font-size: 13px; color: var(--ink-2); background: var(--bg-alt); }
.sitemap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.sitemap h4 { font-size: 12.5px; font-weight: 650; color: var(--ink); margin-bottom: 10px; }
.sitemap a { display: block; padding: 3px 0; }
.sitemap a:hover { color: var(--ink); text-decoration: underline; }
.legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 22px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-items, .nav-tools .pill { display: none; }
  .menu-btn { display: grid; }
  .nav.mobile-open .nav-items {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; top: 52px;
    background: var(--bg);
    padding: 10px 16px 22px; border-bottom: 1px solid var(--nav-line); max-height: calc(100vh - 52px); overflow: auto;
  }
  .nav.mobile-open .nav-items > li > a, .nav.mobile-open .nav-items > li > button { width: 100%; justify-content: space-between; font-size: 17px; padding: 13px 6px; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .mega { position: static; box-shadow: none; border: 0; background: none; backdrop-filter: none; transform: none; display: none; opacity: 1; visibility: visible; }
  .mega.open { display: block; }
  .mega-in { grid-template-columns: 1fr 1fr; padding: 14px 6px 6px; gap: 18px; }
  .bento, .hw, .timeline { grid-template-columns: 1fr 1fr; }
  .apps { grid-template-columns: 1fr; }
  .t-wide, .t-mid, .t-small, .t-third { grid-column: span 2; }
  .credit { grid-template-columns: 1fr; gap: 24px; }
  .sitemap { grid-template-columns: repeat(3, 1fr); }
  section { padding: 84px 16px; }
}
@media (max-width: 560px) {
  .nav-in { padding: 0 16px; }
  .hero { padding: 56px 16px 0; }
  .shot { padding: 0 16px; }
  .bento, .hw, .timeline, .mega-in { grid-template-columns: 1fr; }
  .t-wide, .t-mid, .t-small, .t-third { grid-column: span 1; }
  .tile { padding: 24px; }
  .tile.appear { min-height: 240px; }
  .tile.type .big { font-size: 84px; }
  .dockbar { left: 20px; right: 20px; gap: 7px; }
  .dockbar i { width: 30px; height: 30px; }
  .sitemap { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =====================================================================
   Feature pages
   ===================================================================== */

.nav-items [aria-current="page"] { color: var(--ink); font-weight: 650; }

/* local navigation under the main bar, as on a product page */
.subnav {
  position: sticky; top: 52px; z-index: 40;
  background: var(--nav-bg); border-bottom: 1px solid var(--nav-line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.subnav-in { max-width: 1080px; margin: 0 auto; height: 48px; padding: 0 22px; display: flex; align-items: center; gap: 24px; }
.subnav-title { font-size: 19px; font-weight: 750; letter-spacing: -.02em; margin-right: auto; }
.subnav-links { display: flex; gap: 4px; font-size: 13.5px; overflow-x: auto; scrollbar-width: none; }
.subnav-links a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; }
.subnav-links a:hover { color: var(--ink); }
.subnav-links a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 650; }

/* page hero */
.page-hero { text-align: center; padding: 76px 22px 64px; position: relative; overflow-x: clip; }
.page-hero::before { content: ""; position: absolute; left: 50%; top: -40px; width: 1000px; height: 560px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.page-hero > * { position: relative; }
.page-hero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 12px auto 18px; max-width: 900px; }
.page-hero h1 span { background: linear-gradient(100deg, #d0142a, #ef6a2c 60%, #d07a22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero .lead { max-width: 680px; }
.page-hero .shot { margin-top: 56px; }
.jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.jump a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--card-line); background: var(--card); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.jump a:hover { color: var(--ink); border-color: var(--ink-3); }

/* a feature: text beside a picture, the sides alternating */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.feature.flip > .media { order: -1; }
.feature + .feature { margin-top: 110px; }
.feature h2 { font-size: clamp(30px, 4vw, 44px); }
.feature .sub { font-size: 18px; }
.checks { list-style: none; margin-top: 24px; display: grid; gap: 11px; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--red-soft); }
.checks li::after { content: ""; position: absolute; left: 5px; top: 8px; width: 7px; height: 4px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.checks li b { color: var(--ink); font-weight: 650; }
.checks li.wip::before { background: transparent; border: 2px dashed var(--kicker); width: 13px; height: 13px; }
.checks li.wip::after { display: none; }
.media img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shot-shadow); }
.media.plain img { box-shadow: none; }
.media figcaption { font-size: 13px; color: var(--ink-3); margin-top: 12px; text-align: center; }
.tag-wip { display: inline-block; font-size: 12px; font-weight: 650; color: var(--kicker); border: 1px solid currentColor; border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; letter-spacing: 0; }

/* drawn illustrations (no screenshots needed) */
.stage { border-radius: 22px; padding: 34px; background: var(--tint-blue); border: 1px solid var(--card-line); position: relative; overflow: hidden; }
.stage.wall { background: url("../assets/wall-light.jpg") center / cover; border: 0; min-height: 300px; display: grid; place-items: center; }
:root[data-theme="dark"] .stage.wall { background-image: url("../assets/wall-dark.jpg"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stage.wall { background-image: url("../assets/wall-dark.jpg"); } }

.mock-menubar { display: flex; align-items: center; gap: 16px; white-space: nowrap; overflow: hidden; height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; color: #111; background: rgba(255,255,255,.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 24px -10px rgba(0,0,0,.35); width: 100%; }
.mock-menubar b { font-weight: 750; }
.mock-menubar .mark { width: 16px; height: 16px; color: #7a0f14; }
.mock-menubar .r { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.mock-menubar svg { width: 16px; height: 16px; display: block; }
.mock-panel { position: absolute; right: 70px; top: 82px; width: 250px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 20px 40px -12px rgba(0,0,0,.4); color: #111; font-size: 13px; }
.mock-panel h5 { font-size: 13px; margin-bottom: 10px; }
.mock-panel .slider { height: 22px; border-radius: 11px; background: #e4e4ea; position: relative; overflow: hidden; }
.mock-panel .slider i { position: absolute; inset: 0 35% 0 0; background: #fff; border-radius: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mock-panel .row { display: flex; justify-content: space-between; margin-top: 10px; color: #555; }

.mock-search { width: min(520px, 100%); border-radius: 18px; background: rgba(250,250,252,.86); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); overflow: hidden; color: #111; }
.mock-search .field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-size: 22px; border-bottom: 1px solid rgba(0,0,0,.08); }
.mock-search .field svg { width: 22px; height: 22px; color: #888; }
.mock-search .field .caret { width: 2px; height: 26px; background: #0a66d8; margin-left: -8px; }
.mock-search ul { list-style: none; padding: 8px; }
.mock-search li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: 15px; }
.mock-search li.on { background: #0a66d8; color: #fff; }
.mock-search li i { width: 28px; height: 28px; border-radius: 7px; display: block; flex: none; }
.mock-search li small { margin-left: auto; opacity: .6; font-size: 12.5px; }

.keys { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 26px; font-size: 15px; color: var(--ink-2); }
kbd { font: 600 15px/1 "Sima Sans", system-ui, sans-serif; min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--card); color: var(--ink); border: 1px solid var(--card-line); box-shadow: 0 2px 0 var(--card-line); }
.switcher { display: flex; gap: 14px; padding: 18px 22px; border-radius: 24px; background: rgba(255,255,255,.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 50px -18px rgba(0,30,80,.45); width: max-content; margin: 0 auto; }
.switcher i { width: 64px; height: 64px; border-radius: 16px; display: block; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.switcher i.sel { outline: 4px solid rgba(0,0,0,.18); outline-offset: 6px; }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.swatches i { width: 40px; height: 40px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

/* type specimen with a live weight slider */
.specimen { border-radius: 22px; padding: 40px; background: var(--type-bg); color: #fff; }
.specimen .big { font-size: clamp(64px, 11vw, 150px); line-height: 1; letter-spacing: -.04em; font-weight: var(--w, 700); transition: font-weight .1s; }
.specimen .alpha { font-size: 22px; line-height: 1.5; color: #c9cbd6; margin-top: 18px; font-weight: var(--w, 700); word-break: break-word; }
.specimen label { display: flex; align-items: center; gap: 16px; margin-top: 28px; font-size: 14px; color: #b5b5bd; }
.specimen input[type="range"] { flex: 1; accent-color: #ef3b4e; }
.specimen output { min-width: 110px; text-align: right; color: #fff; font-weight: 650; }
.weights { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 26px; }
.weights span { font-size: 22px; color: #e6e7ee; }
.weights small { display: block; font-size: 11.5px; color: #8b8d9a; font-weight: 500; margin-top: 2px; }

/* spec table */
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; margin-top: 40px; border-top: 1px solid var(--line); }
.spec { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.spec span { color: var(--ink-2); }
.spec b { font-weight: 600; text-align: right; }

/* cards on the overview and system pages */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.cards .tile { min-height: 0; }
.cards .tile ul { margin-top: 12px; padding-left: 18px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hub a.tile { display: flex; flex-direction: column; padding: 0; min-height: 0; transition: transform .2s, box-shadow .2s; }
.hub a.tile:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -24px rgba(0,0,0,.35); }
.hub .pic { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.hub .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hub .txt { padding: 26px 28px 30px; }
.hub .txt h3 { font-size: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips span { font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-line); color: var(--ink-2); }
.code { margin-top: 26px; border-radius: 16px; background: #15171f; color: #e8e8ee; font: 14px/1.7 "Inconsolata", ui-monospace, monospace; padding: 20px 22px; overflow-x: auto; white-space: pre; box-shadow: var(--shot-shadow); }
.code .p { color: #6ee7a8; } .code .c { color: #8b8d9a; }
.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.next a { flex: 1; min-width: 240px; padding: 24px 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.next a small { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.next a b { font-size: 22px; letter-spacing: -.02em; }
.next a:last-child { text-align: right; }

@media (max-width: 900px) {
  .subnav { top: 52px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip > .media { order: 0; }
  .cards, .hub, .specs { grid-template-columns: 1fr; }
  .weights { grid-template-columns: repeat(3, 1fr); }
  .mock-panel { display: none; }
}
@media (max-width: 560px) {
  .subnav-title { font-size: 16px; }
  .subnav-links a { padding: 6px 9px; }
  .stage { padding: 20px; }
  .specimen { padding: 26px; }
  .switcher i { width: 44px; height: 44px; border-radius: 11px; }
  .switcher { gap: 9px; padding: 14px; }
  .mock-menubar .hide-s { display: none; }
}
.tile.dock .dockshot { position: absolute; left: 30px; right: 30px; bottom: 22px; width: calc(100% - 60px); height: auto; border-radius: 16px; box-shadow: 0 12px 30px -12px rgba(0, 40, 120, .45); }
@media (max-width: 560px) { .tile.dock .dockshot { left: 16px; width: calc(100% - 32px); } }

/* HiDPI highlight */
.hidpi { background: radial-gradient(1200px 500px at 50% 0, var(--red-soft), transparent 70%), var(--bg); }
.hidpi-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: stretch; margin-top: 46px; }
.hidpi-step { background: var(--card); border: 1px solid var(--card-line); border-radius: 20px; padding: 26px; }
.hidpi-step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-size: 14px; margin-bottom: 14px; }
.hidpi-step h3 { font-size: 20px; font-weight: 750; letter-spacing: -.015em; margin-bottom: 6px; }
.hidpi-step p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.hidpi-arrow { align-self: center; font-size: 26px; color: var(--ink-3); }
.checks.two { grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 34px; }
.hidpi-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.scale-demo { display: flex; gap: 10px; align-items: flex-end; justify-content: center; }
.scale-demo div { border-radius: 10px; border: 2px solid var(--card-line); background: var(--card); display: grid; place-items: end center; padding-bottom: 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.scale-demo div.on { border-color: var(--red); color: var(--ink); box-shadow: 0 0 0 4px var(--red-soft); }
@media (max-width: 900px) {
  .hidpi-row { grid-template-columns: 1fr; }
  .hidpi-arrow { transform: rotate(90deg); justify-self: center; }
  .checks.two, .hidpi-band { grid-template-columns: 1fr; }
}

/* Hardware page */
.req { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.req-item { text-align: center; padding: 28px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); }
.req-item svg { width: 40px; height: 40px; color: var(--red); margin: 0 auto 14px; display: block; }
.req-item b { display: block; font-size: 18px; font-weight: 750; }
.req-item span { display: block; font-size: 14.5px; color: var(--ink-2); margin-top: 4px; }
.matrix { margin-top: 44px; border-radius: 20px; overflow: hidden; border: 1px solid var(--card-line); background: var(--card); }
.m-head, .m-row { display: grid; grid-template-columns: 170px 1.4fr 1fr; gap: 24px; padding: 18px 26px; }
.m-head { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 1px solid var(--card-line); }
.m-head span:nth-child(2) { color: var(--done); } .m-head span:nth-child(3) { color: var(--kicker); }
.m-row + .m-row { border-top: 1px solid var(--line); }
.m-row b { font-size: 16px; font-weight: 700; }
.m-row span { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.m-row span:nth-child(3) { color: var(--ink-3); }
@media (max-width: 900px) {
  .req { grid-template-columns: 1fr 1fr; }
  .m-head { display: none; }
  .m-row { grid-template-columns: 1fr; gap: 6px; }
  .m-row span:nth-child(2)::before { content: "Works today: "; font-weight: 650; color: var(--done); }
  .m-row span:nth-child(3):not(:empty)::before { content: "In progress: "; font-weight: 650; color: var(--kicker); }
}

/* Download page */
.release { border-radius: 26px; padding: 40px; background: var(--card); border: 1px solid var(--card-line); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .35); }
.release-main { display: flex; gap: 26px; align-items: center; }
.release-main img { width: 96px; height: 96px; flex: none; }
.dl-options { display: grid; gap: 12px; margin-top: 32px; }
.dl-opt { display: grid; grid-template-columns: 40px 1fr auto; gap: 18px; align-items: center; padding: 18px 22px; border-radius: 16px; background: var(--bg-alt); border: 1px solid var(--line); }
.dl-opt svg { width: 32px; height: 32px; color: var(--red); }
.dl-opt b { display: block; font-size: 17px; }
.dl-opt span { display: block; font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.dl-opt .soon { font-size: 12.5px; font-weight: 650; color: var(--kicker); border: 1px solid currentColor; border-radius: 999px; padding: 4px 11px; margin: 0; white-space: nowrap; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.steps li { counter-increment: step; padding: 26px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 750; margin-bottom: 16px; }
.steps b { display: block; font-size: 18px; font-weight: 750; margin-bottom: 4px; }
.steps span { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
code { font-family: "Inconsolata", ui-monospace, monospace; font-size: .95em; padding: 1px 5px; border-radius: 5px; background: var(--bg-alt); border: 1px solid var(--line); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .release { padding: 24px; }
  .release-main { flex-direction: column; align-items: flex-start; }
  .release-main img { width: 72px; height: 72px; }
  .dl-opt { grid-template-columns: 32px 1fr; }
  .dl-opt .soon { grid-column: 2; justify-self: start; }
  .steps { grid-template-columns: 1fr; }
}

/* About pages */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.principles .tile { min-height: 0; }
.principles .tile > b { display: block; font-size: 14px; font-weight: 750; color: var(--red); margin-bottom: 14px; letter-spacing: .06em; }
.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.chain .link { padding: 28px 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-line); text-align: center; }
.chain .link small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.chain .link b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.chain .link span { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.chain .link.up { border-color: var(--kicker); box-shadow: 0 0 0 4px color-mix(in srgb, var(--kicker) 14%, transparent); }
.chain .link.down { background: var(--type-bg); color: #fff; border-color: transparent; }
.chain .link.down span { color: #c4c6d2; } .chain .link.down small { color: #ffb35c; }
.chain .arrow { align-self: center; font-size: 28px; color: var(--ink-3); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 44px; }
.split .tile { min-height: 0; }
.split .checks { margin-top: 16px; }
@media (max-width: 900px) {
  .principles, .split { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; }
  .chain .arrow { transform: rotate(90deg); justify-self: center; }
}

/* apps: REAPER wide, Firefox beside the "more" card */
.apps { grid-template-columns: 1.3fr 1fr; }
.app.wide { grid-column: 1 / -1; }
.app.wide .win { aspect-ratio: auto; }
.app.wide .win img { height: auto; object-fit: initial; }
.app-more { min-height: 0; align-self: start; }
@media (max-width: 900px) { .apps { grid-template-columns: 1fr; } }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 12px; }
.post-grid.three { grid-template-columns: repeat(3, 1fr); margin-top: 40px; }
.post-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .35); }
.post-card .pic { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.post-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.post-card .pic-mark { display: grid; place-items: center; background: var(--tint-red); }
.post-card .pic-mark .mark { width: 34%; aspect-ratio: 1; height: auto; color: var(--red); }
.post-card .txt { padding: 22px 24px 26px; }
.post-card h3 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; margin: 10px 0 8px; }
.post-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.post-tag { font-weight: 700; color: var(--kicker); }
.post { max-width: 760px; margin: 0 auto; padding: 72px 22px 90px; }
.post-head { text-align: center; margin-bottom: 44px; }
.post-head .post-meta { justify-content: center; }
.post-head h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin: 14px 0 16px; }
.prose { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 28px; color: var(--ink); letter-spacing: -.02em; margin-top: 40px; max-width: none; }
.prose strong { color: var(--ink); }
.prose a { color: var(--link); }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose figure { margin: 0 -60px 28px; }
.prose figure img { width: 100%; height: auto; border-radius: 16px; box-shadow: var(--shot-shadow); }
.prose figcaption { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 12px; }
@media (max-width: 900px) {
  .post-grid, .post-grid.three { grid-template-columns: 1fr; }
  .prose figure { margin: 0 0 24px; }
  .post { padding-top: 48px; }
}

/* Developers page */
.steps.five { grid-template-columns: repeat(5, 1fr); }
.policy { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 44px; }
.policy .tile { min-height: 0; }
.policy .tile.no { background: var(--tint-red); }
.policy .checks { margin-top: 14px; }
.checks.x li::before { background: var(--red); }
.checks.x li::after { border: 0; width: 9px; height: 2px; background: #fff; left: 4px; top: 11.5px; transform: none; }
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
.road-item { padding: 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); position: relative; }
.road-item > b { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-bottom: 14px; }
.road-item.done > b { color: var(--done); background: color-mix(in srgb, var(--done) 14%, transparent); }
.road-item.now > b { color: #fff; background: var(--red); }
.road-item.now { border-color: var(--red); }
.road-item.soon > b { color: var(--kicker); background: color-mix(in srgb, var(--kicker) 14%, transparent); }
.road-item.later > b { color: var(--ink-3); background: var(--bg-alt); }
.road-item h3 { font-size: 18px; font-weight: 750; margin-bottom: 6px; }
.road-item p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 900px) {
  .steps.five { grid-template-columns: 1fr 1fr; }
  .policy { grid-template-columns: 1fr; }
  .road { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .steps.five, .road { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .scale-demo { gap: 6px; }
  .scale-demo div { font-size: 10.5px; transform-origin: bottom; }
  .scale-demo div:nth-child(1) { width: 44px !important; height: 30px !important; }
  .scale-demo div:nth-child(2) { width: 54px !important; height: 36px !important; }
  .scale-demo div:nth-child(3) { width: 66px !important; height: 44px !important; }
  .scale-demo div:nth-child(4) { width: 76px !important; height: 52px !important; }
  .scale-demo div:nth-child(5) { width: 86px !important; height: 58px !important; }
}

/* skip link, focus */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 650; }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
