/* =========================================================
   DiveLabs — estilos
   Mobile-first: los estilos base son para celular y las
   media queries (min-width) agregan cambios para pantallas
   más grandes.
   ========================================================= */


/* ---------- 1. Variables (colores, tipografía, medidas) ---------- */
:root {
  /* Paleta de marca */
  --azul-profundo: #062A4A;  /* texto principal, fondos oscuros */
  --azul-oceano:   #0077FF;  /* acento principal */
  --cian:          #00D1E7;  /* acento secundario, detalles */
  --celeste:       #BFE8FF;  /* fondos suaves, badges */
  --gris:          #F5F7FA;  /* fondo de secciones alternas */
  --texto-suave:   #5B6B7C;
  --borde:         #E2E8F0;

  /* Variante más oscura del azul océano para botones y links
     sobre blanco: con #0077FF el texto blanco no llega al
     contraste AA (4.5:1). Esta sí (≈5:1). */
  --azul-accion:       #006AE0;
  --azul-accion-hover: #0055B8;

  --fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --contenedor: 1200px;
  --radio: 16px;
  --alto-header: 68px;
}


/* ---------- 2. Base / reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--azul-profundo);
  background: #fff;
  overflow-x: hidden;
}

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

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--azul-accion);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Foco visible para navegación con teclado */
:focus-visible {
  outline: 3px solid var(--azul-oceano);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Las anclas no quedan tapadas por el header fijo */
section[id] {
  scroll-margin-top: var(--alto-header);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--azul-profundo);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}


/* ---------- 3. Componentes reutilizables ---------- */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--azul-accion);
  color: #fff;
}

.btn-primary:hover {
  background: var(--azul-accion-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--azul-profundo);
  border-color: var(--borde);
}

.btn-secondary:hover {
  border-color: var(--azul-accion);
  color: var(--azul-accion);
}

/* Grupo de botones */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

/* Badge del hero */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--celeste);
  color: var(--azul-profundo);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Etiqueta chica sobre los títulos de sección */
.eyebrow {
  color: var(--azul-accion);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lead {
  color: var(--texto-suave);
  font-size: 1.125rem;
}

/* Contenedor de íconos SVG */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--celeste);
  color: var(--azul-profundo);
  margin-bottom: 20px;
}

/* Secciones */
.section {
  padding: 72px 0;
}

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

.section h2 {
  font-size: 1.875rem;
  font-weight: 800;
  max-width: 640px;
}


/* ---------- 4. Header / Nav ---------- */
/* Header oscuro: el ícono (assets/icon.png) tiene fondo azul profundo */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--azul-profundo);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header :focus-visible {
  outline-color: var(--cian);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: var(--alto-header);
}

/* Logo: ícono del coral + nombre en texto ("Dive" blanco, "Labs" cian) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-name {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--cian);
}

/* Botón hamburguesa (solo mobile) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.nav-menu a:not(.btn):hover {
  color: var(--cian);
}

/* Mobile con JS: el menú se colapsa detrás del botón.
   (Sin JS, los links quedan siempre visibles.) */
@media (max-width: 767px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    padding: 8px 0 20px;
  }

  .js .nav-menu.is-open {
    display: flex;
  }

  .js .nav-menu a:not(.btn) {
    padding: 0 4px;
  }

  .js .nav-menu .btn {
    width: 100%;
    margin-top: 8px;
  }

  .no-js .nav-menu {
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 12px;
  }
}

@media (min-width: 768px) {
  .nav-menu .btn {
    margin-left: 12px;
    min-height: 44px;
    padding: 10px 18px;
  }
}


/* ---------- 5. Hero ---------- */
.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin-top: 20px;
  font-size: 2.25rem;
  font-weight: 800;
}

.hero .lead {
  margin-top: 20px;
  max-width: 560px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: var(--azul-profundo);
}

.hero-visual img {
  width: 45%;
  height: auto;
}


/* ---------- 6. Nosotros (cards) ---------- */
.features {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  color: var(--texto-suave);
}


/* ---------- 7. Productos ---------- */
.products {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.product {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--radio);
}

.product h3 {
  font-size: 1.75rem;
  font-weight: 800;
}

.product > p {
  margin-top: 12px;
}

/* Card destacada (CCM) */
.product-featured {
  background: var(--azul-profundo);
  color: #fff;
}

/* Logo + nombre del producto */
.product-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.product-head img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.product-fullname {
  margin-top: 2px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}

.product-featured .product-subtitle {
  margin-top: 0;
  color: var(--cian);
  font-weight: 600;
}

.product-featured > p:not(.product-subtitle) {
  color: #D5E2EE;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(191, 232, 255, 0.12);
  border: 1px solid rgba(191, 232, 255, 0.25);
  color: var(--celeste);
  font-size: 0.875rem;
  font-weight: 500;
}

.product-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 20px;
  color: var(--cian);
  font-weight: 700;
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

.product-featured :focus-visible {
  outline-color: var(--cian);
}

/* Placeholder (próximo producto) */
.product-next {
  border: 2px dashed var(--borde);
  background: #fff;
}

.product-next .icon {
  background: var(--gris);
  color: var(--texto-suave);
}

.product-next h3 {
  font-size: 1.375rem;
}

.product-next p {
  color: var(--texto-suave);
}


/* ---------- 8. Contacto ---------- */
.contact-inner {
  text-align: center;
}

.contact h2 {
  margin: 0 auto;
}

.contact .lead {
  max-width: 560px;
  margin: 16px auto 0;
}

.contact .actions {
  align-items: stretch;
}

/* Dirección de mail visible + botón Copiar */
.contact-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin-top: 24px;
  color: var(--texto-suave);
}

.contact-email strong {
  color: var(--azul-profundo);
  font-weight: 600;
  word-break: break-all;
}

.copy-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background: #fff;
  color: var(--azul-accion);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--azul-accion);
}

.copy-status {
  min-width: 1px;
  color: var(--azul-accion);
  font-size: 0.875rem;
  font-weight: 600;
}


/* ---------- 9. Footer ---------- */
.site-footer {
  padding: 32px 0;
  background: var(--azul-profundo);
  color: #D5E2EE;
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.site-footer strong {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 800;
}


/* ---------- 10. Tablet (≥ 640px) ---------- */
@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .contact .actions {
    justify-content: center;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .section h2 {
    font-size: 2.25rem;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ---------- 11. Desktop (≥ 960px) ---------- */
@media (min-width: 960px) {
  .section {
    padding: 104px 0;
  }

  .hero {
    padding: 88px 0 104px;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-visual {
    aspect-ratio: 1 / 1;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .products {
    gap: 24px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
