/* ===== PAiS — Proyectos Alternativos de Ingeniería Sustentable ===== */

:root {
  --bg: #FAFAF7;
  --bg-alt: #EEF1F6;
  --surface: #FFFFFF;
  --ink: #1B2430;
  --ink-soft: #4B5768;
  --navy: #2C3A5E;
  --navy-deep: #16213A;
  --orange: #C6702A;
  --orange-soft: #E9C6A6;
  --blue: #3E6FB0;
  --line: #DCE2EA;
  --line-strong: #B9C3D2;
  --panel: #16213A;
  --panel-hover: #0F1830;
  --shadow: 0 1px 2px rgba(22,33,58,0.04), 0 8px 24px rgba(22,33,58,0.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151D;
    --bg-alt: #171D28;
    --surface: #1A2130;
    --ink: #E7EAF0;
    --ink-soft: #A8B2C2;
    --navy: #8CA0CC;
    --navy-deep: #C4D0E8;
    --orange: #E28C4E;
    --orange-soft: #6B4A2E;
    --blue: #7FA3DD;
    --line: #2A3346;
    --line-strong: #3A465D;
    --panel: #232F4C;
    --panel-hover: #2C3A5E;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #11151D;
  --bg-alt: #171D28;
  --surface: #1A2130;
  --ink: #E7EAF0;
  --ink-soft: #A8B2C2;
  --navy: #8CA0CC;
  --navy-deep: #C4D0E8;
  --orange: #E28C4E;
  --orange-soft: #6B4A2E;
  --blue: #7FA3DD;
  --line: #2A3346;
  --line-strong: #3A465D;
  --panel: #232F4C;
  --panel-hover: #2C3A5E;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0;
}

.mono {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

a { color: var(--blue); }

img, svg { max-width: 100%; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- Eyebrow / drawing-callout label ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--orange);
  display: block;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 34px; width: auto; display: block; }
.brand-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--navy);
  line-height: 1.25;
  max-width: 190px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--orange);
}
.nav-cta {
  background: var(--panel);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 3px;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: none !important;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 18px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { width: 100%; padding-block: 10px; border-bottom: 1px solid var(--line); }
  .nav-cta { border-bottom: none !important; text-align: center; }
  .nav-toggle { display: inline-flex; }
  .nav { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  z-index: 0;
}
:root:not([data-theme="light"]) .hero-contours { opacity: 0.28; }
:root[data-theme="dark"] .hero-contours { opacity: 0.28; }
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 76px 64px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  max-width: 15ch;
}
.hero .lede {
  margin-top: 18px;
  max-width: 56ch;
  font-size: 18px;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--panel); color: #fff; }
.btn-primary:hover { background: var(--panel-hover); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); }

.page-hero {
  padding-block: 52px 40px;
}
.page-hero h1 { font-size: clamp(28px, 3.6vw, 40px); }
.page-hero .lede { margin-top: 14px; max-width: 62ch; color: var(--ink-soft); font-size: 17px; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 48px;
}
.stat {
  background: var(--surface);
  padding: 20px 18px;
}
.stat .num {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
}
.stat .label {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); max-width: 22ch; }
.section-head p { color: var(--ink-soft); max-width: 46ch; margin: 10px 0 0 0; }

/* ---------- Service cards ---------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .grid-services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-services { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card .icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 17px; color: var(--navy); }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.card .tag {
  margin-top: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

/* service detail rows (servicios.html) */
.service-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
}
.service-row .icon svg { width: 24px; height: 24px; }
.service-row h3 { font-size: 19px; margin-bottom: 6px; }
.service-row p { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.service-row .meta {
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Sector band ---------- */
.grid-sectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 940px) { .grid-sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-sectors { grid-template-columns: 1fr; } }

/* ---------- Featured specialty callout ---------- */
.feature-spec {
  display: flex;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, var(--panel), var(--navy-deep, var(--panel)));
  color: #fff;
  border-radius: 8px;
  padding: 28px 30px;
}
@media (max-width: 640px) { .feature-spec { flex-direction: column; align-items: flex-start; } }
.feature-spec .icon-big {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.feature-spec .icon-big svg { width: 30px; height: 30px; }
.feature-spec .badge {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255,255,255,0.1);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 9px;
}
.feature-spec h3 { color: #fff; font-size: 19px; margin-bottom: 6px; }
.feature-spec p { color: #C6D2E8; margin: 0; font-size: 14.5px; max-width: 64ch; }
.sector {
  background: var(--panel);
  color: #EAF0FB;
  border-radius: 6px;
  padding: 26px 22px;
}
.sector .icon2 {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.sector .icon2 svg { width: 22px; height: 22px; }
.sector h3 { color: #fff; font-size: 16.5px; margin-bottom: 6px; }
.sector p { margin: 0; color: #C6D2E8; font-size: 14px; }

/* ---------- Projects ---------- */
.grid-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .grid-projects { grid-template-columns: 1fr; } }
.project {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.project .band { height: 6px; background: var(--orange); }
.project .body { padding: 22px; }
.project .meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.project h3 { font-size: 18px; margin-bottom: 8px; }
.project p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Profile / Nosotros ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-grid p { color: var(--ink-soft); }
.spec-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.spec-row:first-child { border-top: none; }
.spec-row .k {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex: none;
  width: 40%;
}
.spec-row .v { color: var(--ink); font-weight: 500; text-align: right; }

.approach-list {
  list-style: none;
  margin: 24px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.approach-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
}
.approach-list .n {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--orange);
  font-weight: 600;
  font-size: 14px;
  padding-top: 2px;
}
.approach-list h4 { font-size: 15.5px; color: var(--navy); margin-bottom: 3px; }
.approach-list p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 26px;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.contact-line:first-of-type { border-top: none; }
.contact-line .ic {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-alt);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.contact-line .ic svg { width: 17px; height: 17px; }
.contact-line > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.contact-line .t { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; font-family: 'IBM Plex Mono', monospace; }
.contact-line .d { font-weight: 600; font-size: 15px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { font-size: 13px; font-weight: 600; color: var(--navy); }
.form input, .form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--surface);
  color: var(--ink);
}
.form input:focus, .form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--panel);
  color: #fff;
  padding-block: 48px;
}
.cta-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: 24px; max-width: 30ch; }
.cta-band p { color: #C6D2E8; margin: 8px 0 0 0; }
.cta-band .btn-primary { background: var(--orange); }
.cta-band .btn-primary:hover { background: #B5631F; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  background: var(--bg-alt);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; }
.footer-brand span { font-family: 'Source Serif 4', serif; font-weight: 600; color: var(--navy); font-size: 13.5px; max-width: 220px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h5 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.footer-col a, .footer-col span {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 6px;
}
.footer-col a:hover { color: var(--navy); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
