/* Cuddles web — tokens del tema "sky" (celeste) de apps/mobile/theme/tokens.ts. */

@font-face { font-family: "Nunito"; src: url("../fonts/Nunito_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/Fredoka_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --canvas: #F5F9FF;
  --fill: #E9F1FC;
  --line: #DCE7F5;
  --accent: #4A86D9;
  --accent-soft: #E0ECFF;
  --accent-ink: #2A5FAB;
  --ink: #26303F;
  --muted: #6F7D90;
  --prose-ink: #3A4556;
  --underline: rgb(74 134 217 / .35);
  --glass: rgb(245 249 255 / .92);
  --white: #fff;
  --radius: 28px;
  --wrap: 1080px;
  --prose: 68ch;
}

/* Tema rosa (opcional). El celeste de arriba es el predeterminado. */
html[data-theme="rose"] {
  --canvas: #FFF7F8;
  --fill: #FCEEF2;
  --line: #F6E0E7;
  --accent: #E0548B;
  --accent-soft: #FFE4EE;
  --accent-ink: #B0346A;
  --ink: #3A2B33;
  --muted: #7A6670;
  --prose-ink: #4A3A42;
  --underline: rgb(224 84 139 / .35);
  --glass: rgb(255 247 248 / .92);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 500 17px/1.65 "Nunito", ui-rounded, system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); font-weight: 700; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--underline); }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Idioma: el script pone data-lang en <html>. Sin JS se ve español. ---------- */
html[data-lang="es"] [lang="en"]:not(html),
html[data-lang="en"] [lang="es"]:not(html),
html:not([data-lang]) [lang="en"]:not(html) { display: none !important; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); padding: 8px 14px; border-radius: 999px; }

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand span { font: 600 23px/1 "Fredoka", sans-serif; letter-spacing: -.01em; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--fill); color: var(--accent-ink); }
.lang-toggle {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white);
}
.lang-toggle button {
  font: 800 13px/1 "Nunito", sans-serif; letter-spacing: .04em;
  border: 0; background: none; color: var(--muted); padding: 7px 10px; border-radius: 999px; cursor: pointer;
}
html[data-lang="es"] .lang-toggle [data-set-lang="es"],
html[data-lang="en"] .lang-toggle [data-set-lang="en"],
html:not([data-lang]) .lang-toggle [data-set-lang="es"] { background: var(--accent); color: var(--white); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 16px/1 "Nunito", sans-serif; text-decoration: none;
  padding: 15px 22px; border-radius: 999px; border: 2px solid transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-soft { background: var(--white); color: var(--accent-ink); border-color: var(--line); }
.btn-soft:hover { border-color: var(--accent); }
.btn[aria-disabled="true"] { cursor: default; }
.btn small { display: block; font-weight: 700; font-size: 12px; opacity: .8; margin-top: 3px; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: "Fredoka", sans-serif; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 800 13px/1 "Nunito", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft); padding: 8px 14px; border-radius: 999px;
}
.eyebrow svg { width: 15px; height: 15px; }
.lead { font-size: 20px; color: var(--muted); max-width: 34ch; }

/* ---------- Landing ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin: 20px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art { background: var(--white); border: 1.5px solid var(--line); border-radius: 44px; padding: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.hero-note svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin-inline: auto; order: -1; padding: 16px; }
}

section.band { padding: 64px 0; }
section.band.alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 12px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--canvas); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px 22px 26px; }
.step img { width: 140px; margin: -6px auto 6px; }
.step .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--white); font: 600 17px/1 "Fredoka", sans-serif; margin-bottom: 12px;
}
.step p { color: var(--muted); margin: 8px 0 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step img { width: 120px; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--white); border: 1.5px solid var(--line); border-radius: 24px; padding: 22px; }
.feature .ico { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.split img { max-width: 340px; margin-inline: auto; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 20px; } .split img { max-width: 220px; } }

.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; margin-top: 3px; }

.cta-card {
  background: var(--accent-soft); border-radius: 40px; padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.cta-card img { width: 170px; }
.cta-card p { color: var(--accent-ink); margin: 10px 0 22px; font-size: 18px; }
@media (max-width: 720px) { .cta-card { grid-template-columns: 1fr; padding: 30px; text-align: center; } .cta-card img { margin: 0 auto; order: -1; width: 130px; } }

/* ---------- Páginas de documentos ---------- */
.doc-hero { padding: 44px 0 28px; }
.doc-hero .wrap { display: flex; gap: 24px; align-items: center; }
.doc-hero img { width: 112px; flex: none; }
.doc-hero h1 { font-size: clamp(32px, 5vw, 46px); }
.doc-meta { color: var(--muted); font-size: 15px; margin-top: 8px; }
@media (max-width: 560px) { .doc-hero img { width: 84px; } }

