/* DispoClinic landing
   Sistema: azul marino institucional como marca, verde azulado clínico solo como detalle.
   Radios: 4px en controles (botones, inputs, pestañas), 6px en imágenes y paneles. */

:root {
  --bg: #fbfcfd;
  --bg-alt: #f1f5f8;
  --surface: #ffffff;
  --ink: #0b1f2e;
  --ink-2: #3a4b58;
  --ink-3: #56666f;
  --line: #dbe3e9;
  --line-strong: #c3cfd8;
  --brand: #0c2d48;
  --brand-hover: #081f33;
  --brand-ink: #f4f8fb;
  --brand-muted: #b8cadb;
  --accent: #0f6b66;
  --accent-soft: #e2efed;
  --danger: #b42318;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 18px 40px -24px rgb(0 0 0 / .22);
  --logo-bg: #0c2d48;
  --logo-fg: #ffffff;
  --r-ctl: 4px;
  --r-box: 6px;
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
  accent-color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1520;
    --bg-alt: #0e1c29;
    --surface: #102030;
    --ink: #e6edf2;
    --ink-2: #b3c1cc;
    --ink-3: #8d9daa;
    --line: #1f3244;
    --line-strong: #2c4459;
    --brand: #dbe7f1;
    --brand-hover: #ffffff;
    --brand-ink: #0b1f2e;
    --brand-muted: #8fa6ba;
    --accent: #5cbcb1;
    --accent-soft: #12302f;
    --danger: #ff8a80;
    --logo-bg: #e6eef5;
    --logo-fg: #0b1f2e;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 40px -24px rgb(0 0 0 / .8);
    color-scheme: dark;
  }
}

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-700.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }

.ic { display: inline-block; width: 1em; height: 1em; fill: currentColor; flex: none; vertical-align: -0.125em; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  caret-color: var(--accent);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: var(--brand-ink); }
html { scrollbar-color: var(--line-strong) var(--bg); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 768px) { .section { padding: 72px 0; } }

.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); max-width: 24ch; }
.section-lead { color: var(--ink-2); font-size: 1.0625rem; max-width: 62ch; margin-top: 16px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--brand); color: var(--brand-ink);
  padding: 8px 16px; border-radius: var(--r-ctl); text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .9375rem; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .ic { font-size: 1.1rem; transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 42px; padding: 0 20px; font-size: .875rem; }

/* Barra superior */
.topbar { background: var(--brand); color: var(--brand-muted); font-size: .8125rem; }
@media (prefers-color-scheme: dark) { .topbar { background: #071019; } }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 24px; }
.topbar ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.topbar li { display: inline-flex; align-items: center; gap: 8px; }
.topbar a { text-decoration: none; color: #e6eef5; }
.topbar a:hover { text-decoration: underline; }
.topbar .ic { font-size: 1rem; }
@media (max-width: 860px) { .topbar .hide-sm { display: none; } }
@media (max-width: 520px) { .topbar .container { justify-content: center; } .topbar .topbar-note { display: none; } }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 8px 24px -18px rgb(0 0 0 / .28); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { display: grid; line-height: 1.1; }
.brand-name b { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; }
.brand-name small { font-size: .6875rem; color: var(--ink-3); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; font-weight: 500; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--brand-ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; padding: 6px; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { display: block; padding: 14px 4px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .nav-links a.btn { display: flex; margin-top: 16px; width: 100%; height: 50px; border-bottom: 0; font-size: 1rem; }
}

/* Portada */
.hero { padding: 72px 0 88px; background: var(--surface); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 4.4vw, 3.625rem); letter-spacing: -0.03em; line-height: 1.08; max-width: 16ch; }
.hero-sub { margin-top: 24px; font-size: 1.1875rem; color: var(--ink-2); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero-media { border-radius: var(--r-box); overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--bg-alt); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { aspect-ratio: 4 / 3.4; }
}

/* Franja de garantías */
.assurances { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.assurances ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.assurances li { display: flex; align-items: center; gap: 14px; padding: 28px 24px; }
.assurances li:first-child { padding-left: 0; }
.assurances li + li { border-left: 1px solid var(--line); }
.assurances .ic { font-size: 1.75rem; color: var(--accent); flex: none; }
.assurances b { display: block; font-weight: 600; font-size: .9375rem; }
.assurances span { display: block; color: var(--ink-3); font-size: .8125rem; line-height: 1.4; }
@media (max-width: 960px) {
  .assurances ul { grid-template-columns: repeat(2, 1fr); }
  .assurances li { padding: 22px 16px; }
  .assurances li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .assurances li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .assurances ul { grid-template-columns: 1fr; }
  .assurances li { padding: 18px 0; border-left: 0 !important; }
  .assurances li + li { border-top: 1px solid var(--line); }
}

/* Líneas de producto */
.tabs { display: flex; gap: 40px; margin: 48px 0 0; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0; border: 0; background: none;
  color: var(--ink-3); font: inherit; font-weight: 600; font-size: 1.0625rem; cursor: pointer;
  transition: color .2s var(--ease);
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab .ic { font-size: 1.3rem; color: var(--accent); }

.panel { padding-top: 48px; }
.panel[hidden] { display: none; }
.panel-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.panel-media { position: sticky; top: 104px; margin: 0; }
.panel-media img { border-radius: var(--r-box); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); }
.panel-media figcaption { margin-top: 20px; color: var(--ink-2); max-width: 46ch; }
.cat-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.cat-rows li { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.cat-rows h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
.cat-rows p { color: var(--ink-2); font-size: .9688rem; line-height: 1.55; }
.catalog-note { margin-top: 32px; color: var(--ink-3); font-size: .9375rem; }
.catalog-note a { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) { animation: panel-in .5s var(--ease) both; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; gap: 36px; }
  .panel-media { position: static; }
}
@media (max-width: 600px) {
  .tabs { gap: 24px; }
  .tab { font-size: 1rem; }
  .cat-rows li { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
}

/* Por qué elegirnos */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.why-media { border-radius: var(--r-box); overflow: hidden; aspect-ratio: 4 / 4.2; background: var(--surface); }
.why-media img { width: 100%; height: 100%; object-fit: cover; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 40px 0 0; }
.why-list div { padding: 22px 0; border-top: 1px solid var(--line-strong); }
.why-list dt { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; }
.why-list dd { margin: 6px 0 0; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-media { aspect-ratio: 3 / 2; }
}
@media (max-width: 520px) { .why-list { grid-template-columns: 1fr; } }

/* Proceso */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; position: relative; }
.step { position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: 64px; right: -36px; height: 1px; background: var(--line-strong); }
.step-icon { position: relative; width: 52px; height: 52px; border-radius: var(--r-ctl); background: var(--brand); display: grid; place-items: center; font-size: 1.4rem; color: var(--brand-ink); }
.step h3 { font-size: 1.25rem; margin: 28px 0 8px; }
.step p { color: var(--ink-2); max-width: 34ch; }
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step:not(:last-child)::after { top: 64px; bottom: -20px; left: 26px; right: auto; width: 1px; height: auto; }
  .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; }
  .step-icon { grid-row: span 2; }
  .step h3 { margin: 12px 0 4px; }
}

/* Instrumental */
.kit-media { border-radius: var(--r-box); overflow: hidden; background: var(--bg-alt); aspect-ratio: 16 / 8; }
.kit-media img { width: 100%; height: 100%; object-fit: cover; }
.kit-text { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-top: 40px; }
.kit-text h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); max-width: 26ch; }
.kit-text p { color: var(--ink-2); margin-top: 12px; max-width: 60ch; }
@media (max-width: 768px) {
  .kit-media { aspect-ratio: 16 / 10; }
  .kit-text { grid-template-columns: 1fr; gap: 24px; }
}

