/* ============================================
   Espar Co. — Design tokens
   ============================================ */
:root {
  --navy: #022660;
  --navy-soft: rgba(2, 38, 96, 0.08);
  --cyan: #00A7F1;
  --cyan-soft: rgba(0, 167, 241, 0.12);
  --white: #FFFFFF;
  --ink: #1B2733;
  --muted: #5B6B7C;
  --muted-on-dark: #AFC3DC;
  --border: #E3E8EF;
  --border-on-dark: rgba(255, 255, 255, 0.18);
  --radius: 10px;
  --container: 1160px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font); color: var(--navy); margin: 0 0 12px; line-height: 1.15; }
p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.eyebrow {
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.eyebrow-light { color: var(--cyan); }
h2.on-dark { color: var(--white); }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-primary { background: var(--cyan); color: var(--white); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,167,241,0.35); }
.btn-block { width: 100%; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand-icon { height: 60px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--navy); }
.main-nav a:hover { color: var(--cyan); }
.nav-cta { font-weight: 700 !important; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 22px; background: var(--navy); border-radius: 2px; }

/* ============================================
   Hero
   ============================================ */
.hero { padding: 88px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
}
.hero h1 { font-size: 64px; font-weight: 800; letter-spacing: -1px; }
.hero-tagline { color: var(--cyan); font-size: 26px; font-weight: 700; margin-bottom: 18px; }
.hero-desc { font-size: 17px; max-width: 460px; margin-bottom: 28px; }

.hero-visual {
  background: var(--navy);
  border-radius: 16px;
  padding: 36px;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.hero-visual-label {
  color: var(--white); font-weight: 700; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}
.hero-visual .bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.9); }
.hero-visual .bar-1 { width: 78%; }
.hero-visual .bar-2 { width: 92%; background: rgba(255,255,255,0.65); }
.hero-visual .bar-3 { width: 60%; background: rgba(255,255,255,0.4); }

.brand-name {
  margin: 0;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-espar {
  color: #0b2d6b;
}

.brand-co {
  color: #12a9e8;
}

/* ============================================
   Servicios
   ============================================ */
.services { padding: 72px 0; }
.services h2 { font-size: 34px; margin-bottom: 40px; max-width: 620px; }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.service-icon { margin-bottom: 16px; }
.service-card h3 { font-size: 17px; margin-bottom: 8px; }
.service-card p { font-size: 14.5px; margin-bottom: 0; }

/* ============================================
   Portafolio
   ============================================ */
.portfolio { background: var(--navy); padding: 72px 0; margin-top: 8px; }
.portfolio h2 { font-size: 34px; margin-bottom: 40px; max-width: 620px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.portfolio-card { background: var(--white); border-radius: var(--radius); overflow: hidden; }
.portfolio-media {background: none !important; padding: 0 !important;margin: 0 !important; width: 100%; height: 200px; /* Ajusta este valor al alto que desees para la portada */
                  overflow: hidden; border-top-left-radius: inherit; border-top-right-radius: inherit; height: 220px; display: flex; 
                  align-items: flex-end; padding: 18px 20px;
}
.portfolio-media span { font-weight: 800; font-size: 15px; letter-spacing: 0.4px; text-transform: uppercase; }
.portfolio-media-fill { background: var(--cyan); }
.portfolio-media-fill span { color: var(--white); }
.portfolio-media-outline { background: var(--white); border-bottom: 1px solid var(--border); }
.portfolio-media-outline span { color: var(--cyan); }
.portfolio-body { padding: 22px 24px 26px; }
.portfolio-body h3 { font-size: 20px; margin-bottom: 8px; }
.portfolio-body p { font-size: 14.5px; margin-bottom: 14px; }
.link-arrow { color: var(--cyan); font-weight: 700; font-size: 14.5px; }
.link-arrow:hover { text-decoration: underline; }
/* Fuerza a la imagen a llenar exactamente el contenedor sin dejar espacios */
.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recorta la imagen prolijamente para cubrir todo el recuadro */
  object-position: center top; /* Alinea la captura desde arriba para no cortar títulos */
  display: block;
}

/* ============================================
   Quiénes somos
   ============================================ */
.about { padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.about-photo {
  background: var(--navy); border-radius: var(--radius);
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
}
.about-photo span { color: rgba(255,255,255,0.55); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.about-copy h2 { font-size: 32px; }
.about-role { color: var(--cyan); font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.about-desc { font-size: 16px; max-width: 480px; margin-bottom: 0; }

/* ============================================
   Contacto
   ============================================ */
.contact { background: var(--navy); padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact h2 { font-size: 32px; max-width: 420px; }
.contact-desc { color: var(--muted-on-dark); font-size: 16px; max-width: 400px; }
.social-links { display: flex; gap: 16px; margin-top: 8px; }
.social-links a {
  color: var(--white); width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--border-on-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.social-links a:hover { background: rgba(255,255,255,0.1); }

.contact-form {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-family: var(--font); font-size: 15px; color: var(--ink);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft);
}
.form-note { font-size: 13.5px; margin: 0; min-height: 18px; color: var(--muted); }
.form-note.success { color: #0F9D58; }
.form-note.error { color: #D93025; }

/* ============================================
   Footer
   ============================================ */
.site-footer { padding: 28px 0; background: #041B45; }
.site-footer p { color: rgba(255,255,255,0.65); font-size: 14px; margin: 0; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-grid { gap: 32px; }
  .about-photo { max-width: 320px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 48px; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; }
  .services-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero-tagline { font-size: 21px; }
  .hero { padding: 40px 0 48px; }
  .services, .portfolio, .about, .contact { padding: 52px 0; }
}
