:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5b616e;
  --line: #e6e3dc;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121317;
    --surface: #1b1d23;
    --ink: #eeece7;
    --muted: #a3a8b3;
    --line: #2c2f37;
    --accent: #fb8c4f;
    --accent-ink: #121317;
    --accent-soft: #2a1d16;
  }
}

:root[data-theme="dark"] {
  --bg: #121317;
  --surface: #1b1d23;
  --ink: #eeece7;
  --muted: #a3a8b3;
  --line: #2c2f37;
  --accent: #fb8c4f;
  --accent-ink: #121317;
  --accent-soft: #2a1d16;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.wordmark {
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px); }
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero h1 {
  margin: 0 0 20px;
  max-width: 14em;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero p {
  max-width: 36em;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.15rem;
}
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

/* Sections */
section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lead { margin: 0 0 32px; color: var(--muted); max-width: 40em; }

/* Brand tiles: each tile sets --tile to its own colour. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.tile {
  --a: var(--tile);
  --soft: color-mix(in srgb, var(--tile) 14%, var(--surface));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgb(0 0 0 / 0.08); }
@media (prefers-reduced-motion: reduce) { .tile, .tile:hover { transition: none; transform: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile {
    --a: color-mix(in srgb, var(--tile) 65%, #ffffff);
    --soft: color-mix(in srgb, var(--tile) 22%, var(--surface));
  }
}
:root[data-theme="dark"] .tile {
  --a: color-mix(in srgb, var(--tile) 65%, #ffffff);
  --soft: color-mix(in srgb, var(--tile) 22%, var(--surface));
}
.tile-art { display: block; aspect-ratio: 16 / 9; background: var(--soft); }
.tile-art svg { display: block; width: 100%; height: 100%; }
.tile-art .a { fill: var(--a); }
.tile-art .s { fill: var(--surface); }
.tile-art .st { fill: none; stroke: var(--a); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tile-art .f { opacity: 0.35; }
.tile-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.area { margin: 0; color: var(--a); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.status { padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.status.live { background: var(--soft); color: var(--a); }
.status.soon { border: 1px dashed var(--line); color: var(--muted); }
.tile h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; font-weight: 800; }
.tile h3 img { width: 32px; height: 32px; border-radius: 8px; }
.tile p { margin: 0; }
.tile .desc { color: var(--muted); }
.tile .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 6px; font-weight: 700; }
.tile .links a { color: var(--a); }
.ext { display: inline-block; margin-left: 3px; font-size: 0.85em; text-decoration: none; }

/* Back link on pages that open in the same window */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.back:hover { border-color: var(--accent); color: var(--accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* About and contact */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px 48px;
}
.two-col p { margin: 0 0 12px; }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { font-weight: 700; text-align: right; }

/* Documents */
.doc { padding: 48px 0 64px; border-top: 0; }
.doc .wrap { max-width: 720px; }
.doc h1 { margin: 0 0 4px; font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 800; }
.doc h2 { margin: 32px 0 8px; font-size: 1.25rem; }
.updated { margin: 0 0 24px; color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

@media (max-width: 520px) {
  .site-header nav { gap: 14px; }
  .site-header nav a.hide-sm { display: none; }
}

/* Back-to-top button, bottom right */
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.08); }
.to-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
