@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap");

/* Colores de marca (ajusta aquí si muestreas el PNG exacto del logo) */
:root {
  --brand-blue-bright: #12a4ff;
  --brand-blue: #0095eb;
  --brand-blue-deep: #0070c8;
  --brand-red: #e3213d;
  --brand-red-deep: #c41230;
  --silver-50: #f8fafc;
  --silver-100: #f1f5f9;
  --silver-200: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.92);
  --card-border: rgba(15, 23, 42, 0.08);
  --accent-blue-soft: rgba(0, 149, 235, 0.12);
  --accent-red-soft: rgba(227, 33, 61, 0.1);
  --success: #059669;
  --danger: #dc2626;
  --radius: 16px;
  --radius-btn: 14px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Montserrat", var(--font-body);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(165deg, var(--silver-100) 0%, var(--silver-50) 28%, #ffffff 55%, #ffffff 100%);
  min-height: 100vh;
}

a {
  color: var(--brand-blue-deep);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ——— Navbar ——— */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  border-bottom: 1px solid var(--silver-200);
}

.nav-logo {
  display: block;
  flex-shrink: 0;
  width: clamp(160px, 18vw, 230px);
  height: auto;
  line-height: 0;
  /* Fondo blanco: evita que la transparencia del PNG se mezcle con el degradado del body (efecto “cuadriculado”). */
  background-color: #ffffff;
  border-radius: 6px;
  padding: 3px 8px;
}

.nav-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.link-quiet {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.link-quiet:hover {
  color: var(--brand-blue-deep);
}

@media (max-width: 640px) {
  .site-nav {
    gap: 0.6rem;
    padding: 0.75rem 0 1rem;
  }

  .link-quiet {
    font-size: 0.84rem;
    white-space: nowrap;
  }
}

/* ——— Hero ——— */
header.hero {
  padding: 0 0 2.5rem;
}

.hero-inner {
  text-align: center;
  padding: 2.25rem 0 2rem;
  max-width: min(920px, 96vw);
  margin: 0 auto;
}

.hero-logo {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: clamp(320px, 42vw, 560px);
  max-width: 92%;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .hero-logo {
    width: min(92vw, 420px);
  }
}

.hero-slogan {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero-slogan .em-dash {
  color: var(--brand-red);
  font-weight: 700;
}

.hero-tagline {
  margin: 0 auto 1.35rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  max-width: 38rem;
}

.lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.88rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
  font-family: var(--font-body);
}

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

/* Botón principal: azul vibrante + acabado glossy tipo emblema */
.btn-primary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 38%, transparent 48%),
    linear-gradient(148deg, var(--brand-blue-bright) 0%, var(--brand-blue) 42%, var(--brand-blue-deep) 100%);
  box-shadow:
    0 10px 28px rgba(0, 112, 200, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -10px 24px rgba(0, 55, 110, 0.18);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow:
    0 12px 34px rgba(0, 112, 200, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -10px 24px rgba(0, 55, 110, 0.2);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--silver-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn-ghost:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue-deep);
  background: var(--silver-50);
}

/* ——— Tarjetas DGII / MINERD / Padres ——— */
.module-cards {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .module-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.module-card {
  position: relative;
  background: var(--surface-soft);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  text-align: left;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 100% 0%, var(--accent-blue-soft), transparent 55%);
  pointer-events: none;
}

.module-card:nth-child(2)::before {
  background: radial-gradient(ellipse 120% 80% at 100% 0%, var(--accent-red-soft), transparent 55%);
}

.module-card:nth-child(3)::before {
  background: radial-gradient(ellipse 120% 80% at 0% 0%, var(--accent-blue-soft), transparent 55%);
}

.module-card-inner {
  position: relative;
  z-index: 1;
}

.module-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-icon svg {
  width: 44px;
  height: 44px;
}

.stroke-brand-blue {
  stroke: var(--brand-blue-deep);
  fill: none;
}

.stroke-brand-red {
  stroke: var(--brand-red);
  fill: none;
}

.module-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.module-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.module-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue-deep);
  margin-bottom: 0.35rem;
}

.module-card:nth-child(2) .module-label {
  color: var(--brand-red-deep);
}

/* ——— Secciones con marca de agua (emblema) ——— */
section {
  padding: 3.25rem 0;
  position: relative;
}

.section-wm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/brand/emblema_star.png") center 38% / min(420px, 70vw) no-repeat;
  opacity: 0.045;
  pointer-events: none;
}

section.alt {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.85) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-block: 1px solid var(--silver-200);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 42rem;
}

.grid-3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-blue-soft);
  color: var(--brand-blue-deep);
  margin-bottom: 0.65rem;
}

.plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: repeat(4, 1fr);
  }
}

.plan {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.plan.featured {
  border-color: rgba(0, 149, 235, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 149, 235, 0.12),
    0 12px 36px rgba(0, 112, 200, 0.12);
}

.plan h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.plan .price {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-blue-deep);
}

.plan ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex: 1;
}

.plan li {
  margin-bottom: 0.35rem;
}

#registro {
  scroll-margin-top: 5rem;
}

.form-card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  border: 1px solid var(--card-border);
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--silver-200);
  background: var(--silver-50);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 149, 235, 0.35);
  outline-offset: 1px;
  border-color: var(--brand-blue);
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  display: none;
}

.form-msg.ok {
  display: block;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.35);
  color: #047857;
}

.form-msg.err {
  display: block;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

/* ——— Footer ——— */
footer {
  padding: 2.5rem 0 3rem;
  color: var(--text-soft);
  font-size: 0.88rem;
  border-top: 1px solid var(--silver-200);
  background: linear-gradient(180deg, #ffffff 0%, var(--silver-50) 100%);
}

footer .foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.footer-brand img {
  display: block;
  width: clamp(160px, 28vw, 240px);
  height: auto;
  max-height: 44px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 6px;
  padding: 4px 10px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* =====================================================================
   Refresh v0.30 — pulido aditivo (micro-interacciones, hero, acentos).
   Bloque al final: solo añade/realza; no reescribe lo anterior.
   ===================================================================== */

html {
  scroll-behavior: smooth;
}

/* Las tarjetas se elevan suavemente al pasar el mouse */
.card,
.module-card,
.plan {
  transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.18s ease;
}

.card:hover,
.module-card:hover,
.plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
  border-color: rgba(0, 149, 235, 0.32);
}

/* Botones con leve elevación */
.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

/* Hero: glows de marca sutiles detrás del contenido */
header.hero {
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(0, 149, 235, 0.1), transparent 60%),
    radial-gradient(55% 45% at 100% 5%, rgba(227, 33, 61, 0.07), transparent 60%);
}

/* Barra de acento (azul→rojo) bajo cada título de sección */
h2 {
  position: relative;
  padding-bottom: 0.65rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-red) 100%);
}

/* Plan destacado: insignia + leve realce */
.plan.featured {
  position: relative;
  transform: translateY(-2px);
}

.plan.featured::before {
  content: "★ Recomendado";
  position: absolute;
  top: -0.7rem;
  right: 1rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 112, 200, 0.35);
}

/* Foco visible coherente (accesibilidad) */
a:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 149, 235, 0.45);
  outline-offset: 2px;
}

/* En móvil, los CTA del hero ocupan el ancho (más tocables) */
@media (max-width: 560px) {
  .cta-row .btn {
    width: 100%;
  }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card,
  .module-card,
  .plan,
  .btn {
    transition: none;
  }
  .card:hover,
  .module-card:hover,
  .plan:hover {
    transform: none;
  }
}
