/* ==========================================================================
   ARGRID ENERGY — Sistema de diseño
   Paleta:  navy-950 #081527 · navy-800 #0E2A4D · navy-600 #1B4B7E
            orange-500 #F2661D · amber-400 #FFB020
            ink-900 #0E1B2E · slate-500 #5B6B82 · fog-50 #F5F8FC
   Tipos:   Display  — Space Grotesk
            Body     — IBM Plex Sans
            Utilidad — IBM Plex Mono (etiquetas, códigos, cifras)
   ========================================================================== */

:root {
  --navy-950: #081527;
  --navy-900: #0a1c33;
  --navy-800: #0e2a4d;
  --navy-700: #123b6b;
  --navy-600: #1b4b7e;
  --orange-500: #f2661d;
  --orange-600: #d6540f;
  --amber-400: #ffb020;
  --ink-900: #0e1b2e;
  --slate-500: #5b6b82;
  --slate-300: #b7c3d4;
  --fog-50: #f5f8fc;
  --fog-100: #eaf0f8;
  --white: #ffffff;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --container: 1180px;
  --radius: 10px;
  --shadow-soft: 0 20px 50px -25px rgba(8, 21, 39, 0.35);
  --shadow-card: 0 1px 0 rgba(14, 27, 46, 0.06), 0 12px 30px -18px rgba(14, 27, 46, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--orange-500);
  display: inline-block;
}

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--light { background: var(--fog-50); }
.section--dark {
  background: var(--navy-950);
  color: var(--fog-50);
}
.section--dark .eyebrow { color: var(--amber-400); }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--slate-500); font-size: 1.02rem; }
.section--dark .section-head p { color: var(--slate-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--orange-500);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-600); }
.btn-ghost-dark {
  border-color: rgba(245, 248, 252, 0.3);
  color: var(--fog-50);
}
.btn-ghost-dark:hover { border-color: var(--amber-400); color: var(--amber-400); }
.btn-ghost-light {
  border-color: rgba(14, 27, 46, 0.18);
  color: var(--ink-900);
}
.btn-ghost-light:hover { border-color: var(--navy-600); color: var(--navy-600); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 21, 39, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 248, 252, 0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 38px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.1;
}
.brand-word span {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--amber-400);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--slate-300);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-links a:hover { color: var(--white); background: rgba(245, 248, 252, 0.08); }
.nav-links a.active { color: var(--navy-950); background: var(--amber-400); }
.nav-cta { margin-left: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(245, 248, 252, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--white);
}
.nav-toggle svg { display: block; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(245, 248, 252, 0.08);
    padding: 10px 20px 20px;
    gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }
}

/* ---------- Hero (single-line diagram signature) ---------- */
.hero {
  position: relative;
  background: var(--navy-950);
  color: var(--fog-50);
  overflow: hidden;
  padding: 108px 0 96px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-grid .edge {
  fill: none;
  stroke: rgba(183, 195, 212, 0.28);
  stroke-width: 1.4;
}
.hero-grid .pulse {
  fill: none;
  stroke: var(--amber-400);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 8 220;
  animation: flow 5.5s linear infinite;
  filter: drop-shadow(0 0 5px rgba(255, 176, 32, 0.65));
}
.hero-grid .pulse.pulse-orange { stroke: var(--orange-500); animation-duration: 4.2s; filter: drop-shadow(0 0 5px rgba(242, 102, 29, 0.65)); }
.hero-grid .node { fill: var(--navy-950); stroke: rgba(183, 195, 212, 0.45); stroke-width: 1.4; }
.hero-grid .node-core { fill: var(--amber-400); opacity: 0.85; }
@keyframes flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -520; }
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero-inner h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-top: 18px;
  color: var(--white);
}
.hero-inner p.lead {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--slate-300);
  max-width: 560px;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 64px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(245, 248, 252, 0.12);
  padding-top: 28px;
}
.hero-meta div { font-family: var(--font-mono); font-size: 0.8rem; color: var(--slate-300); }
.hero-meta strong { display: block; color: var(--white); font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 4px; }

