/* Mundo Tuni — estilos comunes del sitio (inicio, privacidad y soporte).
   Estética de la app 2.1.0: cielo y mar, superficies «gominola» con contorno
   azul marino y relieve, Fredoka para títulos y Nunito para el texto.
   Las fuentes se sirven desde este mismo sitio (fonts/, licencia OFL):
   ninguna petición a terceros al visitar la página. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

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

:root {
  color-scheme: light;

  /* Mar y cielo (TuniColors) */
  --sky:          #87CEEB;
  --sky-light:    #C9EAF6;
  --ocean:        #4FBDCA;
  --sand:         #FFF0D4;
  --sand-light:   #FFF8EC;

  /* Superficie gominola (TuniGominolaSurface / TuniContrastPill) */
  --navy:         #173F5F;
  --face-top:     #FBFBF4;
  --face-bottom:  #E4F1F4;
  --depth:        #BFD3DE;

  /* Texto */
  --ink:          #2E3A40;
  --ink-soft:     #45545C;
  --muted:        #5C6B73;
  --link:         #1B6A8C;

  /* Colores de módulo */
  --coral:        #FF8A5B;
  --mustard:      #FFC94D;
  --sage:         #5EBF7A;
  --pink:         #F06292;
  --blue:         #4D82C9;
  --mint:         #7BC67E;
  --mauve:        #9B8EF5;

  --radius:       22px;
  --radius-sm:    14px;
  --outline:      2.5px;
  --lift:         5px;
  --max-width:    820px;

  --font-display: "Fredoka", "SF Pro Rounded", ui-rounded, "Nunito", system-ui, sans-serif;
  --font-body:    "Nunito", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, var(--sky) 0, var(--sky-light) 260px, #EAF7FA 520px, var(--sand-light) 900px, var(--sand-light) 100%);
  background-color: var(--sand-light);
}

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

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 6px;
}

strong { font-weight: 700; }
code { font-size: 0.88em; background: var(--face-bottom); padding: 1px 6px; border-radius: 6px; }

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ── Superficie gominola ─────────────────────────────────────────────── */

.gummy {
  position: relative;
  background: linear-gradient(180deg, var(--face-top), var(--face-bottom));
  border: var(--outline) solid var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 var(--lift) 0 var(--navy);
}
.gummy::before {                     /* brillo */
  content: "";
  position: absolute;
  top: 7px;
  left: 16px;
  width: min(38%, 160px);
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

/* ── Cabecera y pie del sitio ────────────────────────────────────────── */

.site-header {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.brand-link img { height: 44px; width: auto; }

.site-nav { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 18px 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: none;
  background: linear-gradient(180deg, var(--face-top), var(--face-bottom));
  border: var(--outline) solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--navy);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.site-nav a:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--navy); color: var(--navy); }
.site-nav a:active { transform: translateY(4px); box-shadow: 0 0 0 var(--navy); }
.site-nav a[aria-current="page"] {
  background: linear-gradient(180deg, #FFE39A, var(--mustard));
}

.site-footer {
  margin-top: auto;
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 36px 16px 32px;
  position: relative;
}
.site-footer::before {               /* ola sobre el pie */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 20px;
  background: radial-gradient(circle at 20px -6px, transparent 22px, var(--navy) 23px) repeat-x;
  background-size: 40px 20px;
}
.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 12px;
}
.site-footer a { color: #fff; font-weight: 700; }
.site-footer a:hover { color: var(--mustard); }
.site-footer a:focus-visible { outline-color: var(--mustard); }
.site-footer p { font-size: 0.85rem; opacity: 0.9; }

/* ── Páginas de documento (privacidad y soporte) ─────────────────────── */

.doc-page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px 72px;
}

.doc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 24px;
}
.doc-header .app-icon-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: var(--outline) solid var(--navy);
  box-shadow: 0 4px 0 var(--navy);
  flex-shrink: 0;
}
.doc-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1.1;
  color: var(--navy);
}
.doc-header p {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.sheet { padding: 32px 28px 36px; }

.doc-page p { margin-bottom: 12px; }
.doc-page p:last-child { margin-bottom: 0; }
.doc-page ul, .doc-page ol { padding-left: 22px; margin-bottom: 12px; }
.doc-page li { margin-bottom: 6px; }
.doc-page li::marker { color: var(--navy); }

.lang-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* Resumen */
.summary {
  --face-top: #F3FBF3;
  --face-bottom: #DDF2E0;
  padding: 24px 22px 22px;
  margin-bottom: 28px;
}
.summary h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 14px;
}
.check-list { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 36px;
  margin: 0 !important;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sage);
  border: 2px solid var(--navy);
}
.check-list li::after {              /* marca de verificación */
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 7px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Índice */
.toc { margin-bottom: 36px; }
.toc h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 16px;
  counter-reset: toc;
}
.toc li { counter-increment: toc; margin: 0 !important; }
.toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-weight: 700;
  text-decoration: none;
}
.toc a::before {
  content: counter(toc);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  min-width: 1.4em;
}
.toc a:hover span { text-decoration: underline; }

/* Secciones con número gominola */
.doc-section { margin-bottom: 40px; scroll-margin-top: 16px; }
.doc-section:last-of-type { margin-bottom: 0; }
.doc-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 14px;
}
.doc-section h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--navy);
  margin: 20px 0 8px;
}
.num {
  --tint: var(--coral);
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.05rem;
  color: var(--navy);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 45%, #fff), color-mix(in srgb, var(--tint) 75%, #fff));
  border: var(--outline) solid var(--navy);
  box-shadow: 0 3px 0 var(--navy);
}
.doc-section:nth-of-type(6n+2) .num { --tint: var(--sage); }
.doc-section:nth-of-type(6n+3) .num { --tint: var(--pink); }
.doc-section:nth-of-type(6n+4) .num { --tint: var(--blue); }
.doc-section:nth-of-type(6n+5) .num { --tint: var(--mint); }
.doc-section:nth-of-type(6n+6) .num { --tint: var(--mauve); }

