/* EchoVen — palette from AGENT_HANDOFF.md §3 (Echo Engineering brand guide + Venezuelan flag) */
:root {
  --blue: #1D3C92;
  --navy: #0C1A38;
  --light: #F5F7FA;
  --card: #FCFDFE;
  --line: #DEE4EE;
  --yellow: #F6C522;
  --red: #C8102E;
  --gray: #5E5E5E;
  --ink: #1A1A1A;
  --muted-on-navy: #BFCBE3;
  --sky: #018FCC;

  --font-text: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(64px, 9vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--light);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.12; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.flag {
  height: 8px;
  background: linear-gradient(to right, var(--yellow) 0 33.33%, var(--blue) 33.33% 66.66%, var(--red) 66.66% 100%);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.section { padding: var(--space-section) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 820px; }
.section-head h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem); color: var(--blue); }
.section-head p { color: var(--gray); font-size: 1.125rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(245, 247, 250, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.site-header .brand img { width: 168px; height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 0.9375rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.site-nav a:hover { color: var(--blue); border-bottom-color: var(--yellow); }
.site-nav .nav-links { display: flex; gap: clamp(12px, 2vw, 28px); }
.lang {
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.12em;
  border: 1px solid var(--blue) !important; border-radius: 999px; padding: 6px 14px !important; color: var(--blue) !important;
}
.lang:hover { background: var(--blue); color: #fff !important; }
@media (max-width: 760px) { .site-nav .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 9vw, 120px); }
.hero .wrap { position: relative; }
.hero .wrap > :not(.hero-flag) { position: relative; z-index: 1; }

/* Bolt mark waving like a flag: 16 vertical strips of the icon, each bobbing
   with a phase offset; amplitude grows away from the "pole" on the left. */
.hero-flag {
  --w: 300px; --h: 474px; --strips: 16;
  position: absolute; right: var(--gutter); top: 0;
  width: var(--w); height: var(--h);
  display: flex; opacity: 0.14; pointer-events: none;
}
.hero-flag span {
  flex: 1;
  background: url("/img/echoven-icon.png") no-repeat;
  background-size: var(--w) var(--h);
  background-position: calc(var(--i) * var(--w) / var(--strips) * -1) 0;
  --amp: calc(2px + var(--i) * 0.75px);
  animation: flag-wave 2.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.14s);
  will-change: transform;
}
.hero-flag span:nth-child(1) { --i: 0; }
.hero-flag span:nth-child(2) { --i: 1; }
.hero-flag span:nth-child(3) { --i: 2; }
.hero-flag span:nth-child(4) { --i: 3; }
.hero-flag span:nth-child(5) { --i: 4; }
.hero-flag span:nth-child(6) { --i: 5; }
.hero-flag span:nth-child(7) { --i: 6; }
.hero-flag span:nth-child(8) { --i: 7; }
.hero-flag span:nth-child(9) { --i: 8; }
.hero-flag span:nth-child(10) { --i: 9; }
.hero-flag span:nth-child(11) { --i: 10; }
.hero-flag span:nth-child(12) { --i: 11; }
.hero-flag span:nth-child(13) { --i: 12; }
.hero-flag span:nth-child(14) { --i: 13; }
.hero-flag span:nth-child(15) { --i: 14; }
.hero-flag span:nth-child(16) { --i: 15; }
@keyframes flag-wave {
  from { transform: translateY(calc(var(--amp) * -1)); }
  to   { transform: translateY(var(--amp)); }
}
@media (max-width: 760px) {
  .hero-flag { --w: 170px; --h: 269px; opacity: 0.1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-flag span { animation: none; }
}
.hero-logo { width: min(640px, 100%); margin-bottom: clamp(28px, 4vw, 44px); }
.hero h1 {
  font-size: clamp(1.6rem, 1rem + 2.6vw, 2.75rem); font-weight: 700; color: var(--ink);
  max-width: 900px; line-height: 1.2;
}
.hero .backed {
  margin-top: clamp(32px, 4vw, 48px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px;
}
.hero .backed span { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.hero .backed img { height: 56px; width: auto; }
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 4px; font-weight: 700; text-decoration: none;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 0 -2px var(--yellow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -2px var(--yellow); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 3px 0 -2px var(--yellow); }
.btn-ghost { color: var(--blue); border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--blue); }

/* ---------- About / model ---------- */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-grid .lead { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6rem); line-height: 1.45; }
.about-grid .lead + p { margin-top: 18px; color: var(--gray); font-size: 1.125rem; }
.facts { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--yellow); padding: clamp(22px, 3vw, 34px); display: grid; gap: 6px; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); margin-top: 12px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-weight: 700; }
.facts dd.plain { font-weight: 400; }
.facts dd.name { color: var(--blue); }

.model { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr; align-items: stretch; gap: 16px; }
.model .node { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--blue); padding: 26px; display: grid; gap: 14px; align-content: start; }
.model .node img { height: 64px; width: auto; }
.model .node .where { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; color: var(--gray); }
.model .node.ven { background: var(--navy); border: none; border-top: 6px solid var(--red); color: var(--light); transform: translateY(-10px); box-shadow: 0 18px 40px -18px rgba(12, 26, 56, 0.55); }
.model .node.ven .where { color: var(--yellow); }
.model .arrow { align-self: center; width: 36px; height: 18px; background: var(--yellow); clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%); }
.model-note { margin-top: 28px; font-size: 1.125rem; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .model { grid-template-columns: 1fr; }
  .model .arrow { justify-self: center; transform: rotate(90deg); }
  .model .node.ven { transform: none; }
}

