/* Portavoz landing — the app icon's world as an editorial dark page.
   Palette: deep slate → violet ground, warm paper text, a single amber
   accent (the waveform's peak). Type: Fraunces (display serif, SOFT axis),
   Instrument Sans (body), IBM Plex Mono (commands & measured numbers). */

:root {
  --ink: #f3f1ec;
  --ink-dim: #b9b6c4;
  --ground-0: #0e1120;
  --ground-1: #171b31;
  --violet: #5226bf;
  --amber: #fdbf47;
  --line: rgba(243, 241, 236, 0.14);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(82, 38, 191, 0.55), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(82, 38, 191, 0.25), transparent 55%),
    var(--ground-0);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Language switching: exactly one language visible at a time. */
html[data-lang="es"] .en { display: none; }
html[data-lang="en"] .es { display: none; }

a { color: inherit; text-decoration: none; }

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 600;
}

.top-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
  color: var(--ink-dim);
}
.top-links a:hover { color: var(--ink); }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  background: none;
  border: 0;
  color: var(--ink-dim);
  font: 600 12px/1 "Instrument Sans", sans-serif;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ground-0);
}

/* ---------- hero ---------- */

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  text-align: center;
}

.wave {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  height: 130px;
  margin-bottom: 44px;
}
.wave i {
  width: 16px;
  border-radius: 999px;
  background: rgba(243, 241, 236, 0.92);
  animation: breathe 3.6s ease-in-out infinite;
}
.wave i:nth-child(1) { height: 26%; animation-delay: 0s; }
.wave i:nth-child(2) { height: 44%; animation-delay: 0.35s; }
.wave i:nth-child(3) { height: 66%; animation-delay: 0.7s; }
.wave i:nth-child(4) { height: 92%; animation-delay: 1.05s; }
.wave i:nth-child(5) { height: 58%; animation-delay: 1.4s; }
.wave i:nth-child(6) { height: 38%; animation-delay: 1.75s; }
.wave i:nth-child(7) { height: 22%; animation-delay: 2.1s; }
.wave .peak { background: var(--amber); }

@keyframes breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.72); }
}
@media (prefers-reduced-motion: reduce) {
  .wave i { animation: none; }
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(40px, 6.4vw, 68px);
  font-weight: 560;
  font-variation-settings: "SOFT" 50, "opsz" 100;
  line-height: 1.08;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--amber);
}

.lede {
  max-width: 62ch;
  margin: 26px auto 0;
  font-size: 19px;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.install {
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: var(--ground-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.install:hover { border-color: var(--amber); }
.install code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16.5px;
  color: var(--amber);
}
.copy-hint {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.ghost {
  padding: 15px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.ghost:hover { border-color: var(--ink); }

.fine {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ---------- shared section chrome ---------- */

main section { padding: 84px 24px; }

h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 560;
  font-variation-settings: "SOFT" 50;
  text-align: center;
  margin-bottom: 18px;
  text-wrap: balance;
}

/* ---------- features ---------- */

.features { border-top: 1px solid var(--line); }

.features .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1060px;
  margin: 42px auto 0;
}

.features article {
  background: rgba(23, 27, 49, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.features h3 {
  font-family: "Fraunces", serif;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 10px;
}
.features p {
  font-size: 15.5px;
  color: var(--ink-dim);
}

/* ---------- measured numbers ---------- */

.numbers { border-top: 1px solid var(--line); }

.numbers .note {
  text-align: center;
  color: var(--ink-dim);
  margin-bottom: 40px;
}

.stats {
  max-width: 720px;
  margin: 0 auto;
}
.stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 15px 4px;
  border-bottom: 1px dashed var(--line);
}
.stats dt { color: var(--ink-dim); }
.stats dd {
  font-family: "IBM Plex Mono", monospace;
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

/* ---------- privacy ---------- */

.privacy {
  border-top: 1px solid var(--line);
  text-align: center;
}
.privacy p {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 18px;
  color: var(--ink-dim);
  text-wrap: pretty;
}

/* ---------- footer ---------- */

footer {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 24px 46px;
  border-top: 1px solid var(--line);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14.5px;
  color: var(--ink-dim);
}
footer nav a:hover { color: var(--ink); }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 14px; }
  .top-links { order: 3; width: 100%; justify-content: center; margin-left: 0; }
  .hero { padding-top: 40px; }
  .wave { height: 96px; gap: 10px; }
  .wave i { width: 12px; }
}
