/* M²R · estilos de la web m2r.es (v2, 23/11/2026: ingeniería + consultoría)
   Estilo de la casa: títulos Century Gothic, texto Arial, azul corporativo #2F5496,
   con un verde de acento para la línea de innovación y economía circular.
   Sin fuentes ni recursos externos: la web no hace peticiones a terceros ni usa cookies. */

:root {
  --blue: #2F5496;
  --blue-700: #244378;
  --blue-900: #14274B;
  --blue-tint: #EEF2F9;
  --green: #2A8C74;
  --green-700: #1F6E5B;
  --green-tint: #E9F4F0;
  --bg-alt: #F6F8FB;
  --ink: #16202F;
  --muted: #56606F;
  --line: #E1E6EE;
  --white: #FFFFFF;
  --font-title: "Century Gothic", "CenturyGothic", "AppleGothic", "Futura", "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --max: 1200px;
  --radius: 8px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

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

a { color: var(--blue); }

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

h1, h2 { font-weight: 400; letter-spacing: -0.02em; }
h3 { font-weight: 700; letter-spacing: -0.01em; }

[id] { scroll-margin-top: 88px; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--blue);
  color: var(--white);
  padding: 8px 14px;
  z-index: 100;
}
.skip:focus { left: 16px; }

.c-green { color: var(--green-700); }
.c-blue { color: var(--blue); }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.brand-mark .sq { color: var(--green); }

.brand-text {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

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

.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--blue); }

.nav .nav-cta {
  background: var(--blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
}
.nav .nav-cta:hover { background: var(--blue-700); color: var(--white); }

.lang { display: flex; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }

.lang a, .lang span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
  line-height: 1.2;
}
.lang > :first-child { border-radius: 6px 0 0 6px; }
.lang > :last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.lang [aria-current] { background: var(--blue-tint); color: var(--blue); }
.lang a:hover { color: var(--blue); }

/* ---------- Portada ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #D3DBE7 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 85%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 85%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green-700);
  margin: 0 0 22px;
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}

.hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.08; }

.hero .lead {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 54ch;
  margin: 26px 0 34px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); }

.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

.hero-facts {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14px;
  color: var(--muted);
}
.hero-facts li { position: relative; padding-left: 14px; }
.hero-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.hero-facts strong { color: var(--ink); }

.hero-art svg { width: 100%; height: auto; max-width: 500px; margin: 0 auto; }

/* ---------- Cifras (contador) ---------- */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.stats { background: var(--white); border-bottom: 1px solid var(--line); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }

.stat { display: flex; flex-direction: column; padding: 44px 0 46px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 56px; }

.stat-pre {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--muted);
}

.stat-num {
  font-family: var(--font-title);
  font-size: clamp(60px, 7.5vw, 96px);
  line-height: 1;
  margin: 10px 0 12px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.stat-green .stat-num { color: var(--green-700); }

.stat-label { font-size: 18px; color: var(--ink); max-width: 26ch; }

/* ---------- Secciones ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-green { background: #F3F9F6; }

.section-head { max-width: 760px; margin-bottom: 48px; }

.kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blue);
  font-weight: 700;
  margin: 0 0 14px;
}
.kicker-green { color: var(--green-700); }

.section h2 { font-size: clamp(30px, 3.6vw, 44px); }

.section-head p {
  color: var(--muted);
  margin: 18px 0 0;
  font-size: 18px;
}

/* Dos líneas de trabajo */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.pillar {
  --accent: var(--blue);
  --accent-text: var(--blue);
  --chip-bg: var(--blue-tint);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 36px 34px;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--accent);
}
.pillar-green {
  --accent: var(--green);
  --accent-text: var(--green-700);
  --chip-bg: var(--green-tint);
}

.pillar-num {
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-text);
}

.pillar h3 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
}

.pillar p { color: var(--muted); margin: 0 0 22px; }

.chips {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--accent-text);
}

.more {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-text);
}
.more svg { width: 18px; height: 18px; }
.more:hover { text-decoration: underline; }

