/* The landing page at / and /welcome (docs/frontpage/SPEC.md §5, §8): calm, fast and plainly about math, in words only:
   no picture of the app (Nate, Dec 2). The colours are the board's: its paper, its ink, its selection blue.
   src/front/page.test.ts checks their contrast. */
:root {
  --paper: #fbfaf7;
  --card: #ffffff;
  --ink: #1f2329;
  --ink-soft: #3d4350;
  --line: #d9dbe1;
  --accent: #1d4ed8;
  --accent-dark: #1e3a8a;
  --accent-tint: #dbe6ff;
  --on-accent: #ffffff;
  --focus: #1d4ed8;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 20px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

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

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The skip link: off screen until it has focus, then a full-size target. */
.skip {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

.top {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.button.main {
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--accent);
}

.button.main:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.second {
  background: var(--card);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.button.second:hover {
  background: var(--accent-tint);
}

.hero {
  padding-top: 48px;
  padding-bottom: 40px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  max-width: 14em;
}

h2 {
  font-size: clamp(28px, 3.2vw, 38px);
}

h3 {
  font-size: 24px;
}

p {
  margin: 0 0 16px;
  max-width: 34em;
}

.lead {
  font-size: 22px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.aside,
.note {
  color: var(--ink-soft);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* .who is the privacy, connector and not-found pages' one section. */
.part,
.who,
.closing {
  padding-top: 56px;
}

/* Short pieces side by side where there is room, one under another on a phone. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 20px;
  margin-top: 28px;
}

.cards.two {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
}

.cards.three {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.card {
  min-width: 0;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.card p {
  font-size: 18px;
}

.card p:last-child {
  margin-bottom: 0;
}

/* What is coming sits on its own band, so it never reads as what is live. */
.band {
  margin-top: 56px;
  padding: 56px 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band .card {
  background: var(--paper);
}

.points {
  margin: 0;
  padding-left: 1.2em;
  max-width: 34em;
}

.points li {
  margin-bottom: 10px;
}

.closing {
  padding-bottom: 56px;
}

.foot {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 32px 0 40px;
  font-size: 18px;
}

/* A full-size target, though it sits in a sentence (§5: every link at least 44×44). */
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

/* A phone: the header's two buttons stay beside the name. */
@media (max-width: 480px) {
  .top .button {
    padding: 10px 14px;
  }

  .brand {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
