:root {
  --paper: #f5efe4;
  --card: #fbf7ef;
  --ink: #201a16;
  --muted: #6b6258;
  --accent: #8a2f2a;
  --accent-ink: #fff8f0;
  --line: #dcd2c0;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17130f;
    --card: #1f1a15;
    --ink: #efe7d8;
    --muted: #a89d8c;
    --accent: #d98a7f;
    --accent-ink: #1a1210;
    --line: #3a3128;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* language switch: only the active language is shown */
html[lang="es"] .en, html[lang="en"] .es { display: none !important; }

header.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0;
}
.brand { font: 700 1.15rem var(--serif); letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.lang {
  font: 600 .85rem var(--sans);
  background: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.lang:hover { color: var(--ink); border-color: var(--muted); }

.hero { padding: 40px 0 28px; }
.hero h1 {
  font: 700 clamp(2.6rem, 11vw, 4.4rem)/1.02 var(--serif);
  letter-spacing: -.02em; margin: 0 0 14px;
}
.hero .sub { font: 1.35rem/1.4 var(--serif); margin: 0 0 8px; }
.hero .tag { color: var(--muted); margin: 0 0 28px; }

/* a shelf of spines, pure CSS */
.shelf {
  display: flex; align-items: flex-end; gap: 4px;
  height: 120px; padding: 0 6px;
  border-bottom: 6px solid var(--ink);
  margin: 8px 0 36px;
}
.shelf i { display: block; width: 18px; border-radius: 2px 2px 0 0; background: var(--c); height: var(--h); }
.shelf i:nth-child(3n) { width: 26px; }
.shelf i:nth-child(5n) { width: 14px; }
.shelf i.lean { transform: rotate(8deg); transform-origin: bottom left; margin-right: 14px; }

.wait {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px;
}
.wait h2 { font: 700 1.25rem var(--serif); margin: 0 0 4px; }
.wait p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.wait form { display: flex; gap: 8px; flex-wrap: wrap; }
.wait input[type=email] {
  flex: 1 1 220px; min-width: 0;
  font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
.wait input[type=email]:focus-visible, .lang:focus-visible, .wait button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.wait button {
  font: 700 1rem var(--sans); cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 10px; padding: 12px 20px;
}
.wait button[disabled] { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 10px 0 0; min-height: 1.4em; font-size: .95rem; }
.msg.ok { color: var(--accent); }
.msg.err { color: #b3261e; }
@media (prefers-color-scheme: dark) { .msg.err { color: #f2918a; } }

.features { display: grid; gap: 14px; margin: 36px 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feat { border-top: 2px solid var(--ink); padding-top: 12px; }
.feat h3 { font: 700 1.1rem var(--serif); margin: 0 0 6px; }
.feat p { margin: 0; color: var(--muted); font-size: .98rem; }

footer {
  border-top: 1px solid var(--line); margin-top: 48px;
  padding: 22px 0 40px; color: var(--muted); font-size: .9rem;
}
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* legal / support pages */
.doc { padding: 12px 0 8px; }
.doc h1 { font: 700 2rem/1.15 var(--serif); margin: 8px 0 4px; }
.doc h2 { font: 700 1.2rem var(--serif); margin: 28px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc .meta { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.doc ul { padding-left: 20px; }
.doc details { border-top: 1px solid var(--line); padding: 12px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--line); }
.doc summary { cursor: pointer; font-weight: 600; }
.doc details p { margin: 8px 0 0; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .wait button { transition: opacity .15s; }
}
