/* DoiHouse website. Colors and spacing match the app (src/constants/theme.ts). */

:root {
  --text: #000000;
  --background: #ffffff;
  --background-element: #f0f0f3;
  --background-selected: #e0e1e6;
  --text-secondary: #60646c;
  --primary: #208aef;
  --danger: #d93036;
  --success: #1a7f4b;
  --radius: 16px;
  --max-width: 800px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --background: #000000;
    --background-element: #212225;
    --background-selected: #2e3135;
    --text-secondary: #b0b4ba;
    --primary: #3d9bf5;
    --danger: #ff6369;
    --success: #4cc38a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header and footer */
.site-header .container,
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-header {
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.brand svg {
  width: 32px;
  height: 32px;
}

.site-header nav a,
.site-footer nav a {
  margin-left: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.site-header nav a:hover,
.site-footer nav a:hover {
  color: var(--primary);
}

.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--background-selected);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer nav a:first-child {
  margin-left: 0;
}

/* Headings and text */
h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
  margin: 32px 0 16px;
}

h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 64px 0 16px;
}

h3 {
  font-size: 18px;
  margin: 0 0 4px;
}

.lead {
  font-size: 19px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

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

/* Cards */
.card {
  background: var(--background-element);
  border-radius: var(--radius);
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid .card p {
  margin: 0;
  color: var(--text-secondary);
}

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

.steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step);
  flex: 0 0 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chips li {
  padding: 8px 16px;
  border-radius: 32px;
  border: 1px solid var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Waitlist form */
.waitlist {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 4px;
}

.field label,
.field legend {
  font-weight: 700;
  font-size: 14px;
  padding: 0;
}

fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
}

input[type='email'],
input[type='text'] {
  min-height: 52px;
  border-radius: var(--radius);
  border: 1px solid var(--background-selected);
  background: var(--background);
  color: var(--text);
  padding: 0 16px;
  font: inherit;
}

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

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

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 32px;
  border: 1px solid var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.choice input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.choice input:checked + span::before {
  content: '✓ ';
  white-space: pre;
}

.choice input:focus-visible + span {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.button {
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0 24px;
}

.button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Hidden from people; bots fill it in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.message {
  margin: 0;
  font-weight: 500;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

/* Legal pages */
.draft-banner {
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin: 24px 0;
}

.draft-banner strong {
  color: var(--danger);
}

.legal h2 {
  font-size: 22px;
  margin-top: 40px;
}

.todo {
  background: var(--background-element);
  border-left: 4px solid var(--danger);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-style: italic;
}
