/* ==========================================================================
   Malla — Linktree auto-hospedado (links.malla.io)
   Sistema de marca Malla · navy + acento por página · Silka · sin dependencias.
   El acento lo define cada página con --accent (azul/naranja/verde).
   ========================================================================== */

/* ---------- Fuentes de marca: Silka ---------- */
@font-face { font-family:"Silka"; src:url("../fonts/silka-light-webfont.woff2") format("woff2");    font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"Silka"; src:url("../fonts/silka-regular-webfont.woff2") format("woff2");  font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Silka"; src:url("../fonts/silka-medium-webfont.woff2") format("woff2");   font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"Silka"; src:url("../fonts/silka-semibold-webfont.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"Silka"; src:url("../fonts/silka-bold-webfont.woff2") format("woff2");     font-weight:700; font-style:normal; font-display:swap; }

/* ---------- Tokens ---------- */
:root {
  --navy: #121121;
  --navy-2: #1a1930;
  --accent: #0061fe;          /* por defecto azul corporativo; cada página lo sobreescribe */
  --accent-ink: #ffffff;      /* texto sobre el acento */
  --ink: #f4f4fb;
  --muted: #a6a6bd;
  --card: rgba(255,255,255,.055);
  --card-hover: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --radius: 16px;
  --pad: clamp(18px, 5vw, 28px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Silka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--navy);   /* fallback sólido si color-mix() no está soportado (in-app browsers viejos) */
  background:
    radial-gradient(1100px 600px at 50% -8%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 46%, #0d0c18 100%);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  padding: clamp(40px, 9vh, 84px) var(--pad) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
}

/* ---------- Perfil ---------- */
.profile { text-align: center; display: flex; flex-direction: column; align-items: center; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent), 0 18px 40px rgba(0,0,0,.45);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; display: block; }
.name {
  margin: 18px 0 0; font-size: clamp(1.35rem, 5vw, 1.7rem); font-weight: 700; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: .4rem;
}
.verified { width: 18px; height: 18px; color: var(--accent); flex: none; }
/* handle: acento aclarado para pasar contraste AA sobre navy; si color-mix() falla, cae a --ink (claro, legible) */
.handle { margin: 4px 0 0; font-size: .95rem; color: var(--ink); color: color-mix(in srgb, var(--accent) 55%, #ffffff); font-weight: 600; }
.handle a { color: inherit; text-decoration: none; }
.tagline { margin: 12px 0 0; font-size: .98rem; line-height: 1.5; color: var(--muted); max-width: 34ch; }

/* ---------- Títulos de sección ---------- */
.section-title {
  align-self: flex-start; margin: 22px 0 2px 4px;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.section-title:first-child { margin-top: 0; }
.social-head {
  margin: 30px 0 14px; text-align: center;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Enlaces principales ---------- */
.links { width: 100%; margin-top: 30px; display: flex; flex-direction: column; gap: 13px; }
.link {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.link:hover, .link:focus-visible {
  transform: translateY(-2px);
  background: var(--card-hover); border-color: var(--line-strong);
  box-shadow: 0 12px 26px rgba(0,0,0,.32);
}
.link:focus-visible, .soc:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.link .ico { width: 22px; height: 22px; flex: none; color: var(--accent); }
.link .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.link .lab { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.link .sub { font-size: .82rem; color: var(--muted); font-weight: 400; }
.link .chev { width: 18px; height: 18px; margin-left: auto; color: var(--muted); flex: none; transition: transform .16s ease; }
.link:hover .chev { transform: translateX(3px); color: var(--accent); }

/* Botón primario (Agendar diagnóstico) */
.link.primary {
  background: var(--accent); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}
.link.primary .ico, .link.primary .chev, .link.primary .sub { color: var(--accent-ink); }
.link.primary .sub { opacity: .82; }
.link.primary:hover { filter: brightness(1.05); background: var(--accent); }

/* ---------- Redes (fila de íconos) ---------- */
.socials { margin-top: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.soc {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.soc svg { width: 21px; height: 21px; }
.soc:hover, .soc:focus-visible {
  transform: translateY(-3px); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ---------- Footer ---------- */
.foot { margin-top: auto; padding-top: 40px; text-align: center; }
.foot .logo { height: 20px; width: auto; opacity: .8; }
.foot .meta { margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
.foot .meta a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot .meta a:hover { color: var(--ink); }

/* ---------- Cookie bar (Ley 172-13) ---------- */
.cookie-bar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(140%);
  bottom: 16px; width: min(560px, calc(100% - 24px)); z-index: 90;
  background: #17162b; border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
  transition: transform .28s ease;
}
.cookie-bar.show { transform: translateX(-50%) translateY(0); }
.cookie-bar p { margin: 0 0 12px; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.cookie-bar a { color: var(--accent); }
.cookie-bar .actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-bar button {
  font-family: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink);
}
.cookie-bar .yes { background: var(--accent); border-color: transparent; color: var(--accent-ink); }

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