/* ============================================================
   DOSP — Home
   Tokens extraídos de Figma (variables del archivo)
   ============================================================ */
:root {
  /* Colores (Figma variables) */
  --azul-primario: #009dd8;
  --azul-secundario: #6dc9f2;
  --gris-textos: #cccccc;
  --gris-servicios: #404040;
  --negro-nav: #020303;

  /* Superficies */
  --bg: #070809;
  --bg-clientes: #282828;
  --card-glass: rgba(255, 255, 255, 0.06);

  /* Tipografía */
  --font-title: "Oswald", sans-serif;
  --font-body: "Roboto", sans-serif;

  /* Layout */
  --wrap: 1200px;
}

/* Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--azul-primario);
}
h1, h2, h3 { font-family: var(--font-title); font-weight: 500; line-height: 1.05; text-transform: uppercase; }

/* Botones ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 1px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--azul-primario); color: #fff; }
.btn--primary:hover { background: #007fae; }
.btn--secondary { border-color: var(--azul-primario); color: var(--azul-primario); background: transparent; }
.btn--secondary:hover { background: var(--azul-primario); color: #fff; }
.btn--ghost { border-color: #fff; color: #fff; background: transparent; }
.btn--ghost:hover { background: #fff; color: var(--negro-nav); }

/* Header ----------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { background: rgba(2, 3, 3, 0.92); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 32px; }
.nav a {
  font-weight: 500; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; color: #fff;
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--azul-primario);
  transition: width .2s ease;
}
.nav a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; display: block; transition: .2s; }

/* Hero ------------------------------------------------------- */
.hero { position: relative; min-height: 680px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2,3,3,.92) 0%, rgba(2,3,3,.65) 45%, rgba(2,3,3,.2) 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 28px; }
.hero-sub { font-weight: 300; font-size: clamp(18px, 2.2vw, 24px); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 24px; flex-wrap: wrap; }

/* Botonera soluciones --------------------------------------- */
.solutions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.sol-card {
  position: relative;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 25px 16px;
  overflow: hidden;
  text-align: center;
}
.sol-card::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--img); background-size: cover; background-position: center;
  transform: scale(1.01); transition: transform .4s ease;
}
.sol-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.85) 100%);
}
.sol-card:hover::before { transform: scale(1.08); }
.sol-card span {
  position: relative; z-index: 1;
  font-family: var(--font-title); font-weight: 600; font-size: 22px; line-height: 1.1;
  text-transform: uppercase; color: #fff; max-width: 320px;
}

/* Nosotros --------------------------------------------------- */
.about { position: relative; padding: 90px 0; overflow: hidden; }
.about-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(9px); opacity: .25; transform: scale(1.05);
}
.about-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.about-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 520px 1fr; gap: 80px; align-items: center;
}
.about-img { border-radius: 17px; overflow: hidden; height: 360px; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.about-text h2 { font-size: 48px; }
.about-text p { font-size: 16px; max-width: 450px; }

/* Servicios -------------------------------------------------- */
.services { padding: 65px 0; }
.section-title { text-align: center; display: flex; flex-direction: column; gap: 6px; margin-bottom: 48px; }
.section-title .eyebrow { font-size: 20px; }
.section-title h2 { font-size: 48px; }
.service-list { max-width: 1032px; margin-inline: auto; display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 70px auto 1fr auto;
  align-items: center;
  gap: 25px 50px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.service:last-child { border-bottom: 0; }
.service-num {
  font-family: var(--font-title); font-weight: 500; font-size: 64px; line-height: 1;
  color: var(--azul-primario); text-align: center;
  border-right: 1px solid rgba(255,255,255,.2); padding-right: 25px;
}
.service-icon { width: 72px; height: 72px; object-fit: contain; }
.service-body h3 { font-family: var(--font-body); font-weight: 700; font-size: 16px; text-transform: uppercase; margin-bottom: 6px; }
.service-body p { color: var(--gris-textos); font-size: 13px; }
.service-arrow {
  font-size: 24px; color: var(--azul-primario);
  width: 48px; height: 48px; display: grid; place-items: center;
  transition: transform .2s ease;
}
.service-arrow:hover { transform: translateX(6px); }

/* Stats ------------------------------------------------------ */
.stats { position: relative; min-height: 259px; display: flex; align-items: center; overflow: hidden; }
.stats-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.stats-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.stats-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 35px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 42px; text-align: center; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.25); }
.stat-num { font-family: var(--font-title); font-weight: 600; font-size: clamp(44px, 5vw, 69px); line-height: 1.1; color: var(--azul-primario); }
.stat-label { font-weight: 500; font-size: 16px; text-transform: uppercase; }