/* Recuadros */
.callout {
  padding: 18px 20px 16px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--navy);
}
.callout::before { top: 6px; left: 14px; height: 6px; }
.callout strong:first-child { display: block; margin-bottom: 4px; color: var(--navy); }
.callout-info    { --face-top: #F2F8FE; --face-bottom: #DDEBFA; }
.callout-success { --face-top: #F3FBF3; --face-bottom: #DDF2E0; }

/* Tabla de datos locales */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  border: var(--outline) solid var(--navy);
  border-radius: var(--radius-sm);
  background: #fff;
}
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1.5px solid var(--depth);
}
.data-table thead th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  background: var(--face-bottom);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table small { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 2px 12px 3px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--navy);
  background: #DDF2E0;
  border: 2px solid var(--navy);
}

.contact-box { padding: 20px 22px 18px; margin-top: 12px; }
.contact-box p { margin-bottom: 4px; }

.doc-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 2px dashed var(--depth);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.doc-footer p { margin-bottom: 6px; }

/* ── Soporte ─────────────────────────────────────────────────────────── */

.contact-hero {
  --face-top: #FFF9EF;
  --face-bottom: #FFEBC7;
  text-align: center;
  padding: 26px 20px 28px;
  margin-bottom: 28px;
}
.contact-hero p { font-size: 1.05rem; margin-bottom: 16px; }

.gummy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 24px 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #FFC2A6, var(--coral));
  border: var(--outline) solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 var(--lift) 0 var(--navy);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.gummy-button::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 18px;
  width: 34%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}
.gummy-button:hover { color: var(--navy); transform: translateY(2px); box-shadow: 0 3px 0 var(--navy); }
.gummy-button:active { transform: translateY(5px); box-shadow: 0 0 0 var(--navy); }
.gummy-button.secondary { background: linear-gradient(180deg, var(--face-top), var(--face-bottom)); }

.faq-list { list-style: none; padding: 0 !important; display: grid; gap: 18px; }
.faq-item { padding: 22px 22px 20px; margin: 0 !important; }
.faq-item h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 8px;
}
.faq-item p + p { margin-top: 10px; }
.faq-item .gummy-button { margin-top: 12px; font-size: 1rem; }

/* ── Inicio ─────────────────────────────────────────────────────────── */

.hero-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.35) 0 14px, transparent 15px),
    radial-gradient(circle at 86% 30%, rgba(255, 255, 255, 0.3) 0 10px, transparent 11px),
    radial-gradient(circle at 78% 62%, rgba(255, 255, 255, 0.25) 0 18px, transparent 19px),
    radial-gradient(circle at 8% 70%, rgba(255, 255, 255, 0.25) 0 8px, transparent 9px),
    linear-gradient(180deg, var(--sky) 0%, #A9DDF0 38%, var(--ocean) 100%);
  background-color: var(--ocean);
}

.hero-page .site-header { justify-content: flex-end; }

.hero-main {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 16px 7px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(180deg, #FFE39A, var(--mustard));
  border: var(--outline) solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--navy);
}

.hero-logo { width: min(520px, 88vw); margin: 0 auto 4px; }
.hero-logo img { width: 100%; }

.tuni-hero-img {
  width: min(260px, 62vw);
  margin: -8px auto 0;
  filter: drop-shadow(0 10px 14px rgba(23, 63, 95, 0.25));
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  line-height: 1.1;
  color: var(--navy);
  margin-top: 4px;
}

.hero-sub {
  max-width: 560px;
  margin: 12px auto 26px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
}

.module-chips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin-bottom: 30px;
}
.module-chips li {
  --tint: var(--coral);
  position: relative;
  padding: 12px 10px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--navy);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 32%, #fff), color-mix(in srgb, var(--tint) 62%, #fff));
  border: var(--outline) solid var(--navy);
  border-radius: 18px;
  box-shadow: 0 var(--lift) 0 var(--navy);
}
.module-chips li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 12px;
  width: 36%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}
.module-chips .m-letras   { --tint: var(--blue); }
.module-chips .m-formas   { --tint: var(--sage); }
.module-chips .m-colores  { --tint: var(--pink); }
.module-chips .m-palabras { --tint: var(--mint); }
.module-chips .m-musica   { --tint: var(--mauve); }
.module-chips .m-idiomas  { --tint: var(--sage); }
.module-chips .m-mates    { --tint: var(--blue); }

.hero-benefits {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 34px;
  text-align: left;
}
.hero-benefits li { padding: 22px 20px 20px; }
.hero-benefits h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 6px;
}
.hero-benefits p { font-size: 0.98rem; color: var(--ink); }

.cta-appstore {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.12s ease;
}
.cta-appstore:hover { transform: translateY(-2px); }
.cta-appstore img { width: 180px; height: 54px; }

.hero-price {
  margin-top: 12px;
  font-weight: 800;
  color: var(--navy);
}

/* ── Pantallas estrechas ─────────────────────────────────────────────── */

@media (max-width: 760px) {
  .hero-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { justify-content: center; }
  .brand-link img { height: 38px; }
  .site-nav a { padding: 5px 14px 7px; font-size: 0.95rem; }
  .sheet { padding: 26px 18px 30px; }
  .doc-header .app-icon-img { width: 56px; height: 56px; border-radius: 14px; }
  .doc-section h2 { font-size: 1.2rem; }
  .num { width: 34px; height: 34px; font-size: 0.95rem; }
  .module-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .module-chips li { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
