/* IAFamily — hoja de estilos única del sitio (mobile-first, sin dependencias) */

:root {
  /* Colores de Crescere: azul y naranja sobre fondo casi siempre blanco */
  --blue-50: #EEF5FC;
  --blue-100: #DDEBF8;
  --blue-300: #9DC4EA;
  --blue-400: #4FA8D1;
  --blue-500: #3D7EC2;   /* azul Crescere */
  --blue-600: #3371B3;
  --blue-700: #2A62A2;   /* enlaces y botones (6,2:1 sobre blanco) */
  --blue-800: #214F84;
  --blue-900: #1A2744;   /* azul marino Crescere */
  --orange-400: #E8923A; /* naranja Crescere (solo decorativo) */
  --orange-50: #FFF3E6;
  --orange-700: #B8610F; /* naranja para texto grande sobre blanco */
  --orange-800: #8A4B0B;
  --ink: #1A2744;
  --ink-2: #4A5268;
  --line: #E2E5EE;
  --surface: #F7F9FC;
  --white: #FFFFFF;
  --danger: #B42318;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(26, 39, 68, .06), 0 6px 24px rgba(26, 39, 68, .08);
  --wrap: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

a { color: var(--blue-700); text-underline-offset: 2px; }
a:hover { color: var(--blue-900); }

:focus-visible {
  outline: 3px solid var(--orange-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand:hover { color: var(--blue-800); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.js .nav-toggle { display: inline-flex; }

/* Sin JavaScript el menú se muestra siempre; con JS se pliega en móvil */
.header-inner { flex-wrap: wrap; }
.site-nav { width: 100%; }
.js .header-inner { flex-wrap: nowrap; }
.js .site-nav { display: none; width: auto; }
.js .site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 20px 16px;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover { color: var(--blue-700); }
.site-nav .nav-cta {
  margin-top: 10px;
  text-align: center;
  background: var(--blue-700);
  color: var(--white);
  border-radius: 999px;
  border: 0;
}
.site-nav .nav-cta:hover { background: var(--blue-800); color: var(--white); }

/* ---------- Botones e insignias de tienda ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--blue-700); color: var(--white); }
.btn-primary:hover { background: var(--blue-800); color: var(--white); }
.btn-ghost { background: transparent; color: var(--blue-700); border-color: var(--blue-700); }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue-800); }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.badges li { margin: 0; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  background: #000;
  color: #fff;
  border: 1px solid #A6A6A6;
  border-radius: 12px;
  text-decoration: none;
  line-height: 1.15;
  transition: transform .15s;
}
.store-badge:hover { color: #fff; transform: translateY(-1px); }
.store-badge svg { width: 28px; height: 28px; flex: none; fill: currentColor; }
.store-badge small { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .01em; }
.store-badge strong { display: block; font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.apk-link { margin: 12px 0 0; font-size: .9rem; color: var(--ink-2); }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-800);
  background: var(--blue-100);
  border-radius: 999px;
}
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 88% 10%, rgba(232, 146, 58, .16), transparent 42%),
    radial-gradient(circle at 6% 92%, rgba(61, 126, 194, .10), transparent 45%),
    linear-gradient(180deg, #F3F7FC 0%, #FFFFFF 100%);
  color: var(--ink);
  padding: 48px 0 56px;
  overflow: hidden;
}
.hero h1 { color: var(--ink); }
.hero h1 .accent { color: var(--orange-700); }
.hero .lead { color: var(--ink-2); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 8px;
}
.hero-points li { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--ink); }
.hero-points svg { width: 22px; height: 22px; flex: none; margin-top: 2px; stroke: var(--orange-400); }
.hero-visual { display: flex; justify-content: center; }

/* ---------- Marco de teléfono ---------- */
.phone {
  position: relative;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 10px;
  background: #0E1416;
  border-radius: 42px;
  box-shadow: 0 0 0 2px #2C3A3E, 0 24px 60px rgba(0, 0, 0, .28);
}
.phone::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 70px;
  height: 18px;
  margin-left: -35px;
  background: #0E1416;
  border-radius: 999px;
  z-index: 2;
}
.phone img {
  width: 100%;
  aspect-ratio: 1080 / 2400;
  object-fit: cover;
  border-radius: 32px;
  background: linear-gradient(180deg, var(--blue-50), var(--blue-100));
  color: var(--ink-2);
  font-size: .85rem;
}
.phone-sm { width: min(100%, 220px); border-radius: 34px; padding: 8px; }
.phone-sm img { border-radius: 26px; }
.phone-sm::before { top: 14px; width: 56px; height: 14px; margin-left: -28px; }

/* Hero: three phones fanned out (the side ones overflow and are clipped by .hero) */
.hero-grid > * { min-width: 0; }
.hero-stack { display: flex; justify-content: center; align-items: center; padding: 12px 0; }
.hero-stack figure { margin: 0; flex: none; }
.hero-stack .hs-front { position: relative; z-index: 2; width: 240px; }
.hero-stack .hs-back { width: 150px; opacity: .92; }
.hero-stack .hs-left { margin-right: -60px; transform: rotate(-8deg) translateY(16px); }
.hero-stack .hs-right { margin-left: -60px; transform: rotate(8deg) translateY(16px); }
.hero-stack .phone, .hero-stack .phone-sm { width: 100%; }
figure { margin: 0; }
figcaption { margin-top: 12px; text-align: center; font-size: .92rem; color: var(--ink-2); }

/* ---------- Tarjetas y rejillas ---------- */
.grid { display: grid; gap: 18px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .note { font-size: .88rem; color: var(--ink-2); }
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--blue-50);
  color: var(--blue-700);
}
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-warm { background: var(--orange-50); color: var(--orange-800); }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: .72rem;
  font-weight: 700;
  vertical-align: middle;
  color: var(--orange-800);
  background: var(--orange-50);
  border-radius: 999px;
}

.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.benefits li { margin: 0; display: flex; gap: 14px; align-items: flex-start; }
.benefits .icon { margin: 0; flex: none; }
.benefits strong { display: block; font-size: 1.08rem; }
.benefits span { color: var(--ink-2); }

/* Diferencial / bloques con imagen */
.split { display: grid; gap: 36px; align-items: center; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .35em;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--blue-700);
  border-bottom: 3px solid var(--blue-700);
  transform: rotate(-45deg);
}

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: paso; }
.steps li { counter-increment: paso; margin: 0; position: relative; padding: 24px 24px 24px 76px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--white);
  background: var(--blue-700);
  border-radius: 50%;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--ink-2); }

