/* Landing page layout; colours, type and components come from ds.css. */

:root { --edge: clamp(1rem, 4vw, 3.5rem); }

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

/* A faint grain on the page background: z-index -1 keeps it under the content and the screenshots. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.2 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) max(var(--edge), env(safe-area-inset-right)) var(--space-4) max(var(--edge), env(safe-area-inset-left));
}
/* The logo SVG is square with the mark in the middle: crop to the mark. */
.logo img { display: block; width: 78px; height: 52px; object-fit: cover; }
.top ul { list-style: none; display: flex; gap: var(--space-4) var(--space-6); margin: 0; padding: 0; }
.top nav a { display: inline-block; padding: var(--space-2) 0; text-decoration: none; border-bottom: 1px solid transparent; }
.top nav a:hover { border-bottom-color: currentColor; }

/* The first screen: the city, darkened as the game darkens it behind its menus, with the menu laid over it. */
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(calc(100svh - 84px), 52rem); overflow: hidden; background: #000; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: brightness(0.5); }
.hero-text { position: relative; padding: var(--space-7) var(--edge) clamp(2.5rem, 7vh, 4.5rem); max-width: 70rem; }
h1 { font: 400 var(--step-3)/1.25 var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 var(--space-5); }
h1 span { display: block; }
.lede { max-width: 34rem; font-size: var(--step-1); line-height: 1.5; margin: 0 0 var(--space-6); }
.hero .menu { margin-bottom: var(--space-6); }
.note { max-width: 34rem; margin: 0; color: var(--text); opacity: 0.8; }

/* Sections read like the game's option pages: the title on the left, the content on the right. */
.sec {
  display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--space-5) var(--space-6);
  max-width: calc(var(--page-max) + 2 * var(--edge)); margin: 0 auto;
  padding: var(--space-7) var(--edge);
  border-top: 1px solid var(--line);
}
/* A bold red bar over the title column. */
.sec { background: linear-gradient(var(--red), var(--red)) var(--edge) 0 / 14rem 6px no-repeat; }
.sec > h2 { font-size: var(--step-0); margin: 0.3rem 0 0; }
.prose { max-width: var(--measure); }
.body > :first-child, .body > :first-child > :first-child { margin-top: 0; }

h3.caps { font-size: var(--step--1); margin: 0 0 var(--space-2); }
.sub { margin-top: var(--space-6) !important; }

.shot { margin: var(--space-6) 0; }
.shot img { display: block; width: 100%; background: #000; }
figcaption { margin-top: var(--space-2); font-size: var(--step--1); color: var(--muted); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-6); }
.pair p { margin: 0; }

.list { padding-left: 1.1rem; list-style: square; }
.list li { margin: 0 0 var(--space-3); }
.list li::marker { color: var(--muted); }

.items { margin: 0; }
.items > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: var(--space-2) var(--space-5); padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.items > div:first-child { border-top: 0; padding-top: 0; }
.items dt { padding-top: 0.2rem; }
.items dd { margin: 0; max-width: var(--measure); }
.items dd p { margin: 0 0 var(--space-3); }
.items dd p:last-child { margin-bottom: 0; }
.shot + .items > div:first-child { padding-top: 0; }

/* A menu path, set like the game's own menu items. */
.path { font: 400 0.76em/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; }
.ui { display: block; margin-top: var(--space-4); background: #000; }

.dl { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-5); }
.dl tr { border-top: 1px solid var(--line); }
.dl tr:first-child { border-top: 0; }
.dl th, .dl td { text-align: left; vertical-align: top; padding: var(--space-5) 0; }
.dl tr:first-child > * { padding-top: 0; }
.dl th { width: 15rem; padding-right: var(--space-5); font-weight: 400; }
.dl th .caps { display: block; color: var(--text); }
.dl th .caps .icon { margin-right: 0.6em; }
.dl th .small { display: block; margin-top: var(--space-1); }
.dl td p { margin: 0 0 var(--space-2); max-width: var(--measure); }
.dl td p:last-child { margin-bottom: 0; }
.file { font-weight: 600; font-size: var(--step-1); }
.file:hover { color: var(--red); }

.aside { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); max-width: var(--measure); }
.aside p { margin: 0 0 var(--space-4); }
.files { border-collapse: collapse; font-size: var(--step--1); width: 100%; }
.files th, .files td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-4) var(--space-2) 0; border-top: 1px solid var(--line); }
.files th { font-weight: 400; color: var(--muted); white-space: nowrap; }

.foot {
  max-width: calc(var(--page-max) + 2 * var(--edge)); margin: 0 auto;
  padding: var(--space-6) var(--edge) var(--space-7);
}

@media (max-width: 56rem) {
  .sec { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-6); padding-bottom: var(--space-6); background-size: 5rem 6px; }
  .sec > h2 { font-size: var(--step-1); margin-bottom: var(--space-3); }
  .items dt { color: var(--muted); }
}
@media (max-width: 40rem) {
  .wide-only { display: none; }
  .top ul { gap: var(--space-4); }
  .top .caps { font-size: 0.75rem; letter-spacing: 0.1em; }
  .logo img { width: 60px; height: 40px; }
  .hero { min-height: 0; }
  .hero-img { object-position: 52% 50%; }
  .hero .menu a { font-size: 1rem; letter-spacing: 0.08em; }
  .pair, .items > div { grid-template-columns: minmax(0, 1fr); }
  .dl, .dl tbody, .dl tr, .dl th, .dl td { display: block; width: auto; }
  .dl th { padding: var(--space-5) 0 var(--space-2); }
  .dl td { padding-top: 0; }
  .dl tr:first-child th { padding-top: 0; }
  .files th { white-space: normal; }
}

/* Classic and enhanced, the same frame: the range input moves the divider (--pos). */
.compare { position: relative; overflow: hidden; background: #000; aspect-ratio: 796 / 448; user-select: none; cursor: ew-resize; touch-action: pan-y; }
.compare img { display: block; width: 100%; height: 100%; }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare .after::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--text);
}
.compare .tag { position: absolute; top: 0; left: 0; padding: 0.3rem 0.6rem; background: #000; color: var(--text); font-size: 0.75rem; line-height: 1.4; }
.compare .after .tag { left: auto; right: 0; }
/* Pointers go to the frame's script, which ignores vertical swipes; the input stays for the keyboard and screen readers. */
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
/* The handle on the divider, drawn by the frame since the input is invisible. */
.compare::after {
  content: "\2039\2002\203A"; position: absolute; top: 50%; left: var(--pos); transform: translate(-50%, -50%);
  padding: 0.2rem 0.5rem; background: var(--text); color: var(--bg); font: 700 1rem/1 var(--font-body); pointer-events: none;
}
.compare:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
