/* ============================================================
   INGEMATION — shared stylesheet (framework-free)
   One coherent LIGHT theme. Only dark band = Inicio hero.
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  --navy: #0B2A4A;
  --navy-2: #081826;
  --blue: #1565C0;
  --blue-2: #1E7FD6;
  /* Brand green (from the Ingemation logo #22B14B). Single accent color. */
  --brand: #15803D;      /* dark green — text, links, CTA on white (AA ok) */
  --brand-hi: #22B14B;   /* bright brand green — marks, dashes, small accents */
  --brand-dk: #12652F;   /* darker green — hover on solid green surfaces */
  --brand-tint: rgba(34,177,75,.10); /* faint green wash for pills/icons */

  --white: #FFFFFF;
  --surface: #F4F6F9;
  --border: #E1E6EC;
  --text: #1A2230;
  --muted: #5B6472;

  --ff-head: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* spacing scale (8px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px;
  --s-5: 32px; --s-6: 48px; --s-7: 64px; --s-8: 96px;
  --section-y: clamp(64px, 8vw, 112px);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11,42,74,.04), 0 8px 28px rgba(11,42,74,.07);
  --shadow-hover: 0 4px 10px rgba(11,42,74,.08), 0 18px 44px rgba(11,42,74,.12);
  --nav-h: 76px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--ff-head); color: var(--navy); line-height: 1.12; font-weight: 700; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2em; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: var(--s-6); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  font-family: var(--ff-mono);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 var(--s-3);
  display: inline-flex; align-items: center; gap: .55em;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand-hi); display: inline-block; }
.lead { font-size: 1.15rem; color: var(--muted); }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--ff-head); font-weight: 600; font-size: .98rem;
  padding: .8em 1.5em; border-radius: 10px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 48px; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(21,128,61,.30); }
