/* ==========================================================================
   Carreto con Salud — Sitio en construcción
   Port en CSS puro del diseño Stitch "Tema Blanco" (Clinical Pulse)
   ========================================================================== */

:root {
  /* Marca */
  --teal: #48b8a5;
  --teal-dark: #2fb39e;
  --teal-deep: #1f8f7d;
  --teal-light: #e8f8f5;
  --navy: #1a3b5c;
  --navy-deep: #0b2545;
  --blue: #004b87;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --danger: #dc2626;
  --danger-light: #fef2f2;

  /* Neutros */
  --bg: #f8fafc;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Tipografía */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  /* Espaciado */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.25rem;
  --space-2xl: 3.5rem;
  --gutter: 1.5rem;

  /* Radios */
  --r: 1rem;
  --r-lg: 1.5rem;
  --r-xl: 2rem;
  --r-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--slate-800);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(72, 184, 165, 0.2); color: var(--navy); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

.icon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Tipografía (tokens) ---------- */
.t-display { font-family: var(--font-display); font-size: 48px; line-height: 54px; letter-spacing: -0.02em; font-weight: 700; }
.t-headline-lg { font-family: var(--font-display); font-size: 32px; line-height: 40px; letter-spacing: -0.015em; font-weight: 600; }
.t-body-lg { font-size: 17px; line-height: 1.65; }
.t-body-sm { font-size: 14px; line-height: 20px; }
.t-label-lg { font-family: var(--font-display); font-size: 14px; line-height: 20px; letter-spacing: 0.04em; font-weight: 600; }
.t-label-md { font-family: var(--font-display); font-size: 12px; line-height: 16px; letter-spacing: 0.06em; font-weight: 500; }
.t-label-sm { font-family: var(--font-display); font-size: 11px; line-height: 15px; letter-spacing: 0.08em; font-weight: 600; }
.upper { text-transform: uppercase; }
.bold { font-weight: 700; }
.c-teal { color: var(--teal-dark); }
.c-navy { color: var(--navy); }
.c-muted { color: var(--slate-600); }
.c-soft { color: var(--slate-500); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.site-header .container { height: 80px; display: flex; align-items: center; justify-content: center; }
.site-header img { height: 48px; width: auto; object-fit: contain; padding: 4px 0; }

/* ---------- Main / Hero ---------- */
main { flex-grow: 1; padding-top: 80px; position: relative; }

.hero { position: relative; overflow: hidden; padding: var(--space-xl) 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.blob--teal { top: -8rem; left: 25%; width: 24rem; height: 24rem; background: rgba(72, 184, 165, 0.1); animation: drift 14s ease-in-out infinite alternate; }
.blob--navy { top: 50%; right: -6rem; width: 20rem; height: 20rem; background: rgba(26, 59, 92, 0.05); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(30px, 25px, 0) scale(1.08); } }

.hero .container { position: relative; z-index: 1; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-xl); }

.badge {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--r-full);
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}
.beacon { position: relative; display: flex; width: 10px; height: 10px; }
.beacon::before, .beacon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--teal); }
.beacon::before { animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite; opacity: 0.75; }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }

.trust { display: flex; align-items: center; gap: var(--space-xs); color: var(--slate-600); }
.trust .icon { font-size: 18px; color: var(--teal); }

.grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: start; }
.col { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.stack-md { display: flex; flex-direction: column; gap: var(--space-md); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-sm); }
.stack-xs { display: flex; flex-direction: column; gap: var(--space-xs); }

/* Entrada animada */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.7s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- Canales ---------- */
.channel {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md);
  border-radius: var(--r-full);
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}
.channel:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.channel__main { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.channel__icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border: 1px solid;
}
.channel__icon svg { width: 20px; height: 20px; }
.channel__text { display: flex; flex-direction: column; min-width: 0; }
.channel__title { color: var(--navy); transition: color 0.3s; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.channel__title small { font-family: var(--font-body); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--slate-500); }
.channel__arrow { color: var(--slate-400); padding-right: var(--space-sm); transition: color 0.3s, transform 0.3s; }
.channel:hover .channel__arrow { transform: translateX(3px); }

