/* Placardex site. Colours are tokens.json's color.semantic light and dark pairs, each at or above its
   recorded contrast floor; type is Barlow Bold (headings, wordmark) and IBM Plex Mono with the slashed zero
   (codes), both SIL OFL 1.1, served unmodified from fonts/ with their licences. */
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --surface: #FFFFFF;
  --surface-raised: #F6F3F2;
  --surface-field: #EEEAE9;
  --ink: #1C1416;
  --text-secondary: #5E5356;
  --accent: #C01F28;
  --accent-fill: #C01F28;
  --on-accent: #FFFFFF;
  --control: #8A7F82;
  --separator: #E2DCDB;
  --focus: #1F5FD0;
  --plate: #C01F28;
  --display: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #121012;
    --surface-raised: #1E1A1C;
    --surface-field: #2A2528;
    --ink: #F5F1F1;
    --text-secondary: #B7ACAF;
    --accent: #FF6B70;
    --accent-fill: #D42A32;
    --on-accent: #FFFFFF;
    --control: #8E8487;
    --separator: #3A3336;
    --focus: #7FB0FF;
    --plate: #D42A32;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, .wordmark {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 0.5rem 0 1rem; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.45rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

code, .code {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-size: 0.92em;
}

.secondary { color: var(--text-secondary); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--accent-fill);
  color: var(--on-accent);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--separator);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.mark-plate { fill: var(--plate); }
.wordmark { font-size: 1.55rem; }
.site-nav a {
  margin-left: 1.1rem;
  font-weight: 600;
}
.site-nav a:first-child { margin-left: 0; }

/* Not-a-government notice */
.gov-notice {
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--control);
  border-radius: 12px;
  font-size: 0.98rem;
}
.gov-notice strong { font-weight: 700; }

/* Hero */
.hero { padding: 2.2rem 0 1.4rem; }
.lede { font-size: 1.18rem; max-width: 46rem; }
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0 1rem;
  padding: 0;
  list-style: none;
}
.cta li {
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--control);
  border-radius: 12px;
  background: var(--surface-raised);
  flex: 0 1 17rem;
}
.cta .store { display: block; font-weight: 700; }
.cta .when { display: block; color: var(--text-secondary); font-size: 0.95rem; }

section { padding: 2rem 0; border-top: 1px solid var(--separator); }

/* Proof points and features */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.cards li {
  margin: 0;
  padding: 1.1rem 1.15rem;
  background: var(--surface-raised);
  border-radius: 16px;
}
.cards p { margin: 0; color: var(--text-secondary); }

/* Screens */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--separator);
}
.shots figcaption {
  margin-top: 0.6rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.97rem;
  text-wrap: balance;
}

.quote {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent-fill);
  background: var(--surface-raised);
  border-radius: 0 12px 12px 0;
}

.sources li { word-break: break-word; }

/* Inner pages */
.page { padding: 2rem 0 1rem; max-width: 46rem; }
.page h2 { margin-top: 2rem; font-size: 1.45rem; }
.page h3 { margin-top: 1.4rem; }
.updated { color: var(--text-secondary); font-size: 0.95rem; }
.faq h2 { font-size: 1.25rem; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--separator);
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.site-footer nav a { margin-right: 1.1rem; font-weight: 600; }
.site-footer p { margin: 0.8rem 0 0; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
