:root {
  color-scheme: light;
  --navy: #23213f;
  --teal: #087d8b;
  --teal-dark: #075e68;
  --teal-light: #dff3f2;
  --green: #86cf7d;
  --ink: #163149;
  --muted: #66788b;
  --line: #d7e2e8;
  --surface: #ffffff;
  --danger: #ba3344;
  --success: #187347;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #eef4f5; }
button, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #ffd257; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: -5rem; left: 1rem; padding: .8rem 1rem; border-radius: .5rem; color: white; background: var(--navy); }
.skip-link:focus { top: 1rem; }

.site-header {
  position: relative;
  z-index: 10;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  border-top: 8px solid var(--navy);
  border-bottom: 5px solid var(--green);
  background: #fff;
}
.brand { height: 64px; display: flex; align-items: center; }
.brand img { width: 112px; height: auto; display: block; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.8rem); }
nav a { font-size: .92rem; font-weight: 700; text-decoration: none; }
.nav-cta { padding: .78rem 1.6rem; border-radius: 999px; color: white; background: var(--teal); box-shadow: 0 8px 22px rgba(8,125,139,.18); }

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(500px, 1.08fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(3rem, 7vh, 6rem) clamp(2rem, 5vw, 5.5rem);
  isolation: isolate;
  overflow: hidden;
  background: #174f5b url("/assets/equipo-medico.png") center 38% / cover no-repeat;
}
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,65,76,.93) 0%, rgba(0,82,94,.77) 39%, rgba(1,79,91,.18) 68%, rgba(5,42,49,.12) 100%); }
.intro { max-width: 560px; color: white; }
.kicker { margin: 0 0 .9rem; font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 800; line-height: .98; letter-spacing: -.045em; text-transform: uppercase; }
.intro h1 { margin: 0; max-width: 550px; font-size: clamp(2rem, 3.4vw, 3.35rem); line-height: 1.08; letter-spacing: -.04em; }
.intro > p:last-of-type { max-width: 420px; margin: 1.25rem 0 0; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.55; }
.accent { width: 70px; height: 6px; display: block; margin-top: 1.8rem; border-radius: 20px; background: var(--green); }

.upload-card {
  width: min(100%, 610px);
  justify-self: start;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 24px;
  background: rgba(247,251,252,.94);
  box-shadow: 0 28px 70px rgba(12,49,60,.32);
  backdrop-filter: blur(18px);
}
.card-heading { display: flex; align-items: center; gap: .85rem; }
.secure-mark { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; border-radius: 14px; color: var(--teal); background: var(--teal-light); }
.secure-mark svg, .security-note svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 .1rem; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.upload-card h2 { margin: 0; color: var(--teal); font-size: clamp(1.55rem, 2.2vw, 2rem); line-height: 1.1; letter-spacing: -.025em; }
.card-description { margin: .8rem 0 1.4rem; color: var(--muted); font-size: .94rem; }