.channel--wa .channel__icon { background: #ecfdf5; border-color: #d1fae5; fill: #25d366; }
.channel--wa:hover { border-color: var(--teal); background: rgba(232, 248, 245, 0.4); }
.channel--wa:hover .channel__title, .channel--wa:hover .channel__arrow { color: var(--teal-dark); }

.channel--fb .channel__icon { background: #eff6ff; border-color: #dbeafe; fill: #1877f2; }
.channel--fb:hover { border-color: var(--blue); background: var(--slate-50); }
.channel--fb:hover .channel__title, .channel--fb:hover .channel__arrow { color: var(--blue); }

.channel--ig .channel__icon { background: #fdf2f8; border-color: #fce7f3; fill: #e4405f; }
.channel--ig:hover { border-color: #f9a8d4; background: var(--slate-50); }
.channel--ig:hover .channel__title, .channel--ig:hover .channel__arrow { color: #db2777; }

/* ---------- Aviso ámbar ---------- */
.notice {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--r-xl);
  background: rgba(255, 251, 235, 0.8);
  border: 1px solid rgba(253, 230, 138, 0.7);
  box-shadow: var(--shadow-sm);
  color: var(--slate-700);
}
.notice .icon { font-size: 26px; color: var(--amber-600); flex-shrink: 0; }

/* ---------- Tarjeta formulario ---------- */
.card {
  border-radius: var(--r-xl);
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: var(--space-lg);
}

.form { display: flex; flex-direction: column; gap: var(--space-md); }
.form-row { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.field { display: flex; flex-direction: column; gap: var(--space-xs); }
.field label { color: var(--slate-600); }
.field__wrap { position: relative; display: flex; align-items: center; }
.field__wrap .icon { position: absolute; left: 16px; color: var(--slate-400); pointer-events: none; transition: color 0.2s; }

.input {
  width: 100%;
  font: inherit; font-size: 16px;
  color: var(--slate-900);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease);
  outline: none;
}
.input::placeholder { color: var(--slate-400); }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); background: var(--white); }
.field__wrap:focus-within .icon { color: var(--teal-dark); }
input.input { height: 52px; padding: 0 var(--space-md) 0 48px; border-radius: var(--r-full); }
textarea.input { padding: var(--space-md); border-radius: var(--r-xl); resize: none; min-height: 120px; }

.field.is-invalid .input { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15); }
.field__error { color: var(--danger); font-size: 12px; line-height: 16px; padding-left: var(--space-md); min-height: 0; }
.field__error:empty { display: none; }

.counter { text-align: right; font-size: 12px; color: var(--slate-400); padding-right: var(--space-sm); }

/* Honeypot */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; align-items: flex-start; gap: var(--space-sm); color: var(--slate-600); cursor: pointer; }
.consent input {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(72, 184, 165, 0.6); background: var(--white);
  display: grid; place-content: center; cursor: pointer; transition: all 0.2s;
}
.consent input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); transform: scale(0); transition: transform 0.2s; }
.consent input:checked { background: var(--teal); border-color: var(--teal); }
.consent input:checked::after { transform: scale(1); }
.consent input:focus-visible { box-shadow: 0 0 0 3px rgba(72, 184, 165, 0.3); }

.btn {
  margin-top: var(--space-xs);
  width: 100%; height: 52px;
  border: 0; border-radius: var(--r-full);
  background: var(--teal); color: var(--white);
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  box-shadow: var(--shadow-md);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.btn:hover { background: var(--teal-dark); box-shadow: var(--shadow-lg), 0 0 20px rgba(72, 184, 165, 0.35); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.75; cursor: progress; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: var(--space-md); border-radius: var(--r-full);
  text-align: center; border: 1px solid;
  animation: reveal 0.4s var(--ease) both;
}
.alert[hidden] { display: none; }
.alert .icon { font-size: 18px; }
.alert--ok { background: var(--teal-light); color: var(--teal-deep); border-color: rgba(72, 184, 165, 0.3); }
.alert--err { background: var(--danger-light); color: var(--danger); border-color: rgba(220, 38, 38, 0.25); }

/* Contacto directo */
.direct { padding-top: var(--space-md); border-top: 1px solid var(--slate-100); }
.direct__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-sm); }
.direct__item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md); border-radius: var(--r-full);
  background: var(--slate-50); border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm); transition: all 0.25s var(--ease); min-width: 0;
}
.direct__item:hover { background: var(--white); }
.direct__item .bubble { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid; }
.direct__item .bubble .icon { font-size: 18px; }
.direct__item .meta { display: flex; flex-direction: column; min-width: 0; }
.direct__item .meta strong { font-size: 14px; line-height: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.25s; }
.direct__item--mail .bubble { background: #eff6ff; border-color: #dbeafe; color: var(--blue); }
.direct__item--mail:hover { border-color: var(--blue); }
.direct__item--mail:hover strong { color: var(--blue); }
.direct__item--tel .bubble { background: #f0fdfa; border-color: #ccfbf1; color: var(--teal-dark); }
.direct__item--tel:hover { border-color: var(--teal); }
.direct__item--tel:hover strong { color: var(--teal-dark); }

.privacy {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md); border-radius: var(--r-xl);
  background: var(--white); border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm); color: var(--slate-600);
}
.privacy .icon { color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid rgba(226, 232, 240, 0.9); padding: var(--space-lg) 0; text-align: center; }
.site-footer p + p { margin-top: var(--space-xs); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .form-row, .direct__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .hero { padding: var(--space-2xl) 0; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .t-display { font-size: 36px; line-height: 44px; }
  .t-headline-lg { font-size: 28px; line-height: 36px; }
  .card { padding: var(--space-lg); }
  .container { padding: 0 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