/* Blog ------------------------------------------------------- */
.blog { padding: 80px 0; }
.blog-inner { display: grid; grid-template-columns: 379px 1fr; gap: 35px; align-items: center; }
.blog-intro { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.blog-intro h2 { font-size: 48px; }
.blog-cards { display: flex; gap: 40px; }
.post {
  width: 280px; background: var(--card-glass); border: 1px solid rgba(255,255,255,.55);
  display: flex; flex-direction: column;
}
.post-img { height: 184px; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.55); }
.post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post:hover .post-img img { transform: scale(1.05); }
.post-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.post-cat { font-weight: 700; font-size: 14px; text-transform: uppercase; color: var(--azul-secundario); }
.post-body h3 { font-family: var(--font-title); font-weight: 500; font-size: 16px; }
.post-excerpt { font-size: 12px; color: #fff; }
.post-link { font-weight: 500; font-size: 12px; text-transform: uppercase; color: var(--azul-primario); margin-top: 4px; }

/* Clientes (carrusel marquee infinito) ----------------------- */
.clients { background: var(--bg-clientes); min-height: 230px; display: flex; align-items: center; overflow: hidden; }
.clients-marquee {
  width: 100%;
  overflow: hidden;
  /* desvanecido en los bordes para que los logos entren/salgan suave */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 90px;
  animation: clients-scroll 32s linear infinite;
}
.clients-marquee:hover .clients-track { animation-play-state: paused; }
.clients-track img {
  flex: 0 0 auto;
  height: 46px;            /* altura fija → todos igual de altos */
  width: auto;
  max-width: 170px;        /* freno para logos muy anchos */
  object-fit: contain;
  opacity: .85;
  filter: grayscale(1) brightness(1.6);  /* normaliza logos oscuros sobre el fondo gris */
  transition: filter .25s, opacity .25s;
}
.clients-track img:hover { filter: grayscale(0); opacity: 1; }
@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* la pista está duplicada: -50% = un ciclo seamless */
}
@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* Contacto --------------------------------------------------- */
.contact { position: relative; min-height: 490px; display: flex; align-items: center; padding: 60px 0; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: rgba(2,3,3,.78); }
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 511px; gap: 100px; align-items: center; }
.contact-info { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contact-info h2 { font-family: var(--font-title); font-weight: 600; font-size: 48px; }
.contact-list { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.contact-list li { display: flex; align-items: center; gap: 15px; font-weight: 500; font-size: 14px; }
.contact-list img { width: 22px; height: 22px; object-fit: contain; }
.contact-form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; gap: 25px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: transparent; border: 1px solid #fff; border-radius: 1px;
  padding: 14px 16px; color: #fff; font-family: var(--font-body); font-weight: 500; font-size: 14px;
  text-transform: uppercase; resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--gris-textos); opacity: .55; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--azul-primario); }
.contact-form .btn { align-self: flex-start; }

