/* ===========================================================
   Servicios Rehabilitar — Landing
   Mobile first. Paleta tomada del logo institucional.
   =========================================================== */

:root {
  --navy:        #20315f;
  --blue:        #004a98;
  --sky:         #0099dd;
  --sky-light:   #ceeaf9;
  --ink:         #1a2236;
  --muted:       #5b6678;
  --white:       #ffffff;
  --bg-1:        #0a1733;
  --bg-2:        #004a98;
  --bg-3:        #0099dd;

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 18px 40px -18px rgba(10, 23, 51, .45);
  --shadow-btn:  0 10px 24px -10px rgba(10, 23, 51, .55);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.5;
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Accesibilidad: enlace para saltar al contenido */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip-link:focus {
  left: 0;
}

/* ===========================  Layout  =========================== */

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 6vw, 48px) clamp(16px, 5vw, 32px);
  padding-top: max(env(safe-area-inset-top), clamp(20px, 6vw, 48px));
  padding-bottom: max(env(safe-area-inset-bottom), clamp(20px, 6vw, 48px));
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 7vw, 40px);
}

/* ===========================  Encabezado  =========================== */

.card__head {
  text-align: center;
  margin-bottom: clamp(22px, 6vw, 32px);
}

.logo {
  width: clamp(84px, 24vw, 112px);
  height: auto;
  margin: 0 auto clamp(14px, 4vw, 20px);
}

.title {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.subtitle {
  margin: 8px 0 0;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  color: var(--muted);
}

/* ===========================  Botones  =========================== */

.actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--white);
  box-shadow: var(--shadow-btn);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn:active {
  transform: translateY(1px) scale(.995);
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 16px 30px -12px rgba(10, 23, 51, .6);
  }
}

.btn:focus-visible {
  outline: 3px solid var(--sky-light);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--sky) 100%);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}

.btn__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.btn__icon svg {
  width: 22px;
  height: 22px;
}

.btn__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.btn__title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.btn__desc {
  font-size: 0.82rem;
  opacity: .9;
  margin-top: 2px;
}

.btn__chevron {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}

.btn__chevron svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .btn:hover .btn__chevron {
    transform: translateX(3px);
  }
}

/* ===========================  Pie  =========================== */

.page__footer {
  margin-top: clamp(20px, 5vw, 28px);
  text-align: center;
}

.page__footer p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, .8);
}

/* ===========================  Preferencias  =========================== */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Tablet / escritorio: la tarjeta se mantiene compacta y centrada */
@media (min-width: 640px) {
  .card {
    padding: 44px;
  }
}
