/* ===================================================================
   Iparraguirre Agrimensura — Production CSS
   Tokens + components in one file (single request, gzip-friendly).
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand-navy: #14213D; --brand-navy-700: #1F2E55; --brand-navy-500: #3B5288;
  --brand-red: #C0272D; --brand-red-700: #9A1D22; --brand-red-100: #FBE4E5; /* logo only */
  --brand-olive: #7A8B3F; --brand-olive-700: #5A6A2D; --brand-olive-100: #E8ECD6; --brand-olive-200: #C9D2A8;
  --brand-olive-vibrant: #8FA02B; /* promo bar only */
  --paper: #F6F4EE; --paper-2: #EDEAE1; --surface: #FFFFFF;
  --ink: #14213D; --ink-2: #3D4A66; --ink-3: #6B7385;
  --line: #D9D5C9; --line-strong: #B7B1A2;
  --ok: #1FA363; --warn: #D4A017;
  --font-sans: 'Ubuntu', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 4px; --radius-md: 6px;
  --dur: 200ms; --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --container: 1140px; --container-narrow: 880px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-navy-500); text-decoration: none; transition: color var(--dur) var(--ease-out); }
a:hover { color: var(--brand-navy-500); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--container-narrow); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--paper); padding: 8px 12px; border: 2px solid var(--brand-navy); z-index: 999; }

/* Promo */
.promo { display: block; text-align: center; background: var(--brand-navy); color: #C9D2A8; padding: 11px 16px; font-size: 14px; font-weight: 600; border-bottom: 2px solid var(--brand-olive-vibrant); transition: filter var(--dur) var(--ease-out); text-decoration: none; }
.promo:hover { filter: brightness(1.1); color: #C9D2A8; }
.promo__link { display: inline-block; background: var(--brand-olive-vibrant); color: var(--paper); padding: 3px 12px; border-radius: 999px; font-weight: 700; text-decoration: none; margin-left: 4px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); transition: background var(--dur), box-shadow var(--dur); }
.nav.is-scrolled { background: rgba(246,244,238,0.94); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgba(20,33,61,.06); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.nav__brand img { height: 44px; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link, .nav__btn { background: transparent; border: 0; font-family: var(--font-sans); font-weight: 600; font-size: 14px; color: var(--brand-navy); padding: 10px 14px; text-decoration: none; border-radius: var(--radius); cursor: pointer; transition: background var(--dur), color var(--dur); }
.nav__link:hover, .nav__btn:hover { background: rgba(20,33,61,.06); color: var(--brand-navy); }
.nav__item--has-menu { position: relative; }
.nav__menu { position: absolute; top: calc(100% + 6px); left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,33,61,.10); min-width: 280px; padding: 6px; display: none; flex-direction: column; z-index: 60; }
.nav__item--has-menu:hover .nav__menu, .nav__item--has-menu:focus-within .nav__menu { display: flex; }
.nav__menu a { padding: 10px 12px; border-radius: 3px; color: var(--ink); font-size: 14px; }
.nav__menu a:hover { background: var(--paper-2); color: var(--brand-navy); }
.nav__toggle { display: none; background: transparent; border: 0; padding: 10px; cursor: pointer; color: var(--brand-navy); font-size: 22px; }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 560px; display: flex; align-items: center; }
.hero__bg, .hero__overlay { position: absolute; inset: 0; }
.hero__bg { background-size: cover; background-position: center; }
.hero__overlay { background: linear-gradient(180deg, rgba(20,33,61,0.78), rgba(20,33,61,0.55) 60%, rgba(20,33,61,0.72)); }
.hero__inner { position: relative; padding: 96px 24px; color: var(--paper); }
.hero__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; margin-bottom: 20px; }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 20px; color: var(--paper); max-width: 18ch; text-wrap: balance; }
.hero__accent { color: #C9D2A8; font-style: italic; }
.hero__lead { font-size: 18px; line-height: 1.55; opacity: 0.92; max-width: 52ch; margin: 0 0 32px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn { font-family: var(--font-sans); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none; font-size: 14px; line-height: 1.2; transition: background var(--dur), color var(--dur), border var(--dur); }
.btn:focus-visible { outline: 2px solid var(--brand-olive); outline-offset: 2px; }
.btn--lg { padding: 14px 22px; font-size: 16px; }
.btn--primary { background: var(--brand-olive-vibrant); color: var(--paper); }
.btn--primary:hover { background: var(--brand-olive); color: var(--paper); }
.btn--accent { background: var(--brand-red); color: var(--paper); }
.btn--accent:hover { background: var(--brand-red-700); color: var(--paper); }
.btn--ghost-light { background: transparent; color: var(--paper); border-color: rgba(246,244,238,0.5); }
.btn--ghost-light:hover { background: var(--paper); color: var(--brand-olive-700); }

/* Eyebrow & section title */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-olive); margin-bottom: 12px; }
.eyebrow--center { text-align: center; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); text-align: center; margin: 0 0 32px; text-wrap: balance; }
.section-title--left { text-align: left; }

