/* CAPERS public site. Colours, type and radii follow the app's design tokens (src/theme/tokens.ts). */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/DMSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/DMSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0a0c13;
  --night: #0f121c;
  --surface: #161a28;
  --surface-raised: #1e2335;
  --text: #f5f0e6;
  --text-muted: #b4b1a8;
  --text-faint: #8a8d9c;
  --lime: #c8ff3d;
  --lime-deep: #a6db1f;
  --orange: #ff8a3d;
  --orange-soft: rgba(255, 138, 61, 0.16);
  --lime-soft: rgba(200, 255, 61, 0.14);
  --border: rgba(245, 240, 230, 0.09);
  --border-strong: rgba(245, 240, 230, 0.18);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gutter: 20px;
  --max: 720px;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--lime);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--lime-deep);
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--lime);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
}

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

/* ---------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--night);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 30px;
  height: 30px;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.site-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--lime-soft);
}

/* ---------------------------------------------------------------- content */

main {
  flex: 1;
  padding: 48px 0 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  color: var(--text);
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.04;
  letter-spacing: -1.2px;
}
h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.4;
}

p {
  margin: 0 0 12px;
}
.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 34em;
}
.muted {
  color: var(--text-muted);
}
.faint {
  color: var(--text-faint);
  font-size: 14px;
}

section + section {
  margin-top: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid .card {
  padding: 20px;
}
.grid .card p {
  color: var(--text-muted);
  font-size: 15px;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.button:hover {
  background: var(--lime-deep);
  color: var(--ink);
}
.button.secondary {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.contact {
  margin-top: 28px;
}
.contact .email {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 6vw, 30px);
  letter-spacing: -0.4px;
  word-break: break-word;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-of-type {
  border-top: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 24px;
  color: var(--lime);
}
.faq details[open] summary::after {
  content: '\2013';
}
.faq .answer {
  padding: 0 0 18px;
  color: var(--text-muted);
}
.faq .answer p:last-child {
  margin-bottom: 0;
}

/* Legal pages */
.legal h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  margin-top: 32px;
}
.legal p {
  color: var(--text-muted);
}
.legal .updated {
  color: var(--text-faint);
  font-size: 14px;
}
.legal ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: var(--text-muted);
}
.legal li {
  margin-bottom: 6px;
}
mark.todo {
  background: var(--orange-soft);
  color: var(--orange);
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--night);
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--text-faint);
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--text-muted);
}
.site-footer p {
  margin: 0;
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }
  main {
    padding-top: 32px;
  }
  .card {
    padding: 20px;
  }
}
