:root {
  color-scheme: dark;

  /* Marca — identidad Servites: negro #0D0803, naranja #F05B08, hueso #F1EDEC */
  --brand: #f05b08;
  --brand-light: #ff7a2e;
  --brand-dark: #c44606;
  --brand-darker: #8f3204;

  --brand-tint: rgba(240, 91, 8, 0.1);
  --brand-tint-strong: rgba(240, 91, 8, 0.18);
  --brand-ring: rgba(240, 91, 8, 0.35);
  --brand-glow: rgba(240, 91, 8, 0.45);

  /* Superficies — negro neutro, rampa de elevación más clara conforme sube */
  --surface-0: #0a0a0c;
  --surface-1: #101013;
  --surface-2: #17171b;
  --surface-3: #1e1e24;
  --surface-4: #28282f;

  /* Texto */
  --text: #f5f4f3;
  --text-muted: #b8b6bd;
  --text-light: #85838c;
  --text-faint: #57555e;

  /* Bordes */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-brand: rgba(240, 91, 8, 0.4);

  /* Semántico */
  --success: #22c55e;
  --success-tint: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --danger-tint: rgba(239, 68, 68, 0.12);
  --warning: #ffc72c;
  --info: #3b82f6;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --elev-2:
    0 4px 12px -2px rgba(0, 0, 0, 0.55),
    0 2px 4px -2px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --elev-4:
    0 24px 64px -12px rgba(0, 0, 0, 0.7),
    0 8px 16px -8px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glow-brand:
    0 0 0 1px rgba(240, 91, 8, 0.25),
    0 8px 32px -4px rgba(240, 91, 8, 0.35);
  --glow-brand-strong:
    0 0 0 1px rgba(240, 91, 8, 0.4),
    0 12px 48px -6px rgba(240, 91, 8, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-0);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  max-width: 100%;
  display: block;
}

/* Equilibrio: ni angosto tipo blog, ni edge-to-edge desbordado */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

.section {
  padding: 96px 0;
}

.section-soft {
  background: var(--surface-1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-light);
  background: var(--brand-tint);
  border: 1px solid var(--border-brand);
  padding: 6px 14px;
  border-radius: 999px;
}

.text-accent {
  color: var(--brand-light);
}

/* Section heading */
.section-heading {
  max-width: 620px;
  margin-bottom: 48px;
}

.section-heading span {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-light);
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  margin-bottom: 14px;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 16px;
}

@media (max-width: 760px) {
  .section {
    padding: 64px 0;
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.button-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}

.button-primary:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: var(--glow-brand-strong);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  border-color: var(--text-muted);
  background: var(--surface-2);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.button-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* Insignia de Google Play: negra, con borde gris y esquinas de tarjeta, como
   la oficial, para que se reconozca de un vistazo. Es la misma en el menu, en
   la seccion de descarga y en el login (components/play-badge). */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  border-radius: 9px;
  border: 1px solid #a6a6a6;
  background: #000;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.play-badge-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.play-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.play-badge-text small {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e8e8e8;
}

.play-badge-text strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.play-badge:hover {
  color: #fff;
  border-color: #fff;
  box-shadow: 0 8px 20px -10px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* Version grande, para cuando es el boton principal de una seccion: va en el
   contenedor porque el componente es uno solo para todos. */
.play-badge-lg .play-badge {
  gap: 10px;
  padding: 9px 22px 9px 16px;
  border-radius: 12px;
}

.play-badge-lg .play-badge-icon {
  width: 30px;
  height: 30px;
}

.play-badge-lg .play-badge-text small {
  font-size: 11px;
}

.play-badge-lg .play-badge-text strong {
  font-size: 21px;
}

.legal-nav {
  border-bottom: 1px solid var(--border-subtle);
}

.legal-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.legal-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.legal-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.legal-nav-back svg {
  width: 16px;
  height: 16px;
}

.legal-nav-back:hover {
  color: var(--text);
}

.legal-main {
  padding: 56px 0 110px;
}

.legal-head {
  max-width: 720px;
  margin: 0 auto 48px;
}

.legal-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin: 16px 0 10px;
}

.legal-updated {
  color: var(--text-light);
  font-size: 14px;
}

.legal-article {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.legal-article h2 {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 40px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.legal-article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-article p {
  margin: 0 0 16px;
}

.legal-article ul {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: disc;
}

.legal-article li {
  margin-bottom: 6px;
}

.legal-article li::marker {
  color: var(--brand-light);
}

.legal-article strong {
  color: var(--text);
  font-weight: 600;
}

.legal-download {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.legal-download-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .legal-main {
    padding: 40px 0 72px;
  }
}

/* Lo que las páginas de funciones agregan sobre legal.css */
.funcion-lead {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.funcion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.funcion-plan {
  display: inline-block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
}

.funcion-cta {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 32px;
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  background: var(--brand-tint);
  text-align: center;
}

.funcion-cta h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.funcion-cta p {
  color: var(--text-muted);
  margin: 0 0 22px;
}

.funcion-cta .funcion-actions {
  justify-content: center;
}

@media (max-width: 640px) {
  .funcion-cta {
    padding: 24px 20px;
  }

  .funcion-actions .button {
    width: 100%;
  }
}

/* Enlaces entre las páginas de funciones */
.funciones-nav {
  max-width: 720px;
  margin: 64px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.funciones-nav-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
}

.funciones-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.funciones-nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.funciones-nav-card:hover {
  border-color: var(--border-brand);
  background: var(--surface-2);
}

.funciones-nav-card strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.funciones-nav-card span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .funciones-nav-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  background: var(--surface-0);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-light);
}

.footer-inner a:hover {
  color: var(--brand-light);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

@media (max-width: 960px) {
  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
