/* Q8 — site styles. Light and dark follow the system; the hero is always dark.
   Colours: the Q8 Night palette (Design/Website Palettes/night.css), the app
   icon's charcoal and tangerine. Light mode's accent is a burnt orange, as
   tangerine is too pale to read as text on white. */

:root {
  --bg: #FAFAF9;
  --bg-alt: #F1F1EF;
  --tile: #FFFFFF;
  --line: rgb(28 28 30 / 0.09);
  --text: #1C1C1E;
  --text-2: #68686C;
  --accent: #9A420A;
  --accent-ink: #FFFFFF;
  --nav: rgb(250 250 249 / 0.78);

  --stage: #0B0B0C;
  --stage-text: #F5F4F2;
  --stage-text-2: #A2A1A0;
  --stage-accent: #F28C3E;
  --glow: #F28C3E;
  --glass: rgb(255 255 255 / 0.14);
  --glass-hover: rgb(255 255 255 / 0.22);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --radius: 18px;
  --gutter: max(22px, calc((100vw - 1180px) / 2));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0C;
    --bg-alt: #121214;
    --tile: #1A1A1D;
    --line: rgb(255 255 255 / 0.09);
    --text: #F5F4F2;
    --text-2: #A2A1A0;
    --accent: #F28C3E;
    --accent-ink: #1B0D03;
    --nav: rgb(11 11 12 / 0.78);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Logo ---------- */

/* One colour, the text's: the Q's tail too. */
.logo-mark { display: block; fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; }

/* ---------- Navigation: clear over the hero, frosted once you scroll ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--stage-text);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: var(--nav); color: var(--text);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  height: 64px; padding: 0 var(--gutter);
}
.nav-links { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-links a, .nav-cta { color: inherit; font-size: 0.85rem; opacity: 0.85; }
.nav-links a:hover, .nav-cta:hover { opacity: 1; text-decoration: none; }

.logo { display: grid; justify-items: center; gap: 3px; color: inherit; }
.logo:hover { text-decoration: none; }
.logo .logo-mark { height: 24px; width: auto; }

.nav-cta { justify-self: end; }
@media (max-width: 640px) { .nav-links { visibility: hidden; } }

/* ---------- Hero: seven covers waiting in the dark, a marquee across them ---------- */

.hero {
  --cw: clamp(150px, 19vw, 270px);
  --flow-top: clamp(92px, 13vh, 130px);
  position: relative; overflow: hidden; isolation: isolate;
  height: max(620px, min(100svh, 960px));
  background: var(--stage); color: var(--stage-text);
}
/* A faint light behind the covers, so they stand out as silhouettes. */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: calc(var(--flow-top) + var(--cw) * 0.2);
  width: min(1100px, 140vw); height: calc(var(--cw) * 1.4);
  transform: translateX(-50%);
  background-color: var(--glow); border-radius: 50%;
  filter: blur(120px); opacity: 0.2;
}

.flow {
  position: absolute; left: 0; right: 0; top: var(--flow-top);
  height: calc(var(--cw) * 1.5 + var(--cw) * 0.45);
  perspective: 1200px; transform-style: preserve-3d;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.card {
  position: absolute; left: 50%; top: 0;
  width: var(--cw); margin-left: calc(var(--cw) / -2);
  aspect-ratio: 2 / 3;
  transform:
    translateX(calc(var(--cw) * var(--x, 0)))
    translateZ(calc(var(--cw) * var(--z, 0)))
    rotateY(var(--turn, 0deg));
  -webkit-box-reflect: below 3px linear-gradient(transparent 76%, rgb(255 255 255 / 0.07));
}
.poster {
  display: block; width: 100%; height: 100%;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 28px 60px -20px rgb(0 0 0 / 0.8), 0 0 0 0.5px rgb(255 255 255 / 0.12);
}
.poster svg { display: block; width: 100%; height: 100%; }

/* In the dark: the art only just shows, the outer covers least. */
.card .poster { position: relative; box-shadow: 0 28px 60px -20px rgb(0 0 0 / 0.9), 0 0 0 0.5px rgb(255 255 255 / 0.09); }
.card .poster::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.05), transparent 35%);
}
.card[data-distance="0"] svg { filter: brightness(0.19) saturate(0.5); }
.card[data-distance="1"] svg { filter: brightness(0.13) saturate(0.4); }
.card[data-distance="2"] svg { filter: brightness(0.09) saturate(0.35); }
.card[data-distance="3"] svg { filter: brightness(0.06) saturate(0.3); }

