:root {
  --text-color-default   : #091c42;
  --text-color-light     : #667085;
  --text-color-lighter   : #98A2B3;

  --background-0   : #ffffff;
  --background-1   : #f5f8fd;
  --background-2   : #eff6fe;
  --background-3   : #dbe0e6;
  --background-4   : #c1c7ce;
  --background-5   : #adb4bc;
  --background-6   : #929aa2;

  --border-color-default: #cfd5de;
  --border-color-light: #E3E8EF;

  --primary   : #1982c4;
  --secondary : #53ade5;
  --accent    : #ba4be1;
  --dark      : #282838;
  --grey      : #d3d7dd;
  --light     : #edf0f3;

  --positive  : #329c4a;
  --negative  : #db3737;
  --info      : #85b8ff;
  --warning   : #F2C037;
  --other     : #d8dee4;

  --font-family-base: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-width: 1120px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(9, 28, 66, 0.08);
  --header-height: 72px;
}

/* ==========================================================================
   Fuentes
   ========================================================================== */
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/static/SourceSans3-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/static/SourceSans3-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/static/SourceSans3-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/static/SourceSans3-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/static/SourceSans3-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Reset avanzado
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  font: inherit;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  min-height: 100svh;
  font-family: var(--font-family-base);
  color: var(--text-color-default);
  background: var(--background-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img, svg {
  vertical-align: middle;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
  margin-bottom: .5em;
}

p {
  text-wrap: pretty;
  margin-bottom: 1em;
}

p:last-child, h1:last-child, h2:last-child, h3:last-child {
  margin-bottom: 0;
}

button, input, textarea, select {
  color: inherit;
  background: none;
  border: none;
  appearance: none;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset {
  border: none;
}

/* Reduce o elimina animaciones cuando el usuario lo prefiere así */
@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;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Botones / CTAs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--secondary);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--background-2);
}

.btn-light {
  background: #fff;
  color: var(--primary);
}
.btn-light:hover {
  box-shadow: var(--shadow);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* ==========================================================================
   Cabecera / navegación
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-color-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  height: 48px;
}
.logo img {
  height: 100%;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav ul {
  display: flex;
  gap: 28px;
}

.site-nav a:not(.btn) {
  font-weight: 600;
  color: var(--text-color-light);
}
.site-nav a:not(.btn):hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 100%;
  height: 2px;
  background: var(--text-color-default);
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(180deg, var(--background-2) 0%, var(--background-0) 65%);
  padding: 72px 0 0;
}

.hero-inner {
  text-align: center;
  max-width: 780px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 .75em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--text-color-light);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.hero-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-bottom: 56px;
}

.hero-block {
  background: var(--background-0);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-block-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--background-2);
  color: var(--primary);
  margin-bottom: 16px;
}
.hero-block-icon svg {
  width: 24px;
  height: 24px;
}

.hero-block h3 {
  font-size: 1.1rem;
}
.hero-block p {
  color: var(--text-color-light);
  margin: 0;
}

/* ==========================================================================
   Secciones genéricas
   ========================================================================== */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--background-1);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-lead {
  color: var(--text-color-light);
  font-size: 1.05rem;
}

/* ==========================================================================
   Funcionalidades
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--background-0);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--background-2);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin: 20px 20px 8px;
}
.feature-card p {
  color: var(--text-color-light);
  margin: 0 20px 20px;
}

/* ==========================================================================
   Funcionalidades extra
   ========================================================================== */
.extra-features {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color-light);
}

.extra-features-title {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-color-light);
  margin-bottom: 32px;
}

.extra-feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

.extra-feature-item {
  position: relative;
  padding-left: 28px;
  color: var(--text-color-light);
  font-size: .95rem;
}
.extra-feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--background-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231982c4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.extra-feature-item strong {
  color: var(--text-color-default);
  font-weight: bold;
}

/* ==========================================================================
   Actividades
   ========================================================================== */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 100svh;
}

.activity-row-reverse .activity-media {
  order: 2;
}
.activity-row-reverse .activity-content {
  order: 1;
  margin-left: auto;
}

.activity-media {
  overflow: hidden;
}
.activity-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.activity-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(24px, 6vw, 96px);
  max-width: 600px;
}

.activity-content h3 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text-color-default);
}
.activity-content p {
  color: var(--text-color-light);
  font-size: 1.15rem;
  margin: 0;
}

/* ==========================================================================
   CTA intermedio
   ========================================================================== */
.cta-band {
  background: var(--dark);
  color: #fff;
}
.cta-band-inner {
  text-align: center;
  padding: 64px 24px;
}
.cta-band h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: #fff;
}
.cta-band p {
  color: var(--background-4);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color-light);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-color-light);
  font-size: .9rem;
}
.logo-footer {
  height: 36px;
  width: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .feature-grid,
  .hero-blocks {
    grid-template-columns: repeat(2, 1fr);
  }
  .activity-row {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    margin-bottom: 100px;
  }
  .activity-row-reverse .activity-media,
  .activity-row-reverse .activity-content {
    order: initial;
    margin: 0 auto;
  }
  .activity-media {
    aspect-ratio: 16 / 10;
  }
  .activity-content {
    padding: 32px 24px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--background-0);
    border-bottom: 1px solid var(--border-color-light);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }
  .site-nav ul a {
    display: block;
    padding: 10px 0;
  }
  .site-nav .btn {
    width: 100%;
  }

  .feature-grid,
  .hero-blocks {
    grid-template-columns: 1fr;
  }

  .extra-feature-list {
    grid-template-columns: 1fr;
  }
}
