/* ============================================
   VITALITY — styles.css (retoque general)
   ============================================ */

   
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff4ff;

  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #eefdf3;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #05070d;  
  --text-muted: #313a49;;
  --text-faint: #6b7688 ;
  --border: #e7eaf1;

  --radius-squircle: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-sm: 0 1px 2px rgba(15, 30, 66, 0.04), 0 4px 14px rgba(15, 30, 66, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 30, 66, 0.05), 0 18px 40px rgba(15, 30, 66, 0.09);
  --shadow-lg: 0 4px 10px rgba(15, 30, 66, 0.08), 0 34px 74px -22px rgba(15, 30, 66, 0.24);

  --font-display: "Fraunces", serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== NAV ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1160px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(12px);
  z-index: 100;
  transition: box-shadow 0.3s var(--ease);
}

nav.nav-scrolled {
  box-shadow: 0 1px 0 var(--border);
}

/* ===== NAV — fix mobile (evita que el botón se rompa en 2 líneas) ===== */
.nav-cta {
  white-space: nowrap;
}

@media (max-width: 480px) {
  nav {
    padding: 16px 20px;
  }

  .nav-logo {
    font-size: 16px;
  }

  .nav-cta {
    padding: 9px 16px;
    font-size: 13px;
  }
}

/* ===== HERO BUTTONS — evita que el texto largo empuje el layout ===== */
.hero-actions {
  width: 100%;
}

@media (max-width: 480px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;  /* NUEVO — vuelve VITALITY en mayúsculas */
  color: var(--text);
}

.logo-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: visible; /* antes: hidden — así el foreground puede salirse un poco */
  flex-shrink: 0;
}

.logo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.logo-fg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;   /* antes 100% — ahora sobresale del círculo/cuadrado de fondo */
  height: 150%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links > li > a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s var(--ease);
}

.nav-links > li > a:hover {
  color: var(--text);
}

.nav-links > li > a.active {
  color: var(--blue);
}

.nav-links > li > a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--blue);
}

.nav-cta {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-cta:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* ===== HERO ===== */
.hero {
  padding: 52px 32px 108px;
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-style: italic;
  font-size: clamp(40px, 4.8vw, 60px);
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), var(--shadow-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ===== CARRUSEL ===== */
.hero-visual {
  display: flex;
  justify-content: center;
}

.app-carousel {
  width: 100%;
  max-width: 340px;
}

.carousel-frame {
  position: relative;
  border-radius: var(--radius-squircle);
  overflow: hidden;
  aspect-ratio: 9 / 17.5;
  background: var(--text);
  box-shadow: var(--shadow-lg), 0 0 0 8px #fff, 0 0 0 9px var(--border);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease);
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.carousel-dot.active {
  width: 22px;
  background: var(--blue);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 44px;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .app-carousel {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 104px 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--text);
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.services-bg {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===== ROLES ===== */
.roles-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.role-card {
  border-radius: var(--radius-squircle);
  padding: 44px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.role-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.role-card.paciente {
  background: var(--blue-light);
  border: 1px solid #d9e6ff;
}

.role-card.cuidador {
  background: var(--green-light);
  border: 1px solid #cdf0dc;
}

.role-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.role-card.paciente .role-icon {
  background: var(--blue);
}

.role-card.cuidador .role-icon {
  background: var(--green);
}

.role-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
}

.role-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 23px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.role-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

.role-cta {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.role-card.paciente .role-cta {
  background: var(--blue);
}

.role-card.cuidador .role-cta {
  background: var(--green);
}

.role-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 780px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SERVICIOS ===== */
.services-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.service-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.3s var(--ease);
}

.service-card:hover .service-icon {
  transform: scale(1.06);
}

.service-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.8;
}

.service-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.service-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 780px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== CÓMO FUNCIONA ===== */
.how-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.how-num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}

.how-title {
  font-weight: 600;
  font-size: 16.5px;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

.how-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }
}

/* ===== SEGURIDAD ===== */
.security-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.security-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.security-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.security-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.security-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.8;
}

.security-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
}

@media (max-width: 900px) {
  .security-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== CTA FINAL ===== */
.cta-bg {
  text-align: center;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-inner .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  margin-top: 32px;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 68px 32px 32px;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 240px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.footer-social:hover {
  color: var(--blue);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.footer-links a:hover {
  color: var(--blue);
}

.footer-location {
  margin-top: 24px;
}

.footer-location-text {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.6;
}

.footer-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-soon {
  color: var(--text-faint);
  border-style: dashed;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-legal {
  display: flex;
  gap: 18px;
}

.footer-legal a {
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color 0.25s var(--ease);
}

.footer-legal a:hover {
  color: var(--blue);
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== FADE-IN ON SCROLL ===== */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ACCESIBILIDAD ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

/* ===== RESPONSIVE NAV ===== */
@media (max-width: 860px) {
  .nav-links li a:not(.nav-cta) {
    display: none;
  }
  .section {
    padding: 64px 20px;
  }
}