/* 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).
   The hero is the "constelación de voces": each voice orbits the breathing
   P, and the amber one is you. */

:root {
  --ink: #f3f1ec;
  --ink-dim: #b9b6c4;
  --ground-0: #0e1120;
  --ground-1: #171b31;
  --violet: #5226bf;
  --amber: #fdbf47;
  --voice-1: #8b7cf0;
  --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;
  min-height: 100vh;
}

a { color: inherit; }

/* One language visible at a time. */
[data-lang="es"] .en { display: none; }
[data-lang="en"] .es { display: none; }

/* ── Header ─────────────────────────────────────────────────────────── */

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

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

.brand img { border-radius: 7px; }

.top-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.top-links a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.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: none;
  color: var(--ink-dim);
  font: 600 12px/1 "Instrument Sans", sans-serif;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  cursor: pointer;
}

[data-lang="es"] .lang-toggle button[data-lang-val="es"],
[data-lang="en"] .lang-toggle button[data-lang-val="en"] {
  background: var(--ink);
  color: var(--ground-0);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 84px;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 24px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.release-kicker {
  align-self: flex-start;
  padding: 7px 12px;
  border: 1px solid rgba(253, 191, 71, 0.35);
  border-radius: 999px;
  background: rgba(253, 191, 71, 0.08);
  color: var(--amber);
  font: 500 12.5px/1.3 "IBM Plex Mono", monospace;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.release-kicker:hover {
  border-color: var(--amber);
  background: rgba(253, 191, 71, 0.13);
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 60px;
  font-weight: 560;
  font-variation-settings: "SOFT" 50, "opsz" 100;
  line-height: 1.06;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--amber);
}

.lede {
  max-width: 46ch;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.brew {
  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.15s ease;
}

.brew:hover { border-color: var(--amber); }

.brew code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16.5px;
  color: var(--amber);
}

.brew-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;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

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

.stats {
  display: flex;
  gap: 26px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.stats b {
  color: var(--amber);
  font-weight: 500;
}

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

/* ── Constellation ──────────────────────────────────────────────────── */

.constellation {
  position: relative;
  width: 480px;
  height: 480px;
  justify-self: center;
}

.ring {
  position: absolute;
  border-radius: 999px;
  border: 1px dashed rgba(243, 241, 236, 0.11);
}

.ring-1 { inset: 40px; }
.ring-2 { inset: 90px; }
.ring-3 { inset: 138px; }

.core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sidewave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 72px;
}

.sidewave i {
  display: block;
  width: 7px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: center;
  animation: pv-speak 3.6s ease-in-out infinite;
}

/* The brand "P que habla": the P breathes on its own Fraunces SOFT axis,
   its amber stem pulses, a halo radiates outward as sound. */
.glyph-p {
  position: relative;
  width: 74px;
  height: 96px;
  flex-shrink: 0;
}

.glyph-p .halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 1px solid rgba(253, 191, 71, 0.4);
  animation: pv-halo 3.6s ease-in-out infinite;
}

.glyph-p .p {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  font-family: "Fraunces", serif;
  font-variation-settings: "SOFT" 50;
  font-weight: 600;
  font-size: 90px;
  line-height: 1;
  color: var(--ink);
  animation: pv-p 3.6s ease-in-out infinite;
}

.glyph-p .stem {
  position: absolute;
  left: 12px;
  bottom: 5px;
  width: 10px;
  height: 60px;
  border-radius: 999px;
  background: var(--amber);
  transform-origin: bottom;
  animation: pv-stem 3.6s ease-in-out infinite;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
}

.orbit-a { animation: pv-orbit-a 26s linear infinite; }
.orbit-b { animation: pv-orbit-b 34s linear infinite; }
.orbit-c { animation: pv-orbit-c 44s linear infinite; }

.voice-chip {
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%);
  background: rgba(23, 27, 49, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 12px/1 "Instrument Sans", sans-serif;
  white-space: nowrap;
}

