/* Colours follow the app's tokens in src/frontend/css/variables.css. */
:root {
  color-scheme: light;
  --color-primary: #e8710a;
  --color-primary-dark: #c05708;
  --color-primary-soft: #fdefe0;
  --color-primary-border: #f6d4b0;
  --color-secondary-dark: #0b7a5b;
  --color-background: #f7f5f2;
  --color-surface: #ffffff;
  --color-text: #22303c;
  --color-text-muted: #64757f;
  --color-border: #e7e2db;
  --color-button-text: #ffffff;
  /* primary-dark, not primary: white on #e8710a is only 3:1. */
  --color-button-bg: #c05708;
  --color-button-bg-hover: #a14806;
  --color-focus-ring: rgba(232, 113, 10, 0.35);
  --shadow-sm: 0 1px 3px rgba(24, 32, 40, 0.08), 0 1px 2px rgba(24, 32, 40, 0.04);
  --shadow-md: 0 4px 14px rgba(24, 32, 40, 0.10), 0 1px 3px rgba(24, 32, 40, 0.06);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --radius-md: 0.75rem;
  --radius-lg: 1.125rem;
  --radius-pill: 9999px;
  --gutter: 1rem;
  --max-width: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-primary: #f0813a;
    --color-primary-dark: #ffa35c;
    --color-primary-soft: #2b1d12;
    --color-primary-border: #56331a;
    --color-secondary-dark: #57d9ae;
    --color-background: #14181c;
    --color-surface: #1b2026;
    --color-text: #e9edf0;
    --color-text-muted: #a3aeb7;
    --color-border: #2c343c;
    --color-button-text: #14181c;
    --color-button-bg: #f0813a;
    --color-button-bg-hover: #ffa35c;
    --color-focus-ring: rgba(240, 129, 58, 0.45);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-background);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3 { line-height: 1.2; margin: 0; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Hero */
.hero {
  background: var(--color-primary-soft);
  border-bottom: 1px solid var(--color-primary-border);
  padding: calc(2rem + env(safe-area-inset-top)) 0 2.5rem;
  text-align: center;
}

.hero__inner { display: flex; flex-direction: column; align-items: center; }

.hero__logo {
  width: 11rem;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
}

.hero__pitch {
  font-size: 1.2rem;
  color: var(--color-text);
  max-width: 28rem;
  margin: 0.5rem 0 1.5rem;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 24rem;
  margin: 0.75rem 0 0;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease;
}

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

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--color-focus-ring);
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
}

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

/* Sections */
.section { padding: 2.5rem 0; }

.section--alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section__title { font-size: 1.5rem; }

.section__lead {
  color: var(--color-text-muted);
  margin: 0.5rem 0 1.5rem;
  max-width: 40rem;
}

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

.point {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.point__icon { font-size: 1.5rem; }

.point__title { font-size: 1.125rem; margin: 0.25rem 0 0.375rem; }

.point p { margin: 0; color: var(--color-text-muted); }

/* Install hints */
.hints { display: grid; gap: 0.75rem; }

.hint {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  background: var(--color-background);
}

.hint__title { font-size: 1rem; }

.hint p { margin: 0.25rem 0 0; }

.hint--current {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.hint--current .hint__title::after {
  content: ' · your device';
  font-weight: 400;
  color: var(--color-primary-dark);
}

.hints__more {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 1rem 0 1.5rem;
}

.hints__cta { margin: 0; text-align: center; }

/* Footer */
.footer {
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

.footer p { margin: 0.25rem 0; }

.footer__small { font-size: 0.8125rem; }

@media (min-width: 40rem) {
  .hero { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .hero__logo { width: 13rem; }
  .hero__title { font-size: 3rem; }
  .points { grid-template-columns: 1fr 1fr; }
  .hints { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
