/* =========================================================
   D99-TECH — hoja de estilos principal
   ========================================================= */

:root {
  --bg: #05070a;
  --bg-soft: #0a0e16;
  --panel: rgba(14, 21, 33, 0.66);
  --panel-2: rgba(8, 13, 21, 0.6);
  --panel-soft: rgba(10, 16, 26, 0.6);
  --border: rgba(255, 255, 255, 0.13);
  --border-soft: rgba(255, 255, 255, 0.1);
  --text: #eef1f5;
  --text-dim: rgba(224, 233, 243, 0.78);
  --text-dimmer: rgba(220, 230, 242, 0.66);
  --white: #ffffff;
  --accent: #4d7bff;
  --accent-2: #2b8cff;
  --accent-light: #7fb4ff;
  --dclock: #22d3ac;
  --dclock-dark: #0d3b32;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1200px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, textarea, select { font-family: inherit; }

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

/* ---------- fondo: metal líquido (canvas) + velo ambiental ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* velo translúcido SOBRE el metal (nunca opaco: taparía el canvas) */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(120, 150, 200, 0.14) 0%, rgba(5, 7, 10, 0) 55%),
    radial-gradient(90% 70% at 50% 110%, rgba(5, 7, 10, 0.85) 0%, rgba(5, 7, 10, 0) 60%);
}

/* ---------- header / nav: píldora de cristal con "patas" (mockup original) ---------- */
.site-header {
  position: fixed;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 70px;
  box-sizing: border-box;
}
.nav-wrap {
  width: 100%;
  max-width: 1880px;
  position: relative;
  box-sizing: border-box;
}
/* la figura de cristal la dibuja paintNav() en js/main.js */
.nav-figure {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 64px;
  pointer-events: none;
  z-index: 1;
}
.nav-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.76) 0%, rgba(7, 11, 18, 0.82) 55%, rgba(9, 15, 25, 0.8) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.nav-rim { position: absolute; inset: 0; }
.nav-content {
  width: 100%;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  row-gap: 8px;
  flex-wrap: wrap;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 4px;
}
.brand img { height: 30px; width: auto; filter: drop-shadow(0 3px 10px rgba(43, 140, 255, 0.5)); }
.brand span { font-size: 15.5px; font-weight: 700; letter-spacing: -0.02em; color: #f4f7fb; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.nav-links > li { position: relative; }
.nav-links a.nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(240, 245, 251, 0.78);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a.nav-link:hover,
.nav-links a.nav-link.active { background: rgba(255, 255, 255, 0.1); color: #fff; }

.has-dropdown > .nav-link::after {
  content: "";
  margin-left: 6px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  display: inline-block;
  opacity: 0.7;
}
.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 260px;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 23, 36, 0.96) 0%, rgba(9, 14, 23, 0.98) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 50;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #eef1f5;
}
.dropdown a small { font-size: 12px; font-weight: 400; color: var(--text-dimmer); }
.dropdown a:hover { background: rgba(255, 255, 255, 0.08); }
.dropdown a.dclock-item { background: rgba(34, 211, 172, 0.1); }
.dropdown a.dclock-item:hover { background: rgba(34, 211, 172, 0.18); }
.dropdown-divider { height: 1px; background: var(--border-soft); margin: 6px 8px; }

.nav-cta-group { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  color: #061020;
  background: linear-gradient(180deg, #ffffff 0%, #cfe0ff 100%);
  box-shadow: 0 8px 24px -8px rgba(80, 150, 255, 0.6);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%); }