/* ---------- Services ---------- */
.services { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-block + .service-block { margin-top: clamp(56px, 7vw, 96px); }
.service-title { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline; margin-bottom: 26px; }
.service-title .num { font-family: var(--font-mono); font-size: 0.875rem; color: var(--red); grid-row: span 2; padding-top: 10px; }
.service-title h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); color: var(--blue); }
.service-title .by { font-size: 0.9375rem; color: var(--gray); }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature {
  display: flex; align-items: center; gap: 18px;
  background: var(--light); border-left: 6px solid var(--yellow); padding: 24px 26px;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-weight: 700;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.feature:nth-child(n+3) { border-left-color: var(--red); }
.feature:hover { transform: translateX(4px); box-shadow: -4px 0 0 0 var(--blue); }
.feature svg { flex: none; width: 36px; height: 36px; color: var(--blue); }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { background: var(--light); border-top: 4px solid var(--red); padding: 22px 22px 26px; font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.tile-grid.eng .tile { border-top-color: var(--blue); }
.also {
  margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 16px 20px; background: var(--navy); color: var(--muted-on-navy); font-size: 0.9875rem;
}
.also strong { color: var(--light); }
.also .tag { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow); }
@media (max-width: 900px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid, .tile-grid { grid-template-columns: 1fr; } }

/* ---------- Experience ---------- */
.experience { background: var(--navy); color: var(--light); position: relative; }
.experience .flag { position: absolute; top: 0; left: 0; right: 0; }
.experience .eyebrow { color: var(--yellow); }
.exp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(20px, 4vw, 48px); margin: 18px 0 clamp(36px, 5vw, 64px); }
.exp-head .big { font-size: clamp(6rem, 3rem + 12vw, 12rem); font-weight: 800; line-height: 0.9; color: var(--yellow); letter-spacing: -0.02em; }
.exp-head h2 { font-size: clamp(1.75rem, 1rem + 2.6vw, 3.25rem); max-width: 620px; }
.exp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.exp-cols div { border-top: 3px solid var(--yellow); padding-top: 22px; }
.exp-cols div + div { border-top-color: var(--red); }
.exp-cols h3 { font-size: 1.375rem; margin-bottom: 8px; }
.exp-cols p { color: var(--muted-on-navy); }
@media (max-width: 700px) { .exp-cols { grid-template-columns: 1fr; } }

