:root {
  --bg: #0a0a0f;
  --bg-soft: #14141c;
  --surface: #1a1a24;
  --border: rgba(255,255,255,0.08);
  --text: #f4f4f7;
  --text-dim: #b4b4c2;
  --text-faint: #7a7a8a;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --teal: #22d3ee;
  --amber: #f59e0b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at top, #181029 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--violet-soft);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.wrap.narrow { max-width: 640px; }

.hero {
  margin-bottom: 48px;
}

.brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-soft);
  margin-bottom: 12px;
}

h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h2 {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  color: var(--text);
}

.lede {
  color: var(--text-dim);
  font-size: 18px;
  margin: 0;
}

.updated {
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

section p, section ul {
  color: var(--text-dim);
  margin: 0 0 12px;
}

section ul {
  padding-left: 22px;
}
section li {
  margin-bottom: 6px;
}

.foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

/* Doc cards (index) */
.docs {
  display: grid;
  gap: 14px;
  margin-bottom: 56px;
}

.doc-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.doc-card:hover {
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-1px);
  text-decoration: none;
}
.doc-title {
  display: block;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 4px;
}
.doc-meta {
  display: block;
  color: var(--text-dim);
  font-size: 15px;
}

/* Back link */
.back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--text-faint);
  font-size: 14px;
}
.back::before {
  content: "← ";
}

/* Language switch */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(20,20,28,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  gap: 2px;
  z-index: 100;
}
.lang-switch button {
  background: transparent;
  color: var(--text-faint);
  border: 0;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch button:hover {
  color: var(--text);
}
.lang-switch button.active {
  background: var(--violet);
  color: white;
}

/* Language visibility — only show selected language */
html[lang="en"] [data-lang="es"] { display: none; }
html[lang="es"] [data-lang="en"] { display: none; }

/* When a parent has data-i18n the spans are inline children */
[data-i18n] [data-lang] { display: inline; }
html[lang="en"] [data-i18n] [data-lang="es"] { display: none; }
html[lang="es"] [data-i18n] [data-lang="en"] { display: none; }

@media (max-width: 540px) {
  .wrap { padding: 48px 20px 80px; }
  h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  body { font-size: 16px; }
}

/* ====== Landing / marketing page ====== */

.wrap.wide { max-width: 1100px; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 56px;
}

.site-nav .brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.site-nav .brand-row img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.site-nav .nav-links {
  display: inline-flex;
  gap: 22px;
  font-size: 14px;
}

.site-nav .nav-links a {
  color: var(--text-dim);
  font-weight: 500;
}

.site-nav .nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.hero-landing {
  text-align: center;
  padding: 24px 0 88px;
}

.hero-landing .brand-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 28px;
  box-shadow:
    0 8px 24px rgba(139, 92, 246, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-landing h1 {
  font-size: 56px;
  line-height: 1.05;
  max-width: 760px;
  margin: 0 auto 20px;
}

.hero-landing h1 .accent {
  background: linear-gradient(90deg, var(--violet-soft), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-landing .lede {
  font-size: 19px;
  max-width: 580px;
  margin: 0 auto 36px;
}

.cta-row {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 22px 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn-appstore:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
}

.btn-appstore svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-appstore .appstore-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.btn-appstore .appstore-text .small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.btn-appstore .appstore-text .big {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-ghost:hover {
  text-decoration: none;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.06);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  text-align: center;
  margin: 0 auto 12px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 720px;
}

.section-lede {
  text-align: center;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 17px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: var(--violet-soft);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon.violet {
  background: rgba(139, 92, 246, 0.16);
  color: var(--violet-soft);
}

.feature-icon.teal {
  background: rgba(34, 211, 238, 0.14);
  color: var(--teal);
}

.feature-icon.amber {
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.showcase {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 24px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}

.showcase::-webkit-scrollbar { height: 8px; }
.showcase::-webkit-scrollbar-track { background: transparent; }
.showcase::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 999px;
}

.showcase img {
  width: 320px;
  flex-shrink: 0;
  border-radius: 24px;
  scroll-snap-align: start;
  display: block;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.cta-banner {
  text-align: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 24px;
  padding: 48px 32px;
  margin-top: 32px;
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.cta-banner p {
  color: var(--text-dim);
  margin: 0 0 24px;
  font-size: 17px;
}

.site-foot {
  margin-top: 96px;
  padding: 40px 0 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 14px;
}

.site-foot .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.site-foot .foot-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.site-foot .foot-links {
  display: inline-flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-foot .foot-links a {
  color: var(--text-dim);
}

.site-foot .foot-meta {
  width: 100%;
  text-align: left;
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 8px;
}

/* Support page (FAQ) */
.faq {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

.faq details[open] {
  border-color: rgba(139, 92, 246, 0.35);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--violet-soft);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
}

.contact-card {
  margin-top: 40px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.contact-card p {
  color: var(--text-dim);
  margin: 0 0 16px;
  font-size: 15px;
}

.contact-card a.email {
  display: inline-block;
  background: var(--violet);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
}

.contact-card a.email:hover {
  text-decoration: none;
  background: var(--violet-soft);
}

@media (max-width: 760px) {
  .hero-landing { padding: 16px 0 56px; }
  .hero-landing h1 { font-size: 38px; }
  .hero-landing .lede { font-size: 17px; }
  .hero-landing .brand-icon { width: 80px; height: 80px; border-radius: 18px; margin-bottom: 22px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .showcase img { width: 240px; }
  .cta-banner { padding: 36px 22px; }
  .cta-banner h2 { font-size: 24px; }
  .site-nav { padding: 16px 0 32px; }
  .site-nav .nav-links { gap: 14px; }
  .site-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
}
