/* Readexa site. Colours come only from the tokens below; the contract test
   rejects a hex value anywhere else in this file. */

:root {
  /* Brand terracotta, darkened from #D97757 so text on it and in it
     reaches 4.5:1. */
  --accent: #B4532F;
  --on-accent: #FFFFFF;
  --link: #B4532F;
  --secondary: #2E7D7A;
  --bg: #FDFAF6;
  --surface: #FFFFFF;
  --text: #3C3C3C;
  --muted: #6B6560;
  --border: #E7E0D6;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --gutter: 16px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #E8906F;
    --on-accent: #1C1917;
    --link: #E8906F;
    --secondary: #6EC6C0;
    --bg: #1C1917;
    --surface: #292524;
    --text: #E8E3DC;
    --muted: #A8A29E;
    --border: #3A3532;
  }
}

@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Lora";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/lora-600.woff2") format("woff2");
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.125rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.1875rem; }

@media (min-width: 720px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
}

p { margin: 0 0 1em; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

.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(--bg);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.nav { display: flex; gap: 16px; flex-wrap: wrap; }

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 12px 0;
}

.nav a[aria-current="page"] { color: var(--link); font-weight: 600; }

/* Hero */

.hero {
  padding-top: 48px;
  padding-bottom: 32px;
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 22px;
}

.lede {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 36em;
  margin: 0 auto 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Sections */

.section { padding-top: 40px; padding-bottom: 40px; }

.section > h2 { text-align: center; margin-bottom: 24px; }

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature p { margin: 0; color: var(--muted); }

/* Screenshot strip: the strip scrolls sideways, the page never does. */

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 16px;
  margin: 0;
  list-style: none;
}

.shot {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: center;
  margin: 0;
}

.shot img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.shot figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

/* Auto margins centre the strip when it fits and fall away when it does
   not, so the first screenshot can always be scrolled to. */
.shots > li:first-child { margin-left: auto; }
.shots > li:last-child { margin-right: auto; }

.note {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
}

/* Long-form pages */

.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 0 0 1em;
}

.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.table-scroll { overflow-x: auto; }

.prose details {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.prose summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 24px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 24px 0 40px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer nav a { padding: 12px 0; }
.site-footer p { margin: 0 0 4px; }