/* The marquee: a lit band across the covers. */
.marquee {
  position: absolute; z-index: 2; left: 0; right: 0;
  top: calc(var(--flow-top) + var(--cw) * 0.8);
  overflow: hidden;
  background: rgb(11 11 12 / 0.55);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-block: 1px solid color-mix(in srgb, var(--stage-accent) 55%, transparent);
  box-shadow: 0 0 90px -12px color-mix(in srgb, var(--stage-accent) 30%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 56s linear infinite;
}
.marquee-half { display: flex; align-items: center; flex-shrink: 0; }
.marquee-half span {
  padding: clamp(14px, 1.5vw, 20px) 0;
  font-size: clamp(0.82rem, 1.45vw, 1.12rem); font-weight: 500;
  letter-spacing: 0.36em; text-transform: uppercase; white-space: nowrap;
  color: var(--stage-text);
  text-shadow: 0 0 18px color-mix(in srgb, var(--stage-accent) 45%, transparent);
}
.marquee-mark {
  flex-shrink: 0; height: 0.95em; width: auto; margin: 0 2.2em 0 1.85em;
  font-size: clamp(0.82rem, 1.45vw, 1.12rem);
  fill: var(--stage-accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }
.hero.is-paused .marquee-track,
.hero.is-away .marquee-track { animation-play-state: paused; }

/* Keeps the headline legible over the cover flow, as a film's grade would. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(0deg, rgb(11 11 12 / 0.92) 0%, rgb(11 11 12 / 0.55) 26%, transparent 48%),
    linear-gradient(90deg, rgb(11 11 12 / 0.7) 0%, transparent 46%);
}

.hero-copy {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 92px;
  max-width: 640px;
}
.hero h1 {
  margin: 0; font-size: clamp(2.7rem, 6vw, 4.8rem); font-weight: 500;
  letter-spacing: -0.03em; line-height: 1.02;
}
.glass-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  padding: 13px 24px; border-radius: 12px;
  background: var(--glass); color: var(--stage-text);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  font-size: 0.95rem; font-weight: 500;
}
.glass-btn:hover { background: var(--glass-hover); text-decoration: none; }

.hero-pause {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 28px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--glass); color: var(--stage-text); cursor: pointer;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: grid; place-items: center;
}
.hero-pause:hover { background: var(--glass-hover); }
.hero-pause svg { width: 14px; height: 14px; fill: currentColor; }
.hero-pause .play { display: none; }
.hero-pause[aria-pressed="true"] .play { display: block; }
.hero-pause[aria-pressed="true"] .pause { display: none; }

@media (max-width: 640px) {
  .hero { height: max(600px, min(100svh, 740px)); --cw: 44vw; --flow-top: 92px; }
  .hero-copy { bottom: 104px; }
}

/* Nothing moves: the marquee stands still and needs no pause button. */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; transform: translateX(-4em); }
  .hero-pause { display: none; }
}

/* ---------- Tiles under the hero ---------- */