.btn-primary:hover { background: var(--brand-dk); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost--light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost--light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.link-arrow { font-family: var(--ff-head); font-weight: 600; color: var(--brand); display: inline-flex; gap: .4em; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---- Header / nav ---- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.brand img { height: 40px; width: auto; }
.brand .brand-light { display: none; }
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a { font-family: var(--ff-head); font-weight: 600; font-size: .96rem; color: var(--navy); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--brand-hi); transition: width .2s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: var(--s-3); }

/* solid state (default on light pages, + after scroll on home) */
.site-header.solid { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); box-shadow: var(--shadow); border-color: var(--border); }
/* transparent-over-hero (home only) */
.site-header.over-hero:not(.solid) .nav a,
.site-header.over-hero:not(.solid) .brand + .header-cta .btn-ghost { color: #fff; }
.site-header.over-hero:not(.solid) .brand .brand-dark { display: none; }
.site-header.over-hero:not(.solid) .brand .brand-light { display: block; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: .2s; }

/* ---- Hero (the ONE dark band) ---- */
.hero {
  position: relative; color: #fff; padding-top: calc(var(--nav-h) + clamp(48px,7vw,88px));
  padding-bottom: clamp(64px, 8vw, 110px);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  overflow: hidden;
}
.hero::before { /* subtle blueprint grid */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(94,150,214,.09) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(94,150,214,.09) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(120% 90% at 20% 0%, #000 40%, transparent 78%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr .85fr; gap: var(--s-7); align-items: center; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #7FE0A6; }
.hero .eyebrow::before { background: var(--brand-hi); }
.hero p.lead { color: #C4D2E4; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-6); }
.hero-stats .num { font-family: var(--ff-mono); font-size: 1.5rem; color: #fff; font-weight: 500; }
.hero-stats .lbl { font-size: .82rem; color: #9FB2CA; }
.hero-media { position: relative; }
.hero-media img { width: 100%; border-radius: var(--radius); filter: drop-shadow(0 24px 48px rgba(0,0,0,.35)); }

/* ---- Interior page header (light) ---- */
.page-header { padding-top: calc(var(--nav-h) + clamp(40px,6vw,72px)); padding-bottom: clamp(32px,5vw,56px); background: var(--surface); border-bottom: 1px solid var(--border); }
.page-header .container { max-width: 820px; }

/* ---- Card ---- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cdd8e6; }
.card .ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-tint); margin-bottom: var(--s-3); }
.card .ico img { width: 30px; height: 30px; object-fit: contain; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .97rem; margin-bottom: var(--s-3); }
.card--flag { grid-column: span 2; }

/* ---- Logo strip ---- */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(28px,4vw,56px) clamp(36px,5vw,68px); }
/* Cohesive grayscale wall at full opacity (the old low opacity washed colored
   logos out). Real brand colour returns on hover. */
.logos img { height: 42px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1); opacity: .78; transition: filter .25s ease, opacity .25s ease; }
.logos img:hover { filter: none; opacity: 1; }
.logos-label { text-align: center; margin-bottom: var(--s-5); }

/* ---- Sectors ---- */
.sectors { display: grid; grid-template-columns: repeat(5,1fr); gap: var(--s-4); }
.sector { text-align: center; padding: var(--s-4) var(--s-2); }
.sector img { width: 66px; height: 66px; object-fit: contain; margin: 0 auto var(--s-3); }
.sector span { font-family: var(--ff-head); font-weight: 600; font-size: .95rem; color: var(--navy); }

/* ---- Service detail (servicios page) ---- */
.svc-group { padding-top: var(--s-6); }
.svc-group > .grp-label { font-family: var(--ff-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--s-3); }
.svc-item { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-5); background:#fff; border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- Projects ---- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter { font-family: var(--ff-head); font-weight: 600; font-size: .92rem; padding: .55em 1.1em; border-radius: 999px; border: 1.5px solid var(--border); background:#fff; color: var(--navy); cursor: pointer; transition:.2s; }
.filter[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color:#fff; }
.project { overflow: hidden; padding: 0; }
.project .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--navy); }
.project .thumb img { width:100%; height:100%; object-fit: cover; filter: saturate(.85); transition: transform .3s ease; }
.project:hover .thumb img { transform: scale(1.04); }
.project .body { padding: var(--s-4); }
.pill { display: inline-block; font-family: var(--ff-mono); font-size: .72rem; letter-spacing:.04em; text-transform: uppercase; color: var(--brand); background: var(--brand-tint); padding: .3em .7em; border-radius: 6px; margin-bottom: var(--s-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-3); }
.chip { font-family: var(--ff-mono); font-size: .72rem; color: var(--muted); border:1px solid var(--border); border-radius:6px; padding:.25em .55em; }

/* ---- CTA band ---- */
.cta-band { background: var(--surface); text-align: center; }
.cta-band .container { max-width: 720px; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-2); color: #B9C6D8; padding-block: var(--s-7) var(--s-5); font-size: .93rem; }
.site-footer a { color: #B9C6D8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); margin-bottom: var(--s-6); }
.site-footer h4 { color:#fff; font-size: .82rem; letter-spacing:.08em; text-transform: uppercase; font-family: var(--ff-mono); margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-brand img { height: 42px; margin-bottom: var(--s-3); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--s-4); font-size: .85rem; color: #7E90A6; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
.form-field { margin-bottom: var(--s-3); }
.form-field label { display:block; font-family: var(--ff-head); font-weight:600; font-size:.9rem; margin-bottom:.35em; color: var(--navy); }
.form-field input, .form-field textarea { width:100%; padding:.75em .9em; border:1px solid var(--border); border-radius:10px; font: inherit; background:#fff; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(34,177,75,.18); }
.contact-info li { display:flex; gap:.6em; margin-bottom:.6em; list-style:none; }
.contact-info ul { padding:0; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero-media { order: -1; max-width: 380px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .sectors { grid-template-columns: repeat(3,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav, .header-cta .btn { display: none; }
  .nav-toggle { display: block; color: var(--navy); }
  .site-header.over-hero:not(.solid) .nav-toggle { color:#fff; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--navy-2); padding: var(--s-4) var(--gutter); gap: var(--s-4);
  }
  .nav.open a { color:#fff; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card--flag { grid-column: span 1; }
  .sectors { grid-template-columns: repeat(2,1fr); }
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
