/* Nexomed Biomédica — tokens, base y componentes compartidos */
:root {
  --navy-950: #061528;
  --navy: #0b2545;
  --navy-700: #13355f;
  --blue-700: #134a8e;
  --blue: #1a5fb4;
  --blue-400: #5b93d6;
  --blue-100: #dde9f8;
  --blue-50: #f1f6fd;
  --teal: #0e9488;
  --teal-300: #2dd4bf;
  --teal-50: #e7f6f4;

  --ink: #0d1b2e;
  --text: #2a3a52;
  --muted: #586880;
  --line: #e2e8f0;
  --line-strong: #cad5e2;
  --surface: #ffffff;
  --soft: #f5f8fb;

  --danger: #b42318;
  --danger-50: #fef3f2;
  --success: #067647;
  --success-50: #ecfdf3;
  --warning: #93370d;
  --warning-50: #fffaeb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
  --shadow: 0 1px 2px rgba(11, 37, 69, 0.05), 0 6px 18px -6px rgba(11, 37, 69, 0.12);
  --shadow-lg: 0 30px 60px -24px rgba(11, 37, 69, 0.28), 0 12px 24px -12px rgba(11, 37, 69, 0.12);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
  --header-h: 72px;
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-display); line-height: 1.18; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
button { font: inherit; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(26, 95, 180, 0.5); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--navy); color: #fff; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* Logotipo tipográfico: NEXOMED pequeño, BIOMÉDICA protagonista */
.brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding-left: 12px;
  border-left: 3px solid var(--teal);
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.brand-top { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.52em; color: var(--blue); }
.brand-main { font-family: var(--font-display); font-size: 1.42rem; font-weight: 800; letter-spacing: 0.035em; color: var(--navy); }
.brand-light .brand-top { color: #a9c8ee; }
.brand-light .brand-main { color: #fff; }

/* Botones */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.72em 1.2em;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary:hover { --btn-bg: var(--blue-700); box-shadow: 0 6px 16px -8px rgba(26, 95, 180, 0.7); }
.btn-dark { --btn-bg: var(--navy); }
.btn-dark:hover { --btn-bg: var(--navy-700); box-shadow: 0 6px 16px -8px rgba(11, 37, 69, 0.7); }
.btn-outline { --btn-bg: #fff; --btn-fg: var(--navy); --btn-border: var(--line-strong); }
.btn-outline:hover { --btn-border: var(--blue); --btn-fg: var(--blue); }
.btn-soft { --btn-bg: var(--blue-50); --btn-fg: var(--blue-700); --btn-border: var(--blue-100); }
.btn-soft:hover { --btn-bg: var(--blue); --btn-fg: #fff; --btn-border: var(--blue); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--navy); }
.btn-light:hover { --btn-bg: var(--teal-50); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); }
.btn-ghost:hover { --btn-bg: var(--soft); transform: none; }
.btn-danger { --btn-bg: var(--danger); }
.btn-danger:hover { --btn-bg: #912018; }
.btn-sm { padding: 0.55em 0.95em; font-size: 0.875rem; }
.btn-lg { padding: 0.9em 1.45em; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5em; aspect-ratio: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue);
  border: 1px solid var(--blue-100);
  flex-shrink: 0;
}
.icon-tile .icon { width: 22px; height: 22px; }

/* Formularios */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 16px; }
.label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.label .optional { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  padding: 0.68em 0.85em;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.18); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }
.help { font-size: 0.82rem; color: var(--muted); }
.field-error { font-size: 0.82rem; color: var(--danger); font-weight: 500; }
.field-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 0.9rem; border: 1px solid; }
.alert .icon { margin-top: 2px; }
.alert-error { background: var(--danger-50); color: var(--danger); border-color: #fecdca; }
.alert-info { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.alert-warning { background: var(--warning-50); color: var(--warning); border-color: #fedf89; }