/* Consultoría */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card-service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 30px;
}

.icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  color: var(--green-700);
  margin-bottom: 22px;
}
.icon-badge svg { width: 28px; height: 28px; }

.card-service h3 { font-size: 21px; margin-bottom: 10px; }
.card-service p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }

.ticks { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.ticks li {
  position: relative;
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--line);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* Ingeniería */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  border-top: 1px solid var(--line);
}

.eng-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.eng-item svg { width: 32px; height: 32px; color: var(--blue); margin-top: 2px; }
.eng-item h3 { font-size: 18px; }
.eng-item p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* Sectores */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.sector {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 24px 24px;
}
.sector-green { border-left-color: var(--green); }
.sector h3 { font-size: 17px; margin-bottom: 6px; }
.sector p { margin: 0; color: var(--muted); font-size: 15px; }

/* Cómo trabajo */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.step { border-top: 1px solid var(--line); padding-top: 22px; }
.step-num {
  display: block;
  font-family: var(--font-title);
  font-size: 40px;
  line-height: 1;
  color: #A9BCDD;
}
.step h3 { font-size: 19px; margin: 16px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* El estudio */
.about {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.about h2 { margin-bottom: 26px; }
.about-text p { margin: 0 0 18px; }
.about-text p:last-child { margin-bottom: 0; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--white);
}
.card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 18px;
}
.card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  font-size: 15px;
}
.card dt { color: var(--muted); }
.card dd { margin: 0; font-weight: 700; }

/* Contacto */
.contact {
  color: var(--white);
  padding: 96px 0;
  background:
    radial-gradient(ellipse 60% 90% at 95% 0%, rgba(42, 140, 116, 0.35), transparent 60%),
    var(--blue-900);
}
.contact .kicker { color: #9FD3C3; }
.contact h2 { color: var(--white); font-size: clamp(30px, 3.6vw, 44px); max-width: 30ch; }
.contact p { color: #D6DEEC; max-width: 60ch; font-size: 18px; margin: 18px 0 34px; }

.contact .btn-primary {
  background: var(--white);
  color: var(--blue-900);
  font-size: clamp(17px, 2.4vw, 22px);
  padding: 18px 28px;
}
.contact .btn-primary:hover { background: var(--green-tint); }
.contact .btn:focus-visible { outline-color: var(--white); }

.contact .note { display: block; margin-top: 24px; font-size: 14px; color: #AFC0DE; }

/* Pie */
.site-footer { background: #0E1D3A; color: #AFC0DE; font-size: 14px; padding: 28px 0; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
}
.site-footer a { color: var(--white); }

/* Página de aviso legal */
.legal { padding: 64px 0 88px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; font-weight: 700; letter-spacing: -0.01em; }
.legal .updated { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.legal dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }

/* Datos pendientes de confirmar (se quitan antes de publicar) */
.pendiente { background: #FFF1A8; text-decoration: underline; padding: 0 3px; }

/* ---------- Adaptación a pantallas ---------- */

@media (max-width: 1040px) {
  .cards-3, .eng-grid, .sectors { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
}

@media (max-width: 900px) {
  .nav .nav-link { display: none; }
  .nav { gap: 14px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; padding-bottom: 64px; }
  .hero-art svg { max-width: 360px; }
  .pillars, .about { grid-template-columns: 1fr; }
  .about { gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section, .contact { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .cards-3, .eng-grid, .sectors, .steps { grid-template-columns: 1fr; }
  .pillar { padding: 32px 22px 28px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { padding: 32px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .hero-art .lbl { font-size: 17px; letter-spacing: 1px; }
  .hero-art .ctr { font-size: 19px; letter-spacing: 2px; }
  .card-service { padding: 28px 22px; }
  .legal dl, .card dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd, .card dd { margin-bottom: 10px; }
}

@media (max-width: 440px) {
  .brand-text { display: none; }
  .nav .nav-cta { padding: 8px 12px; font-size: 14px; }
}
