/* Palette and type are the brand tokens — values mirror
   assets/marketing/brand/tokens.json, which is generated from
   assets/marketing/src/brand.mjs. Change them there, not here.
   See assets/marketing/brand/brand-guidelines.md. */
:root {
  --ink900: #0b0f14;
  --ink800: #111821;
  --ink700: #1b2430;
  --cream: #f6f3ec;
  --slate: #8fa0b0;
  --slate-dim: #5d6b78;

  --green900: #16351f;
  --green500: #2fb56a;
  --green200: #9cebbe;

  --red900: #3a1414;
  --red700: #b02e34;
  --red500: #c94040;
  --red200: #f5b3ac;

  --radius-card: 30px;
  --radius-pill: 999px;

  --maxw: 640px;
}

* {
  box-sizing: border-box;
}

/* `display: flex` on .face/.step would otherwise beat the UA's
   [hidden] { display: none }, rendering both card faces at once. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--ink900);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding: 0 20px;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
}

section {
  padding-block: 56px;
}

section + section {
  border-top: 1px solid var(--ink700);
}

h1 {
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 800;
}

h2 {
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 20px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

p {
  margin: 0 0 12px;
}

a {
  color: inherit;
}

.masthead {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 20px;
}

.sub {
  font-size: 18px;
  color: var(--slate);
  margin-bottom: 32px;
}

.dim {
  color: var(--slate);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- demo card ---------------- */

.card-stage {
  margin-bottom: 36px;
}

.card {
  border-radius: var(--radius-card);
  padding: 24px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 180ms ease;
}

.card--green {
  background: var(--green900);
}

.card--red {
  background: var(--red900);
}

.face {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-name {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.8;
  margin: 0;
}

.big {
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

/* The streak pill, matching the ad and share-card creative. */
.pill {
  align-self: flex-start;
  margin: 4px 0 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
}

.pill--green {
  background: rgba(47, 181, 106, 0.16);
  color: var(--green200);
}

.pill--red {
  background: rgba(201, 64, 64, 0.22);
  color: var(--red200);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Unselected chips stay muted so exactly one chip reads as chosen —
   red500 against red700 is too close to tell apart, and the guidelines'
   "one accent per surface" wants the accent spent on the selection. */
.chip {
  appearance: none;
  border: 1px solid rgba(246, 243, 236, 0.14);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  background: rgba(246, 243, 236, 0.07);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
}

.chip[aria-pressed='true'] {
  background: var(--red500);
  border-color: var(--red500);
}

.consequence {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  padding: 12px;
}

.consequence {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.commit {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--cream);
  background: var(--red500);
  border-radius: 12px;
  padding: 12px 16px;
  width: 100%;
  margin-top: 4px;
}

.commit-note {
  font-size: 14px;
  color: var(--red200);
  margin: 10px 0 0;
}

.flip {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  display: block;
  margin: 14px auto 0;
  padding: 12px 20px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
}

.demo-label {
  text-align: center;
  font-size: 13px;
  color: var(--slate);
  margin: 0;
}

/* ---------------- signup ---------------- */

.signup {
  background: var(--ink800);
  border: 1px solid var(--ink700);
  border-radius: 16px;
  padding: 20px;
}

.field-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.field-row--end {
  justify-content: flex-end;
  margin-top: 12px;
}

input[type='email'],
textarea {
  flex: 1 1 200px;
  min-width: 0;
  font: inherit;
  color: var(--cream);
  background: var(--ink900);
  border: 1px solid var(--ink700);
  border-radius: 10px;
  padding: 12px 14px;
}

textarea {
  width: 100%;
  resize: vertical;
}

input[type='email']:focus,
textarea:focus {
  outline: 2px solid var(--green500);
  outline-offset: 1px;
}

button[type='submit'] {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--ink900);
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 18px;
  flex: 0 0 auto;
}

button[type='submit'][disabled] {
  opacity: 0.6;
  cursor: progress;
}

.ghost {
  appearance: none;
  background: none;
  border: 1px solid var(--ink700);
  border-radius: 10px;
  padding: 12px 18px;
  font: inherit;
  color: var(--slate);
  cursor: pointer;
}

.consent {
  font-size: 13px;
  color: var(--slate);
  margin: 12px 0 0;
}

.step-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.qualify-label {
  display: block;
  color: var(--slate);
  font-size: 15px;
  margin-bottom: 10px;
}

.done-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.form-error {
  color: var(--red200);
  font-size: 14px;
  margin: 10px 0 0;
}

/* ---------------- how it works ---------------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 14px;
}

.step-n {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green900);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}

.steps p {
  color: var(--slate);
  margin: 0;
}

.not-a {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--ink700);
  color: var(--slate);
}

.not-a em {
  color: var(--cream);
  font-style: normal;
  font-weight: 600;
}

/* ---------------- footer ---------------- */

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 0 56px;
  border-top: 1px solid var(--ink700);
  font-size: 14px;
  color: var(--slate);
}

.fine {
  margin: 0;
}

/* ---------------- privacy page ---------------- */

.prose {
  padding-block: 56px;
}

.prose h2 {
  font-size: 20px;
  margin-top: 32px;
}

.prose p,
.prose li {
  color: var(--slate);
}

.prose ul {
  padding-left: 20px;
}
