/*
 * The Public Site's only stylesheet. Colour and radius values are the App's tokens
 * (frontend/src/style.css), copied rather than imported: the site is built by Python,
 * not by Vite, and a shared build would drag the SPA's bundle in to draw a paragraph.
 * When a token changes there, change it here too — two palettes is the failure this
 * file exists to prevent.
 */
:root {
  --surface: #f7f5ef;
  --raised: #fffdf8;
  --ink: #201d18;
  --soft: #5f5a50;
  --accent: #3f6b4a;
  --accent-ink: #f7f5ef;
  --symptom: #a8621f;
  --line: #e2dcd0;
  --radius: 14px;
  --measure: 38rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #161512;
    --raised: #1e1d19;
    --ink: #efeae0;
    --soft: #b3ada1;
    --accent: #9ac7a6;
    --accent-ink: #161512;
    --symptom: #eaba74;
    --line: #302e28;
  }
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--raised);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 10;
}

/* Navigation */
.nav {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 3.75rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--soft);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--ink);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.button.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

/* Hero: the one place the page raises its voice. */
.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--symptom);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--soft);
  max-width: var(--measure);
  margin: 0;
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 4rem 0 3rem;
  }
}

/* Prose */
.prose {
  max-width: 52rem;
  padding-bottom: 4rem;
}

.prose > * {
  max-width: var(--measure);
}

.prose > .hero,
.prose > .shot,
.prose > .shot-grid,
.prose > .cards,
.prose > .steps,
.prose > table {
  max-width: none;
}

.prose > h1 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
}

.prose > h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 3rem 0 0.75rem;
}

.prose > h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
}

.prose p,
.prose li {
  color: var(--ink);
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose blockquote,
.note {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--symptom);
  background: var(--raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--soft);
}

.prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

/* Screenshots */
.shot {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.shot img {
  width: min(100%, 20rem);
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px -25px rgb(0 0 0 / 0.55);
  background: var(--raised);
}

.shot figcaption {
  font-size: 0.88rem;
  color: var(--soft);
  text-align: center;
  max-width: 30rem;
}

.shot-grid {
  display: grid;
  gap: 2rem 1.75rem;
  margin: 2.5rem auto;
  max-width: 46rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.shot-grid .shot {
  margin: 0;
}

/* Cards and steps */
.cards {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.cards li {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.cards strong {
  display: block;
  margin-bottom: 0.3rem;
}

.cards p {
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.steps h3 {
  margin: 0 0 0.15rem;
}

/* Prices: one card, because there is one plan. */
.price {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  margin: 2rem 0;
}

.price .amount {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.25rem 0;
}

.price .amount small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--soft);
  letter-spacing: 0;
}

.price ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

/* FAQ */
.prose details {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
  max-width: var(--measure);
}

.prose details:last-of-type {
  border-bottom: 1px solid var(--line);
}

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

.prose summary::marker {
  color: var(--accent);
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.92rem;
}

.foot-inner {
  display: grid;
  gap: 1rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.foot a {
  color: var(--soft);
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.muted {
  color: var(--soft);
  margin: 0;
}

.not-found {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

/* A phone cannot hold the brand, three links and a button: the links move to the
   footer, where every one of them also appears, and the button stays. */
@media (max-width: 40rem) {
  .nav-links {
    display: none;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .hero {
    padding-top: 1.75rem;
  }
}
