/* Colors match the app (src/client/styles/app.css) so both feel like one
   product. */
:root {
  --background: oklch(95.5% 0 0);
  --foreground: oklch(20% 0 0);
  --card: oklch(100% 0 0);
  --primary: oklch(50% 0.12 262);
  --primary-foreground: oklch(100% 0 0);
  --secondary: oklch(92% 0 0);
  --muted-foreground: oklch(20% 0 0 / 65%);
  --border: oklch(90% 0 0);
  --section-alt: oklch(97.5% 0 0);
  --radius: 0.5rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(18% 0 0);
    --foreground: oklch(92% 0 0);
    --card: oklch(23% 0 0);
    --primary: oklch(66% 0.12 262);
    --primary-foreground: oklch(100% 0 0);
    --secondary: oklch(28% 0 0);
    --muted-foreground: oklch(92% 0 0 / 65%);
    --border: oklch(30% 0 0);
    --section-alt: oklch(20.5% 0 0);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

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

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow {
  max-width: 44rem;
}

.center {
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.75rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.header-nav a,
.link-quiet {
  color: var(--muted-foreground);
  text-decoration: none;
}

.header-nav a:hover,
.link-quiet:hover {
  color: var(--foreground);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
}

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

.button-primary:hover {
  filter: brightness(1.08);
}

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

.button-secondary:hover {
  border-color: var(--border);
}

.button-block {
  display: block;
  width: 100%;
}

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

/* Sections */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted-foreground);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.fine-print {
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.section {
  padding: 4rem 0;
}

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

.section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-lead {
  text-align: center;
  color: var(--muted-foreground);
  margin: -0.75rem 0 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.25rem;
}

.card p {
  color: var(--muted-foreground);
  margin: 0;
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 68rem;
  margin: 0 auto 1.25rem;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
}

.plan-featured {
  border-color: var(--primary);
  border-width: 2px;
}

.plan-head h3 {
  margin-bottom: 0.25rem;
}

/* .card p would otherwise shrink and grey the price. */
.plan .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
}

.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.plan-list li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.95rem;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* FAQ */
details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 0.75rem 0 0;
  color: var(--muted-foreground);
}

.cta h2 {
  margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  gap: 1.25rem;
}

.footer-inner a {
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--foreground);
}

/* Three price cards get cramped before the phone layout kicks in. */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 30rem;
  }
}

/* Phones */
@media (max-width: 720px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Legal pages */
.legal {
  padding: 3rem 0 4rem;
}
