/* =========================================================
   CIVILNOVA SOLUTIONS — hoja de estilos principal
   Sin dependencias externas. Fuentes alojadas en /assets/fonts
   ========================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #0d1117;
  --ink-2: #161b22;
  --ink-3: #232a33;
  --steel: #5b6673;
  --line: #e3dfd8;
  --paper: #f6f4f0;
  --white: #ffffff;
  --orange: #ea7217;
  --orange-dark: #c95c0c;
  --orange-soft: #fdf0e6;
  --text: #1c2128;
  --muted: #5b6370;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--orange); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 92%;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 800; font-stretch: 85%; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 750; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; }
p { margin: 0 0 1.1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-stretch: 110%;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 62ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--orange-dark);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.is-solid, body:not(.has-hero) .site-header {
  background: rgba(13,17,23,.92);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 56px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav a, .nav .nav-toggle-sub {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.86); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 10px 14px; border-radius: 8px; background: none; border: 0; cursor: pointer;
  transition: color .2s, background .2s;
}
.nav a:hover, .nav .nav-toggle-sub:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--orange); border-radius: 8px 8px 0 0; }
.nav .chev { width: 12px; height: 12px; transition: transform .2s; }
.has-sub { position: relative; }
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* puente para no perder el hover */
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.open .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .chev, .has-sub.open .chev { transform: rotate(180deg); }
.submenu a { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; padding: 10px 12px; }
.submenu a strong { color: #fff; font-weight: 600; font-size: .95rem; }
.submenu a span { color: rgba(255,255,255,.55); font-size: .8rem; font-weight: 400; }
.nav .btn { margin-left: 10px; padding: 10px 20px; color: #fff; background: var(--orange); }
.nav .btn:hover { background: var(--orange-dark); }

.menu-btn {
  display: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2);
  background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 1020px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink);
    flex-direction: column; align-items: stretch; padding: 16px var(--gutter) 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .nav.open { transform: none; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .nav a, .nav .nav-toggle-sub { font-size: 1.15rem; padding: 14px 8px; width: 100%; justify-content: space-between; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--orange); }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 8px 12px; min-width: 0; }
  .has-sub.open .submenu { display: block; }
  .submenu a { border-bottom: 0; padding: 10px 8px; }
  .nav .btn { margin: 24px 0 0; justify-content: center; border-bottom: 0; border-radius: 999px; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end;
  color: #fff; background: var(--ink); overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13,17,23,.55) 0%, rgba(13,17,23,.25) 35%, rgba(13,17,23,.88) 100%),
    linear-gradient(90deg, rgba(13,17,23,.75) 0%, rgba(13,17,23,0) 70%);
}
.hero::after { /* rejilla técnica */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 60%, transparent 100%);
}
.hero .wrap { padding-top: calc(var(--header-h) + 80px); padding-bottom: clamp(56px, 9vh, 110px); }
.hero h1 { color: #fff; max-width: 13ch; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { color: rgba(255,255,255,.82); margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--orange); }

.page-hero {
  position: relative; color: #fff; background: var(--ink); isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + clamp(64px, 10vw, 120px)) 0 clamp(56px, 8vw, 96px);
}
.page-hero .bg { position: absolute; inset: 0; z-index: -2; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,17,23,.92) 0%, rgba(13,17,23,.7) 55%, rgba(13,17,23,.45) 100%); }
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.4rem); max-width: 18ch; }
.page-hero .lead { color: rgba(255,255,255,.8); margin: 0; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(56px, 7vw, 88px) 0; }
.section-paper { background: var(--paper); }
.section-dark { background: var(--ink); color: rgba(255,255,255,.78); position: relative; overflow: hidden; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead { color: rgba(255,255,255,.7); }
.section-dark.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
}
.section-dark > .wrap { position: relative; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head > div { flex: 1 1 420px; }
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head .lead { margin: 0; max-width: 42ch; flex: 0 1 42ch; }

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 40px 32px 8px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 32px; }
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display); font-stretch: 80%; font-weight: 800;
  font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: 1; color: var(--ink); letter-spacing: -0.03em;
}
.stat-num span { color: var(--orange); }
.stat h3 { margin: 14px 0 10px; font-size: 1.15rem; }
.stat p { color: var(--muted); font-size: .96rem; margin: 0; }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Plataformas ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.product:hover { transform: translateY(-6px); border-color: rgba(234,114,23,.6); box-shadow: 0 28px 50px rgba(0,0,0,.35); }
.product-img { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); filter: saturate(.9); }
.product:hover .product-img img { transform: scale(1.06); }
.product-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(22,27,34,.9)); }
.product-body { padding: 4px 26px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; margin-top: -34px; position: relative; }
.product-name { font-family: var(--font-display); font-stretch: 105%; font-weight: 800; font-size: 1.6rem; letter-spacing: .02em; color: #fff; }
.product-desc { color: rgba(255,255,255,.7); font-size: .98rem; margin: 0; flex: 1; }
.product-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--orange); font-weight: 600; font-size: .92rem; }
.product-cta svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.product:hover .product-cta svg { transform: translate(3px, -3px); }
@media (max-width: 960px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .products { grid-template-columns: 1fr; } }