form { padding: 1.35rem; border-radius: 16px; background: white; box-shadow: 0 8px 25px rgba(23,65,77,.08); }
.field-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .42rem; min-width: 0; }
.field > span, legend { color: var(--ink); font-size: .88rem; font-weight: 750; }
b { color: #da243d; }
.field input { width: 100%; min-height: 48px; padding: .72rem .82rem; border: 1px solid #c9d7df; border-radius: 10px; color: var(--ink); background: #fbfdfe; transition: border-color .2s, box-shadow .2s, background .2s; }
.field input:hover { border-color: #8da8b4; }
.field input:focus { border-color: var(--teal); outline: none; background: white; box-shadow: 0 0 0 4px rgba(8,125,139,.12); }
.field-hint { min-height: 1em; color: var(--muted); font-size: .76rem; }
.field-error { display: block; min-height: 1.1em; color: var(--danger); font-size: .78rem; line-height: 1.35; }

.file-field { min-width: 0; margin: .8rem 0 0; padding: 0; border: 0; }
.file-field legend { margin-bottom: .48rem; padding: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.drop-zone { min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1rem; border: 1.5px dashed #93b5be; border-radius: 12px; color: var(--muted); background: #f8fcfc; text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--teal); background: #edf9f8; transform: translateY(-1px); }
.drop-zone > span { font-size: .9rem; }
.drop-zone strong { color: var(--teal); }
.drop-zone small { font-size: .73rem; line-height: 1.4; }
.upload-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-light); }
.upload-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.file-list.has-files { display: grid; gap: .45rem; margin: .55rem 0 .9rem; }
.file-list-heading { margin: 0 0 .15rem; color: var(--muted); font-size: .77rem; font-weight: 700; }
.file-row { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .58rem .65rem; border: 1px solid #e0e9ed; border-radius: 10px; background: #fbfdfd; }
.file-type { min-width: 42px; padding: .38rem .35rem; border-radius: 7px; color: var(--teal); background: var(--teal-light); font-size: .66rem; font-weight: 800; text-align: center; }
.file-details { min-width: 0; display: flex; flex-direction: column; }
.file-details strong { overflow: hidden; color: var(--ink); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.file-details small { color: var(--muted); font-size: .7rem; }
.remove-file { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #6a7882; background: transparent; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.remove-file:hover { color: var(--danger); background: #fff0f2; }

.submit-button { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: .65rem; margin-top: .25rem; border: 0; border-radius: 10px; color: white; background: linear-gradient(90deg, #087b89, #0e9daa); box-shadow: 0 10px 22px rgba(8,125,139,.2); font-weight: 750; cursor: pointer; transition: transform .2s, filter .2s, box-shadow .2s; }
.submit-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 13px 28px rgba(8,125,139,.26); }
.submit-button:disabled { cursor: wait; opacity: .78; }
.spinner { width: 18px; height: 18px; display: none; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: block; }
.status { min-height: 0; margin-top: .75rem; padding: 0; border-radius: 9px; font-size: .84rem; font-weight: 650; text-align: center; }
.status.is-success, .status.is-error { padding: .7rem .85rem; }
.status.is-success { color: var(--success); background: #e9f8ef; }
.status.is-error { color: #9f2435; background: #fff0f2; }
.security-note { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: 1rem; color: #3d5568; font-size: .8rem; }
.security-note svg { width: 17px; color: var(--green); stroke-width: 2.4; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: .78fr 1.22fr; gap: 2rem; padding-inline: 2rem; }
  .kicker { font-size: clamp(2rem, 4.6vw, 3.2rem); }
  .intro h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
}

@media (max-width: 760px) {
  .site-header { height: 72px; padding-inline: 1rem; }
  nav > a:not(.nav-cta) { display: none; }
  .nav-cta { padding: .68rem 1rem; font-size: .8rem; }
  .brand img { width: 102px; }
  .hero { min-height: calc(100vh - 72px); grid-template-columns: 1fr; align-items: start; gap: 2rem; padding: 3.25rem 1rem 2rem; background-position: 56% center; }
  .hero-shade { background: linear-gradient(180deg, rgba(0,66,77,.94) 0%, rgba(0,77,88,.82) 31%, rgba(5,48,57,.7) 58%, rgba(8,50,59,.82) 100%); }
  .intro { text-align: center; margin-inline: auto; }
  .kicker { margin-bottom: .65rem; font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .intro h1 { font-size: clamp(1.7rem, 7.3vw, 2.4rem); }
  .intro > p:last-of-type { margin-inline: auto; font-size: 1rem; }
  .accent { margin: 1.3rem auto 0; }
  .upload-card { justify-self: center; border-radius: 20px; padding: 1.1rem; }
  form { padding: 1rem; }
  .field-grid { grid-template-columns: 1fr; gap: .35rem; }
}

@media (max-width: 420px) {
  .nav-cta { padding: .65rem .75rem; font-size: .73rem; }
  .card-heading { align-items: flex-start; }
  .upload-card h2 { font-size: 1.45rem; }
  .drop-zone > span { font-size: .84rem; }
}

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

