/* The app's look: ink, paper and brass (ios/Ridewright/Assets.xcassets), Righteous for titles. */
@font-face {
  font-family: Righteous;
  src: url(/fonts/Righteous-Regular.ttf) format('truetype');
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #f3efe6;
  --card: #ffffff;
  --hairline: #e0d9ca;
  --text: #18242b;
  --muted: #5a6670;
  --link: #8a5a12;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #18242b;
    --card: #22323b;
    --hairline: #2e3f48;
    --text: #f3efe6;
    --muted: #9faab0;
    --link: #e2b56e;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

header.site,
main,
footer {
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  font-family: Righteous, system-ui, sans-serif;
  font-size: 1.5rem;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a[aria-current='page'] {
  color: inherit;
  text-decoration: none;
}

.brand img,
.app-icon {
  border-radius: 22.5%;
  /* The icon's ground is the dark page colour; the hairline keeps its edge visible. */
  box-shadow: 0 0 0 1px var(--hairline);
}

h1,
h2,
h3 {
  font-family: Righteous, system-ui, sans-serif;
  font-weight: normal;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
}

h2 {
  margin-top: 2.25rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

.hero {
  padding-block: 1.5rem 0.5rem;
  text-align: center;
}

.lede {
  font-size: 1.2rem;
}

.muted {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
}

.cards article {
  padding: 0.25rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--card);
}

.cards h3 {
  margin-block: 1rem 0;
}

footer {
  margin-top: 3rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0.25rem 0;
}
