/* HEROCA Ingeniería — hoja de estilos del sitio.
   Basada en el sistema de diseño "Industry" (blueprint, cards y botones
   con esquinas cuadradas y marcas de registro), con la paleta cálida
   propia de HEROCA (crema / naranjo) en lugar del acero azul por defecto. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  --color-bg: #FFFFFF;
  --color-surface: #F1E9DE;
  --color-text: #1C1C1C;
  --color-muted: #6B645C;
  --color-accent: #D97B3F;
  --color-accent-2: #BC6530;
  --color-divider: color-mix(in srgb, #1C1C1C 14%, transparent);

  --color-neutral-100: #FFFFFF;
  --color-neutral-200: #F1E9DE;
  --color-neutral-300: #E4DACB;
  --color-neutral-400: #C9BDAE;
  --color-neutral-500: #A79C8C;
  --color-neutral-600: #877C6C;
  --color-neutral-700: #6B645C;
  --color-neutral-800: #453F37;
  --color-neutral-900: #2B2420;

  --color-accent-100: #FBE9DC;
  --color-accent-200: #F6D2B8;
  --color-accent-300: #E8A363;
  --color-accent-400: #E08E52;
  --color-accent-500: #D97B3F;
  --color-accent-600: #BC6530;
  --color-accent-700: #8A4A24;
  --color-accent-800: #5F331A;
  --color-accent-900: #2B2420;

  --color-accent-2-100: #FDF1E6;
  --color-accent-2-200: #FADFC0;
  --color-accent-2-300: #F2C08A;
  --color-accent-2-400: #E8A05C;
  --color-accent-2-500: #D98C4A;
  --color-accent-2-600: #C2762F;
  --color-accent-2-700: #9C5F26;
  --color-accent-2-800: #74461C;
  --color-accent-2-900: #4A2D13;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2B2420 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2B2420 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2B2420 22%, transparent);

  --edge: clamp(20px, 5vw, 72px);
  --wrap: 1200px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.wrap { max-width: var(--wrap); margin: 0 auto; }

/* — blueprint frame (cards, figures, tabs) — */
.blueprint {
  position: relative;
  border: 1px solid var(--color-divider);
  border-radius: 0;
}
.blueprint > .corner { display: none; }

.duotone { position: relative; overflow: hidden; }
.duotone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--color-accent); mix-blend-mode: color;
}
.duotone img { width: 100%; height: 100%; object-fit: cover; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 19px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 0;
}
.btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); background: transparent;
  border: 1px solid var(--color-divider); border-radius: 0;
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); display: block; }
.card-body { margin: 0; font-size: 19px; opacity: 0.85; }

/* — nav — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--edge);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-divider);
}
.nav-brand { display: flex; align-items: center; margin-right: auto; }
.nav-brand img { height: 40px; width: auto; display: block; }
.nav a { color: inherit; text-decoration: none; font-size: 19px; }
.nav a:hover { color: var(--color-accent); }
.nav-links { display: flex; align-items: center; gap: var(--space-4); }
.nav-toggle { display: none; }

/* — sections — */
section { padding: calc(3 * var(--space-8)) var(--edge); }
.section-pad-sm { padding: calc(2.5 * var(--space-8)) var(--edge); }
.eyebrow {
  display: block; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--color-accent-700); margin-bottom: 12px;
}

/* — hero — */
.hero {
  position: relative; overflow: hidden;
  background: var(--color-accent-900); color: var(--color-bg);
  padding: calc(4 * var(--space-8)) var(--edge) calc(3 * var(--space-8));
}
.hero-media { position: absolute; inset: 0; opacity: 0.28; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; }
.hero h1 {
  color: var(--color-bg); font-size: clamp(32px, 5vw, 58px);
  text-transform: uppercase; max-width: 820px; margin: 0;
}
.hero-sub {
  font-size: 19px; line-height: 1.6; color: color-mix(in srgb, var(--color-bg) 82%, transparent);
  max-width: 560px; margin: 20px 0 0;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-cta .btn-secondary { color: var(--color-bg); border-color: color-mix(in srgb, var(--color-bg) 35%, transparent); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px;
  margin-top: calc(3 * var(--space-8)); padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--color-bg) 22%, transparent);
}
.stats-grid b {
  display: block; font-family: var(--font-heading); font-weight: 600; font-size: 42px;
  color: var(--color-accent-300);
}
.stats-grid span { font-size: 19px; color: color-mix(in srgb, var(--color-bg) 75%, transparent); }

/* — quienes somos — */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: stretch; }
.about-copy p { font-size: 19px; line-height: 1.6; color: var(--color-muted); max-width: 540px; }
.about-media { align-self: stretch; min-height: 320px; }

.about-pillars {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: calc(2 * var(--space-8));
}
.pillar-card { padding: 24px; background: var(--color-surface); }
.pillar-card .card-kicker { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.pillar-body { font-size: 20px; line-height: 1.5; font-weight: 400; color: var(--color-text); margin: 0; }

@media (max-width: 900px) {
  .about-pillars { grid-template-columns: 1fr; }
}

/* — section banner photo (servicios) — */
.section-banner {
  aspect-ratio: 12 / 5;
  margin-bottom: 28px;
}
.section-banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .section-banner { aspect-ratio: 4 / 3; }
}

/* — valores layout: bigger square photo fixed on the left; the tab list
   stacks above its description (like the mobile tab pattern) so the text
   gets the full width of the right column instead of a squeezed 1fr. */
.valores-layout {
  display: grid; grid-template-columns: 400px 1fr; gap: 32px; align-items: start;
}
.valores-media { aspect-ratio: 1 / 1; width: 100%; }
.valores-media img { width: 100%; height: 100%; object-fit: cover; }

