/* vitaimo.app: one stylesheet, system fonts only. Colors follow the app (core/design/Color.kt). */
:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-soft: #e8eaf6;
  --text: #1f2330;
  --muted: #555b6e;
  --primary: #3949ab;
  --primary-hover: #1a237e;
  --on-primary: #ffffff;
  --border: #dcdcdc;
  --field-border: #868b9a;
  --error: #b3261e;
  --success: #2e7d32;
  --radius: 16px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --surface-soft: #252a45;
    --text: #f5f5f5;
    --muted: #bdbdbd;
    --primary: #9fa8da;
    --primary-hover: #c5cae9;
    --on-primary: #1a237e;
    --border: #4d4d4d;
    --field-border: #757575;
    --error: #f2b8b5;
    --success: #a5d6a7;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

.site-header,
main,
.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 1rem;
}

.languages a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

section.hero {
  border-top: none;
}

h1,
h2 {
  overflow-wrap: break-word;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.25;
}

p {
  margin: 0 0 12px;
}

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 24px;
}

.lead {
  font-size: 1.25rem;
}

.muted {
  color: var(--muted);
}

.note,
.small {
  font-size: 1rem;
}

.note {
  color: var(--muted);
}

.tablet-art {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
}

.button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

a:focus-visible,
input:focus-visible,
select:focus-visible,
.button:focus-visible,
.form-status:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 700;
}

.needs {
  max-width: 72ch;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

#soon p {
  max-width: 72ch;
}

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

.points li {
  position: relative;
  padding-left: 28px;
}

.points li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.card {
  max-width: 720px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.form {
  display: grid;
  gap: 20px;
  max-width: 560px;
  margin-top: 16px;
}

.form[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.field > label:not(.choice),
legend {
  padding: 0;
  font-weight: 600;
}

input[type="email"],
input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  cursor: pointer;
}

.choice input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 4px 0 0;
  accent-color: var(--primary);
}

.field-error {
  margin: 0;
  color: var(--error);
  font-weight: 600;
  font-size: 1rem;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 16px;
  color: var(--success);
  font-weight: 600;
  scroll-margin: 16px;
}

.form-status.error {
  color: var(--error);
}

.form-status:empty {
  margin: 0;
}

.policy {
  max-width: 760px;
  padding-top: 16px;
  padding-bottom: 40px;
}

.policy-list {
  display: grid;
  gap: 12px;
  padding-left: 1.4em;
}

.site-footer {
  padding-top: 0;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 1rem;
}

.site-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.site-footer p {
  margin: 0 0 8px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .points {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
  }
}

/* The invite and pairing pages (invite.html, pair.html). The steps keep one column: in three, the code would wrap. */
.policy .steps {
  grid-template-columns: 1fr;
}

/* A paragraph inside a step (the Google Play button) stands apart from the step's text above it and adds nothing below
   the step's own padding. */
.policy .steps li > p {
  margin: 12px 0 0;
}

/* The code, big enough to read and type, and on one line down to a 320 px screen. */
.code {
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: clamp(1.25rem, 7vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}
