/* ===== Design tokens ===== */
:root {
  --navy: #0f2741;
  --navy-700: #163d63;
  --steel: #6b8bb0;
  --accent: #5c7e4c;       /* brand green (from logo) */
  --accent-dark: #46603a;  /* darker green for hover */
  --ink: #1b2530;
  --muted: #5d6b7a;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --max: 1140px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 39, 65, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 38px; width: auto; display: block; }

/* footer reuses the square mark */
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 7px;
  background: var(--accent); color: #fff;
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 24px;
}

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav a { color: #36424f; font-weight: 600; font-size: 15px; }
.primary-nav a:hover { color: var(--navy); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 9px 18px; border-radius: 8px;
}
.nav-cta:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.25s; }

/* ===== Hero ===== */
.hero {
  position: relative; color: #fff;
  background:
    linear-gradient(115deg, rgba(15,39,65,0.92), rgba(22,61,99,0.78)),
    url("hero.svg") center/cover no-repeat,
    var(--navy);
  padding: 110px 0 96px;
}
.hero-inner { position: relative; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); }
.hero-sub { font-size: 19px; color: #d6e1ef; max-width: 620px; margin: 22px 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 9px;
  font-weight: 600; font-size: 15px; cursor: pointer; border: 2px solid transparent;
  transition: 0.2s; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* ===== Sectors strip ===== */
.sectors { background: var(--navy-700); }
.sectors-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 1px; background: rgba(255,255,255,0.08);
}
.sectors-grid div {
  background: var(--navy-700); color: #fff;
  padding: 22px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.sectors-grid strong { font-family: "Barlow Condensed", sans-serif; font-size: 19px; letter-spacing: 0.03em; }
.sectors-grid small { color: var(--steel); font-size: 12px; }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; color: var(--accent-dark); font-weight: 700; margin: 0 0 10px; }
.section-title { font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 18px; color: var(--navy); }
.lead { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 0 40px; }

/* ===== Nosotros ===== */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.value-card h3 { font-size: 24px; color: var(--accent-dark); margin-bottom: 10px; }
.value-card p { color: var(--muted); margin: 0; }

/* ===== Servicios ===== */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.service-card h3 { font-size: 23px; color: var(--navy); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 3px solid var(--accent); display: inline-block; }
.service-card ul { margin: 0 0 8px; padding-left: 20px; color: var(--muted); }
.service-card li { margin-bottom: 7px; }
.service-sub { font-weight: 700; color: var(--ink); margin: 16px 0 6px; font-size: 15px; }
.inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-list li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 13px; color: var(--ink); margin: 0; }

/* ===== Proyectos ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; background: #fff; box-shadow: var(--shadow);
}
.project-zone {
  display: inline-block; background: var(--navy); color: #fff;
  font-family: "Barlow Condensed", sans-serif; letter-spacing: 0.06em;
  padding: 4px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px;
}
.project-card h4 { font-size: 18px; color: var(--accent-dark); margin: 14px 0 4px; }
.project-card p { color: var(--muted); margin: 0; }

/* ===== Clientes ===== */
.client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.client-group h3 {
  font-size: 18px; color: var(--navy); margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent);
}
.client-group ul { list-style: none; padding: 0; margin: 0; }
.client-group li { color: var(--muted); padding: 4px 0; font-size: 15px; border-bottom: 1px solid var(--line); }

/* ===== Contacto ===== */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 28px; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.contact-label { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--accent-dark); font-weight: 700; margin-bottom: 3px; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 260px; border: 0; display: block; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
}
.contact-form label { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; gap: 6px; color: var(--ink); }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-alt);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; background: #fff; }
.contact-form .btn { margin-top: 4px; }
.form-note { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.form-note.ok { color: var(--accent-dark); font-weight: 600; }
.form-note.error { color: #c0392b; font-weight: 600; }
.contact-form .btn:disabled { opacity: 0.65; cursor: progress; }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: #d6e1ef; padding: 36px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-logo { height: 40px; width: auto; display: block; }
.footer-brand small { color: var(--steel); font-size: 13px; letter-spacing: 0.04em; }
.footer-copy { margin: 0; font-size: 14px; color: var(--steel); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .value-grid, .service-grid, .project-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 8px 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .primary-nav.open { max-height: 380px; }
  .primary-nav a { padding: 14px 24px; border-top: 1px solid var(--line); }
  .nav-cta { margin: 8px 24px; text-align: center; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
}
