:root {
  color-scheme: light dark;
  /* The blue and the neutrals of the app (frontend/src/index.css) */
  --primary: oklch(0.546 0.245 262.881);
  --primary-foreground: oklch(0.985 0 0);
  --primary-text: oklch(0.488 0.243 264.376);
  --background: oklch(1 0 0);
  --surface: oklch(0.97 0.014 254.604);
  --foreground: oklch(0.145 0 0);
  --muted: oklch(0.45 0 0);
  --border: oklch(0.922 0 0);
  --radius: 0.625rem;
  --shadow: 0 12px 32px oklch(0.3 0.05 262 / 16%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: oklch(0.546 0.245 262.881);
    --primary-text: oklch(0.809 0.105 251.813);
    --background: oklch(0.145 0 0);
    --surface: oklch(0.205 0.02 262);
    --foreground: oklch(0.985 0 0);
    --muted: oklch(0.72 0 0);
    --border: oklch(1 0 0 / 14%);
    --shadow: 0 12px 32px oklch(0 0 0 / 50%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

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

a:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: 2px;
}

.wrap {
  width: min(70rem, 100% - 2rem);
  margin-inline: auto;
}

/* Top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top nav a:not(.button) {
  display: none;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.top nav a:not(.button):hover {
  color: var(--foreground);
}

@media (min-width: 48rem) {
  .top nav a:not(.button) {
    display: inline;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(0.92);
}

.button.secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}

.button.secondary:hover {
  background: var(--surface);
  filter: none;
}

/* First screen */

.hero {
  padding-block: 3.5rem;
  background: linear-gradient(var(--surface), var(--background) 70%);
}

.hero h1 {
  max-width: 48rem;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: -0.02em;
}

.lead {
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.origin {
  max-width: 38rem;
  margin-top: 1.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary);
}

/* Screenshots */

.frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--background);
  box-shadow: var(--shadow);
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame.phone {
  width: min(17rem, 100%);
  border: 6px solid var(--foreground);
  border-radius: 1.75rem;
}

.shots {
  margin: 2.5rem 0 0;
}

.shots-stage {
  position: relative;
}

.shots .phone {
  margin-inline: auto;
}

.shots .desktop-only {
  display: none;
}

.shots figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 48rem) {
  .hero {
    padding-block: 5rem 3.5rem;
  }

  .shots .desktop-only {
    display: block;
    width: 81%;
  }

  .shots .phone {
    position: absolute;
    right: 0;
    bottom: -1.5rem;
    width: 20%;
    margin: 0;
    border-width: 5px;
  }

  .shots figcaption {
    margin-top: 2.5rem;
  }
}

.feature {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: 3rem;
}

.feature h3 {
  font-size: 1.35rem;
}

.feature p {
  max-width: 32rem;
  margin-top: 0.5rem;
  color: var(--muted);
}

.feature .phone {
  justify-self: center;
}

@media (min-width: 48rem) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .feature.wide {
    grid-template-columns: 1fr 2fr;
  }
}

/* Sections */

.section {
  padding-block: 3.5rem;
  border-top: 1px solid var(--border);
}

.section > .wrap > h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.01em;
}

.intro {
  max-width: 42rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.steps,
.roles {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 62rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 3px solid var(--primary);
}

.steps li::before {
  content: counter(step);
  color: var(--primary-text);
  font-size: 1.25rem;
  font-weight: 700;
}

.steps h3,
.roles h3 {
  font-size: 1.1rem;
}

.steps p,
.roles p,
.roles ul {
  margin-top: 0.5rem;
  color: var(--muted);
}

.role {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
}

.role ul {
  padding-left: 1.1rem;
}

.handled {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
}

.handled p {
  max-width: 48rem;
  margin-top: 1rem;
}

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

@media (min-width: 40rem) {
  .rules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 62rem) {
  .rules {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rules strong,
.rules span {
  display: block;
}

.rules span {
  color: var(--muted);
  font-size: 0.95rem;
}

.role.main {
  background: var(--surface);
  border-color: transparent;
}

@media (min-width: 48rem) {
  .role.main {
    grid-column: 1 / -1;
  }

  .roles {
    grid-template-columns: repeat(2, 1fr);
  }
}

.faq {
  max-width: 48rem;
  margin-top: 1.5rem;
}

.faq details {
  border-top: 1px solid var(--border);
}

.faq details:last-child {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  padding-block: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.faq summary:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: 2px;
}

.faq details p {
  padding-bottom: 1rem;
  color: var(--muted);
}

.closing .actions {
  margin-top: 1.5rem;
}

.closing .intro {
  margin-top: 2rem;
}

.placeholder-inline {
  border-bottom: 1px dashed var(--muted);
}

.placeholder {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px dashed var(--muted);
  border-radius: var(--radius);
  color: var(--muted);
}

/* Bottom */

.bottom {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.bottom .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

/* Page not found */

.missing {
  padding-block: 5rem;
}

.missing h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}