/* Preguntas frecuentes */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: start; }
.faq-aside p { color: var(--ink-2); margin-top: 16px; max-width: 36ch; }
.faq-aside a { color: var(--accent); font-weight: 600; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-weight: 600; font-size: 1.0625rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--brand); }
@media (prefers-color-scheme: dark) { .faq-list summary:hover { color: var(--ink); } }
.faq-list summary .ic { font-size: 1.2rem; color: var(--accent); transition: transform .3s var(--ease); flex: none; }
.faq-list details[open] summary .ic { transform: rotate(45deg); }
.faq-list details p { padding: 0 48px 24px 0; color: var(--ink-2); max-width: 68ch; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: start; }
.contact-info { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--line-strong); }
.contact-info li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-info .ic { font-size: 1.35rem; color: var(--accent); margin-top: 2px; flex: none; }
.contact-info strong { display: block; font-size: .8125rem; color: var(--ink-3); font-weight: 500; }
.contact-info a, .contact-info span { font-weight: 600; text-decoration: none; }
.contact-info a:hover { color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box); padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; box-shadow: var(--shadow); }
.form-title { grid-column: 1 / -1; font-size: 1.25rem; margin-bottom: 4px; }
.field { display: grid; gap: 8px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .error { font-size: .8125rem; color: var(--danger); min-height: 1em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; padding-top: 4px; }
.form-foot small { color: var(--ink-3); max-width: 40ch; }
.form-success {
  grid-column: 1 / -1; display: none; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); font-weight: 500;
}
.form-success .ic { font-size: 1.35rem; flex: none; }
.form.is-sent .form-success { display: flex; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; padding: 24px 20px; } .form-foot .btn { width: 100%; } }

/* Pie */
.footer { background: #0c2d48; color: #b8cadb; padding: 72px 0 104px; }
@media (prefers-color-scheme: dark) { .footer { background: #071019; } }
.footer .brand { --logo-bg: #f4f8fb; --logo-fg: #0c2d48; }
.footer .brand-name b { color: #f4f8fb; }
.footer .brand-name small { color: #8fa6ba; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; }
.footer p { font-size: .9375rem; margin-top: 18px; max-width: 34ch; }
.footer h4 { margin: 0 0 16px; font-size: .9375rem; color: #f4f8fb; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: #b8cadb; text-decoration: none; font-size: .9375rem; }
.footer ul a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgb(184 202 219 / .2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8125rem; color: #8fa6ba; }
.footer :focus-visible { outline-color: #8fd3ca; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: #ffffff; font-size: 1.75rem; text-decoration: none;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / .35);
  transition: transform .25s var(--ease);
}
@media (prefers-color-scheme: dark) { .wa-float { color: #062321; } }
.wa-float:hover { transform: translateY(-2px); }
.wa-float:active { transform: scale(.96); }

/* Movimiento: una sola entrada, la de la portada */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-media { animation: unveil 1.2s var(--ease) .1s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
