/* Lane Rush privacy site
   Concept: the page is a stretch of the game's road. A fixed asphalt rail
   with a dashed lane line and red/white curb runs down the left edge;
   the content reads like signage beside it. */

:root {
  color-scheme: light;
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #1f242b;
  --muted: #5b6470;
  --rule: #d5dbe2;
  --asphalt: #3a3f47;
  --lane: #f4f6f8;
  --curb-red: #d33a3a;
  --curb-white: #f4f6f8;
  --gold: #e8a800;
  --gold-soft: rgba(232, 168, 0, 0.18);
  --focus: #1f6fd1;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --rail: 72px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #2a2f36;
    --surface: #333941;
    --ink: #f1f3f5;
    --muted: #aeb6c0;
    --rule: #464d57;
    --asphalt: #1e2228;
    --lane: #d9dde2;
    --curb-white: #d9dde2;
    --gold: #f5b800;
    --gold-soft: rgba(245, 184, 0, 0.16);
    --focus: #7fb2ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- The road rail ---------- */
.road {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background:
    /* dashed centre line */
    repeating-linear-gradient(
      to bottom,
      var(--lane) 0 28px,
      transparent 28px 56px
    ) center / 4px 100% no-repeat,
    var(--asphalt);
  z-index: 0;
}

.road::after {
  /* red/white curb on the right edge of the rail */
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  bottom: 0;
  width: 8px;
  background: repeating-linear-gradient(
    to bottom,
    var(--curb-red) 0 18px,
    var(--curb-white) 18px 36px
  );
}

/* ---------- Page frame ---------- */
.page {
  position: relative;
  z-index: 1;
  margin-left: calc(var(--rail) + 8px);
  padding: 0 clamp(1.25rem, 5vw, 4.5rem);
  max-width: 1180px;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 2.5rem;
  border-bottom: 2px solid var(--rule);
}

.app-line {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  /* a gold coin-edge shadow, like the in-game logo's extrusion */
  text-shadow: 0.04em 0.05em 0 var(--gold-soft);
}

.meta {
  margin: 1.25rem 0 0;
  color: var(--muted);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 2rem;
}

.top-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 2px;
}

.top-nav a:hover {
  border-bottom-color: var(--curb-red);
}

/* ---------- Policy layout ---------- */
.policy {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: 3rem 0 2rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 1.5rem;
  font-size: 0.95rem;
}

.toc-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  border-left: 2px dashed var(--rule);
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.3rem 0 0.3rem 0.9rem;
  margin-left: -2px;
  border-left: 3px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}

.toc a::before {
  content: counter(toc);
  min-width: 1.4em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.is-active {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--gold);
}

/* ---------- Clauses ---------- */
.clauses {
  max-width: var(--measure);
}

.clause {
  padding: 0 0 2rem;
}

.clause + .clause {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.clause h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.15;
}

/* section number set like a lane marker plate */
.num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.35rem;
  border-radius: 4px;
  background: var(--asphalt);
  color: var(--lane);
  font-size: 1.15rem;
  font-style: normal;
  box-shadow: inset 0 -3px 0 var(--gold);
}

.clause p {
  margin: 0 0 1rem;
}

.clause ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.clause li {
  margin-bottom: 0.5rem;
}

.clause li::marker {
  color: var(--gold);
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: var(--gold-soft);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

main a:not(.email) {
  color: inherit;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

main a:not(.email):hover {
  text-decoration-color: var(--curb-red);
}

/* ---------- Help ---------- */
.help,
.contact {
  max-width: calc(var(--measure) + 4rem);
  padding: 3rem 0;
  border-top: 2px solid var(--rule);
}

.help h2,
.contact h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1;
}

details {
  border-bottom: 1px solid var(--rule);
}

details:first-of-type {
  border-top: 1px solid var(--rule);
}

summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1.1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold);
  color: #1f242b;
  font-weight: 700;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin: 0 0 1.25rem;
  max-width: var(--measure);
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact p {
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.email {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--gold);
  overflow-wrap: anywhere;
}

.email:hover {
  border-bottom-color: var(--curb-red);
}

.copy-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.copy-status {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 2rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer p {
  margin: 0;
}

.back-top {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Utilities and accessibility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  summary::after {
    transition: none;
  }
}

/* ---------- Small screens: the road becomes a strip across the top ---------- */
@media (max-width: 820px) {
  :root {
    --rail: 0px;
  }

  .road {
    position: absolute;
    inset: 0 0 auto 0;
    width: auto;
    height: 18px;
    background:
      repeating-linear-gradient(
        to right,
        var(--lane) 0 28px,
        transparent 28px 56px
      ) center / 100% 3px no-repeat,
      var(--asphalt);
  }

  .road::after {
    top: auto;
    right: 0;
    bottom: -6px;
    left: 0;
    width: auto;
    height: 6px;
    background: repeating-linear-gradient(
      to right,
      var(--curb-red) 0 18px,
      var(--curb-white) 18px 36px
    );
  }

  .page {
    margin-left: 0;
    padding-top: 24px;
  }

  .policy {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol {
    columns: 2;
    column-gap: 1rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

@media (max-width: 480px) {
  .toc ol {
    columns: 1;
  }

  .clause h3 {
    font-size: 1.5rem;
  }
}
