/* Family AAC — sitio público (landing, privacidad, términos, soporte). Mismo lenguaje visual que la app. */
:root {
  --bg: #fefaf3;
  --card: #ffffff;
  --ink: #1d2a52;
  --muted: #5f6474;
  --line: #ece4d4;
  --chip: #f4efe6;
  --primary: #2d6bdb;
  --primary-soft: #eef4ff;
  --green: #2f8f4e;
  --radius: 24px;
  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }

/* Idioma: el contenido existe en ambos idiomas; se muestra el elegido. */
html[data-lang='es'] [lang='en']:not(html),
html[data-lang='en'] [lang='es']:not(html) { display: none !important; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Encabezado */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
nav.links { margin-left: auto; display: flex; gap: 18px; align-items: center; }
nav.links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav.links a:hover { color: var(--primary); }
.lang-switch { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.lang-switch button,
.lang-switch a {
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 0.85rem;
  padding: 6px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; text-decoration: none;
}
.lang-switch button[aria-pressed='true'],
.lang-switch a[aria-current='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / 0.08); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.75; z-index: -1; }
.blob.b1 { width: 380px; height: 380px; background: #dce9f7; top: -120px; left: -120px; }
.blob.b2 { width: 300px; height: 300px; background: #fcefc9; bottom: -100px; right: -80px; }
.blob.b3 { width: 200px; height: 200px; background: #e5f1dd; top: 40%; left: 46%; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.hero .logo { width: 130px; margin-bottom: 12px; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 24px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 16px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; min-height: 54px;
}
.store-btn small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.8; line-height: 1.1; }
.store-btn span { line-height: 1.15; }
.store-btn.soon { background: var(--chip); color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 0.9rem; }
.shot {
  border-radius: 22px; border: 10px solid #1d2a52; background: #1d2a52;
  box-shadow: 0 30px 60px -20px rgb(29 42 82 / 0.35); overflow: hidden;
}
.shot img { border-radius: 12px; }

/* Secciones */
section.block { padding: 56px 0; }
section.block h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; letter-spacing: -0.01em; text-align: center; }
section.block > .wrap > p.sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 680px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 10px 30px -18px rgb(29 42 82 / 0.25);
}
.card .ico { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--primary-soft); margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split + .split { margin-top: 48px; }
.split h3 { font-size: 1.5rem; margin: 0 0 10px; }
.split ul { padding-left: 1.2em; color: var(--muted); }
.privacy-band { background: var(--card); border-block: 1px solid var(--line); }
.checks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; max-width: 820px; margin: 0 auto; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: '✓'; color: var(--green); font-weight: 900; }
.notice { background: var(--chip); border-radius: 18px; padding: 16px 20px; color: var(--ink); font-size: 0.95rem; }

/* Páginas legales */
main.doc { padding: 40px 0 64px; }
main.doc article {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 48px); max-width: 860px; margin: 0 auto;
}
main.doc h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
main.doc h2 { font-size: 1.3rem; margin: 32px 0 8px; }
main.doc h3 { font-size: 1.05rem; margin: 20px 0 4px; }
main.doc .meta { color: var(--muted); margin-top: -8px; }
main.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 12px 0; }
main.doc th, main.doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
main.doc th { background: var(--chip); }
.table-scroll { overflow-x: auto; }
details { border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 10px 0; background: var(--card); }
details summary { font-weight: 700; cursor: pointer; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Pie */
footer.bottom { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer.bottom a { color: var(--muted); }
.attrib { font-size: 0.82rem; margin-top: 10px; flex-basis: 100%; }

@media (max-width: 860px) {
  .hero .wrap, .split, .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero .logo { width: 110px; }
  .checks { grid-template-columns: 1fr; }
  nav.links a.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Utilidades (sin estilos en línea: el sitio usa una política de seguridad de contenido estricta) */
.sub.more { margin-top: 28px; }
.center-doc { text-align: center; }
.icon-404 { margin: 0 auto 16px; border-radius: 24px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- Funciones: mosaico con piezas reales de la app ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 14px 22px;
  overflow: hidden;
}
.tile h3 { margin: 18px 8px 6px; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
.tile p { margin: 0 8px; color: var(--muted); font-size: 0.98rem; }
.tile .visual {
  border-radius: 14px;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
}
.tile-lang, .tile-say { grid-column: span 4; }
.tile-grow, .tile-edit { grid-column: span 3; }

/* Celda como en el tablero de la app */
.mini-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  min-height: 112px;
  padding: 8px 6px 6px;
  background: #ffc27a;
  border: 2.5px solid #2b2b2b;
  border-radius: 12px;
  line-height: 1.1;
  text-align: center;
}
.mini-cell img { width: 56%; height: auto; margin-bottom: 4px; }
.mini-cell b { font-size: 0.95rem; color: #1d1d1d; }
.mini-cell small { font-size: 0.72rem; color: #5a4630; }
.mini-cell.sm { width: 76px; min-height: 80px; }
.mini-cell.sm b { font-size: 0.78rem; }
.mini-cell.sm:not(.food) { background: #fff1c7; }

.tile-lang .visual { background: #eaf2fd; }
.swap { display: flex; align-items: center; gap: 6px; }
.swap .chip { font-weight: 800; font-size: 0.85rem; padding: 6px 10px; border-radius: 10px; background: #fff; color: var(--muted); border: 1px solid #d7e3f5; }
.swap .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.swap .arrow { color: var(--primary); font-weight: 900; }

.tile-pin { background: #1d2a52; border-color: #1d2a52; }
.tile-pin h3 { color: #fff; }
.tile-pin p { color: #c3cbe0; }
.tile-pin .visual { flex-direction: column; background: rgb(255 255 255 / 0.06); }
.pin-dots { display: flex; gap: 10px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgb(255 255 255 / 0.25); }
.pin-dots i.on { background: #9cc3ff; }
.keys { display: grid; grid-template-columns: repeat(3, 40px); gap: 8px; }
.keys span { height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.1); color: #fff; font-weight: 700; }

.tile-do .visual.words { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; background: #fff7ea; }
.tile-do .mini-cell { width: 92px; min-height: 84px; }
.tile-do .mini-cell b { font-size: 0.8rem; }

.tile-say .visual { flex-direction: column; align-items: stretch; background: #f1f4f1; }
.bar { display: flex; align-items: center; gap: 6px; background: #fff; border: 2px solid #dfe3e8; border-radius: 14px; padding: 8px; }
.bar .word { background: #eef0f3; border-radius: 10px; padding: 6px 12px; font-weight: 800; font-size: 1.1rem; color: #1d1d1d; }
.bar .speak { margin-left: auto; background: #2f8f4e; color: #fff; font-weight: 700; font-size: 0.9rem; border-radius: 10px; padding: 8px 14px; }
.row-cells { display: flex; gap: 8px; justify-content: center; }

.tile-grow .visual.grids { background: #f6f1fb; align-items: flex-end; }
.g { display: grid; gap: 2px; padding: 4px; border-radius: 8px; background: #fff; border: 1px solid #e3d8f1; }
.g::before { content: ''; }
.g3 { width: 54px; height: 54px; grid-template-columns: repeat(3, 1fr); }
.g5 { width: 72px; height: 60px; grid-template-columns: repeat(5, 1fr); }
.g7 { width: 92px; height: 78px; grid-template-columns: repeat(7, 1fr); }
.g10 { width: 120px; height: 76px; grid-template-columns: repeat(10, 1fr); }
.g { background-image: radial-gradient(circle, #c9a7f5 45%, transparent 47%); background-origin: content-box; background-clip: content-box; }
.g3 { background-size: calc(100% / 3) calc(100% / 3); }
.g5 { background-size: calc(100% / 5) calc(100% / 4); }
.g7 { background-size: calc(100% / 7) calc(100% / 6); }
.g10 { background-size: 10% calc(100% / 6); }

.tile-edit .visual { background: #fdf0f5; }
.mini-cell.photo { background: #ffb3d1; }
.swatches { display: grid; grid-template-columns: repeat(5, 26px); gap: 8px; }
.swatches i { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #2b2b2b; }
.swatches .c1 { background: #ffc27a; } .swatches .c2 { background: #9cc3ff; } .swatches .c3 { background: #ffe36e; }
.swatches .c4 { background: #c9a7f5; } .swatches .c5 { background: #ff9c9c; }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile-grow, .tile-edit { grid-column: span 1; }
  .tile-lang, .tile-say { grid-column: span 2; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .tile, .tile-lang, .tile-say, .tile-grow, .tile-edit { grid-column: span 1; }
  .mini-cell { width: 92px; min-height: 96px; }
  .mini-cell.sm { width: 64px; min-height: 72px; }
  .bar .word { font-size: 0.95rem; padding: 5px 8px; }
  .tile-lang .visual { gap: 8px; padding: 14px 10px; }
}