.tiles-band { padding: 56px 0 0; }
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 16px; color: #fff; isolation: isolate;
  box-shadow: 0 0 0 1px var(--line);
}
.tile:hover { text-decoration: none; }
.tile .tile-art { position: absolute; inset: 0; z-index: -1; transition: transform 0.6s cubic-bezier(0.2, 0.75, 0.2, 1); }
.tile .tile-art svg { width: 100%; height: 100%; display: block; }
.tile:hover .tile-art { transform: scale(1.04); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.75) 0%, rgb(0 0 0 / 0.4) 30%, transparent 58%);
}
.tile-name { position: absolute; left: 18px; bottom: 16px; font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.tile-go {
  position: absolute; right: 14px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(255 255 255 / 0.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tile-go svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Sections ---------- */

.section { padding: 104px 0; }
.section.alt { background: var(--bg-alt); }
.eyebrow { margin: 0; color: var(--accent); font-weight: 600; font-size: 1rem; }
h2 {
  margin: 6px 0 16px; max-width: 18ch;
  font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500;
  letter-spacing: -0.03em; line-height: 1.04;
}
.lede { margin: 0; max-width: 36em; font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--text-2); }

/* Six kinds */
.kinds {
  display: grid; gap: 14px; margin-top: 52px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 980px) { .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kind {
  background: var(--tile); border-radius: var(--radius); padding: 22px 20px;
  border: 1px solid var(--line);
}
.kind svg {
  width: 30px; height: 30px; fill: none; stroke: var(--accent);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.kind h3 { margin: 14px 0 4px; font-size: 1.05rem; font-weight: 600; }
.kind p { margin: 0; font-size: 0.9rem; color: var(--text-2); line-height: 1.4; }

/* Two columns: words beside a picture */
.split {
  display: grid; gap: 56px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.split + .split { margin-top: 112px; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .split.flip > :first-child { order: 0; }
}

.points { margin: 22px 0 0; padding: 0; list-style: none; }
.points li { position: relative; padding-left: 22px; margin-top: 10px; color: var(--text-2); }
.points li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.points b { color: var(--text); font-weight: 600; }

/* Panes that hint at the app */
.pane {
  background: var(--tile); border: 1px solid var(--line);
  border-radius: 22px; padding: 22px;
  box-shadow: 0 30px 60px -40px rgb(0 0 0 / 0.35);
}
.pane-title { margin: 0 0 14px; font-weight: 600; font-size: 1.05rem; }
.pane-title span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--text-2); }
.line {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.9rem;
}
.line dt { color: var(--text-2); }
.line dd { margin: 0; font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; }
.line dd .to { color: var(--accent); }
dl { margin: 0; }
.pane .button {
  display: block; margin-top: 16px; padding: 10px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  text-align: center; font-weight: 600; font-size: 0.95rem;
}

.rows { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; background: var(--bg-alt); font-size: 0.9rem;
}
.section.alt .row { background: var(--bg); }
.row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--text-2); }
.row .state { font-size: 0.8rem; color: var(--text-2); white-space: nowrap; }
.row .state.done { color: #2fa36b; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-2); opacity: 0.6; }
.dot.on { background: #2fa36b; opacity: 1; }
.dot.busy { background: var(--accent); opacity: 1; }
.bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 42%; background: var(--accent); }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 980px;
  background: var(--bg-alt); border: 1px solid var(--line);
  font-size: 0.75rem; font-weight: 500; color: var(--text-2);
}
.tag.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* Gallery picture */
.gallery-pane { display: grid; grid-template-columns: 0.8fr 1fr; gap: 22px; align-items: center; }
.gallery-pane .poster { box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.5); border-radius: 10px; aspect-ratio: 2 / 3; height: auto; }
.stars { color: #f5b301; letter-spacing: 2px; font-family: -apple-system, sans-serif; }
.search {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 8px 12px; border-radius: 10px; background: var(--bg-alt);
  font-size: 0.85rem; color: var(--text-2);
}
.search svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search b { color: var(--text); font-weight: 500; }
.search .count { margin-left: auto; }
@media (max-width: 480px) { .gallery-pane { grid-template-columns: minmax(0, 1fr); } .gallery-pane .poster { max-width: 200px; margin: 0 auto; } }

/* Three small cards */
.trio { display: grid; gap: 14px; margin-top: 52px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.trio .kind h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; }

/* Credits */
.credits { margin-top: 44px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.credit { padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--tile); }
.credit h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.credit p { margin: 0; font-size: 0.88rem; color: var(--text-2); line-height: 1.45; }
.notice { margin-top: 24px; font-size: 0.8rem; color: var(--text-2); }

/* Footer */
.footer { padding: 36px 0 56px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-2); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; justify-content: space-between; }
.footer a { color: var(--text-2); }
.footer nav { display: flex; gap: 20px; }
.footer .logo-mark { height: 18px; width: auto; color: var(--text); }

/* ---------- Plain document pages (privacy) ---------- */

.doc { padding: 128px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { margin: 0 0 6px; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.doc .updated { margin: 0 0 36px; color: var(--text-2); font-size: 0.9rem; }
.doc h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; max-width: none; margin: 44px 0 10px; }
.doc .summary { font-size: 1.2rem; color: var(--text-2); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 12px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.doc th { color: var(--text-2); font-weight: 500; }
@media (max-width: 560px) {
  .doc table, .doc thead, .doc tbody, .doc tr, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; }
}
