/* Paleta y tipografía tomadas de la app Clinia Doctor (clinia.do) */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-muted: #475569;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brass: #b9863b;
  --brass-hover: #a5752f;
  --brass-text: #8a6224;   /* dorado oscuro para texto pequeño (contraste AA) */
  --brass-light: #d9a756;  /* dorado sobre fondos oscuros */
  --brass-soft: #f3e7d4;
  --green: #25d366;
  --green-dark: #1eab52;
  --font-display: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow: 0 20px 50px -24px rgba(15, 23, 42, 0.25);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}
p { margin: 0; color: var(--ink-muted); }
ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ---------- Icons ---------- */
.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn--primary {
  background: var(--brass);
  color: var(--ink);
}
.btn--primary:hover { background: var(--brass-hover); transform: translateY(-1px); }
.btn--whatsapp {
  background: var(--green);
  color: var(--ink);
}
.btn--whatsapp:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn--small { padding: 10px 18px; font-size: 14px; white-space: nowrap; }
.btn--large { padding: 15px 26px; font-size: 16px; }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo__mark {
  width: 28px;
  height: 28px;
  color: var(--brass);
}
.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover { color: var(--brass-text); }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% 0%, var(--brass-soft) 0%, transparent 60%),
    var(--bg);
  padding: 96px 0 112px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
}

.badge {
  display: inline-block;
  background: var(--brass-soft);
  color: var(--brass-text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
}

.hero__subtitle {
  font-size: 18px;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
@media (max-width: 480px) {
  .hero__ctas .btn { width: 100%; }
}

/* ---------- Hero collage ---------- */
.collage { position: relative; }
.collage__fotos {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr;
  grid-template-rows: 210px 190px;
  gap: 14px;
  /* Bordes difuminados hacia el fondo */
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 60%, transparent 100%);
}
.collage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.collage__img--medico {
  grid-row: 1 / 3;
  object-position: 28% center;
}
.collage__img--medica {
  grid-row: 1 / 3;
  object-position: center 30%;
}
.collage__img--rx {
  object-position: center 30%;
  filter: blur(1.5px) grayscale(1) contrast(0.9);
  opacity: 0.85;
}
.collage__img--steth {
  filter: blur(1.5px) saturate(0.7);
  opacity: 0.85;
}

/* Receta con la marca de Clinia, en primer plano */
.receta {
  position: absolute;
  right: 8%;
  bottom: -14px;
  width: 170px;
  padding: 14px 16px 16px;
  background: var(--surface);
  border-radius: 12px;
  border-top: 3px solid var(--brass);
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.35);
  transform: rotate(-4deg);
}
.receta__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.receta__logo { width: 14px; height: 14px; color: var(--brass); }
.receta__rx {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--brass-text);
  margin: 4px 0 6px;
}
.receta__line {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  margin-bottom: 7px;
}
.receta__line--short { width: 60%; }
.receta__firma {
  width: 70px;
  height: 1px;
  background: var(--line-strong);
  margin: 16px 0 0 auto;
}

@media (max-width: 900px) {
  .collage { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 480px) {
  .collage__fotos { grid-template-rows: 150px 140px; gap: 10px; }
  .receta { width: 130px; right: 2%; }
}

/* ---------- Funcionalidades ---------- */
.funciones {
  padding: 104px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.funciones h2,
.testimonios h2 {
  text-align: center;
  font-size: 34px;
  margin: 0 auto 64px;
}
.funciones__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 48px;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .funciones__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .funciones__grid { grid-template-columns: 1fr; gap: 36px; }
}
.funcion__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brass-soft);
  color: var(--brass-text);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.funcion h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.funcion p { font-size: 15px; }

/* ---------- Testimonios (sección oculta en el HTML hasta tener testimonios reales) ---------- */
.testimonios { padding: 88px 0; background: var(--surface); }
.testimonios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
@media (max-width: 900px) {
  .testimonios__grid { grid-template-columns: 1fr; }
}
.testimonio {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.testimonio blockquote {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}
.testimonio__autor {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonio__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brass-soft);
  border: 2px solid var(--brass);
  flex-shrink: 0;
}
.testimonio__autor strong { display: block; font-size: 14px; }
.testimonio__autor span { font-size: 13px; color: var(--ink-muted); }

/* ---------- Demo form ---------- */
.demo {
  background: var(--ink);
  padding: 104px 0;
}
.demo__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .demo__inner { grid-template-columns: 1fr; }
}
.demo__content h2 {
  color: #ffffff;
  font-size: 34px;
  margin-bottom: 16px;
}
.demo__content p {
  color: #cbd5e1;
  font-size: 17px;
}
/* Tarjeta con borde superior dorado, como el login de Clinia Doctor */
.demo__form {
  position: relative;
  background: var(--surface);
  border-radius: 28px;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
}
.demo__form::before {
  content: '';
  position: absolute;
  inset: -3px -3px auto -3px;
  height: 45%;
  border: 3px solid var(--brass);
  border-bottom: none;
  border-radius: 31px 31px 0 0;
  -webkit-mask: linear-gradient(#000 40%, transparent);
          mask: linear-gradient(#000 40%, transparent);
  pointer-events: none;
}
.demo__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.demo__form input,
.demo__form select {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}
.demo__form input::placeholder { color: var(--ink-faint); }
.demo__form input:focus,
.demo__form select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-soft);
}
.demo__form label.demo__consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
}
.demo__consent input {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--brass);
}

/* Errores por campo y mensaje de estado */
.demo__form input[aria-invalid="true"] { border-color: #b0432e; }
.demo__error {
  font-size: 12.5px;
  font-weight: 400;
  color: #b0432e;
}
.demo__error:empty { display: none; }
.demo__consent-wrap .demo__error { display: block; margin: 6px 0 0 28px; }
.demo__consent-wrap .demo__error:empty { display: none; }
.demo__status {
  font-size: 14px;
  text-align: center;
}
.demo__status:empty { display: none; }
.demo__status--ok { color: #2f8f5b; font-weight: 500; }
.demo__status--error { color: #b0432e; }

/* Honeypot: fuera de pantalla (no display:none, que algunos bots detectan) */
.demo__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.logo--footer { color: #ffffff; font-size: 18px; }
.logo--footer .logo__mark { width: 22px; height: 22px; color: var(--brass-light); }
.footer p { color: #94a3b8; font-size: 13px; }
.footer__contact {
  display: flex;
  gap: 20px;
}
.footer__contact a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
}
.footer__contact a:hover { color: var(--brass-light); }
