/* ============================================================
   Crowmark Compliance Group — muestra de diseño
   Paleta: azul marino corporativo + dorado. Independiente del
   sitio de Red Dominion: no comparte hoja de estilos.
   ============================================================ */

:root {
  --navy:      #14213D;
  --navy-2:    #1B2A4A;
  --navy-deep: #0D1729;
  --navy-soft: #2C3E63;

  --gold:       #C9A227;
  --gold-light: #DCC069;
  --gold-deep:  #A9861A;

  --paper:   #F7F8FA;
  --paper-2: #EDEFF3;
  --line:    #DDE1E8;

  --ink:     #14213D;
  --ink-mid: #55617A;
  --ink-dim: #8A93A6;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1120px;
  --header-h: 68px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 34px); }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }

::selection { background: var(--gold); color: var(--navy); }

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

/* Iconos: heredan el color del contenedor */
.ico {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Barra de muestra ---------- */
.demo-bar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 9px 20px;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .55);
  font-size: .74rem;
  letter-spacing: .4px;
  text-align: center;
}
.demo-bar a { color: var(--gold-light); font-weight: 500; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }

.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo-text { font-size: 1.05rem; font-weight: 400; letter-spacing: .1px; white-space: nowrap; }
.logo-text strong { font-weight: 700; }

.nav-list { display: flex; align-items: center; gap: 30px; }
.nav-link {
  position: relative;
  font-size: .86rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .72);
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span {
  width: 22px; height: 2px;
  background: #fff;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn-gold { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); }

.btn-outline { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }

.btn-lg { padding: 15px 38px; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  padding: 74px 0;
  background: var(--navy);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0 0 0 auto; width: 58%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* Degradado que funde la imagen con el fondo: el texto queda legible */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--navy) 6%, rgba(20, 33, 61, .82) 34%, rgba(20, 33, 61, .35) 100%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -.3px;
}
.hero-title strong { font-weight: 700; }

.hero-tagline {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  color: var(--gold);
}

.hero-text { margin-top: 22px; color: rgba(255, 255, 255, .78); font-size: .95rem; font-weight: 300; }

.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Secciones ---------- */
.section { padding: 66px 0; }
.section-paper   { background: var(--paper); }
.section-paper-2 { background: var(--paper-2); }
.section-navy    { background: var(--navy); color: #fff; }

/* Título con filete a ambos lados */
.section-title {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 42px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--navy);
  white-space: nowrap;
}
.section-title::before, .section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-title span { flex: 0 0 auto; }
.section-title-light { color: #fff; }
.section-title-light::before, .section-title-light::after { background: rgba(255, 255, 255, .18); }

/* ---------- Sectores ---------- */
.sectors {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.sector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  text-align: center;
}
.sector + .sector { border-left: 1px solid var(--line); }
.sector .ico { width: 38px; height: 38px; color: var(--navy); stroke-width: 1.3; }
.sector span { font-size: .8rem; font-weight: 500; color: var(--ink); }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.service {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20, 33, 61, .13); }

.service-head {
  padding: 26px 22px 22px;
  background: var(--navy);
  color: #fff;
  text-align: center;
}
.service-head .ico { width: 34px; height: 34px; margin: 0 auto 14px; }
.ico-gold { color: var(--gold); }
/* Reserva 2 líneas: sin esto las cabeceras azules quedan a distinta altura
   según si el título envuelve o no, y el borde inferior sale escalonado. */
.service-head h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px;
  text-align: center;
}
.service-body p { flex: 1; font-size: .84rem; color: var(--ink-mid); font-weight: 300; }
.service-body .btn { width: 100%; }

/* ---------- Enfoque ---------- */
.approach {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
/* Línea que une los pasos, por detrás de los círculos */
.approach::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 10%; right: 10%;
  height: 1px;
  background: var(--line);
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.step-dot {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 6px var(--paper);
}
.step-dot .ico { width: 30px; height: 30px; }
.step-name { font-size: .82rem; font-weight: 500; }

.approach-note {
  margin-top: 38px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-mid);
  font-size: .95rem;
}

/* ---------- Pilares ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.pillar { padding-inline: 10px; }
.pillar + .pillar { border-left: 1px solid rgba(255, 255, 255, .14); padding-left: 40px; }
.pillar h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; }
.pillar p { font-size: .86rem; font-weight: 300; color: rgba(255, 255, 255, .72); }

/* ---------- Alcance internacional ---------- */
.reach {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  background: var(--navy-deep);
  overflow: hidden;
}
/* El SVG mide 1440x340, la misma altura de la sección, y ya reserva la franja
   central para el texto: no necesita ningún velo encima. */
.reach-map {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.reach-inner { position: relative; z-index: 1; text-align: center; }

.reach-regions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: .5px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
}
.reach-regions i { color: var(--gold); font-style: normal; font-weight: 300; }

/* ---------- Contacto ---------- */
.contact-inner { text-align: center; }
.contact-inner .section-title { justify-content: center; }
.contact-text {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--ink-mid);
  font-weight: 300;
  font-size: .95rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding-top: 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-note {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: .88rem;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .76rem;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: var(--gold-light); }
.footer-bottom a:hover { text-decoration: underline; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .sectors { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  /* El borde por orden ya no vale al envolver: se corta por columna */
  .sector + .sector { border-left: 0; }
  .sector:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }

  .approach { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .approach::before { display: none; }

  .pillars { grid-template-columns: 1fr; gap: 28px; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); padding-left: 10px; padding-top: 28px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 80vw);
    padding: 90px 26px 26px;
    background: var(--navy-deep);
    border-left: 1px solid rgba(255, 255, 255, .1);
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    z-index: 40;
  }
  .nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-list li { width: 100%; }
  .nav-link { display: block; width: 100%; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .09); }
  .nav-link::after { display: none; }
  .nav-link.active { color: var(--gold); }

  .hero { min-height: 0; padding: 56px 0; }
  /* La imagen pasa a fondo completo y el degradado a vertical */
  .hero-media { width: 100%; }
  .hero-media::after { background: linear-gradient(180deg, rgba(20, 33, 61, .9), rgba(20, 33, 61, .82)); }

  .section { padding: 52px 0; }
  .section-title { gap: 14px; white-space: normal; }
}

@media (max-width: 620px) {
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .sector:not(:nth-child(3n + 1)) { border-left: 0; }
  .sector:nth-child(even) { border-left: 1px solid var(--line); }

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

  .hero-text br { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }

  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
