/* =============================================
   TOPBAR
============================================= */

.topbar {
  background: var(--color-primary);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.topbar-left span,
.topbar-right a {
  color: rgba(207, 216, 227, 0.85);
}

.topbar a {
  color: rgba(207, 216, 227, 0.85);
  transition: color var(--t);
}

.topbar a:hover {
  color: var(--color-accent);
}

.topbar-desktop { display: inline; }
.topbar-mobile  { display: none; }

/* =============================================
   BRAND
============================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.brand img {
  height: 1.625rem;
}

/* =============================================
   NAV — DESKTOP
============================================= */

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav > a {
  font-size: 0.865rem;
  font-weight: 500;
  color: var(--color-gray-dark);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  position: relative;
}

.nav > a:hover {
  color: var(--color-primary);
  background: var(--color-surface);
}

/* Estado activo */
.nav-active {
  color: var(--color-accent) !important;
  font-weight: 600 !important;
}

/* CTA en el nav */
.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.1rem !important;
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: opacity var(--t), transform var(--t) !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Bandera idioma */
.lang-flag {
  margin-left: 0.6rem;
  display: flex;
  align-items: center;
  padding: 0.3rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
}

.lang-flag img {
  width: 1.375rem;
  height: 1.375rem;
  transition: transform var(--t), opacity var(--t);
}

.lang-flag:hover img {
  transform: scale(1.1);
  opacity: 0.8;
}

/* =============================================
   HAMBURGER
============================================= */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 0.3125rem;
}

.nav-toggle span {
  width: 1.375rem;
  height: 2px;
  background: var(--color-primary);
  display: block;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =============================================
   CERRAR (MENÚ MÓVIL)
============================================= */

.nav-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  cursor: pointer;
  color: var(--color-gray-dark);
  transition: color var(--t);
}

.nav-close:hover {
  color: var(--color-primary);
}

/* =============================================
   OVERLAY
============================================= */

.nav-overlay {
  display: none;
}

/* =============================================
   HERO
============================================= */

.hero {
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-gray-light);
}

/* Badge/etiqueta encima del h1 */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(242, 140, 40, 0.12);
  border: 1px solid rgba(242, 140, 40, 0.3);
  border-radius: 6.25rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Typing animation — oculto, integrado en el badge */
.hero-typing {
  display: none;
}

.hero-text h1 {
  color: var(--color-primary);
  margin-bottom: 1.1rem;
}

.hero-text > p {
  color: var(--color-gray-text);
  font-size: 1rem;
  max-width: 32rem;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

/* Trust line debajo de los botones */
.hero-trust {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-gray-light);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-trust-item strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.hero-trust-item span {
  font-size: 0.72rem;
  color: var(--color-gray-text);
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Imagen del hero */
.hero-image {
  position: relative;
  z-index: 2;
}

.hero-image img {
  border-radius: var(--radius-md);
  object-fit: cover;
  height: 25rem;
  width: 100%;
  box-shadow: var(--shadow-md);
}

/* Marco decorativo detrás de la imagen */
.hero-image::before {
  content: '';
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 1px solid rgba(242, 140, 40, 0.35);
  border-radius: var(--radius-md);
  z-index: -1;
}

/* =============================================
   BOTONES
============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t), opacity var(--t);
  white-space: nowrap;
}

/* Primario — naranja sólido */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: #da7d22;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242,140,40,0.35);
}

/* Secundario — outline oscuro (sobre fondo claro) */
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-gray-light);
}

.btn-ghost:hover {
  background: var(--color-white);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Alias legacy */
.btn-cta {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-cta:hover {
  background: #da7d22;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242,140,40,0.35);
}

/* =============================================
   CURSOR TYPING
============================================= */

.cursor {
  display: inline-block;
  width: 2px;
  background: var(--color-accent);
  margin-left: 2px;
  animation: blink 1s infinite;
  height: 0.9em;
  vertical-align: middle;
  border-radius: 1px;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75%      { opacity: 0; }
}

/* =============================================
   DIVIDERS
============================================= */

.section-divider {
  height: 1px;
  background: var(--color-gray-light);
}

.section-divider-strong {
  height: 1px;
  background: var(--color-gray-light);
}

.divider-block { display: none; }

.section-divider-soft {
  background: var(--color-white);
  padding: 3.5rem 0 1.5rem;
}

.divider-text {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-text);
}

.divider-line {
  width: 2.5rem;
  height: 2px;
  background: var(--color-accent);
  opacity: 0.5;
}

.section-divider-cta { display: none; }
.divider-accent       { display: none; }

/* =============================================
   AUTHORITY STRIP
============================================= */

.authority {
  background: var(--color-secondary);
  padding: 1.25rem 0;
}

.authority-sub {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

/* =============================================
   FOOTER
============================================= */

footer {
  background: var(--color-primary);
  color: rgba(207, 216, 227, 0.6);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* =============================================
   MENÚ MÓVIL
============================================= */

@media (max-width: 960px) {

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100dvh;
    width: min(18.75rem, 80vw);
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 5.5rem 1.75rem 2rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -6px 0 32px rgba(15,42,68,0.14);
    z-index: 1000;
    gap: 0;
  }

  .nav.open {
    right: 0;
  }

  .nav > a {
    width: 100%;
    padding: 1rem 0;
    font-size: 0.975rem;
    border-bottom: 1px solid var(--color-gray-light);
    border-radius: 0;
    background: transparent !important;
    margin: 0;
  }

  .nav > a:last-of-type {
    border-bottom: none;
  }

  .nav .nav-cta {
    margin-left: 0 !important;
    margin-top: 1.25rem !important;
    text-align: center;
    background: var(--color-accent) !important;
    color: var(--color-white) !important;
    border-radius: var(--radius-sm) !important;
    border-bottom: none !important;
    padding: 0.875rem 1rem !important;
  }

  .lang-flag {
    margin-left: 0 !important;
    margin-top: 2.5rem !important;
    border: none !important;
    background: transparent !important;
    border-bottom: none !important;
    width: fit-content;
    padding: 0.25rem 0 !important;
  }

  .nav-close {
    display: block;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 42, 68, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  .topbar-desktop { display: none; }
  .topbar-mobile  { display: inline; }

  .hero-image img {
    height: 18.75rem;
  }

  .hero-image::before {
    display: none;
  }

  .hero-trust {
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-image img {
    height: 13.125rem;
  }

  .hero-trust {
    gap: 1.25rem;
  }

  .hero-trust-item strong {
    font-size: 1rem;
  }
}