/* ---------- Standards strip ---------- */
.standards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--fog-100);
  border: 1px solid var(--fog-100);
  border-radius: var(--radius);
  overflow: hidden;
}
.standard-item {
  background: var(--white);
  padding: 24px 26px;
}
.standard-item .code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--orange-500);
  letter-spacing: 0.06em;
}
.standard-item h4 { font-size: 1.05rem; margin-top: 8px; }
.standard-item p { margin-top: 8px; color: var(--slate-500); font-size: 0.92rem; }

/* ---------- Cards grid (services) ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--fog-100);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -22px rgba(14, 27, 46, 0.28); }
.card .code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--orange-500);
  letter-spacing: 0.08em;
}
.card .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  color: var(--navy-600);
}
.card h3 { font-size: 1.12rem; margin-top: 10px; }
.card p { margin-top: 10px; color: var(--slate-500); font-size: 0.95rem; }
.card .deliverables {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--fog-100);
}
.card .deliverables span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.card .deliverables ul { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.card .deliverables li {
  font-size: 0.88rem;
  color: var(--ink-900);
  padding-left: 16px;
  position: relative;
}
.card .deliverables li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--orange-500);
  border-radius: 50%;
}

/* ---------- Methodology stepper ---------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 26px 22px 22px;
  background: var(--navy-900);
  border: 1px solid rgba(245, 248, 252, 0.1);
  border-radius: var(--radius);
}
.step .num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber-400);
  letter-spacing: 0.06em;
}
.step h4 { color: var(--white); font-size: 1rem; margin-top: 12px; }

/* ---------- Case studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.case-card {
  background: var(--white);
  border: 1px solid var(--fog-100);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.case-card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
  background: var(--fog-100);
  padding: 5px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.case-card h3 { font-size: 1.25rem; }
.case-card ul { display: flex; flex-direction: column; gap: 8px; }
.case-card li {
  font-size: 0.94rem;
  color: var(--slate-500);
  padding-left: 18px;
  position: relative;
}
.case-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--navy-600);
  border-radius: 50%;
}
.case-result {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--fog-100);
}
.case-result span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-500);
}
.case-result p { margin-top: 8px; font-weight: 500; color: var(--ink-900); }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid rgba(245, 248, 252, 0.1);
}
.contact-row .icon {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  color: var(--amber-400);
  flex-shrink: 0;
}
.contact-row .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-300);
}
.contact-row a, .contact-row p { margin-top: 6px; font-size: 1.02rem; color: var(--white); }
.contact-row a:hover { color: var(--amber-400); }

.form-card {
  background: var(--white);
  color: var(--ink-900);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-soft);
}
.form-card h3 { font-size: 1.2rem; }
.form-card p.hint { margin-top: 8px; color: var(--slate-500); font-size: 0.9rem; }
.field { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 12px 14px;
  border: 1px solid var(--fog-100);
  background: var(--fog-50);
  border-radius: 8px;
  color: var(--ink-900);
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--navy-600);
  background: var(--white);
}
.form-card .btn { margin-top: 22px; width: 100%; justify-content: center; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy-950);
  color: var(--fog-50);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 520px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--slate-300);
  padding: 56px 0 28px;
  border-top: 1px solid rgba(245, 248, 252, 0.08);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; color: var(--slate-300); }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-300);
  margin-bottom: 14px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.92rem;
  color: var(--fog-50);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--amber-400); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 248, 252, 0.08);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--slate-500);
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--navy-950);
  color: var(--fog-50);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 14px; max-width: 640px; }
.page-hero p { margin-top: 16px; color: var(--slate-300); max-width: 560px; font-size: 1.02rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Utility ---------- */
.mt-lg { margin-top: 48px; }
.text-center { text-align: center; }