/* Galería de capturas */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* ---------- Planes ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; contain: paint; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
caption { text-align: left; padding: 14px 16px; font-weight: 700; color: var(--ink); caption-side: top; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--blue-50); color: var(--blue-900); font-size: .95rem; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.plans-table { min-width: 620px; }
.plans-table td, .plans-table thead th:not(:first-child) { text-align: center; }
.plans-table .price { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.plans-table .price-alt { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.yes { color: var(--blue-700); font-weight: 700; }
.no { color: var(--ink-2); }
.plan-notes { margin-top: 18px; font-size: .95rem; color: var(--ink-2); }
.plan-cards { display: grid; gap: 16px; margin-bottom: 24px; }
.plan-card { position: relative; }
.plan-card.featured { border: 2px solid var(--blue-700); }
.plan-card .amount { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.plan-card .amount small { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.plan-card .yearly { color: var(--ink-2); font-size: .95rem; margin-bottom: 12px; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 18px;
  font-weight: 700;
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blue-700);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 18px 4px; color: var(--ink-2); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--blue-50) 0%, #FFFFFF 55%, var(--orange-50) 100%);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}
.cta h2 { color: var(--ink); }
.cta p { color: var(--ink-2); }
.cta a:not(.store-badge) { color: var(--blue-700); }
.cta-band { padding: 56px 0; }

/* ---------- Artículos (páginas de guía) ---------- */
.breadcrumbs { padding-top: 16px; font-size: .9rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li { margin: 0; color: var(--ink-2); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-2); }
.article-header { padding: 24px 0 8px; }
.article-header .lead { margin-bottom: .6em; }
.meta { font-size: .9rem; color: var(--ink-2); }
.article { padding-bottom: 24px; }
.article h2 { margin-top: 1.6em; }
.article h3 { margin-top: 1.3em; }
.article figure.inline { margin: 28px auto; }
.callout {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--blue-50);
  border-left: 4px solid var(--blue-700);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-warm { background: var(--orange-50); border-left-color: var(--orange-400); }
.article .table-wrap { margin: 20px 0; }
.compare-table { min-width: 560px; }
.source-note { font-size: .9rem; color: var(--ink-2); }
.related { padding-top: 8px; padding-bottom: 48px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.related li { margin: 0; }
.related a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.related a:hover { border-color: var(--blue-700); background: var(--blue-50); }

/* Lista de guías en portada */
.guides-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.guides-list li { margin: 0; }
.guides-list a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.guides-list a strong { display: block; color: var(--blue-700); margin-bottom: 2px; }
.guides-list a span { font-size: .93rem; color: var(--ink-2); }
.guides-list a:hover { border-color: var(--blue-700); }

/* Más apps */
.more-apps-band { padding: 40px 0; }
.more-apps-band h2 { font-size: 1.15rem; }
.more-apps { display: flex; gap: 14px; align-items: flex-start; }
.more-apps .icon { margin: 0; flex: none; }

/* ---------- Pie ---------- */
.site-footer {
  background: var(--blue-900);
  color: #CBD3E3;
  padding: 48px 0 28px;
  font-size: .95rem;
}
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #FFFFFF; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand p { margin-top: 12px; max-width: 340px; }
.footer-brand .brand { color: var(--white); }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: 12px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.footer-soon { font-size: .8rem; color: #F5B266; margin-left: 4px; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .87rem;
  color: #A9B4CA;
}
.footer-bottom p { margin: 0 0 6px; }

/* ---------- 404 ---------- */
.notfound { padding-top: 72px; padding-bottom: 72px; text-align: center; }
.notfound-help { margin-top: 32px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guides-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { padding: 44px 40px; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  body { font-size: 1.075rem; }
  .section { padding: 88px 0; }
  .nav-toggle, .js .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav, .js .site-nav, .js .site-nav.is-open {
    width: auto;
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
  }
  .site-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .site-nav a { border: 0; padding: 8px 12px; font-size: .97rem; border-radius: 8px; }
  .site-nav a:hover { background: var(--blue-50); }
  .site-nav .nav-cta { margin: 0 0 0 8px; padding: 10px 20px; }
  .site-nav .nav-cta:hover { background: var(--blue-800); }
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .hero .phone { width: 300px; }
  .hero-grid:has(.hero-stack) { grid-template-columns: 1.05fr .95fr; }
  .hero-stack .hs-front { width: 280px; }
  .hero-stack .hs-back { width: 190px; }
  .hero-stack .hs-left { margin-right: -85px; }
  .hero-stack .hs-right { margin-left: -85px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse > :first-child { order: 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .gallery .phone { width: min(100%, 240px); }
  .guides-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr 1fr 1.1fr; }
  .cta { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
  .cta h2 { margin-bottom: .3em; }
}

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .site-footer, .cta, .related, .nav-toggle { display: none !important; }
  body { color: #000; }
  a { color: #000; }
}

/* Logo shown in the hero until the app screenshots are added */
.hero-logo {
  display: block;
  width: min(220px, 60vw);
  height: auto;
  margin: 0 auto;
  padding: 24px;
  border-radius: 32px;
  background: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
