/* miardilla.com — estilos compartidos (paleta Violeta Oro de la app) */
@font-face { font-family: 'Nunito'; src: url('/fuentes/Nunito_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fuentes/Nunito_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fuentes/Nunito_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url('/fuentes/Baloo2_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fuentes/IBMPlexMono_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --bg: #120D22; --card: #1E1735; --card-2: #241C3F; --border: #3D3266;
  --text: #F1ECFF; --sub: #A79CCB; --primary: #8B5CF6; --primary-light: #B679F0;
  --gold: #FFC15E; --gold-dark: #E8A93E; --debt: #F0577A; --savings: #2FA9A0;
  --degradado: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Nunito', system-ui, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2 { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; margin: 0; line-height: 1.12; }
h3 { font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
strong { font-weight: 800; }
::selection { background: var(--primary); color: #fff; }
.mono { font-family: 'IBM Plex Mono', monospace; font-weight: 600; letter-spacing: -0.02em; }
.sub { color: var(--sub); }
.contenedor { max-width: 1180px; margin: 0 auto; }
.seccion { padding: 104px 48px; }
.seccion-alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #2A1B06; padding: 10px 16px; border-radius: 10px; font-weight: 800; z-index: 100; }
.saltar:focus { left: 12px; }

/* Etiquetas */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--primary-light); }
.eyebrow.verde { color: var(--savings); }
.eyebrow.oro { color: var(--gold); }
.titulo-seccion { text-align: center; max-width: 660px; margin: 0 auto 64px; }
.titulo-seccion h2 { font-size: 38px; margin-top: 12px; }

/* Botones */
.boton { display: inline-block; font-weight: 800; font-size: 16px; padding: 15px 28px; border-radius: 13px; text-align: center; }
.boton-primario { background: var(--degradado); color: #1B1030; }
.boton-primario:hover { color: #1B1030; filter: brightness(1.06); }
.boton-secundario { border: 1px solid var(--border); color: var(--text); padding: 14px 26px; }
.boton-secundario:hover { color: var(--text); border-color: var(--primary-light); }
.boton-oro { background: var(--gold); color: #2A1B06; font-size: 14.5px; padding: 11px 20px; border-radius: 11px; }
.boton-oro:hover { color: #2A1B06; filter: brightness(1.05); }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 48px; background: rgba(18, 13, 34, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.marca { display: flex; align-items: center; gap: 10px; color: var(--text); }
.marca:hover { color: var(--text); }
.marca img { width: 34px; height: 34px; border-radius: 9px; }
.marca span { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--sub); font-size: 15px; font-weight: 700; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

/* Tarjetas */
.tarjeta { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.tarjeta-2 { background: var(--card-2); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grilla-chica { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.pildora { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 8px; padding: 4px 10px; }
.pildora.violeta { color: var(--primary-light); background: rgba(139, 92, 246, 0.18); }
.pildora.verde { color: var(--savings); background: rgba(47, 169, 160, 0.16); }
.barra { height: 8px; border-radius: 999px; background: var(--card); overflow: hidden; }
.barra > span { display: block; height: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 15px; line-height: 1.5; }
.check svg { flex-shrink: 0; margin-top: 3px; }

/* Hero */
.hero { position: relative; padding: 96px 48px 110px; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, #1B1340 55%, var(--bg) 100%); }
.mancha { position: absolute; border-radius: 50%; pointer-events: none; }
.mancha.oro { top: -120px; right: -100px; width: 480px; height: 480px; background: var(--gold); opacity: 0.14; filter: blur(90px); }
.mancha.violeta { bottom: -160px; left: -120px; width: 520px; height: 520px; background: var(--primary); opacity: 0.18; filter: blur(100px); }
.hero-fila { position: relative; display: flex; align-items: center; gap: 64px; flex-wrap: wrap; }
.hero-texto { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-texto h1 { font-size: 60px; line-height: 1.05; }
.hero-texto .bajada { font-size: 18.5px; line-height: 1.6; color: var(--sub); max-width: 46ch; }
.insignia { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; background: rgba(255, 193, 94, 0.12); border: 1px solid rgba(255, 193, 94, 0.35); color: var(--gold); font-size: 13px; font-weight: 800; padding: 7px 14px; border-radius: 999px; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.botones { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { flex: 1 1 380px; min-width: 290px; display: flex; justify-content: center; position: relative; }
.hero-visual .mascota { position: absolute; width: 130px; height: 130px; top: -48px; right: 4px; z-index: 2; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.telefono { width: 310px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 30px; padding: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 14px; }

/* Filas de funciones */
.funcion { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; margin-bottom: 96px; }
.funcion.invertida { flex-wrap: wrap-reverse; }
.funcion-texto { flex: 1 1 420px; min-width: 0; }
.funcion-texto h3 { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 29px; margin: 12px 0 14px; }
.funcion-texto p { color: var(--sub); font-size: 16px; line-height: 1.65; max-width: 48ch; }
.funcion-visual { flex: 1 1 360px; min-width: 280px; display: flex; justify-content: center; }
.funcion-visual > div { width: 100%; max-width: 380px; }
.fila-persona { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 12px 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }

/* Lectura larga (privacidad) */
.lectura { max-width: 760px; margin: 0 auto; }
.lectura h1 { font-size: 44px; margin-bottom: 12px; }
.lectura section { padding: 28px 0; border-top: 1px solid var(--border); }
.lectura section:first-of-type { border-top: none; }
.lectura h2 { font-size: 24px; margin-bottom: 14px; }
.lectura h3 { font-size: 17px; margin: 18px 0 8px; }
.lectura p, .lectura li { font-size: 15.5px; line-height: 1.7; }
.lectura p { margin-bottom: 14px; }
.lectura ul { margin: 0 0 14px; padding-left: 20px; }
.lectura li { margin-bottom: 6px; }
.lectura .caja { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; }
.lectura .caja p:last-child, .lectura .caja ul:last-child { margin-bottom: 0; }
.indice { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin: 32px 0 40px; }
.indice ol { margin: 0; padding-left: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 28px; font-size: 14.5px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--sub); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 800; }
tr:last-child td { border-bottom: none; }

/* Preguntas frecuentes */
details { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 800; font-size: 16px; min-height: 28px; }
summary::-webkit-details-marker { display: none; }
summary svg { flex-shrink: 0; transition: transform 0.2s; }
details[open] summary svg { transform: rotate(180deg); }
details p { color: var(--sub); font-size: 15px; line-height: 1.65; margin-top: 12px; }

/* Pie */
.pie { padding: 56px 48px 40px; border-top: 1px solid var(--border); background: var(--card); }
.pie-fila { display: flex; gap: 48px; flex-wrap: wrap; justify-content: space-between; }
.pie h4 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 14px; }
.pie-links { display: flex; flex-direction: column; gap: 10px; }
.pie-links a { color: var(--sub); font-size: 14px; }
.pie-links a:hover { color: var(--gold); }
.pie .derechos { color: var(--sub); font-size: 12.5px; margin-top: 40px; }

@media (max-width: 760px) {
  .seccion, .hero, .pie { padding-left: 20px; padding-right: 20px; }
  .seccion { padding-top: 72px; padding-bottom: 72px; }
  .hero { padding-top: 64px; padding-bottom: 80px; }
  .nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .hero-texto h1 { font-size: 42px; }
  .titulo-seccion h2, .lectura h1 { font-size: 32px; }
  .funcion { margin-bottom: 64px; gap: 32px; }
  .tarjeta { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  summary svg { transition: none; }
}
