/* Inter, latin subset, SIL Open Font License 1.1 (fonts/OFL.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --surface: #ffffff;
  --bg: #f1f1f1;
  --card: #ffffff;
  --text: #303030;
  --text2: #616161;
  --border: #ebebeb;
  --brand-fill: #007cb4;
  --brand-text: #00679b;
  --brand-surface: #f2f9ff;
  --badge-bg: #d5ebff;
  --wordmark: #00527c;
  --link: #00527c;
  --logo-main: #007cb4;
  --logo-coin: #e9a825;
  --n-surface: #fdf5e1;
  --n-fill: #e9a825;
  --n-on-fill: #3d2800;
  --n-icon: #a8730a;
  --n-text: #8a5a00;
  --shadow: 0px 8px 16px -4px rgba(26, 26, 26, 0.22);
  --bevel: 1px 0 0 0 rgba(0, 0, 0, 0.13) inset, -1px 0 0 0 rgba(0, 0, 0, 0.13) inset, 0 -1px 0 0 rgba(0, 0, 0, 0.17) inset, 0 1px 0 0 rgba(204, 204, 204, 0.5) inset;
  --input-bg: #fdfdfd;
  --input-border: #8a8a8a;
  --crit: #b42318;
  --btn-bg: linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, 0.15) 100%), #007cb4;
  --btn-shadow: 0px -1px 0px 1px rgba(0, 58, 90, 0.8) inset, 0px 0px 0px 1px rgba(0, 103, 155, 0.8) inset, 0px 0.5px 0px 1.5px rgba(255, 255, 255, 0.251) inset;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #131d23;
    --bg: #0c1418;
    --card: #1b2830;
    --text: #e8f2f7;
    --text2: #9fb1bb;
    --border: #26343d;
    --brand-fill: #0f7fb8;
    --brand-text: #8fd0f0;
    --brand-surface: #15303f;
    --badge-bg: #1d4258;
    --wordmark: #e8f2f7;
    --link: #8fd0f0;
    --logo-main: #5bb8e8;
    --logo-coin: #f2b84a;
    --n-surface: #2a2414;
    --n-fill: #f2b84a;
    --n-on-fill: #2b1d00;
    --n-icon: #f2b84a;
    --n-text: #f4c86a;
    --shadow: 0px 8px 16px -4px rgba(0, 0, 0, 0.55);
    --bevel: 0 0 0 1px rgba(255, 255, 255, 0.07) inset;
    --input-bg: #0c1418;
    --input-border: #5c6f7a;
    --crit: #ff8a80;
    --btn-bg: linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, 0.12) 100%), #0f7fb8;
    --btn-shadow: 0px -1px 0px 1px rgba(0, 30, 50, 0.8) inset, 0px 0.5px 0px 1.5px rgba(255, 255, 255, 0.18) inset;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--brand-fill); outline-offset: 2px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.brand svg { width: 27px; height: 27px; }
.brand span { font-weight: 700; font-size: 20px; letter-spacing: -0.045em; line-height: 1; color: var(--wordmark); white-space: nowrap; }
.logo-main { fill: var(--logo-main); }
.logo-coin { fill: var(--logo-coin); }
.logo-cut { fill: none; stroke: var(--surface); stroke-width: 2.8; stroke-linecap: round; }
.logo-tail { fill: none; stroke: var(--logo-main); stroke-width: 2.5; stroke-linecap: round; }
.nav-link { font-size: 14px; font-weight: 550; text-decoration: none; padding: 12px 0; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 40px; padding: 24px var(--gutter) 0; }
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.8px; text-wrap: balance; }
.lede { font-size: 16px; line-height: 24px; color: var(--text2); text-wrap: pretty; }
.note { font-size: 14px; line-height: 20px; color: var(--text2); }

/* Signup form */
#signup { display: flex; flex-direction: column; gap: inherit; }
.signup { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
input[type="email"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 18px;
}
input[type="email"]::placeholder { color: #8a8a8a; }
input[type="email"]:focus-visible { outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--crit); }
.field-error, .form-error { font-size: 14px; line-height: 20px; color: var(--crit); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.button:disabled { opacity: 0.7; cursor: progress; }
.text-button {
  padding: 12px 0;
  border: none;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}

/* Status panel (joined, confirmed) */
.status {
  margin-top: 8px;
  padding: 20px;
  border-radius: 12px;
  background: var(--n-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.status:focus { outline: none; }
.status-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--n-fill);
  color: var(--n-on-fill);
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-body { display: flex; flex-direction: column; gap: 4px; padding-top: 1px; }
.status h2, .status h1 { font-size: 18px; line-height: 24px; font-weight: 650; }
.status p { font-size: 15px; line-height: 22px; color: var(--text2); }
.status strong { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.status .text-button { padding: 0; margin-top: 8px; }

/* Illustration */
.art { border-radius: 20px; background: var(--bg); padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; margin: 0 -8px; }
.nudge-card {
  transform: rotate(-1.5deg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  min-height: 340px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--bevel), var(--shadow);
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-icon { width: 64px; height: 64px; border-radius: 12px; background: var(--brand-surface); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.badge { padding: 2px 8px; border-radius: 8px; background: var(--badge-bg); color: var(--brand-text); font-size: 12px; line-height: 16px; font-weight: 550; }
.card-title { margin-top: 8px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.2px; text-wrap: balance; }
.card-text { font-size: 16px; line-height: 24px; color: var(--text2); text-wrap: pretty; }
.card-spacer { flex: 1; }
.card-amount { display: flex; align-items: baseline; gap: 6px; }
.card-amount span:first-child { font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.54px; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.card-amount span:last-child { font-size: 14px; color: var(--text2); }
.card-hints { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); margin-left: 24px; }
.toast-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--n-surface); color: var(--n-icon); display: flex; align-items: center; justify-content: center; }
.toast-body { display: flex; flex-direction: column; gap: 2px; }
.toast-label { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--n-text); }
.toast-text { font-size: 14px; line-height: 20px; }

/* How it works */
.how { margin-top: 40px; padding: 40px 16px 48px; background: var(--bg); display: flex; flex-direction: column; gap: 20px; }
.how-heading { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); }
.how h2 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.4px; }
.steps { list-style: none; margin: 0; background: var(--card); border-radius: 12px; box-shadow: var(--bevel); padding: 4px 16px; }
.steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.step-num { width: 32px; height: 32px; border-radius: 999px; background: var(--brand-fill); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.step-body { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.steps h3 { font-size: 16px; line-height: 22px; font-weight: 650; }
.steps p { font-size: 15px; line-height: 22px; color: var(--text2); }

/* Footer */
.site-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--gutter) 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
}
.site-footer a { color: var(--text2); padding: 12px 0; }

/* Single-message pages (confirm, 404) and prose (privacy) */
.page { width: 100%; max-width: 568px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.6px; text-wrap: balance; }
.page-state { display: flex; flex-direction: column; gap: 16px; }
.page-state:focus { outline: none; }
.page > p, .page-state > p:not(.form-error) { font-size: 16px; line-height: 24px; color: var(--text2); text-wrap: pretty; }
.page .button { align-self: flex-start; }
.page .status { margin-top: 0; }
.page .status h1 { font-size: 22px; line-height: 28px; letter-spacing: -0.2px; }

.prose { max-width: 768px; gap: 12px; }
.prose h2 { margin-top: 20px; font-size: 20px; line-height: 28px; font-weight: 650; }
.prose p, .prose li { font-size: 16px; line-height: 24px; color: var(--text2); }
.prose ul { margin: 0; padding-left: 20px; }
.prose strong { color: var(--text); font-weight: 600; }

/* Desktop */
@media (min-width: 960px) {
  :root { --gutter: max(56px, calc((100% - 1088px) / 2)); }
  .site-header { padding-top: 24px; padding-bottom: 24px; }
  .brand { gap: 6px; }
  .brand svg { width: 32px; height: 32px; }
  .brand span { font-size: 24px; }
  .nav-link { padding: 0; }

  .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 56px var(--gutter) 88px; }
  .hero-copy { gap: 20px; }
  .hero h1 { font-size: 56px; line-height: 60px; letter-spacing: -1.5px; }
  .lede { max-width: 520px; font-size: 18px; line-height: 28px; }
  .signup, .status { max-width: 520px; margin-top: 12px; }
  .fields { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; }
  .fields input { grid-column: 1; grid-row: 1; }
  .fields button { grid-column: 2; grid-row: 1; }
  .fields .field-error { grid-column: 1 / -1; }
  .hero .status { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }

  .art { position: relative; height: 540px; margin: 0; padding: 0; display: block; }
  .nudge-card { position: absolute; left: 36px; right: 72px; top: 44px; transform: rotate(-2deg); }
  .toast { position: absolute; right: 24px; bottom: 24px; width: 300px; margin: 0; }

  .how { margin-top: 0; padding: 72px var(--gutter) 88px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: start; }
  .how-heading { gap: 8px; padding: 0; }
  .how h2 { font-size: 36px; line-height: 44px; letter-spacing: -0.6px; }
  .steps { padding: 8px 24px; }
  .steps li { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 20px 0; }
  .step-num { width: 40px; height: 40px; font-size: 15px; }
  .step-body { gap: 4px; padding-top: 2px; }
  .steps h3 { font-size: 18px; line-height: 24px; }
  .steps p { font-size: 16px; line-height: 24px; }

  .site-footer { padding-top: 20px; padding-bottom: 28px; }
  .site-footer a { padding: 0; }

  .page { padding-top: 72px; padding-bottom: 96px; }
  .page h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.8px; }
}
