/* gametism.com - one stylesheet for every page. Fonts are served from
   this site (no third-party requests). */

@font-face {
  font-family: "Saira";
  src: url("fonts/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --slate: #14161e;      /* the logo's own ground */
  --raised: #1b1e28;
  --well: #10121a;
  --line: #2a2f3d;
  --ink: #e9edf5;
  --muted: #98a1b5;
  --faint: #6b7487;
  --cyan: #38d3ff;
  --spectrum: linear-gradient(90deg, #38d3ff 0%, #3868ff 25%, #8a38ff 45%,
                              #ff38bd 62%, #ff5238 80%, #ff9b38 100%);
  --display: "Saira", "Bahnschrift", "Segoe UI", sans-serif;
  --body: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", "Cascadia Mono", Consolas, monospace;
  --measure: 66ch;
  --wrap: 1140px;
  --gutter: clamp(20px, 4vw, 40px);
  color-scheme: dark;
}
/* On wide-gamut screens the logo colours are shown at their full
   saturation. */
@media (color-gamut: p3) {
  :root {
    --spectrum: linear-gradient(90deg, color(display-p3 0.2 0.83 1) 0%,
      color(display-p3 0.2 0.4 1) 25%, color(display-p3 0.55 0.2 1) 45%,
      color(display-p3 1 0.2 0.75) 62%, color(display-p3 1 0.3 0.2) 80%,
      color(display-p3 1 0.62 0.2) 100%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--slate);
  color: var(--ink);
  font: 400 17px/1.62 var(--body);
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 3px; }
::selection { background: #3868ff; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--slate); padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* Type scale: 17 / 21 / 28 / 40 / 64 (ratio about 1.33) */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 700; }
h2 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 650; }
h3 { font-size: 21px; font-weight: 600; font-stretch: 108%; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: 20px; line-height: 1.55; color: #cfd5e2; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(20, 22, 30, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand b { font: 700 20px/1 var(--display); font-stretch: 115%; }
.brand span { font: 400 13px/1 var(--body); color: var(--muted); margin-left: 2px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { color: var(--slate); }
.menu { display: none; margin-left: auto; }
.menu summary {
  list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink); font-size: 15px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
  position: absolute; right: var(--gutter); top: 58px; display: grid; gap: 4px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 200px;
}
.menu nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.menu nav a:hover { background: var(--line); }
@media (max-width: 860px) { .nav { display: none; } .menu { display: block; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 16px/1 var(--body); text-decoration: none;
  padding: 14px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--ink); color: var(--slate);
}
.btn:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 8px; }
.btn[aria-disabled="true"] { background: var(--raised); color: var(--muted); border-color: var(--line); cursor: default; }
.btn svg { width: 18px; height: 18px; }

/* The one bright line: the logo's spectrum, drawn once across the page
   top like the peak of an HDR signal. */
.signal { height: 3px; background: var(--spectrum); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .signal { animation: draw 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Best Setup panel (illustration of GT-Hub's own window) */
.setup {
  background: var(--raised); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 22px 18px; font-size: 15px;
}
.setup header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.setup header strong { font: 600 18px/1.2 var(--display); font-stretch: 108%; }
.setup header span { color: var(--muted); font-size: 13px; }
.setup dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.setup dt, .setup dd { padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.setup dt { color: var(--muted); padding-right: 18px; }
.setup dd b { display: block; font-weight: 500; }
.setup dd .mono { display: block; color: var(--cyan); font-size: 13.5px; margin-top: 3px; }
.setup footer { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; }
.caption { color: var(--faint); font-size: 13px; margin-top: 10px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section > .wrap > h2 { max-width: 22ch; }
h2 + p, h2 + .lead { margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }

/* Ten tools: a list, two columns, not cards */
.tools { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); margin: 44px 0 0; }
.tools div { padding: 20px 0; border-top: 1px solid var(--line); }
.tools dt { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tools dt h3 { font-size: 20px; }
.tools dd { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }
.off { font-size: 12.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; white-space: nowrap; }
@media (max-width: 760px) { .tools { grid-template-columns: 1fr; } }

/* Brightness scale */
.scale { margin: 8px 0 0; }
.scale .bar {
  position: relative; height: 54px; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(90deg, #000 0%, #2b2b2b 6%, #6d6d6d 14%, #bdbdbd 30%, #fff 55%, #fff 100%);
}
.scale .bar::after { /* above the real peak nothing is shown */
  content: ""; position: absolute; inset: 0 0 0 var(--real); border-radius: 0 10px 10px 0;
  background: repeating-linear-gradient(135deg, rgba(20,22,30,.86) 0 7px, rgba(20,22,30,.72) 7px 14px);
}
.scale .mark { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--ink); z-index: 1; }
.scale .mark.cut { background: #ff5238; }
.scale ol { position: relative; height: 92px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; }
.scale li { position: absolute; transform: translateX(-50%); text-align: center; white-space: nowrap; color: var(--muted); }
.scale li b { display: block; color: var(--ink); font: 500 15px/1.3 var(--mono); }
.scale li.end { transform: translateX(-100%); text-align: right; }
.scale li.low { top: 46px; }
.routes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; list-style: none; }
.routes li { border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font-size: 15px; }

/* Screenshot slots: an <img> that shows a marked placeholder until the
   file exists in assets/shots/. */
.shot {
  position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: var(--well); border: 1px solid var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.wide { aspect-ratio: 16 / 9; }
.shot img { position: relative; z-index: 1; opacity: 0; transition: opacity .2s; }
.shot.loaded > img, .shot .after.loaded > img { opacity: 1; }
.shot .ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px;
  color: var(--faint); font-size: 14px; padding: 20px;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.025) 18px 36px);
  border: 1px dashed #3a4052; border-radius: 12px;
}
.shot .ph b { color: var(--muted); font-weight: 500; font-size: 15px; }
.shot.loaded > .ph { display: none; }
figcaption.caption { margin-top: 10px; }

/* Before / after */
.compare { position: relative; --pos: 50%; touch-action: pan-y; user-select: none; }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare .ph { align-content: end; font-size: 13px; overflow-wrap: anywhere; }
.compare > .ph { padding: 16px calc(50% + 16px) 18px 16px; }
.compare .after .ph { background-color: #171a24; padding: 16px 16px 18px calc(50% + 16px); }
.compare .after { z-index: 1; border: 0; border-radius: 0; background: transparent; aspect-ratio: auto; }
.compare .handle { z-index: 2; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--ink); transform: translateX(-1px); pointer-events: none; }
.compare .handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--ink);
  box-shadow: 0 0 0 6px rgba(20,22,30,.5);
}
.compare input { z-index: 4; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare input:focus-visible + .handle::after { outline: 2px solid var(--cyan); outline-offset: 4px; }
.compare .tag { position: absolute; top: 12px; z-index: 3; font-size: 13px; background: rgba(20,22,30,.8); padding: 3px 9px; border-radius: 6px; pointer-events: none; }
.compare .tag.l { left: 12px; } .compare .tag.r { right: 12px; }

/* Frame time illustration */
.frames { background: var(--well); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 12px; }
.frames svg { width: 100%; height: auto; }
.frames .legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.frames .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }

/* Steps: a real sequence, so they are numbered */
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: s; }
.steps li { counter-increment: s; }
.steps h3 { display: flex; gap: 12px; align-items: baseline; margin: 18px 0 8px; }
.steps h3::before { content: counter(s); font: 700 15px/1 var(--display); color: var(--slate); background: var(--ink); border-radius: 50%; width: 26px; height: 26px; display: inline-grid; place-content: center; flex: none; transform: translateY(-2px); }
.steps p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Limits */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); margin-top: 40px; }
.limits div { border-top: 1px solid var(--line); padding: 20px 0; }
.limits h3 { margin-bottom: 6px; }
.limits p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 36px; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 500; font-size: 18px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Download */
.download { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.download ul { padding-left: 1.1em; margin: 0 0 1em; color: var(--muted); }
.download ul li { margin: 4px 0; }
.note { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; font-size: 15px; }
.note h3 { font-size: 18px; margin-bottom: 8px; }
.note p { color: var(--muted); }
.note p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .download { grid-template-columns: 1fr; } }

/* More from Gametism */
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: 36px; }
.more a { display: block; text-decoration: none; color: var(--ink); border-top: 2px solid var(--line); padding-top: 16px; }
.more a:hover { border-top-color: var(--ink); }
.more a span { display: block; color: var(--muted); margin-top: 6px; font-size: 15px; }
@media (max-width: 760px) { .more { grid-template-columns: 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 14.5px; background: var(--well); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot p { max-width: 48ch; }
.foot h2 { font: 600 14.5px/1.4 var(--body); color: var(--ink); margin: 0 0 10px; letter-spacing: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .wrap > div:first-child { grid-column: 1 / -1; } }

/* Text pages (Impressum, privacy, trademarks) */
.page { padding: clamp(48px, 7vw, 88px) 0 96px; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 12px; }
.page h2 { font-size: 24px; margin: 44px 0 12px; font-stretch: 108%; }
.page h3 { font-size: 18px; margin: 26px 0 8px; }
.page p, .page li { color: #cfd5e2; }
.page ul { padding-left: 1.2em; }
.page address { font-style: normal; color: var(--ink); line-height: 1.7; }
.fill { background: rgba(255, 155, 56, .14); border-bottom: 1px dashed #ff9b38; color: #ffcf9e; padding: 0 3px; border-radius: 3px; }
.lang { color: var(--muted); font-size: 15px; }

/* While the site is in development (tools/build.py, DEVELOPMENT), a gated
   page shows visitors this notice instead of itself. */
.gate, .gate-chip { display: none; }
html.gate-on:not(.gate-open) body > :not(.gate) { display: none !important; }
html.gate-on:not(.gate-open) .gate {
  display: grid; place-items: center; min-height: 100vh; min-height: 100svh;
  padding: 48px var(--gutter);
  background: radial-gradient(900px 520px at 50% 42%, rgba(138, 56, 255, .10), transparent 70%), var(--slate);
}
.gate-box { max-width: 34rem; text-align: center; }
.gate-logo { width: 96px; height: 96px; margin: 0 auto 28px; }
.gate h1 {
  margin: 0 0 18px; font: 700 clamp(30px, 5.2vw, 46px)/1.08 var(--display);
  font-stretch: 110%; letter-spacing: -0.01em; text-wrap: balance;
}
.gate p { margin: 0 0 6px; color: #cfd5e2; }
.gate .gate-de { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.gate-links { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gate-links .btn { padding: 11px 16px; font-size: 15px; }
.gate-legal { display: flex; justify-content: center; gap: 22px; font-size: 14px; }
.gate-legal a { color: var(--muted); }
.gate-legal a:hover { color: var(--ink); }
html.gate-on.gate-open .gate-chip {
  display: flex; align-items: center; gap: 12px; position: fixed; left: 16px; bottom: 16px; z-index: 50;
  padding: 8px 8px 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raised); color: var(--muted); font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
.gate-chip button {
  font: 600 14px/1 var(--body); color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; cursor: pointer;
}
.gate-chip button:hover { border-color: var(--muted); }