.btn-ghost {
  color: #eaf1fb;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(12, 19, 30, 0.62);
  backdrop-filter: blur(14px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }
.btn-dclock {
  color: #04211b;
  background: linear-gradient(180deg, #4ff0cd 0%, #22d3ac 100%);
  box-shadow: 0 8px 24px -8px rgba(34, 211, 172, 0.55);
}
.btn-dclock:hover { background: linear-gradient(180deg, #6bf5d8 0%, #34e0ba 100%); }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-content.open .nav-toggle span { background: transparent; }
.nav-content.open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-content.open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- layout general de página ---------- */
main { padding-top: 116px; position: relative; z-index: 10; }

/* panel ancho: el metal líquido queda solo como marco en las orillas */
.page-shell {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 30px 26px;
  position: relative;
  z-index: 10;
}
.glass-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 34px;
  /* brillo especular superior/inferior + cristal base (como el mockup) */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0px, rgba(255, 255, 255, 0.05) 3px, rgba(255, 255, 255, 0) 22px),
    linear-gradient(0deg, rgba(150, 185, 255, 0.26) 0px, rgba(150, 185, 255, 0.03) 4px, rgba(255, 255, 255, 0) 26px),
    linear-gradient(180deg, rgba(10, 15, 24, 0.62) 0%, rgba(6, 10, 17, 0.7) 45%, rgba(8, 13, 22, 0.74) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 40px 110px -40px rgba(0, 0, 0, 0.9),
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 0 0.5px rgba(255, 255, 255, 0.09),
    0 20px 46px -34px rgba(255, 255, 255, 0.5) inset,
    0 -16px 40px -30px rgba(140, 180, 255, 0.45) inset;
  padding: 72px clamp(22px, 3.2vw, 76px) 48px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}
/* capa interior: difumina y OSCURECE el metal dentro del panel
   (sin esto el fondo brillante se cuela y el panel se ve lechoso) */
.glass-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  backdrop-filter: blur(30px) saturate(140%) brightness(0.7);
  -webkit-backdrop-filter: blur(30px) saturate(140%) brightness(0.7);
  -webkit-mask-image: radial-gradient(110% 110% at 50% 45%, #000 0%, #000 58%, rgba(0, 0, 0, 0.22) 86%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(110% 110% at 50% 45%, #000 0%, #000 58%, rgba(0, 0, 0, 0.22) 86%, rgba(0, 0, 0, 0) 100%);
}
/* borde degradado del panel */
.glass-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(190, 215, 255, 0.4) 16%, rgba(255, 255, 255, 0.05) 48%, rgba(120, 150, 210, 0.2) 80%, rgba(255, 255, 255, 0.5) 100%);
  -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-clip: content-box, border-box;
  mask-clip: content-box, border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.glass-frame > * { position: relative; z-index: 4; }
@media (min-width: 640px) { .glass-frame { padding: 96px clamp(32px, 3.4vw, 88px) 64px; } }

section { scroll-margin-top: 120px; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.eyebrow.is-dclock { color: var(--dclock); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.03em; font-weight: 700; color: #f3f7fc; }
h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0; color: var(--text-dim); }

.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.section-head p { font-size: 16.5px; line-height: 1.55; }

/* ---------- hero (home): logo grande a la izquierda, texto a la derecha ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(200px, 360px) 1fr;
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
  text-align: left;
  padding: 16px 0 8px;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.hero .cta-row { justify-content: flex-start; margin-top: 4px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 26px; }
  .hero-copy { align-items: center; }
  .hero .cta-row { justify-content: center; }
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 239, 247, 0.86);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 20, 0.62);
}
.hero img.hero-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 20px 64px rgba(43, 140, 255, 0.5));
}
@media (max-width: 820px) { .hero img.hero-logo { max-width: 220px; } }
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 7.4vw, 118px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 0%, #fff 45%, #9fb4d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead { max-width: 56ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* generic small page hero (service pages) */
.page-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}
.page-hero h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; }
.page-hero .lead { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dimmer);
}
.breadcrumb a:hover { color: #fff; }

/* ---------- tarjetas / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* con el panel ancho fijamos el número de columnas: si no, quedan tarjetas huérfanas */
@media (min-width: 1180px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .grid-5 { grid-template-columns: repeat(5, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
}
.card ul.feature-list { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; font-size: 14px; color: rgba(226, 235, 245, 0.82); }
.card ul.feature-list li { display: flex; align-items: center; gap: 8px; }
.card ul.feature-list li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent-light); flex-shrink: 0;
}
.card a.card-link { margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent-light); }
.card a.card-link:hover { color: #fff; }

.card.is-link { transition: transform 0.18s ease, border-color 0.18s ease; }
.card.is-link:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.24); }