.voice-chip.violet { color: #cfc9ff; border-color: rgba(139, 124, 240, 0.5); }
.voice-chip.dim { color: var(--ink-dim); border-color: rgba(139, 124, 240, 0.35); }
.voice-chip.me { color: var(--amber); border-color: rgba(253, 191, 71, 0.55); }

/* ── Sections ───────────────────────────────────────────────────────── */

section#screens,
section#features,
section#numbers,
section#privacy {
  border-top: 1px solid var(--line);
  padding: 84px 24px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1120px;
  margin: 42px auto 0;
}
.thumb {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: var(--ink-dim);
  text-align: center;
}
.thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.72);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.thumb:hover img,
.thumb:focus-visible img {
  transform: translateY(-4px);
  box-shadow: 0 30px 64px -24px rgba(0, 0, 0, 0.82);
  border-color: rgba(253, 191, 71, 0.45);
}
.thumb-cap {
  font-size: 14.5px;
}
@media (max-width: 720px) {
  .thumbs { grid-template-columns: 1fr; max-width: 460px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(6, 7, 14, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  animation: lb-in 0.16s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: min(1360px, 94vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 40px 110px -30px rgba(0, 0, 0, 0.9);
  cursor: default;
}
.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(23, 27, 49, 0.85);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.lb-close:hover { background: rgba(23, 27, 49, 1); }

section h2 {
  font-family: "Fraunces", serif;
  font-size: 40px;
  font-weight: 560;
  font-variation-settings: "SOFT" 50;
  text-align: center;
  margin: 0 auto 18px;
  text-wrap: balance;
}

.section-lede {
  text-align: center;
  color: var(--ink-dim);
  margin: 0 0 40px;
}

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

.cards article {
  background: rgba(23, 27, 49, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.cards h3 {
  font-family: "Fraunces", serif;
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 10px;
}

.cards p {
  font-size: 15.5px;
  color: var(--ink-dim);
}

.ledger {
  max-width: 720px;
  margin: 0 auto;
}

.ledger div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 15px 4px;
  border-bottom: 1px dashed var(--line);
}

.ledger dt { color: var(--ink-dim); }

.ledger dd {
  font-family: "IBM Plex Mono", monospace;
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  margin: 0;
}

section#privacy { text-align: center; }

.privacy-body {
  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 img { border-radius: 5px; }

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14.5px;
}

footer nav a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer nav a:hover { color: var(--ink); }

/* ── Animations ─────────────────────────────────────────────────────── */

@keyframes pv-speak {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes pv-stem {
  0%, 100% { transform: scaleY(1); box-shadow: 0 0 18px rgba(253, 191, 71, 0.5); }
  50% { transform: scaleY(0.82); box-shadow: 0 0 36px rgba(253, 191, 71, 0.85); }
}

@keyframes pv-p {
  0%, 100% { font-variation-settings: "SOFT" 0; }
  50% { font-variation-settings: "SOFT" 100; }
}

@keyframes pv-halo {
  0% { transform: translate(-50%, -50%) scale(0.55); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0; }
}

@keyframes pv-orbit-a {
  from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes pv-orbit-b {
  from { transform: rotate(120deg) translateX(168px) rotate(-120deg); }
  to { transform: rotate(480deg) translateX(168px) rotate(-480deg); }
}

@keyframes pv-orbit-c {
  from { transform: rotate(230deg) translateX(205px) rotate(-230deg); }
  to { transform: rotate(590deg) translateX(205px) rotate(-590deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sidewave i,
  .glyph-p .halo,
  .glyph-p .p,
  .glyph-p .stem,
  .orbit { animation: none !important; }
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }
  .hero h1 { font-size: 44px; }
  .constellation {
    width: 340px;
    height: 340px;
    transform: scale(0.72);
    transform-origin: top center;
    margin-top: -20px;
  }
  .top-links { display: none; }
}

@media (max-width: 560px) {
  .stats { flex-wrap: wrap; gap: 14px; }
  section#features, section#numbers, section#privacy { padding: 56px 20px; }
  .brew code { font-size: 14px; }
}
