/* De Tu Lado — estilos de marca ("Fusión cálida": arco de Refugio + colores de Juntos).
   Paleta y tipografías definidas en docs/04-MARCA.md. Las páginas nuevas usan
   solo este archivo; las heredadas de Limpi (registro, paneles, admin) tienen
   sus estilos propios con los mismos colores escritos a mano.
   Para cambiar la paleta: tocar SOLO este bloque :root (y los hex de las
   páginas heredadas — ver tabla en docs/04-MARCA.md). */

@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('../fonts/nunito-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root {
  --marca: #3A2350;      /* ciruela profundo: textos de marca, títulos, fondos oscuros */
  --boton: #4B2E5C;      /* ciruela: botones y links */
  --boton-h: #40274E;
  --secundario: #7D6390; /* lavanda oscuro: volantas, círculo "familia" del logo */
  --suave: #EEE4EF;      /* lavanda: chips, bloques suaves */
  --suave-xl: #F7F2F7;
  --acento: #F59E6B;     /* damasco: círculo "acompañante", detalles cálidos */
  --acento-l: #FCE4D6;
  --fondo: #FAF6F2;      /* crema: fondo general */
  --blanco: #FFFFFF;
  --texto: #4B3360;
  --muted: #746281;
  --borde: #E7E1E2;
  --ok: #2E7D4F;         /* verde de estado (verificado, enviado) — no es de marca */
  --radio: 16px;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sombra: 0 1px 2px rgba(58,35,80,.06), 0 6px 24px rgba(58,35,80,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--texto); background: var(--fondo); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--boton); }
h1, h2, h3 { font-family: var(--serif); color: var(--marca); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--secundario); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .78rem 1.3rem; border-radius: 12px;
  font: 700 .95rem/1.2 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--boton); color: #fff; }