/* ---------- Valores ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; transition: border-color .3s, transform .3s var(--ease); }
.value:hover { border-color: var(--orange); transform: translateY(-4px); }
.value-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; margin-bottom: 24px; }
.value-icon svg { width: 28px; height: 28px; }
.value p { color: var(--muted); margin: 0; font-size: .98rem; }
.value .num { font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .14em; color: var(--steel); float: right; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr; } }

/* ---------- Proyectos ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(13,17,23,.1); }
.project-img { aspect-ratio: 3/2; overflow: hidden; background: var(--paper); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.project:hover .project-img img { transform: scale(1.04); }
.project-body { padding: 28px 30px 30px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); }
.tag.alt { background: var(--paper); color: var(--steel); }
.project h3 { font-size: 1.35rem; margin-bottom: 12px; }
.project p { color: var(--muted); font-size: .97rem; margin: 0; }
.project details { margin-top: auto; padding-top: 16px; }
.project summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--orange-dark); }
.project summary::-webkit-details-marker { display: none; }
.project summary svg { width: 16px; height: 16px; transition: transform .25s; }
.project details[open] summary svg { transform: rotate(45deg); }
.project details[open] summary .more { display: none; }
.project details:not([open]) summary .less { display: none; }
.project details p { margin-top: 14px; }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }

.projects-teaser { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.teaser { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; color: #fff; text-decoration: none; isolation: isolate; }
.teaser img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.teaser::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,17,23,0) 30%, rgba(13,17,23,.92)); }
.teaser:hover img { transform: scale(1.05); }
.teaser-body { padding: 26px; }
.teaser-body .tag { background: var(--orange); color: #fff; }
.teaser h3 { color: #fff; font-size: 1.3rem; margin: 12px 0 0; }
@media (max-width: 960px) { .projects-teaser { grid-template-columns: 1fr; } .teaser { min-height: 300px; } }

/* ---------- Clientes ---------- */
.marquee { display: grid; gap: 16px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; gap: 16px; width: max-content; animation: scroll 90s linear infinite; }
.marquee-row:nth-child(2) { animation-direction: reverse; animation-duration: 110s; }
.marquee-row:nth-child(3) { animation-duration: 100s; }
.marquee:hover .marquee-row { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.logo-tile {
  width: 132px; height: 96px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: grid; place-items: center; padding: 10px;
}
.logo-tile img { max-width: 100%; max-height: 76px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.logo-tile:hover img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marquee-row { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-row[aria-hidden="true"] { display: none; }
  .hero-media img { animation: none; transform: none; }
}

/* ---------- Bloque texto + imagen ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media { position: relative; }
.split-media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.split-media .badge {
  position: absolute; left: -24px; bottom: -24px; background: var(--orange); color: #fff; padding: 22px 26px; border-radius: 12px;
  font-family: var(--font-display); box-shadow: 0 20px 40px rgba(234,114,23,.3);
}
.split-media .badge strong { display: block; font-size: 2.4rem; font-stretch: 80%; line-height: 1; font-weight: 800; }
.split-media .badge span { font-size: .85rem; letter-spacing: .04em; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } .split-media .badge { left: 16px; bottom: -20px; } }

.prose { max-width: 70ch; }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 36px; color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea7217' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat;
}
.section-dark .checklist li { color: rgba(255,255,255,.85); }
.section-dark .checklist li::before { background-color: rgba(234,114,23,.15); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--ink); padding: 36px 30px; }
.pillar .n { font-family: var(--font-display); color: var(--orange); font-weight: 800; font-size: 2.6rem; font-stretch: 80%; line-height: 1; margin-bottom: 20px; display: block; }
.pillar h3 { font-size: 1.2rem; }
.pillar p { margin: 0; font-size: .95rem; color: rgba(255,255,255,.65); }
@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pillars { grid-template-columns: 1fr; } }

.countries { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.country { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: .92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; font-size: .9rem; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stack-group { background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); padding: 26px; }
.stack-group h3 { font-size: 1rem; font-stretch: 110%; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
@media (max-width: 760px) { .stack { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta {
  position: relative; border-radius: calc(var(--radius) * 1.5); overflow: hidden; isolation: isolate;
  padding: clamp(48px, 7vw, 88px) clamp(28px, 6vw, 80px); color: #fff; background: var(--ink);
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
}
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,17,23,.96), rgba(13,17,23,.6)); }
.cta h2 { color: #fff; margin-bottom: 12px; }
.cta p { color: rgba(255,255,255,.75); margin: 0; max-width: 52ch; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.contact-list .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; }
.contact-list .ic svg { width: 22px; height: 22px; }
.contact-list small { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); font-weight: 600; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--orange-dark); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.3); padding: clamp(28px, 4vw, 44px); box-shadow: 0 30px 60px rgba(13,17,23,.06); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea {
  font: inherit; font-size: 1rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(234,114,23,.12); }
.field textarea { min-height: 160px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 6px 0 24px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex-shrink: 0; }
.consent a { color: var(--orange-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-weight: 500; display: none; }
.form-status.ok { display: block; background: #e8f6ee; color: #146c3b; }
.form-status.err { display: block; background: #fdecec; color: #a61b1b; }

.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); height: clamp(340px, 34vw, 440px); position: relative; }
/* Las columnas pueden estrecharse por debajo del ancho de su contenido (evita que el mapa ensanche la página en móvil) */
.split > *, .contact-grid > * { min-width: 0; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-consent { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--paper) url("../img/fotos/bg-pont-quisi.webp") center/cover; isolation: isolate; }
.map-consent::before { content: ""; position: absolute; inset: 0; background: rgba(246,244,240,.88); z-index: -1; }
.map-consent p { font-size: .9rem; color: var(--muted); max-width: 40ch; margin: 0 auto 16px; }

/* ---------- Noticias ---------- */
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .feed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feed { grid-template-columns: 1fr; } }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 24px 44px rgba(13,17,23,.08); }
.news-media img, .news-media video { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--paper); }
.news-body { padding: 24px 26px 26px; }
.news-date { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 10px; display: block; }
.news-text { font-size: .96rem; color: var(--text); overflow-wrap: anywhere; }
.news-text p { margin: 0 0 .8em; }
.news-text a { color: var(--orange-dark); }
.news-text .invisible { display: none; }
.news-text .ellipsis::after { content: "…"; }
.news-text.clamped { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.news-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .92rem; }
.news-actions button { background: none; border: 0; padding: 0; color: var(--steel); cursor: pointer; font-weight: 600; }
.feed-status { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }
.skeleton { height: 360px; border-radius: var(--radius); background: linear-gradient(90deg, #efece7 25%, #f7f5f2 50%, #efece7 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.feed-more { text-align: center; margin-top: 40px; }

/* ---------- Legal ---------- */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.6em; }
.legal p, .legal li { color: #3b424c; font-size: .98rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .92rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal a { color: var(--orange-dark); overflow-wrap: anywhere; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 80px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid h4 { color: #fff; font-size: .8rem; font-stretch: 110%; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 20px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; color: rgba(255,255,255,.75); transition: color .2s; }
.footer-grid a:hover { color: var(--orange); }
.footer-brand img { height: 48px; width: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 34ch; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; color: #fff; transition: background .2s, border-color .2s; }
.socials a:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.socials svg { width: 18px; height: 18px; }
.seals { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.seals a { background: #fff; border-radius: 10px; padding: 6px; display: block; transition: transform .2s; }
.seals a:hover { transform: translateY(-2px); }
.seals img { height: 44px; width: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: .85rem; }
.footer-bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-bottom a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  background: var(--orange); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(234,114,23,.35); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.legal details { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; background: var(--paper); }
.legal summary { cursor: pointer; padding: 16px 20px; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.legal details[open] summary { border-bottom: 1px solid var(--line); }
.legal details > *:not(summary) { margin-left: 20px; margin-right: 20px; }
.legal details > :last-child { margin-bottom: 18px; }

/* ---------- Inteligencia artificial ---------- */
.pillars { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.ai-grid .value { position: relative; overflow: hidden; }
.ai-grid .value::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--orange); transition: width .4s var(--ease); }
.ai-grid .value:hover::after { width: 100%; }
.ai-case {
  margin-top: 28px; display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: center;
  background: var(--ink); color: rgba(255,255,255,.75); border-radius: var(--radius); overflow: hidden; padding-right: 36px;
}
.ai-case img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; object-position: center 80%; }
.ai-case h3 { color: #fff; margin: 12px 0 10px; }
.ai-case .tag { background: var(--orange); color: #fff; }
.ai-case p { margin: 0 0 14px; }
.ai-case .link-arrow { color: var(--orange); }
@media (max-width: 760px) { .ai-case { grid-template-columns: 1fr; padding: 0 0 28px; } .ai-case > div { padding: 0 24px; } }
.stack-group.wide { grid-column: 1 / -1; border-color: rgba(234,114,23,.45); background: linear-gradient(135deg, rgba(234,114,23,.12), var(--ink-2) 60%); }
.ai-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.ai-grid .value { grid-column: span 3; }
.ai-grid .value:nth-child(-n+2) { grid-column: span 3; }
.ai-grid .value:nth-child(3), .ai-grid .value:nth-child(4) { grid-column: span 3; }
.ai-grid .value-feature { grid-column: 1 / -1 !important; background: var(--ink); border-color: var(--ink); display: grid; grid-template-columns: 56px 1fr; gap: 0 24px; align-items: start; }
.ai-grid .value-feature .value-icon { margin: 0; grid-row: span 2; background: rgba(234,114,23,.15); }
.ai-grid .value-feature h3 { color: #fff; }
.ai-grid .value-feature p { color: rgba(255,255,255,.72); max-width: 80ch; }
@media (max-width: 760px) { .ai-grid .value { grid-column: 1 / -1 !important; } .ai-grid .value-feature { grid-template-columns: 1fr; } .ai-grid .value-feature .value-icon { margin-bottom: 20px; } }

/* ---------- Sectores (inicio) ---------- */
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sector { position: relative; min-height: 300px; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; color: #fff; text-decoration: none; isolation: isolate; }
.sector img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.sector::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,17,23,.05) 20%, rgba(13,17,23,.9)); }
.sector:hover img { transform: scale(1.06); }
.sector > div { padding: 22px; }
.sector h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.sector p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.8); line-height: 1.5; }
@media (max-width: 1000px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sectors { grid-template-columns: 1fr; } .sector { min-height: 240px; } }

/* ---------- Medio ambiente (soluciones) ---------- */
.env-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.env { grid-column: span 3; background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .35s var(--ease); }

.env:hover { transform: translateY(-4px); border-color: rgba(76,175,80,.6); }
.env-logo { height: 120px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 24px; }
.env-logo img { max-height: 70px; max-width: 80%; width: auto; object-fit: contain; }
.env-logo img.sq { max-height: 64px; }
.env-logo-green { background: #2c7a22; color: #fff; }
.env-logo-green strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.env-logo-red { background: #e01b24; }
.env-logo-flora { background: #65961d; }
.env-logo-dk { background: #257718; color: #fff; }
.env-logo-dk strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.env-logo-text { gap: 0; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: #2f6b2a; letter-spacing: -.01em; }
.env-logo-text span { color: var(--orange); }
.env-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.env-body h3 { font-size: 1.25rem; }
.env-body p { color: rgba(255,255,255,.7); font-size: .96rem; margin: 0 0 14px; flex: 1; }
.env-body .link-arrow { color: #7cc576; }
@media (max-width: 640px) { .env { grid-column: 1 / -1; } }

/* Cabecera con foto más protagonista (Soluciones a medida) */
.page-hero.vivid::before { background: linear-gradient(90deg, rgba(13,17,23,.9) 0%, rgba(13,17,23,.62) 42%, rgba(13,17,23,.12) 78%, rgba(13,17,23,0) 100%), linear-gradient(0deg, rgba(13,17,23,.35), rgba(13,17,23,0) 40%); }
.page-hero.vivid .bg img { object-position: 60% 40%; filter: saturate(1.15) contrast(1.05); }
@media (max-width: 760px) { .page-hero.vivid::before { background: linear-gradient(180deg, rgba(13,17,23,.55), rgba(13,17,23,.85)); } }

/* ---------- Página Inteligencia artificial (19/11/2026) ---------- */
.ai-prods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ai-prod { font-family: var(--font-display); font-weight: 800; letter-spacing: .04em; font-size: 1.05rem; padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; }
.ai-prod.alt { background: var(--orange-soft); color: var(--orange-dark); }
.pillar .pillar-link { margin-top: 16px; color: var(--orange); font-size: .92rem; }
/* Menú con 6 entradas: se compacta en pantallas medianas */
@media (min-width: 1021px) and (max-width: 1240px) {
  .nav a, .nav .nav-toggle-sub { padding: 10px 9px; font-size: .9rem; }
  .nav .btn { margin-left: 6px; padding: 10px 16px; }
  .brand img { height: 48px; }
}

/* Corrección 19/11/2026: el desenfoque (backdrop-filter) de la cabecera convertía la cabecera
   en el contenedor del menú móvil (position: fixed) y lo recortaba a 76 px de alto.
   El desenfoque pasa a un pseudo-elemento, que no afecta a los hijos. */
.site-header.is-solid, body:not(.has-hero) .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.site-header.is-solid::before, body:not(.has-hero) .site-header::before { backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
body.menu-open .site-header { background: var(--ink); }

/* Etiqueta «En desarrollo» en la página de IA (19/11/2026) */
.ai-grid .tag-dev { display: inline-block; margin-bottom: 12px; background: var(--paper); color: var(--steel); border: 1px dashed var(--steel); }
.ai-grid .value-feature .tag-dev { background: transparent; color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.4); }

/* El enlace «Escríbenos» lleva al formulario: deja hueco para la cabecera fija (19/11/2026) */
#formulario { scroll-margin-top: calc(var(--header-h) + 24px); }
/* Formulario: los campos de la columna derecha se salían del recuadro (19/11/2026) */
.form-row > * { min-width: 0; }
.field input, .field textarea { width: 100%; }
/* El botón «Contacto» mantiene el naranja también en la propia página de Contacto */
.nav .btn[aria-current="page"] { background: var(--orange-dark); color: #fff; box-shadow: none; border-radius: 999px; }
.form-row { row-gap: 0; }

/* Fichas de Soluciones a medida con ilustraciones esquemáticas (19/11/2026) */
.project-img.esquema { background: #eef3ea; border-bottom: 1px solid var(--line); }
.project:hover .project-img.esquema img { transform: scale(1.02); }

/* Inicio con ilustraciones esquemáticas en sectores y plataformas (19/11/2026) */
.sectors.esquema .sector { background: #eef3ea; }
.sectors.esquema .sector::before { background: linear-gradient(180deg, rgba(13,17,23,0) 35%, rgba(13,17,23,.88) 100%); }
.product-img.esquema { background: #eef3ea; }
.product-img.esquema img { filter: none; }
.product-img.esquema::after { background: linear-gradient(180deg, transparent 55%, rgba(22,27,34,.92)); }

/* Web unificada (19/11/2026): desplegable «Producto o servicio de interés» del formulario de Contacto */
.field select { font: inherit; font-size: 1rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--text); width: 100%; max-width: 100%; }
.field select:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(234,114,23,.12); }

/* 20/11/2026: fondo del aviso «Mostrar mapa» (Dónde estamos): edificio Centroelena, sede de CIVILNOVA en el Parque Tecnológico de Asturias */
.map-consent { background-image: url("../img/fotos/bg-centroelena.webp"); background-position: center 40%; }