/* ---------- Sectors ---------- */
.sector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sector { padding: clamp(26px, 3vw, 38px); }
.sector .label { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; }
.sector .sub { margin: 8px 0 18px; }
.sector li { list-style: none; padding: 10px 0; border-top: 1px solid; font-size: 1.125rem; }
.sector.crit { background: var(--navy); color: var(--light); border-top: 6px solid var(--red); }
.sector.crit .label { color: var(--yellow); }
.sector.crit .sub { color: var(--muted-on-navy); }
.sector.crit li { border-color: rgba(191, 203, 227, 0.22); }
.sector.non { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--blue); }
.sector.non .label { color: var(--blue); }
.sector.non .sub { color: var(--gray); }
.sector.non li { border-color: var(--line); }
.pills { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.pill { padding: 10px 22px; border-radius: 999px; font-weight: 700; }
.pill.y { background: var(--yellow); color: var(--ink); }
.pill.b { background: var(--blue); color: #fff; }
@media (max-width: 760px) { .sector-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process { background: #fff; border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.step { border-top: 5px solid var(--yellow); padding: 22px 20px 0 0; }
.step:nth-child(3), .step:nth-child(4) { border-top-color: var(--blue); }
.step:nth-child(5) { border-top-color: var(--red); }
.step .n { font-family: var(--font-mono); font-size: 0.875rem; color: var(--red); }
.step h3 { font-size: 1.375rem; color: var(--blue); margin: 8px 0 6px; }
.step p { color: var(--gray); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { border-top: none; border-left: 5px solid var(--yellow); padding: 16px 0 16px 20px; }
  .step:nth-child(3), .step:nth-child(4) { border-left-color: var(--blue); }
  .step:nth-child(5) { border-left-color: var(--red); }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); padding: clamp(24px, 3vw, 38px); }
.card.main { border-top: 6px solid var(--yellow); }
.card.us { border-top: 6px solid var(--red); }
.card .logo { width: 260px; margin-bottom: 20px; }
.card h3 { font-size: 1.5rem; }
.card .role { color: var(--gray); margin-bottom: 18px; }
.contact-list { list-style: none; display: grid; gap: 12px; }
.contact-list .k { display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); }
.contact-list a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--yellow); }
.contact-list a:hover { color: var(--red); }
.us .label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); margin-bottom: 18px; }
.us .co { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.us .co img { height: 48px; width: auto; }
.us .addr { color: var(--gray); padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--muted-on-navy); font-size: 0.875rem; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.site-footer img { width: 180px; }
.site-footer .legal { display: grid; gap: 4px; }
.site-footer .legal strong { color: var(--light); }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

.visually-hidden-num {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Gallery (Echo ED Corp work) ---------- */
.gallery { background: var(--light); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 10px; }
.shot { position: relative; margin: 0; overflow: hidden; background: var(--line); }
.shot.big { grid-column: span 2; grid-row: span 2; }
.shot.tall { grid-row: span 2; }
.shot.wide { grid-column: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.shot:hover img { transform: scale(1.04); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px; color: #fff; font-size: 0.875rem; font-weight: 700;
  background: linear-gradient(to top, rgba(12, 26, 56, 0.85), rgba(12, 26, 56, 0));
}
.shot::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; z-index: 1;
  background: linear-gradient(to right, var(--yellow) 0 33.33%, var(--blue) 33.33% 66.66%, var(--red) 66.66% 100%);
  transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); }
.shot:hover::before { transform: scaleX(1); }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; } }
@media (max-width: 520px) {
  .shots { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .shot.big, .shot.wide { grid-column: auto; }
  .shot.big, .shot.tall { grid-row: span 2; }
}
@media (prefers-reduced-motion: reduce) { .shot img, .shot::before { transition: none; } }
