/* ==========================================================================
   PipDarts website
   The tokens mirror pipdarts/lib/theme: neutrals plus one accent, square
   corners, solid 1.5 px edges, the platform font. No shadow, no gradient,
   no translucency.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f2f3f5;
  --surface-accent: #fdeedd;
  --ink: #111418;
  --muted: #5a626d;
  --accent: #ec6e0b;
  --accent-strong: #d9620a;
  /* The brand orange only reaches 3.1:1 on white, so small accent text uses
     a darker shade of the same hue and keeps AA contrast. */
  --accent-text: #b45309;
  --on-accent: #241203;
  --outline: #1a1d21;
  --outline-muted: #c7cbd1;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --max: 1080px;
  --edge: 1.5px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0a0c0f;
    --surface: #14171c;
    --surface-muted: #1e222a;
    --surface-accent: #2b1a0e;
    --ink: #f4f6f8;
    --muted: #a3abb7;
    --accent: #f97316;
    --accent-strong: #fb8c3c;
    --accent-text: #f97316;
    --on-accent: #1a0a09;
    --outline: #dfe3e8;
    --outline-muted: #3c434e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a0c0f;
  --surface: #14171c;
  --surface-muted: #1e222a;
  --surface-accent: #2b1a0e;
  --ink: #f4f6f8;
  --muted: #a3abb7;
  --accent: #f97316;
  --accent-strong: #fb8c3c;
  --accent-text: #f97316;
  --on-accent: #1a0a09;
  --outline: #dfe3e8;
  --outline-muted: #3c434e;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding-left: 1.25em;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: -56px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

code {
  padding: 1px 5px;
  background: var(--surface-muted);
  border: 1px solid var(--outline-muted);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas,
    monospace;
  font-size: 0.9em;
}

.mark {
  width: 100%;
  height: auto;
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: var(--edge) solid var(--outline);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-nav {
  display: none;
  gap: 24px;
  margin-left: 12px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 100ms linear;
}

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

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.lang {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lang a,
.lang span {
  color: var(--muted);
  text-decoration: none;
}

.lang [aria-current="true"] {
  color: var(--ink);
}

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

.lang-sep {
  color: var(--outline-muted);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  border: var(--edge) solid var(--outline);
  cursor: pointer;
  transition: background-color 100ms linear;
}

.icon-btn:hover {
  background: var(--surface-muted);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding-block: clamp(40px, 7vw, 88px);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

h1 {
  margin-top: 16px;
  font-size: clamp(2.75rem, 7.5vw, 5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 44ch;
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.link-arrow {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-bottom: var(--edge) solid var(--accent);
  padding-bottom: 2px;
  transition: color 100ms linear;
}

.link-arrow:hover {
  color: var(--accent-text);
}

.hero-mark {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 320px;
  margin-inline: auto;
  padding: 24px;
  background: var(--surface-muted);
  border: var(--edge) solid var(--outline);
  color: var(--ink);
}

.hero-mark .mark {
  width: min(100%, 240px);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
  }

  .hero-mark {
    width: 100%;
    max-width: none;
    justify-self: end;
  }
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  background: transparent;
  color: var(--ink);
  border: var(--edge) solid var(--outline);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 100ms linear, border-color 100ms linear,
    color 100ms linear;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-muted {
  background: var(--surface-muted);
  border-style: dashed;
  border-color: var(--outline-muted);
  color: var(--muted);
  cursor: default;
}

/* --- Claims ------------------------------------------------------------- */

.claims {
  padding-bottom: clamp(8px, 2vw, 16px);
}

.claims-grid {
  display: grid;
  gap: 16px;
}

.claim {
  padding: 24px;
  background: var(--surface);
  border: var(--edge) solid var(--outline);
  border-top: 4px solid var(--accent);
}

.claim-value {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.claim-title {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.claim-text {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .claims-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .claim + .claim {
    border-left: 0;
  }
}

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

.section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: var(--edge) solid var(--outline);
}

.section-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-title {
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-lead {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--muted);
}

/* --- Games -------------------------------------------------------------- */

.game-grid {
  display: grid;
  gap: 16px;
}

.game-card {
  padding: 24px;
  background: var(--surface);
  border: var(--edge) solid var(--outline);
  transition: background-color 100ms linear;
}

.game-card:hover {
  background: var(--surface-muted);
}

.game-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--surface-accent);
  border: var(--edge) solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
}

.game-icon svg {
  width: 28px;
  height: 28px;
}

.game-title {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.game-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Features ----------------------------------------------------------- */

.feature-list {
  display: grid;
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding-block: 20px;
  border-top: 1px solid var(--outline-muted);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
}

.feature-text {
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Closing ------------------------------------------------------------ */

.closing {
  padding-block: clamp(40px, 6vw, 72px);
  border-top: var(--edge) solid var(--outline);
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: var(--edge) solid var(--outline);
}

.closing-mark {
  width: 44px;
  height: 44px;
  color: var(--ink);
}

.closing-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.closing-text {
  margin-top: 8px;
  color: var(--muted);
}

.closing .btn {
  flex-shrink: 0;
}

@media (min-width: 760px) {
  .closing-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: var(--edge) solid var(--outline);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--ink);
}

.footer-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-note {
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

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

.footer-disabled {
  color: var(--muted);
  border-bottom: 1px dashed var(--outline-muted);
  cursor: default;
}

.footer-copy {
  width: 100%;
  font-size: 13px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .footer-copy {
    width: auto;
  }
}

/* --- Legal page --------------------------------------------------------- */

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 72px) 80px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-bottom: var(--edge) solid var(--accent);
  padding-bottom: 2px;
}

.back-link:hover {
  color: var(--ink);
}

.doc h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.05;
}

.doc-meta {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--surface-muted);
  border: var(--edge) solid var(--outline-muted);
  font-size: 14px;
  color: var(--muted);
}

.doc h2 {
  margin-top: 48px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.doc p,
.doc ul {
  margin-top: 14px;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.doc a:hover {
  color: var(--accent-text);
}

.note {
  margin-top: 28px;
  padding: 20px;
  background: var(--surface-accent);
  border: var(--edge) solid var(--accent);
}

.note p {
  margin: 0;
}

.note + p {
  margin-top: 20px;
}

@media print {
  .site-header,
  .site-footer,
  .back-link {
    display: none;
  }

  .doc {
    padding-block: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
