/* My VR Media Player — single stylesheet, no framework, mobile-first. Tokens in tokens.css. */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; border: 1px solid rgba(0, 0, 0, 0.08);
}
.brand-mark img { display: block; width: 27px; height: 27px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: 15px; }
.nav a {
  color: var(--muted); text-decoration: none;
  padding: 7px 10px; border-radius: 9px;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel); }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 6vw, 76px) 0 clamp(22px, 3vw, 40px); }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
.hero h1 {
  font-size: clamp(34px, 6.2vw, 58px);
  line-height: 1.04; letter-spacing: -0.035em;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6;
  color: var(--muted); max-width: 56ch; margin: 0;
}
.badge-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 22px 0 0; padding: 0; list-style: none;
}
.badge {
  display: inline-block; font-size: 13px; line-height: 1.5;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--panel);
}
.badge.ok { color: var(--text); border-color: var(--line-strong); font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 1px solid var(--line);
  transition: transform var(--motion-fast) ease, filter var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn.ghost { background: transparent; color: var(--text); }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost:hover { filter: none; background: var(--panel); }
.btn:active { transform: translateY(1px); }
/* Non-interactive button (e.g. "Coming soon") — readable, but not a dead link. */
.btn.is-disabled { opacity: 0.62; cursor: not-allowed; }
.btn.is-disabled:hover { filter: none; }
.fine { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.hero-art {
  position: relative; display: grid; place-items: center;
  justify-self: center; margin: 0; width: fit-content; overflow: hidden;
  padding: clamp(14px, 2.4vw, 22px);
  background: var(--shot-bg); border: 1px solid var(--shot-line);
  border-radius: 28px;
}
.hero-art::before {
  content: ""; position: absolute; inset: -15% -30%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.1), transparent 72%);
}
.hero-art img {
  position: relative; display: block;
  width: min(280px, 66vw);
}

/* ---------- Sections ---------- */
section.block { padding: clamp(28px, 4vw, 52px) 0; }
:where(section, h1, h2, h3)[id] { scroll-margin-top: 84px; }
section.block h2 {
  font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-lead { color: var(--muted); margin: 0 0 20px; max-width: 68ch; }

/* ---------- Screenshot gallery ---------- */
.gallery { display: grid; gap: 16px; }
.gallery-wide {
  margin: 0; padding: clamp(10px, 2vw, 18px);
  background: var(--shot-bg); border: 1px solid var(--shot-line);
  border-radius: var(--radius-lg);
}
.gallery-wide img { display: block; width: 100%; border-radius: 10px; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shot {
  display: flex; flex-direction: column; margin: 0;
  padding: 12px 12px 0; border-radius: var(--radius);
  background: var(--shot-bg); border: 1px solid var(--shot-line);
}
.shot img { display: block; width: 100%; margin: auto 0; border-radius: 8px; }
.shot figcaption {
  padding: 12px 2px 14px;
  font-size: 13px; line-height: 1.5; color: var(--shot-muted);
}

/* ---------- Closing banner ---------- */
.banner {
  margin: 0; overflow: hidden;
  background: var(--shot-bg); border: 1px solid var(--shot-line);
  border-radius: var(--radius-lg);
}
.banner img { display: block; width: 100%; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 0 4px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h2, .card h3 { margin-top: 0; }
.card h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.card p, .card li { color: var(--muted); }
.card p { margin: 0; }
.card p + p { margin-top: 10px; }
.card strong, .card b { color: var(--text); }

/* ---------- Policy pages ---------- */
.policy .wrap { max-width: 880px; }
.policy h2 {
  margin-top: 38px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -0.015em;
}
.policy h3 { margin-top: 22px; font-size: 17px; }
.policy ul { color: var(--muted); padding-left: 22px; }
.policy li + li { margin-top: 6px; }
.toc {
  margin: 26px 0 10px; padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc .toc-title {
  margin: 0; padding: 0; border: 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.toc ol { margin: 8px 0 0; padding-left: 22px; color: var(--muted); }
.toc li + li { margin-top: 4px; }

/* ---------- Tables (privacy / permissions) ---------- */
table.meta { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
table.meta th, table.meta td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
table.meta th { color: var(--text); width: 34%; }
table.meta td { color: var(--muted); overflow-wrap: anywhere; }

/* ---------- License text disclosure ---------- */
.policy details {
  margin: 16px 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel);
}
.policy summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.policy details[open] summary { border-bottom: 1px solid var(--line); }
.policy pre {
  margin: 0; padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px; line-height: 1.55; color: var(--muted);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 24px 0 44px; color: var(--muted); font-size: 14px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.skip { position: fixed; left: -9999px; top: 12px; }
.skip:focus { left: 12px; background: #fff; color: #000; padding: 8px 14px; z-index: 99; }

/* ---------- Motion ---------- */
.hero, .block { animation: rise var(--motion-slow) ease both; }
.block:nth-of-type(2) { animation-delay: 70ms; }
.block:nth-of-type(3) { animation-delay: 140ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .block { animation: none; }
  .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
@media (max-width: 899px) {
  .hero-art img { width: min(250px, 58vw); }
}
@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .brand span + span { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark img { width: 24px; height: 24px; }
  .site-header .wrap { gap: 10px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .nav { font-size: 14px; }
  .nav a { padding: 7px 8px; }
}
@media (max-width: 600px) {
  .shots {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; padding-bottom: 6px;
    margin: 0 -20px; padding-left: 20px; padding-right: 20px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 74%; scroll-snap-align: start; }
}
@media (max-width: 620px) {
  table.meta, table.meta tbody, table.meta tr, table.meta th, table.meta td { display: block; width: 100%; }
  table.meta tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.meta th {
    padding: 0 0 6px; border: 0;
    font-size: 14px; letter-spacing: 0.01em;
  }
  table.meta td { padding: 0; border: 0; }
  table.components thead { display: none; }
  table.components td { padding: 2px 0; }
  table.components td::before {
    display: inline-block; min-width: 82px; margin-right: 6px;
    color: var(--text); font-weight: 700;
  }
  table.components td:nth-child(1)::before { content: "Component: "; }
  table.components td:nth-child(2)::before { content: "Version: "; }
  table.components td:nth-child(3)::before { content: "License: "; }
  table.components td:nth-child(4)::before { content: "Upstream: "; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .shots { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .nav a { padding: 7px 6px; font-size: 13px; }
}
