/*
 * poqui — web presence.
 * One stylesheet, no framework, no build step, no external font or CDN.
 * Palette is lifted verbatim from app/src/design/tokens.ts so the site and the app
 * are the same object. Dark mode mirrors the app's dark palette.
 */

:root {
  color-scheme: light dark;

  /* light — tokens.ts palette.light */
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1b1a18;
  --ink-muted: #6f6a62;
  --line: #e7e2da;
  --control: #8e8880;
  --cool: #4b8985;
  --warm-ink: #a85a2b;
  --glow: #e8c56a;

  --measure: 34rem;
  --gap: 1.5rem;
  --radius: 14px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* dark — tokens.ts palette.dark */
    --bg: #121110;
    --surface: #1c1a18;
    --ink: #f2eee8;
    --ink-muted: #a59f96;
    --line: #2a2724;
    --control: #726d65;
    --cool: #6fb5b0;
    --warm-ink: #e39a70;
    --glow: #ebcb7a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px, the app's body size */
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ── layout ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap--wide {
  max-width: 44rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ── masthead ───────────────────────────────────────────────────────── */

.masthead {
  padding: 1.75rem 0 0.5rem;
}

.masthead__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.mark img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
  border: 1px solid var(--line);
}

.mark span {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.625rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: 8px;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── type ───────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.15;
  font-weight: 300;
  letter-spacing: -0.015em;
  margin: 1.5rem 0 0.75rem;
  max-width: 20ch;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 2.75rem 0 0.5rem;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.375rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--ink);
  text-decoration-color: var(--control);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

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

.lede {
  font-size: 1.1875rem;
  color: var(--ink-muted);
  max-width: 32ch;
}

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

.small {
  font-size: 0.9375rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

dl {
  margin: 0 0 1rem;
}

dt {
  font-weight: 600;
  margin-top: 1rem;
}

dd {
  margin: 0.25rem 0 0;
  color: var(--ink-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ── hero ───────────────────────────────────────────────────────────── */

.hero {
  padding: 1rem 0 0;
}

.hero__icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: block;
  border: 1px solid var(--line);
}

/* ── the coin rule: one thin hairline standing in for the app's ground line ── */

.rule {
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
  border: 0;
}

/* ── blocks ─────────────────────────────────────────────────────────── */

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

.card h2,
.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.note {
  border-left: 3px solid var(--cool);
  padding: 0.125rem 0 0.125rem 1rem;
  margin: 1.25rem 0;
  color: var(--ink-muted);
}

.todo {
  display: inline-block;
  background: var(--surface);
  border: 1px dashed var(--warm-ink);
  color: var(--warm-ink);
  border-radius: 6px;
  padding: 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ── the two-column price / free comparison ─────────────────────────── */

.plans {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: 1fr;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

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

.plans > li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.plans h3 {
  margin: 0 0 0.25rem;
}

.plans p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.price {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 0.9375rem;
}

/* ── tables (processors, data) ──────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9375rem;
}

caption {
  text-align: left;
  padding: 0.75rem 0.875rem 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

/* ── call to action ─────────────────────────────────────────────────── */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  margin: 0.5rem 0 0.25rem;
}

.cta:hover,
.cta:focus-visible {
  background: var(--cool);
  color: #ffffff;
}

.cta--pending {
  background: transparent;
  color: var(--ink-muted);
  border: 1px dashed var(--control);
}

.cta--pending:hover,
.cta--pending:focus-visible {
  background: transparent;
  color: var(--ink);
}

/* ── footer ─────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  margin-top: 3.5rem;
  padding: 1.75rem 0 3rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.foot ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.foot li {
  margin: 0;
}

.foot a {
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot a:hover,
.foot a:focus-visible {
  color: var(--ink);
}

/* ── legal document furniture ───────────────────────────────────────── */

.doc-meta {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

.toc h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

section[id] {
  scroll-margin-top: 1rem;
}

/* ── faq ────────────────────────────────────────────────────────────── */

.faq h2 {
  font-size: 1.1875rem;
  margin-top: 2.25rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

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

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 999px;
  border: 1px solid var(--control);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  text-align: center;
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .nav,
  .cta,
  .skip {
    display: none;
  }
}
