:root {
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1A2233;
  --text-muted: #5B6472;
  --primary: #3D7FE0;
  --primary-dark: #2E63B8;
  --primary-tint: rgba(61, 127, 224, 0.1);
  --border: #E3E8EF;
  --shadow: 0 8px 24px rgba(20, 30, 50, 0.08);
  --nav-bg: rgba(245, 247, 250, 0.85);
  --danger: #D64545;
  --danger-tint: rgba(214, 69, 69, 0.06);
  --danger-border: rgba(214, 69, 69, 0.25);
}

[data-theme="dark"] {
  --bg: #10151C;
  --card: #1A222E;
  --text: #EDF1F7;
  --text-muted: #9AA5B4;
  --primary: #5B9BF0;
  --primary-dark: #3D7FE0;
  --primary-tint: rgba(91, 155, 240, 0.16);
  --border: #2A3441;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(16, 21, 28, 0.85);
  --danger: #F16A5C;
  --danger-tint: rgba(241, 106, 92, 0.12);
  --danger-border: rgba(241, 106, 92, 0.3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .2s, color .2s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

body,
.site-header,
.feature-card,
.legal-card,
.trust-card,
.stats-card,
.danger-box,
.icon-btn,
.footer-bottom,
footer.site-footer,
.screens-track img,
nav.site-nav a {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, opacity .2s ease;
}

body.view-fade { opacity: 0; }

#theme-toggle svg { transition: transform .4s ease; }
#theme-toggle.spin svg { transform: rotate(180deg); }

h1, h2, h3 { font-family: 'Nunito', sans-serif; font-weight: 900; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.brand span {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -.02em;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
nav.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
nav.site-nav a.active { color: var(--primary); font-weight: 700; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { display: block; }

.toolbar { display: flex; align-items: center; gap: 10px; }

section.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
section.hero img.hero-logo { width: 96px; height: 96px; }
section.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
section.hero p.tagline { font-size: clamp(18px, 3vw, 22px); line-height: 1.5; color: var(--text-muted); margin: 0; max-width: 520px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(61, 127, 224, .35);
}

section.features { max-width: 1120px; margin: 0 auto; padding: 8px 24px 72px; }
section.features h2 { font-size: clamp(24px, 3.5vw, 32px); text-align: center; margin: 0 0 40px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--card);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.feature-card h3 { font-size: 17px; margin: 0; }
.feature-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); margin: 0; }

section.trust { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }
.trust-card {
  background: var(--card);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.trust-card h2 { font-size: clamp(20px, 2.5vw, 24px); margin: 0 0 8px; }
.trust-card > div > p { font-size: 14.5px; color: var(--text-muted); margin: 0; line-height: 1.55; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item p { font-size: 14.5px; line-height: 1.55; margin: 0; }
.trust-item svg { flex-shrink: 0; margin-top: 2px; }

footer.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer-brand { max-width: 280px; display: flex; flex-direction: column; gap: 10px; }
.footer-brand .brand-row { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-row img { width: 26px; height: 26px; }
.footer-brand .brand-row span { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 16px; }
.footer-brand p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-label {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.footer-col a { font-size: 14px; color: var(--text); }
.footer-bottom {
  text-align: center; padding: 18px 24px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted);
}

main.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
main.legal h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 8px; letter-spacing: -.02em; }
main.legal .updated { font-size: 14px; color: var(--text-muted); margin: 0 0 40px; }
.legal-card {
  background: var(--card);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.legal-card section h2 { font-size: 19px; margin: 0 0 10px; }
.legal-card section p, .legal-card section li { font-size: 15px; line-height: 1.65; color: var(--text); }
.legal-card section ul, .legal-card section ol { margin: 0; padding-left: 20px; }
.legal-card section ul { margin-top: 10px; }

.danger-box {
  background: var(--danger-tint);
  border: 1px solid var(--danger-border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.danger-box svg { flex-shrink: 0; margin-top: 1px; color: var(--danger); }
.danger-box p { margin: 0; color: var(--text); }

[data-lang="es"] [data-i18n="en"] { display: none; }
[data-lang="en"] [data-i18n="es"] { display: none; }

/* ---- animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 24px rgba(61, 127, 224, .35); }
  50% { box-shadow: 0 10px 34px rgba(61, 127, 224, .55); }
}

section.hero img.hero-logo { animation: floatY 5s ease-in-out infinite; }
section.hero h1 { animation: fadeUp .7s ease both; }
section.hero p.tagline { animation: fadeUp .7s .12s ease both; }
section.hero .badge { animation: fadeUp .7s .24s ease both, pulseGlow 3s ease-in-out infinite; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.feature-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(20, 30, 50, .14);
}
[data-theme="dark"] .feature-card:hover { box-shadow: 0 16px 36px rgba(0, 0, 0, .5); }

.feature-icon { transition: transform .25s ease; }
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(-4deg); }

.icon-btn { transition: transform .2s ease, border-color .2s ease, color .2s ease; }
.icon-btn:active { transform: scale(.92); }

@media (prefers-reduced-motion: reduce) {
  section.hero img.hero-logo,
  section.hero h1,
  section.hero p.tagline,
  section.hero .badge,
  .reveal,
  .feature-card,
  .feature-icon,
  body,
  body.view-fade,
  #theme-toggle svg {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  body.view-fade { opacity: 1; }
}

/* ---- screenshots gallery ---- */
section.screens { max-width: 1120px; margin: 0 auto; padding: 8px 24px 80px; }
section.screens h2 { font-size: clamp(24px, 3.5vw, 32px); text-align: center; margin: 0 0 12px; }
section.screens p.screens-sub { text-align: center; color: var(--text-muted); font-size: 15px; margin: 0 0 36px; }
.screens-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 4px 20px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.screens-track img {
  flex: 0 0 auto;
  height: 420px;
  width: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  transition: transform .3s ease;
}
.screens-track img:hover { transform: translateY(-6px) scale(1.02); }
.screens-track::-webkit-scrollbar { height: 8px; }
.screens-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* ---- stats ---- */
.stats-card {
  background: var(--card);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--primary);
  display: block;
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.stats-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 14px auto 0;
  max-width: 520px;
}

/* ---- contact form ---- */
.contact-card {
  background: var(--card);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-field label { font-size: 13.5px; font-weight: 700; color: var(--text-muted); }
.form-field input,
.form-field textarea {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .35s ease, color .35s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.form-field textarea { resize: vertical; min-height: 120px; font-family: inherit; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 14px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 10px 24px rgba(61, 127, 224, .3);
}
.contact-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }
.contact-submit:active { transform: translateY(0) scale(.98); }
.contact-submit:disabled { opacity: .6; cursor: default; transform: none; }

.contact-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-status { margin-top: 16px; font-size: 14px; }
.contact-status-error { color: var(--danger); }

.contact-done {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeUp .5s ease both;
}
.contact-done svg { color: var(--primary); }
.contact-done h2 { font-size: 20px; margin: 0; }
.contact-done p { color: var(--text-muted); font-size: 14.5px; margin: 0; max-width: 380px; }
