/* Tokens mirror src/styles/index.css; keep both in sync by hand. */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelify-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('/fonts/silkscreen-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f6eedc;
  --surface: #fff8e8;
  --sunken: #eadfc4;
  --ink: #2b2118;
  --ink2: #5c4a39;
  --line: #2b2118;
  --shadow: #2b2118;
  --gold: #e8b23a;
  --gold-press: #d29a26;
  --on-gold: #2b2118;
  --leaf-ink: #36703a;
  --grain: rgb(43 33 24 / 0.07);
  --title: 'Pixelify Sans', ui-sans-serif, system-ui, sans-serif;
  --label: 'Silkscreen', ui-sans-serif, system-ui, sans-serif;
  --body: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c2140;
    --surface: #272e58;
    --sunken: #141834;
    --ink: #f2e6cc;
    --ink2: #b9b0c9;
    --line: #0a0c1f;
    --shadow: #0a0c1f;
    --leaf-ink: #8fd184;
    --grain: rgb(242 230 204 / 0.05);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--grain) 0.8px, transparent 1px),
    radial-gradient(var(--grain) 0.8px, transparent 1px);
  background-size:
    6px 6px,
    10px 10px;
  background-position:
    0 0,
    3px 5px;
}

a {
  color: inherit;
}

img,
.pixelated {
  image-rendering: pixelated;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1,
h2,
h3 {
  font-family: var(--title);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
}
h2 {
  font-size: 1.75rem;
}
h3 {
  font-size: 1.25rem;
}

.label {
  font-family: var(--label);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
}

/* 2 px stepped border with a hard drop shadow, as the app's `px` utility. */
.px {
  background: var(--surface);
  box-shadow:
    0 -2px 0 0 var(--line),
    0 2px 0 0 var(--line),
    -2px 0 0 0 var(--line),
    2px 0 0 0 var(--line),
    2px 4px 0 0 var(--shadow),
    4px 2px 0 0 var(--shadow);
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--title);
  font-size: 1.5rem;
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
}
nav.lang {
  display: flex;
  gap: 0.5rem;
  font-family: var(--label);
  font-size: 0.75rem;
}
nav.lang a {
  padding: 0.25rem 0.5rem;
  text-decoration: none;
}
nav.lang a[aria-current='true'] {
  background: var(--gold);
  color: var(--on-gold);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--title);
  font-size: 1.125rem;
  text-decoration: none;
  background: var(--gold);
  color: var(--on-gold);
  box-shadow:
    0 -2px 0 0 var(--line),
    0 2px 0 0 var(--line),
    -2px 0 0 0 var(--line),
    2px 0 0 0 var(--line),
    2px 4px 0 0 var(--shadow),
    4px 2px 0 0 var(--shadow);
}
.btn:hover {
  background: var(--gold-press);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow:
    0 -2px 0 0 var(--line),
    0 2px 0 0 var(--line),
    -2px 0 0 0 var(--line),
    2px 0 0 0 var(--line);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 3rem;
}
@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
  }
}
.hero p.lead {
  font-size: 1.25rem;
  color: var(--ink2);
  margin: 0 0 1.5rem;
}
.hero .art {
  display: flex;
  justify-content: center;
}
.hero .art img {
  width: min(16rem, 70vw);
  height: auto;
}
.demo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--title);
  font-size: 1.25rem;
  background: var(--surface);
  box-shadow:
    0 -2px 0 0 var(--ink),
    0 2px 0 0 var(--ink),
    -2px 0 0 0 var(--ink),
    2px 0 0 0 var(--ink),
    inset 2px 2px 0 0 var(--sunken);
}
.demo span {
  color: var(--ink2);
}

section {
  padding: 2rem 0;
}
.grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 40rem) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
}
.card {
  padding: 1.25rem;
}
.card img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
}
.card p {
  margin: 0;
  color: var(--ink2);
}
.plan .price {
  font-family: var(--title);
  font-size: 2rem;
  margin: 0.25rem 0;
}
.plan .price small {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--ink2);
}
.plan ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}
.plan.pro {
  background: var(--sunken);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 2rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
th,
td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--sunken);
}
thead th {
  font-family: var(--label);
  font-size: 0.75rem;
  text-transform: uppercase;
}
tbody th {
  font-weight: 600;
}

.cta {
  text-align: center;
  padding: 3rem 0;
}

main.doc {
  max-width: 44rem;
  padding-bottom: 3rem;
}
main.doc h2 {
  margin-top: 2rem;
}
.draft {
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
}

footer.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 2px solid var(--sunken);
  color: var(--ink2);
  font-size: 0.9rem;
}
footer.site nav {
  display: flex;
  gap: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .bob {
    animation: bob 2s steps(2, end) infinite;
  }
  @keyframes bob {
    50% {
      transform: translateY(-6px);
    }
  }
}

footer.site nav a {
  display: inline-block;
  padding: 0.75rem 0;
}
