/* Design tokens: approved in the design brief (see docs/decisions.md). */
:root {
  --bg: #FFFFFF;
  --ink: #24272C;
  --ink-soft: #5B616B;
  --accent: #A9D6EE;       /* button fill, with ink text on it */
  --accent-text: #2A76A0;  /* "you", links, focus outlines */
  --card-border: #E5E8EC;
  --card-shadow: 0 1px 2px rgba(36, 39, 44, 0.04), 0 8px 24px rgba(36, 39, 44, 0.05);
  --radius: 20px;
  --pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
}

/* Layout: one narrow, left-aligned column, centered on wide screens. */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 16px 24px;
  display: grid;
  gap: 20px;
}

h1,
h2,
p {
  margin: 0;
  max-width: 65ch;
}

/* Hero */
.hero {
  padding: 8px 8px 20px;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.accent,
.brand {
  color: var(--accent-text);
}

.subhead {
  margin-top: 16px;
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 28px 24px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

/* How Actve works: steps with label-style tags */
.steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--pill);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}

/* Signup form */
.signup {
  display: grid;
  gap: 16px;
}

.field-label {
  font-weight: 600;
  margin-bottom: -8px;
}

input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.button {
  min-height: 52px;
  padding: 12px 28px;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--accent);
}

/* Secondary style: an outlined pill, used for links that look like buttons. */
.button-secondary {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink-soft);
  text-decoration: none;
}

.prose > .actions {
  margin-top: 28px;
}

/* Text for screen readers only (e.g. "opens in a new tab"). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 4px 0 0;
  accent-color: var(--accent-text);
}

.note {
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* Links share the blue used for "Actve", so they are always underlined. */
a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 2px;
}

/* Privacy notice: longer reading text inside cards */
.back {
  margin-bottom: 24px;
}

.updated {
  margin-top: 12px;
}

.prose > * + * {
  margin-top: 14px;
}

.prose > h2 + * {
  margin-top: 0;
}

h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.prose > h3 {
  margin-top: 24px;
}

.prose ul {
  margin-bottom: 0;
  padding-left: 1.25em;
  max-width: 65ch;
}

.prose li + li {
  margin-top: 8px;
}

/* Footer */
.nowrap {
  white-space: nowrap;
}

.footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* Wider screens */
@media (min-width: 640px) {
  .page {
    padding-top: 96px;
    gap: 24px;
  }

  h1 {
    font-size: 3rem;
  }

  .subhead {
    font-size: 1.1875rem;
  }

  .card {
    padding: 40px;
  }

  .button-primary {
    justify-self: start;
  }
}

/* Motion: cards fade in once as they appear.
   Only active when fade.js has added the "js" class, so with
   JavaScript off (or reduce motion on) everything is simply visible. */
.js .reveal {
  opacity: 0;
  transition: opacity 350ms ease-out;
}

.js .reveal.is-visible {
  opacity: 1;
}

/* When printing, show every card, even ones not scrolled to yet. */
@media print {
  .js .reveal {
    opacity: 1;
    transition: none;
  }
}