/* Footer ----------------------------------------------------- */
.site-footer { background: var(--negro-nav); }
.footer-top { display: grid; grid-template-columns: 299px 1px 1fr; gap: 70px; align-items: flex-start; padding: 60px 24px 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-brand img { height: 90px; width: auto; }
.footer-brand p { font-weight: 500; font-size: 14px; color: #fff; }
.footer-divider { width: 1px; align-self: stretch; background: rgba(255,255,255,.18); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col h4 { font-family: var(--font-body); font-weight: 700; font-size: 16px; text-transform: uppercase; }
.footer-col a { font-weight: 500; font-size: 14px; color: var(--gris-textos); }
.footer-col a:hover { color: #fff; }
.footer-col--cert img { width: 110px; height: auto; }
.footer-bottom { text-align: center; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom span { font-weight: 500; font-size: 14px; color: var(--gris-servicios); }

/* Responsive ------------------------------------------------- */
@media (max-width: 980px) {
  .solutions { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-img { height: 280px; }
  .blog-inner { grid-template-columns: 1fr; gap: 32px; }
  .blog-cards { justify-content: flex-start; flex-wrap: wrap; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-divider { display: none; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(2,3,3,.97); padding: 8px 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; }
  .nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .service { grid-template-columns: 56px 1fr auto; gap: 16px 20px; }
  .service-icon { display: none; }
  .service-num { font-size: 44px; padding-right: 16px; }
  .form-row { flex-direction: column; gap: 13px; }
}
@media (max-width: 520px) {
  .solutions { grid-template-columns: 1fr; }
}

/* ============================================================
   PÁGINAS INTERNAS (compartido)
   ============================================================ */

/* Hero interno (más bajo que el de Home) */
.page-hero { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-top: 76px; }
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .30; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,8,9,.6), rgba(7,8,9,.85)); }
.page-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.page-hero-inner .ph-logo { height: 56px; width: auto; }
.page-hero-inner .ph-rule { width: 280px; height: 1px; background: rgba(255,255,255,.35); }
.page-hero-inner h1 { font-size: clamp(40px, 6vw, 64px); }

/* Sobre nosotros (texto + stats apilados) */
.about-split { padding: 70px 0; }
.about-split-inner { display: grid; grid-template-columns: 1fr auto 333px; gap: 60px; align-items: center; }
.about-split .as-text { display: flex; flex-direction: column; gap: 18px; }
.about-split .as-text h2 { font-size: 48px; }
.about-split .as-text p { font-size: 16px; max-width: 442px; }
.about-split .as-divider { width: 1px; align-self: stretch; background: rgba(255,255,255,.2); }
.about-stats { display: flex; flex-direction: column; gap: 18px; }
.about-stats .stat-num { font-family: var(--font-title); font-weight: 600; font-size: 56px; line-height: 1.1; color: var(--azul-primario); }
.about-stats .stat-label { font-weight: 500; font-size: 15px; text-transform: uppercase; }

/* Valores (banda con íconos) */
.values { position: relative; padding: 60px 0; overflow: hidden; }
.values-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.values-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,40,65,.55); }
.values-grid { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 90px; max-width: 900px; margin-inline: auto; }
.value { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 180px; }
.value img { height: 64px; width: auto; }
.value span { font-family: var(--font-title); font-weight: 600; font-size: 30px; text-transform: uppercase; color: var(--azul-primario); text-align: center; }

/* Misión / Visión */
.mv { padding: 60px 0; }
.mv-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: stretch; max-width: 1040px; margin-inline: auto; }
.mv-col { display: flex; flex-direction: column; gap: 16px; }
.mv-col h2 { font-size: 48px; }
.mv-col p { font-size: 16px; }
.mv-divider { width: 1px; background: rgba(255,255,255,.2); }

/* Capacidades (cards sobre gris) */
.capabilities { background: var(--gris-servicios); }
.capabilities-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.cap-card { display: flex; flex-direction: column; gap: 16px; padding: 28px 30px; min-height: 240px; }
.cap-card + .cap-card { border-left: 1px solid rgba(255,255,255,.15); }
.cap-card img { height: 60px; width: auto; align-self: flex-start; object-fit: contain; }
.cap-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 17px; text-transform: uppercase; }
.cap-card p { font-size: 15px; color: #fff; }

@media (max-width: 980px) {
  .about-split-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-split .as-divider { display: none; }
  .about-stats { flex-direction: row; flex-wrap: wrap; gap: 24px 40px; }
  .mv-inner { grid-template-columns: 1fr; gap: 28px; }
  .mv-divider { display: none; }
  .capabilities-inner { grid-template-columns: repeat(2, 1fr); }
  .cap-card:nth-child(3) { border-left: 0; }
}
@media (max-width: 560px) {
  .capabilities-inner { grid-template-columns: 1fr; }
  .cap-card + .cap-card { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); }
}

