/*
 * Styles for the static site at manifestiny.app (landing, tester pages, 404). Colours and type come from
 * src/theme/tokens.ts. Keep the two in step.
 */
@font-face {
  font-family: 'Geist';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Geist_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Geist';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Geist_600SemiBold.ttf') format('truetype');
}

:root {
  --bg: #f4f5f3;
  --surface: #fbfbfa;
  --surface-raised: #fffffe;
  --text: #1c1f1d;
  --text-muted: #5c6460;
  --border: #e1e4e1;
  --border-strong: #c9cec9;
  --accent: #1f6a4e;
  --accent-text: #f4f8f5;
  --accent-soft: #dfede5;
  --accent-soft-text: #174f3b;
  --danger: #9b3a34;
  --shadow: rgba(30, 50, 40, 0.1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131614;
    --surface: #1b1f1c;
    --surface-raised: #222723;
    --text: #eceeec;
    --text-muted: #a3aba6;
    --border: #2b302d;
    --border-strong: #3b413d;
    --accent: #63b58c;
    --accent-text: #0f1a14;
    --accent-soft: #1e3a2c;
    --accent-soft-text: #b9e1cb;
    --danger: #e08a84;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Geist',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
p,
ul {
  margin: 0 0 12px;
}
ul {
  padding-left: 20px;
}
li + li {
  margin-top: 6px;
}
strong {
  font-weight: 600;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
@media (min-width: 480px) {
  .page {
    padding: 40px 24px 64px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  font-weight: 600;
  margin: 0 0 12px;
}
@media (min-width: 480px) {
  h1 {
    font-size: 34px;
  }
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  font-weight: 600;
  margin: 0 0 8px;
}
.lede {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px var(--shadow);
  margin-bottom: 16px;
}
@media (min-width: 480px) {
  .card {
    padding: 20px;
  }
}
.card > :last-child {
  margin-bottom: 0;
}

.checklist {
  list-style: none;
  padding: 0;
}
.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.checklist li::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 6px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 32px 0 0;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin: 0 0 32px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps > li > h2 {
  margin-top: 4px;
}
.from {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--accent-soft-text);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.quiet {
  color: var(--text-muted);
  font-size: 14px;
}

/* Sign-up form: label above input, helper text under it, error under that. */
.signup {
  margin-top: 16px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.field input:focus-visible {
  border-color: var(--accent);
  border-radius: 12px;
}
.help {
  color: var(--text-muted);
  font-size: 14px;
  margin: 6px 0 0;
}
.error {
  display: none;
  color: var(--danger);
  font-size: 14px;
  margin: 6px 0 0;
}
.field input:user-invalid {
  border-color: var(--danger);
}
.field input:user-invalid ~ .error {
  display: block;
}
.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
button[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
}
@media (min-width: 480px) {
  button[type='submit'] {
    width: auto;
  }
}
button[type='submit']:hover {
  filter: brightness(1.05);
}
.signup .quiet {
  margin: 12px 0 0;
}

figure {
  margin: 16px 0 0;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fffffe;
  box-shadow: 0 4px 16px var(--shadow);
}
figcaption {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}
.wait {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 14px;
  color: var(--text-muted);
}

details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
details:last-of-type {
  border-bottom: 1px solid var(--border);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  color: var(--text-muted);
  font-weight: 400;
  font-size: 20px;
  flex: none;
}
details[open] summary::after {
  content: '\2013';
}
details p {
  margin-top: 8px;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

/* Landing page */
.hero {
  padding-top: 8px;
  margin-bottom: 40px;
}
.logo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  color: var(--accent);
}
.landing h1 {
  font-size: 36px;
  letter-spacing: -0.8px;
}
@media (min-width: 480px) {
  .landing h1 {
    font-size: 44px;
  }
}
.landing .lede {
  margin-bottom: 16px;
}
.cta {
  margin: 24px 0 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 24px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--shadow);
}
@media (min-width: 480px) {
  .button {
    width: auto;
  }
}
.button:hover {
  filter: brightness(1.05);
}
.landing section {
  margin-bottom: 32px;
}
.points {
  list-style: none;
  counter-reset: point;
  padding: 0;
  margin: 0;
}
.points li {
  counter-increment: point;
  position: relative;
  padding-left: 44px;
  margin: 0 0 20px;
}
.points li::before {
  content: counter(point);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.points h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 3px 0 4px;
}
.points p {
  color: var(--text-muted);
  margin: 0;
}