/* ---------- modelo 3D por cuadros (turntable) ---------- */
.modelo-3d {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  /* halo tenue detrás del modelo, para que no flote sobre la nada */
  background: radial-gradient(closest-side, rgba(77, 123, 255, 0.16), rgba(77, 123, 255, 0) 72%);
}
.modelo-3d .modelo-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55));
}
/* en la tarjeta: chiquito y arriba del texto */
.card .modelo-3d { width: 100%; max-width: 176px; margin: -6px auto 2px; }
.card.is-link:hover .modelo-3d { transform: translateY(-2px) scale(1.04); }
.card .modelo-3d { transition: transform 0.25s ease; }
/* en la página del servicio: grande, junto al título */
.hero-servicio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 16px;
}
@media (min-width: 900px) { .hero-servicio { grid-template-columns: 1fr minmax(320px, 460px); gap: 56px; } }
.page-hero-modelo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.page-hero-modelo .modelo-3d { width: 100%; max-width: 440px; }
.modelo-pie {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

/* la morfosis tarjeta → página la hace el navegador con View Transitions */
@view-transition { navigation: auto; }
::view-transition-group(modelo-servicio) { animation-duration: 620ms; }
::view-transition-old(modelo-servicio),
::view-transition-new(modelo-servicio) {
  animation-duration: 620ms;
  animation-timing-function: cubic-bezier(0.22, 0.9, 0.24, 1);
  mix-blend-mode: normal;
}
::view-transition-old(root) { animation: vt-salida 260ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-entrada 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both; }
@keyframes vt-salida { to { opacity: 0; transform: scale(0.985); } }
@keyframes vt-entrada { from { opacity: 0; transform: translateY(14px); } }

/* respaldo para navegadores sin View Transitions */
body.saliendo { opacity: 0; transition: opacity 0.18s ease; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  .card.is-link:hover .modelo-3d { transform: none; }
}

.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tag {
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(10, 16, 26, 0.6);
  color: rgba(232, 239, 247, 0.85);
}

.mini-card {
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, rgba(8, 13, 21, 0.58) 100%);
  backdrop-filter: blur(18px);
}
.mini-card h3 { font-size: 18px; margin-bottom: 6px; }
.mini-card p { font-size: 14.5px; line-height: 1.5; }

