/* Crowlo website. One stylesheet, no build step.
   Colours come from lib/core/theme/app_colors.dart (light and dark).
   Fonts are the app's own, self-hosted (OFL, licences in /fonts/). */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f5f3fa;
  --surface: #ffffff;
  --ink: #1b1e38;
  --muted: #5d6087;
  --line: #dcd8ec;
  --accent: #5b4fc4;
  --accent-deep: #43389f;
  --accent-soft: #e6e2fa;
  --on-accent: #ffffff;
  --gold: #f3b93c;
  --gold-soft: #fdf0d2;
  --good: #18786d;
  --good-soft: #d6f1ec;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12132a;
    --surface: #1c1e3a;
    --ink: #ecebf8;
    --muted: #a3a5c8;
    --line: #2e3157;
    --accent: #9a8ff0;
    --accent-deep: #b3abf5;
    --accent-soft: #2c2860;
    --on-accent: #12132a;
    --gold: #f5c65c;
    --gold-soft: #3b301a;
    --good: #4cc7b6;
    --good-soft: #163d3a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 8vw, 3.4rem);
}

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

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
  color: var(--on-accent);
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  padding: 1rem 0;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.3em;
}

/* Hero */

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

.hero .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 12px 32px rgb(27 30 56 / 18%);
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: var(--measure);
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  margin: 0.5rem 0 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  line-height: 1.2;
}

.store-badge small {
  font-size: 0.85rem;
}

.store-badge strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.facts li {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

@media (min-width: 48rem) {
  .hero .wrap {
    grid-template-columns: 1fr auto;
  }

  .hero-icon {
    width: 192px;
    height: 192px;
    border-radius: 42px;
    order: 2;
  }

  .hero {
    padding: 4rem 0 5rem;
  }
}

/* Sections */

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.section > .wrap > p,
.section > .wrap > ul {
  max-width: var(--measure);
}

.cards {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  counter-reset: unit;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

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

.units .card {
  counter-increment: unit;
}

.units .card h3::before {
  content: "Unit " counter(unit);
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

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

@media (min-width: 64rem) {
  .cards.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
  counter-reset: step;
  max-width: var(--measure);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 800;
}

.steps p {
  margin: 0.35rem 0 0;
}

.note {
  max-width: var(--measure);
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
}

.note p:last-child {
  margin-bottom: 0;
}

.privacy-line {
  max-width: var(--measure);
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--good-soft);
  font-size: 1.1rem;
}

.privacy-line p {
  margin: 0;
}

/* Long-form pages (privacy, support) */

.page {
  padding: 2rem 0 4rem;
}

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

.prose h2 {
  margin-top: 2.2rem;
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose li {
  margin-bottom: 0.35em;
}

.meta {
  color: var(--muted);
}

.fill-me {
  background: var(--gold-soft);
  color: var(--ink);
  padding: 0 0.25em;
  border-radius: 4px;
  font-weight: 700;
}

/* Footer */

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a {
    transition: color 0.15s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