/* Nav: link activo + CTA */
.nav a.active::after { width: 100%; }
.nav a.nav-cta { padding: 10px 22px; }
.nav a.nav-cta::after { display: none; }

/* ============================================================
   PROYECTOS (categorías)
   ============================================================ */
.projects-hero { position: relative; min-height: 380px; display: flex; align-items: center; overflow: hidden; padding-top: 76px; }
.projects-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.projects-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,8,9,.85), rgba(7,8,9,.35)); }
.projects-hero h1 { position: relative; z-index: 1; font-weight: 600; font-size: clamp(40px, 6vw, 64px); }
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px;
  max-width: 1280px; margin-inline: auto; padding: 60px 24px;
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects-grid { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACTO (página)
   ============================================================ */
.contact.is-page { padding-top: 120px; }
.contact-map { line-height: 0; background: #0b0c0d; }
.contact-map a { display: block; }
.contact-map img { width: 100%; height: 440px; object-fit: cover; display: block; transition: opacity .2s ease; }
.contact-map a:hover img { opacity: .9; }
@media (max-width: 600px) { .contact-map img { height: 320px; } }

/* Formulario de contacto: honeypot + estado */
.contact-form .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { font-size: 14px; line-height: 1.4; margin-top: 2px; min-height: 1em; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* ============================================================
   SOLUCIONES (detalle de categoría)
   ============================================================ */
.sol-hero { position: relative; min-height: 420px; display: flex; align-items: center; overflow: hidden; padding-top: 76px; }
.sol-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.sol-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,8,9,.9), rgba(7,8,9,.45)); }
.sol-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.sol-hero-inner h1 { font-weight: 600; font-size: clamp(36px, 5.5vw, 56px); max-width: 720px; }

.sol-intro { padding: 50px 0 10px; }
.sol-intro p { max-width: 720px; font-size: 17px; color: var(--gris-textos); }

.sol-gallery-section { padding: 40px 0 90px; }
.sol-gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px;
  max-width: 1280px; margin-inline: auto; padding: 0 24px;
}
.sol-project { display: flex; flex-direction: column; gap: 12px; }
.sol-carousel { position: relative; aspect-ratio: 680 / 460; overflow: hidden; background: #0b0c0d; }
.sol-carousel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.sol-carousel img.is-active { opacity: 1; }
.sol-carousel-nav { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.sol-carousel-btn { pointer-events: auto; width: 48px; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.05); border: 0; cursor: pointer; transition: background .2s ease; }
.sol-carousel-btn:hover { background: rgba(255,255,255,.14); }
.sol-carousel-btn svg { width: 9px; height: 16px; }
.sol-carousel-dots { position: absolute; z-index: 2; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.sol-carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); border: 0; padding: 0; cursor: pointer; }
.sol-carousel-dot.is-active { background: var(--azul-primario); }

.sol-cta { padding: 0 0 90px; text-align: center; }
.sol-cta-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.sol-cta h2 { font-size: 34px; }

@media (max-width: 720px) {
  .sol-gallery-grid { grid-template-columns: 1fr; gap: 24px; }
  .sol-hero { min-height: 340px; }
}
.contact-form button[disabled] { opacity: .6; cursor: default; }