.btn-primary:hover { background: var(--boton-h); }
.btn-dark { background: var(--marca); color: #fff; }
.btn-outline { border-color: var(--borde); color: var(--marca); background: #fff; }
.btn-outline:hover { border-color: var(--secundario); }
.btn-soft { background: var(--suave); color: var(--marca); }
.btn-wa { background: #1F9D55; color: #fff; }
.btn-wa:hover { background: #198048; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

/* ── Header / footer ── */
.ta-demo { background: var(--acento-l); color: #6E4730; font-size: .84rem; text-align: center; padding: 7px 16px; }
.ta-demo b { font-weight: 800; }
.ta-header { background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 50; }
.ta-nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.ta-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--marca); }
.ta-brand svg { width: 32px; height: 32px; flex: none; }
.ta-brand span { font: 600 1.35rem/1 var(--serif); letter-spacing: -.01em; }
.ta-brand span { white-space: nowrap; }
@media (max-width: 420px) { .ta-brand span { font-size: 1.18rem; } .ta-brand svg { width: 28px; height: 28px; } .ta-nav { gap: 10px; } }
.ta-links { display: flex; align-items: center; gap: 4px; }
.ta-links a { text-decoration: none; color: var(--texto); font-weight: 700; font-size: .92rem; padding: 8px 12px; border-radius: 10px; }
.ta-links a:hover, .ta-links a.on { background: var(--suave-xl); color: var(--marca); }
.ta-actions { display: flex; gap: 8px; align-items: center; }
.ta-burger { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--marca); cursor: pointer; padding: 6px; }
@media (max-width: 900px) {
  .ta-links { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--borde); box-shadow: var(--sombra); }
  .ta-links.open { display: flex; }
  .ta-links a { padding: 12px; }
  .ta-burger { display: block; }
  .ta-actions .hide-sm { display: none; }
  /* En el celular "Ingresar" queda a la vista y el menú suma crear cuenta (familia o AT) */
  .ta-ingresar { padding: .55rem .85rem; font-size: .88rem; }
  .ta-menu-cuenta { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--borde); }
  .ta-links .ta-menu-cuenta a { padding: .78rem 1rem; }
  .ta-links .ta-menu-cuenta a.btn-primary, .ta-links .ta-menu-cuenta a.btn-primary:hover { color: #fff; background: var(--boton); }
  .ta-links .ta-menu-cuenta a.btn-outline { color: var(--marca); background: #fff; }
}
@media (min-width: 901px) { .ta-menu-cuenta { display: none; } }
@media (max-width: 360px) { .ta-ingresar i { display: none; } .ta-ingresar { padding: .5rem .7rem; } .ta-actions { gap: 2px; } .ta-burger { padding: 4px; } .ta-brand span { font-size: 1.08rem; } }
.lp-logged-in .ta-menu-cuenta { display: none; }
.ta-footer { background: var(--marca); color: #D8D3DC; padding: 48px 0 28px; margin-top: 72px; font-size: .92rem; }
.ta-footer a { color: #D8D3DC; text-decoration: none; }
.ta-footer a:hover { color: #fff; }
.ta-redes { display: flex; gap: 10px; margin-top: 16px; }
.ta-redes a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.ta-redes a:hover { background: rgba(255,255,255,.2); }
.ta-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ta-foot-grid h4 { color: #fff; font: 800 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 14px; }
.ta-foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ta-foot-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: .82rem; color: #A99BB8; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .ta-foot-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .ta-foot-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .ta-foot-grid { grid-template-columns: minmax(0,1fr); } }

/* ── Bloques ── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; }
.card-soft { background: var(--suave); border-radius: var(--radio); padding: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .grid-2 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--suave); color: var(--marca);
  font: 700 .86rem/1.2 var(--sans); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; user-select: none; }
.chip:hover { border-color: var(--secundario); }
.chip.on { background: var(--marca); color: #fff; }
.chip-sm { padding: 4px 10px; font-size: .78rem; cursor: default; }
.chip-sm:hover { border-color: transparent; }

.badge { display: inline-flex; align-items: center; gap: 4px; font: 800 .74rem/1 var(--sans); padding: 5px 9px; border-radius: 999px; }
.badge-ok { background: #E1F0E7; color: var(--ok); }
.badge-dest { background: var(--acento-l); color: #7F5238; }
.badge-fund { background: var(--suave-xl); color: var(--marca); }

/* ── Formularios ── */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--marca); }
.field .hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--marca); background: #fff; border: 1.5px solid var(--borde); border-radius: 12px; padding: .75rem .9rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--secundario); box-shadow: 0 0 0 3px rgba(125,99,144,.18); }
textarea { min-height: 120px; resize: vertical; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; background: #fff; border: 1.5px solid var(--borde); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.radios input { accent-color: var(--boton); }
.radios label:has(input:checked) { border-color: var(--boton); background: var(--suave-xl); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: 4px; accent-color: var(--boton); }
.alert { border-radius: 12px; padding: 14px 16px; font-size: .92rem; }
.alert-ok { background: #E1F0E7; color: var(--marca); }
.alert-err { background: #FBE5DE; color: #7A2E1A; }

/* ── Tarjeta de AT ── */
/* Ficha con el formato de Limpi: foto grande (4:5, como un posteo) y datos debajo */
.at-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s, transform .15s; }
.at-card:hover { box-shadow: var(--sombra); border-color: #D8CDDC; transform: translateY(-2px); }
.at-card.dest { border-color: #F9C5A6; }
.at-foto { position: relative; aspect-ratio: 4 / 5; background: var(--suave-xl); overflow: hidden; }
.at-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.foto-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--suave), var(--acento-l)); }
.foto-ph span { font: 500 clamp(2.4rem, 7vw, 3.6rem)/1 var(--serif); color: var(--marca); opacity: .75; }
.at-ov { position: absolute; display: inline-flex; align-items: center; gap: 4px; font: 800 .72rem/1 var(--sans); padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--marca); box-shadow: 0 2px 8px rgba(58,35,80,.14); }
.at-ov-l { top: 10px; left: 10px; } .at-ov-r { top: 10px; right: 10px; } .at-ov-b { bottom: 10px; left: 10px; }
.at-ov.dest { background: var(--acento-l); color: #7F5238; }
.at-ov-r i { color: var(--ok); }
.at-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.at-stars { display: flex; align-items: center; gap: 6px; font-size: .84rem; flex-wrap: wrap; }
.at-stars b { color: var(--marca); }
.estrellas { letter-spacing: 1px; color: #D9DED9; font-size: .95rem; }
.estrellas .on { color: #E3A33A; }
.at-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge-cobro { background: var(--suave-xl); color: var(--marca); font-weight: 700; }
.at-contacto { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.at-card.dest .at-contacto { color: #1F7A47; }
.at-ver { font-weight: 800; color: var(--boton); white-space: nowrap; }
.at-body .at-foot { margin-top: auto; }
.at-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--acento-l); color: var(--marca); display: flex; align-items: center; justify-content: center;
  font: 800 1.05rem/1 var(--sans); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.6rem; }
.at-name { font: 600 1.2rem/1.2 var(--serif); color: var(--marca); }
.at-meta { font-size: .86rem; color: var(--muted); }
.at-bio { font-size: .92rem; color: var(--texto); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.at-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--suave-xl); padding-top: 12px; font-size: .86rem; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #F3EBF0 25%, #FAF7FA 50%, #F3EBF0 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radio); }
@keyframes sk { to { background-position: -200% 0; } }

/* Invitación a AT fundadores (ta-ui.js) */
.ta-invita { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 360px; max-width: calc(100% - 32px); background: #fff;
  border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: 0 12px 40px rgba(58,35,80,.22); padding: 22px 22px 16px;
  transform: translateY(24px); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.ta-invita.on { transform: none; opacity: 1; }
.ta-invita::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: var(--radio) var(--radio) 0 0; background: var(--acento); }
.ta-invita h3 { font-size: 1.35rem; margin: 6px 0 8px; padding-right: 20px; }
.ta-invita p { font-size: .92rem; margin: 0 0 12px; }
.ta-invita-quedan { display: inline-flex; align-items: center; gap: 6px; background: var(--acento-l); color: #7F5238; font-weight: 800; font-size: .85rem; border-radius: 99px; padding: 5px 12px; margin-bottom: 14px; }
.ta-invita-x { position: absolute; top: 12px; right: 10px; background: none; border: 0; font-size: 1.2rem; color: var(--muted); cursor: pointer; padding: 6px; line-height: 1; }
.ta-invita-pie { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: .84rem; }
.ta-invita-pie button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 560px) {
  .ta-invita { right: 0; left: 0; bottom: 0; width: auto; max-width: none; border-radius: var(--radio) var(--radio) 0 0; padding: 20px 16px 16px; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--marca); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .92rem; z-index: 100; box-shadow: var(--sombra); max-width: calc(100% - 32px); }