.stat-box {
  flex: 1;
  min-width: 120px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 26, 0.6);
  backdrop-filter: blur(16px);
}
.stat-box .num { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; color: #fff; }
.stat-box .label { font-size: 13.5px; color: var(--text-dimmer); margin-top: 4px; }

/* ---------- certificaciones: credenciales, no etiquetas ---------- */
.cert-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
  padding: 20px 26px;
  margin-top: 26px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(12, 19, 30, 0.55), rgba(8, 13, 21, 0.5));
}
.cert-summary .item { display: flex; flex-direction: column; gap: 2px; }
.cert-summary .n {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.cert-summary .l { font-size: 12.5px; color: var(--text-dimmer); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
@media (min-width: 1000px) { .cert-grid { grid-template-columns: repeat(3, 1fr); } }
/* ficha destacada: la marca con la que hay más profundidad técnica */
.cert-featured { margin-top: 18px; }
.brand-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 21, 33, 0.62) 0%, rgba(8, 13, 21, 0.56) 100%);
  backdrop-filter: blur(16px);
}
.brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f2f6fc;
}
.brand-name svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent-light); }
.brand-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  white-space: nowrap;
}
.cert-list { display: flex; flex-direction: column; }
/* la ficha destacada lista sus certificaciones a dos columnas */
.cert-list.cert-list-2col { display: grid; grid-template-columns: 1fr; column-gap: 48px; }
@media (min-width: 880px) { .cert-list.cert-list-2col { grid-template-columns: 1fr 1fr; } }
.cert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.cert-row:last-child { border-bottom: none; padding-bottom: 2px; }
.cert-row .cert-name { font-size: 14.5px; font-weight: 600; color: #eaf1fb; }
.cert-row .cert-area { font-size: 13px; color: var(--text-dimmer); flex: 1 1 100%; }
@media (min-width: 480px) { .cert-row .cert-name { min-width: 106px; } }
/* en la ficha destacada la especialidad va a la derecha, formato de expediente */
.cert-featured .cert-row .cert-area { flex: 1 1 auto; text-align: right; }
/* el rango es la información: Master > Expert/Pro > Certified */
.rank {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.rank-master { color: #f2d9a4; background: rgba(226, 190, 122, 0.14); border: 1px solid rgba(226, 190, 122, 0.45); }
.rank-expert { color: #b4d4ff; background: rgba(127, 180, 255, 0.13); border: 1px solid rgba(127, 180, 255, 0.34); }
.rank-base { color: rgba(216, 227, 242, 0.82); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); }

/* ---------- proyectos ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: rgba(10, 16, 26, 0.6);
  backdrop-filter: blur(16px);
}
.project-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: #0b111c; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card .body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; }
.project-card .kicker { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(140, 180, 255, 0.9); }
.project-card h3 { font-size: 18.5px; }
.project-card p { font-size: 14.5px; line-height: 1.5; color: rgba(222, 231, 242, 0.72); }

/* ---------- banner D-Clock (home) ---------- */
.dclock-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 44px;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 172, 0.28);
  background: linear-gradient(140deg, rgba(13, 59, 50, 0.6) 0%, rgba(10, 16, 26, 0.66) 55%, rgba(8, 13, 21, 0.66) 100%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  position: relative;
  overflow: hidden;
}
.dclock-banner::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px; height: 420px;
  background: radial-gradient(closest-side, rgba(34, 211, 172, 0.28), transparent);
  pointer-events: none;
}
.dclock-banner .content { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.dclock-banner .content p { max-width: 52ch; font-size: 16px; line-height: 1.55; color: rgba(226, 240, 236, 0.85); }
.dclock-banner .visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.dclock-banner .visual img { width: 100%; max-width: 220px; filter: drop-shadow(0 20px 50px rgba(34, 211, 172, 0.35)); }
.dclock-feature-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(226, 240, 236, 0.85);
}
.dclock-feature-mini::before { content: "✓"; color: var(--dclock); font-weight: 700; }
@media (max-width: 780px) {
  .dclock-banner { grid-template-columns: 1fr; padding: 32px 26px; }
  .dclock-banner .visual { order: -1; }
}

/* ---------- página D-Clock dedicada ---------- */
.dclock-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 10px 0 20px;
}
.dclock-hero img.dclock-logo { width: 88px; filter: drop-shadow(0 10px 30px rgba(34, 211, 172, 0.5)); }
.dclock-hero h1 {
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #cdfaf0 60%, #22d3ac 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.badge-pill.is-dclock { border-color: rgba(34, 211, 172, 0.32); color: #b6f5e6; }

.platform-card { text-align: center; align-items: center; }
.platform-card .icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 172, 0.14); border: 1px solid rgba(34, 211, 172, 0.3);
  font-size: 24px;
}
.dclock-feature-card { border-color: rgba(34, 211, 172, 0.16); }

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  position: relative;
}
.plan-card.is-popular { border-color: rgba(34, 211, 172, 0.5); box-shadow: 0 0 0 1px rgba(34, 211, 172, 0.25), 0 20px 50px -30px rgba(0,0,0,0.8); }
.plan-card .popular-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 5px 14px; border-radius: 999px; color: #04211b;
  background: linear-gradient(180deg, #4ff0cd 0%, #22d3ac 100%);
  white-space: nowrap;
}
.plan-card .plan-name { font-size: 20px; font-weight: 700; color: #fff; }
.plan-card .plan-size { font-size: 13.5px; color: var(--text-dimmer); }
.plan-card .plan-desc { font-size: 13.5px; color: var(--text-dim); }
.plan-card ul { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; font-size: 13.5px; color: rgba(226,235,245,0.85); }
.plan-card ul li { display: flex; gap: 8px; align-items: flex-start; }
.plan-card ul li::before { content: "✓"; color: var(--dclock); font-weight: 700; flex-shrink: 0; }

.step-card { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #04211b;
  background: linear-gradient(180deg, #4ff0cd 0%, #22d3ac 100%);
}

/* ---------- nosotros ---------- */
.nosotros-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: start; }
.nosotros-stats { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.nosotros-cards { display: flex; flex-direction: column; gap: 14px; }

/* ---------- contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.contact-info .block { display: flex; flex-direction: column; gap: 3px; }
.contact-info .label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(150, 190, 255, 0.85); }
.contact-info .value { font-size: 15.5px; color: #eef4fc; line-height: 1.5; }
.contact-info a.value:hover { color: var(--accent-light); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.contact-form input, .contact-form textarea, .contact-form select {
  font-size: 15px;
  color: #f2f7fd;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 12, 20, 0.42);
  outline: none;
  width: 100%;
}
.contact-form select option { background: #0a0e16; color: #f2f7fd; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: rgba(140, 190, 255, 0.6); }
.contact-form textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-msg { font-size: 14px; padding: 12px 14px; border-radius: 12px; display: none; }
.form-msg.show { display: block; }
.form-msg.success { background: rgba(34, 211, 172, 0.14); border: 1px solid rgba(34, 211, 172, 0.35); color: #b6f5e6; }
.form-msg.error { background: rgba(255, 90, 90, 0.12); border: 1px solid rgba(255, 90, 90, 0.35); color: #ffc9c9; }

/* ---------- footer ---------- */
footer.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--border-soft);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand span { font-size: 14.5px; font-weight: 600; color: rgba(238, 244, 252, 0.9); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-dimmer); }
.footer-links a:hover { color: #fff; }
.footer-legal { font-size: 13.5px; color: rgba(214, 225, 238, 0.6); }

/* ---------- utilidades ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-8 { margin-top: 8px; }
.related-links { display: flex; gap: 10px; flex-wrap: wrap; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  /* en móvil no se dibuja la píldora de cristal: barra sólida redondeada */
  .nav-figure { display: none; }
  .nav-content {
    height: auto !important;
    flex-wrap: wrap;
    padding: 8px 12px !important;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(14, 20, 32, 0.92) 0%, rgba(7, 11, 18, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.85);
  }
  .nav-links { display: none; width: 100%; order: 3; flex-direction: column; align-items: stretch; gap: 2px; padding-top: 8px; }
  .nav-content.open .nav-links { display: flex; }
  .has-dropdown .dropdown { position: static; transform: none; opacity: 1; visibility: visible; display: none; width: 100%; margin-top: 4px; box-shadow: none; }
  .has-dropdown.open .dropdown { display: flex; flex-direction: column; }
  .has-dropdown.open .dropdown a { padding: 10px 14px; }
  .nav-toggle { display: flex; }
  .nav-cta-group .btn-ghost { display: none; }
  main { padding-top: 104px; }
  .site-header { padding: 0 14px; }
}
@media (max-width: 640px) {
  .glass-frame { padding: 56px 22px 32px; gap: 64px; border-radius: 24px; }
  .page-shell { padding: 0 12px 16px; }
}