.tab-panel--valores { grid-template-columns: 1fr; }
.tab-panel--valores .tab-list {
  flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--color-divider);
}
.tab-panel--valores .tab-btn { width: auto; border-left: none; border-bottom: 3px solid transparent; }
.tab-panel--valores .tab-btn.active { border-left: none; border-bottom-color: var(--color-accent); }

@media (max-width: 900px) {
  .valores-layout { grid-template-columns: 1fr; }
  .valores-media { max-width: 420px; margin: 0 auto; }
}

/* — tabbed panels (valores / servicios) — */
.tab-panel { display: grid; border: 1px solid var(--color-divider); }
.tab-panel.tab-panel--servicios { grid-template-columns: 280px 1fr; }
.tab-list { display: flex; flex-direction: column; background: var(--color-bg); border-right: 1px solid var(--color-divider); }
.tab-panel--servicios .tab-list { background: var(--color-surface); }
.tab-btn {
  text-align: left; width: 100%; display: flex; align-items: center;
  padding: 12px 16px; border: none; border-left: 3px solid transparent;
  background: transparent; color: var(--color-muted); font-size: 19px;
  cursor: pointer; font-family: var(--font-body);
}
.tab-btn b { font-family: var(--font-heading); font-size: 16px; color: var(--color-accent-700); margin-right: 8px; font-weight: 400; }
.tab-btn.active { border-left-color: var(--color-accent); background: var(--color-bg); color: var(--color-text); font-weight: 600; }
.tab-content { padding: 32px; min-height: 200px; }
.tab-content h3 { text-transform: uppercase; font-size: 20px; margin: 0 0 8px; }
.tab-content .tab-title {
  display: block; font-family: var(--font-heading); font-weight: 600; font-size: 20px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); margin-bottom: 10px;
}
.tab-content .tab-desc { font-size: 19px; line-height: 1.65; color: var(--color-muted); margin: 0; max-width: 64ch; }
.tab-content p.tab-sub { font-size: 19px; color: var(--color-muted); max-width: 600px; margin: 0 0 18px; }
.service-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; }
.service-items div {
  display: flex; align-items: flex-start; gap: 8px; font-size: 19px; padding: 8px 0;
  border-bottom: 1px solid var(--color-divider);
}
.service-items span.dot { width: 5px; height: 5px; margin-top: 7px; flex-shrink: 0; background: var(--color-accent); }

/* — fortalezas — */
.fortalezas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 24px; }
.fortaleza-card { padding: 20px; background: var(--color-bg); }
.fortaleza-num { display: block; font-family: var(--font-heading); font-size: 16px; color: var(--color-accent-700); margin-bottom: 10px; }
.fortaleza-card h4 { font-size: 19px; margin: 0 0 8px; }
.fortaleza-card p { font-size: 19px; color: var(--color-muted); margin: 0; }

/* — equipo — */
.team-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.team-media figure { aspect-ratio: 4/3; }

/* — clientes — */
/* flexbox instead of grid: with justify-content:center, an incomplete last
   row (e.g. 11 logos = 3+3+3+2) centers itself instead of leaving an empty
   cell on the right, so the count of logos never needs to be a multiple of 3.
   Each cell carries its own border (rather than a divider-colored background
   showing through gaps) so an incomplete row never exposes a bare stripe of
   background color where a cell would have been. */
.clients-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  max-width: 900px; margin: 0 auto;
}
.clients-grid div {
  flex: 1 1 calc(33.333% - 2px); max-width: calc(33.333% - 2px); box-sizing: border-box;
  border: 1px solid var(--color-divider);
  display: flex; align-items: center; justify-content: center; height: 90px;
  background: var(--color-surface); padding: 14px;
}
.clients-grid img { max-width: 180px; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.clients-grid div.cell-tight { padding: 4px; }
.clients-grid img.logo-bhp { max-height: 60%; }
@media (max-width: 640px) {
  .clients-grid div { flex-basis: 100%; max-width: 100%; }
}

/* — contacto — */
#contacto { position: relative; overflow: hidden; }
.contact-media { position: absolute; inset: 0; opacity: 0.22; }
.contact-media img { width: 100%; height: 100%; object-fit: cover; }
.contact-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.contact-card { padding: 24px; background: color-mix(in srgb, var(--color-bg) 8%, transparent); }
.contact-card .corner { color: color-mix(in srgb, var(--color-bg) 55%, transparent); }
.contact-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-bg) 20%, transparent);
}
.contact-row:last-of-type { border-bottom: none; }
.contact-row .label {
  font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent-300); width: 80px; flex-shrink: 0;
}
.contact-row a, .contact-row span.value { color: var(--color-bg); font-size: 19px; }
.contact-row a { font-weight: 600; }
.contact-card .btn-primary { width: 100%; justify-content: center; margin-top: 16px; }

/* — footer — */
footer {
  padding: 24px var(--edge); font-size: 12px;
  background: var(--color-accent-900); color: color-mix(in srgb, var(--color-bg) 78%, transparent);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* — responsive — */
@media (max-width: 900px) {
  .about-grid, .team-grid, .contact-grid { grid-template-columns: 1fr; }
  .tab-panel.tab-panel--valores, .tab-panel.tab-panel--servicios { grid-template-columns: 1fr; }
  .tab-list { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--color-divider); }
  .tab-btn { width: auto; border-left: none; border-bottom: 3px solid transparent; }
  .tab-btn.active { border-left: none; border-bottom-color: var(--color-accent); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 12px var(--edge) 20px;
    background: var(--color-bg); border-bottom: 1px solid var(--color-divider);
  }
}