/* Service */
.service { padding: 80px 0; border-bottom: 1px solid var(--line); }
.service:nth-of-type(even) { background: var(--paper-2); }
.service__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.service--reverse .service__grid { direction: rtl; }
.service--reverse .service__grid > * { direction: ltr; }
.service__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance; }
.service__body { font-size: 17px; color: var(--ink-2); line-height: 1.65; margin: 0 0 24px; max-width: 50ch; }
.service__frame { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 2px 6px rgba(20,33,61,.08); border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--ink); }
.service__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease-out); }
.service__frame:hover img { transform: scale(1.02); }

/* Equipo */
.equipo { padding: 80px 0; background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.equipo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.equipo__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.equipo__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--paper); color: var(--brand-navy); display: flex; align-items: center; justify-content: center; font-size: 56px; margin-bottom: 8px; }
.equipo__name { font-weight: 700; font-size: 18px; }
.equipo__role { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }

/* Map */
.mapblock { padding: 80px 0; }
.mapblock__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.mapblock__map { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 2px 6px rgba(20,33,61,.08); aspect-ratio: 16/10; background: var(--ink); }
.mapblock__map iframe { width: 100%; height: 100%; border: 0; }
.mapblock__title { font-family: var(--font-display); font-weight: 700; font-size: 28px; margin: 0 0 12px; }
.mapblock__copy p { color: var(--ink-2); line-height: 1.6; margin: 0 0 12px; }

/* FAQ */
.faq-section { padding: 80px 0; }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color var(--dur); }
.faq__item[open] { border-color: var(--brand-navy); }
.faq__q { width: 100%; background: transparent; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--ink); cursor: pointer; text-align: left; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--brand-navy); }
.faq__chev { font-family: var(--font-mono); color: var(--brand-olive); font-size: 22px; line-height: 1; width: 20px; text-align: center; }
.faq__item[open] .faq__chev::before { content: '−'; }
.faq__chev::before { content: '+'; }
.faq__a { padding: 0 20px 20px; color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 70ch; }

/* Contact */
.contact { padding: 80px 0; background: var(--brand-navy); color: var(--paper); }
.contact .eyebrow { color: #C9D2A8; }
.contact .section-title { color: var(--paper); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact__info p { color: rgba(246,244,238,0.85); margin: 0 0 24px; max-width: 40ch; line-height: 1.6; }
.contact__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.contact__list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.contact__list i { color: #C9D2A8; font-size: 18px; }
.contact__list a { color: var(--paper); }
.contact__list a:hover { color: #C9D2A8; }
.contact__form { background: var(--paper); color: var(--ink); padding: 28px; border-radius: var(--radius-md); display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; }
.field__hint { font-size: 13px; color: var(--fg-muted); margin: 6px 0 0; line-height: 1.5; }
.ctrl { font-family: var(--font-sans); font-size: 15px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); transition: border var(--dur), box-shadow var(--dur); }
.ctrl:focus { outline: none; border-color: var(--brand-navy); box-shadow: 0 0 0 3px rgba(20,33,61,.12); }

/* Footer */
.footer { background: var(--brand-navy); color: var(--paper); padding: 64px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer__logo { height: 44px; margin-bottom: 16px; }
.footer__about { color: rgba(246,244,238,0.78); font-size: 14px; line-height: 1.55; max-width: 38ch; }
.footer__h { font-weight: 700; font-size: 14px; margin: 0 0 14px; letter-spacing: 0.04em; }
.footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(246,244,238,0.85); }
.footer__list i { color: #C9D2A8; }
.footer__list a { color: rgba(246,244,238,0.85); }
.footer__list a:hover { color: var(--paper); }
.footer__social { display: flex; gap: 14px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(246,244,238,0.06); color: var(--paper); font-size: 18px; transition: background var(--dur); }
.footer__social a:hover { background: var(--brand-olive-700); }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(246,244,238,0.12); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(246,244,238,0.6); }
.footer__mono { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* WhatsApp float */
.wa-float { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; background: #25D366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 6px 20px rgba(20,33,61,0.25); z-index: 100; transition: transform var(--dur), box-shadow var(--dur); }
.wa-float:hover { transform: scale(1.06); color: white; }

/* Responsive */
@media (max-width: 920px) {
  .nav__list { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 24px; gap: 4px; }
  .nav__list.is-open { display: flex; }
  .nav__list .nav__menu { position: static; box-shadow: none; border: 0; padding-left: 12px; display: flex; }
  .nav__toggle { display: block; }
  .service__grid, .mapblock__grid, .contact__grid, .footer__grid, .equipo__grid { grid-template-columns: 1fr; gap: 32px; }
  .service--reverse .service__grid { direction: ltr; }
  .hero { min-height: 480px; }
  .hero__inner { padding: 64px 24px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}