.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-bottom: 72px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 15px; }
.toc p { font: 800 12px/1 "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; }
.toc a:hover { color: var(--accent-ink); border-left-color: var(--accent); }
.doc > * { min-width: 0; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: sticky; top: 68px; z-index: 4; margin-inline: -20px; padding: 10px 20px; background: var(--glass); border-bottom: 1px solid var(--line); }
  .toc > p { display: none; }
  .toc ol { display: flex; gap: 6px; border: 0; overflow-x: auto; scrollbar-width: none; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc li { flex: none; }
  .toc a { margin: 0; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14px; white-space: nowrap; }
  .toc a:hover { border-color: var(--accent); }
  html { scroll-padding-top: 140px; }
}

.prose { max-width: var(--prose); }
.prose h2 { font-size: 26px; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--prose-ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 800; }

.card { background: var(--white); border: 1.5px solid var(--line); border-radius: 24px; padding: 22px 24px; margin: 22px 0; }
.card.soft { background: var(--accent-soft); border-color: transparent; }
.card.soft p, .card.soft li { color: var(--accent-ink); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 8px; }
.summary-grid div { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; font-size: 15px; font-weight: 700; line-height: 1.45; }
.summary-grid svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
@media (max-width: 560px) { .summary-grid { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1.5px solid var(--line); border-radius: 20px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 800; color: var(--accent-ink); background: var(--fill); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 800; color: var(--ink); min-width: 150px; }

.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list li { counter-increment: s; position: relative; padding-left: 46px; margin: 14px 0; }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font: 600 16px/1 "Fredoka", sans-serif;
}

/* FAQ */
.faq details { background: var(--white); border: 1.5px solid var(--line); border-radius: 20px; margin: 10px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 20px; font-weight: 800; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 20px 18px; }
.faq details > div p:first-child { margin-top: 0; }

/* Pendientes por confirmar: visibles a propósito hasta que se reemplacen. */
mark.todo { background: rgb(255 236 179); color: rgb(110 72 0); border-radius: 6px; padding: 1px 6px; font-weight: 800; font-size: .92em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--white); padding: 40px 0 48px; font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 2fr; gap: 32px; }
.site-footer .brand span { font-size: 20px; }
.site-footer p { color: var(--muted); margin: 12px 0 0; max-width: 34ch; }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 20px; align-content: start; }
.foot-links a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 4px 0; }
.foot-links a:hover { color: var(--accent-ink); }
.copyright { grid-column: 1 / -1; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } .foot-links { grid-template-columns: 1fr 1fr; } }

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

/* Iconos: siempre en el color de acento (blanco solo sobre el botón celeste). */
svg.i { color: var(--accent); }
.btn-primary svg.i { color: var(--white); }

/* Tarjeta de contacto (Soporte) */
.contact-card { position: sticky; top: 92px; background: var(--white); border: 1.5px solid var(--line); border-radius: 24px; padding: 22px; }
.contact-card .ico { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 12px; }
.contact-card .ico svg { width: 24px; height: 24px; }
.contact-card h2 { font-size: 21px; }
.contact-card .addr { margin: 6px 0 10px; word-break: break-word; }
.contact-card p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .contact-card { position: static; } }

/* Selector de tema: dos muestras de color */
.theme-toggle { display: inline-flex; gap: 2px; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); }
.theme-toggle button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-toggle button span { width: 16px; height: 16px; border-radius: 50%; display: block; }
.theme-toggle [data-set-theme="sky"] span { background: #4A86D9; }
.theme-toggle [data-set-theme="rose"] span { background: #E0548B; }
html:not([data-theme="rose"]) .theme-toggle [data-set-theme="sky"],
html[data-theme="rose"] .theme-toggle [data-set-theme="rose"] { background: var(--accent-soft); }
@media (max-width: 420px) { .nav a:not(.hide-sm) { display: none; } }
