/* ==========================================================================
   CIME — Consultoría Integral del Mercosur
   Landing styles. Brand: deep teal + warm gold, editorial corporate.
   ========================================================================== */

:root {
  /* Brand */
  --teal-900: #052e28;
  --teal-800: #073b33;
  --teal-700: #0a4f44;
  --teal-600: #0c6455;
  --teal-500: #00806b;   /* logo teal */
  --teal-400: #2fa590;
  --teal-100: #d7ede8;
  --teal-50:  #eef7f4;

  --gold-600: #b3872f;
  --gold-500: #c9a24b;
  --gold-300: #e6cf95;

  --ink:      #0e1c1a;
  --slate:    #4b5a57;
  --muted:    #6d7c78;
  --line:     #e3e8e6;
  --paper:    #f6f8f7;
  --white:    #ffffff;

  --container: 1200px;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(5, 46, 40, .08), 0 1px 2px rgba(5, 46, 40, .04);
  --shadow-md: 0 12px 30px rgba(5, 46, 40, .10);
  --shadow-lg: 0 26px 60px rgba(5, 46, 40, .18);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

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

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tint { background: var(--paper); }
.section--ink { background: var(--teal-900); color: #dfeae7; }

/* Accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.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;
}

/* ---- Section headers -------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal-600);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--gold-500); border-radius: 2px;
}
.section--ink .eyebrow { color: var(--gold-300); }

.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin: 16px 0 14px; }
.section-head p { color: var(--slate); font-size: 1.08rem; margin: 0; }
.section--ink .section-head h2 { color: #fff; }
.section--ink .section-head p { color: #b9ccc7; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  --bg: var(--teal-500); --fg: #fff;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  box-shadow: 0 8px 20px rgba(0, 128, 107, .22);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 128, 107, .3); }
.btn svg { width: 18px; height: 18px; }
.btn--gold { --bg: var(--gold-500); box-shadow: 0 8px 20px rgba(201, 162, 75, .3); color: #33280c; }
.btn--gold:hover { box-shadow: 0 14px 28px rgba(201, 162, 75, .4); }
.btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.5); box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); box-shadow: none; }
.btn--outline {
  background: transparent; color: var(--teal-600); border-color: var(--teal-100); box-shadow: none;
}
.btn--outline:hover { background: var(--teal-50); box-shadow: none; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  padding: 14px 0;
}
.site-header.is-solid {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; color: #fff; }
.brand__sub { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.is-solid .brand__name { color: var(--teal-700); }
.is-solid .brand__sub { color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: .94rem; font-weight: 500; color: rgba(255,255,255,.9);
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold-500); transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.is-solid .nav-links a { color: var(--slate); }
.is-solid .nav-links a:hover { color: var(--teal-600); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  color: #fff;
}
.is-solid .nav-toggle { color: var(--teal-700); }
.nav-toggle svg { width: 26px; height: 26px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(5,46,40,.92) 0%, rgba(7,59,51,.82) 42%, rgba(10,79,68,.45) 100%),
    linear-gradient(0deg, rgba(5,46,40,.7), rgba(5,46,40,0) 40%);
}
.hero__inner { padding: 130px 0 70px; max-width: 820px; }
.hero .eyebrow { color: var(--gold-300); }
.hero h1 {
  color: #fff; font-size: clamp(2.5rem, 6vw, 4.6rem); margin: 20px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--gold-300); }
.hero__lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: #d8e6e2; max-width: 620px; margin: 0 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 64px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 30px;
}
.hero__stats .stat__value { font-family: var(--font-head); font-size: clamp(1.8rem, 3.6vw, 2.9rem); color: #fff; }
.hero__stats .stat__label { font-size: .82rem; color: #b9ccc7; letter-spacing: .02em; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll span { width: 1px; height: 34px; background: linear-gradient(rgba(255,255,255,.7), transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.about-copy p { color: var(--slate); font-size: 1.06rem; margin: 0 0 18px; }
.about-copy .lead { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.4; color: var(--ink); margin-bottom: 24px; }
.about-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.about-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; color: var(--ink); }
.about-points svg { width: 22px; height: 22px; color: var(--teal-500); flex: none; margin-top: 2px; }

.about-media { position: relative; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-badge {
  position: absolute; left: -22px; bottom: -22px; background: var(--white);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; border: 1px solid var(--line);
}
.about-badge strong { font-family: var(--font-head); font-size: 2.4rem; color: var(--teal-500); line-height: 1; }
.about-badge span { font-size: .86rem; color: var(--slate); max-width: 130px; }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--teal-500), var(--gold-500));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-600); margin-bottom: 18px;
  transition: background .3s, color .3s;
}
.service-card:hover .service-icon { background: var(--teal-500); color: #fff; }
.service-icon svg { width: 27px; height: 27px; }
.service-card h3 { font-size: 1.16rem; margin-bottom: 10px; letter-spacing: -0.005em; }
.service-card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ==========================================================================
   Experience band
   ========================================================================== */
.exp { position: relative; overflow: hidden; }
.exp__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.exp__copy h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 16px 0 20px; }
.exp__copy p { color: #b9ccc7; font-size: 1.05rem; margin: 0 0 16px; }
.exp__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 8px; }
.exp__stat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 22px; }
.exp__stat strong { font-family: var(--font-head); font-size: 2.2rem; color: var(--gold-300); display: block; }
.exp__stat span { font-size: .9rem; color: #b9ccc7; }

/* ==========================================================================
   Reasons
   ========================================================================== */
.reasons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.reason {
  padding: 30px 26px; border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.reason:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.reason__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-500); color: #33280c; margin-bottom: 16px; }
.reason__icon svg { width: 24px; height: 24px; }
.reason h3 { font-size: 1.08rem; margin-bottom: 8px; }
.reason p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 16px; }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 30px 18px 14px; color: #fff; font-size: .9rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(5,46,40,.85)); opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery-item--wide { grid-column: span 2; }
.gallery-item--tall { grid-row: span 2; }

/* ==========================================================================
   Offices
   ========================================================================== */
.offices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.office {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  background: var(--white); display: flex; gap: 18px; align-items: flex-start;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.office:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.office__pin { width: 44px; height: 44px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; flex: none; }
.office__pin svg { width: 22px; height: 22px; }
.office h3 { font-size: 1.3rem; margin-bottom: 4px; }
.office p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin: 16px 0 18px; }
.contact-info > p { color: var(--slate); font-size: 1.05rem; margin: 0 0 30px; max-width: 420px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list .ci { width: 46px; height: 46px; border-radius: 12px; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; flex: none; }
.contact-list .ci svg { width: 22px; height: 22px; }
.contact-list .cl-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact-list .cl-value { font-weight: 600; color: var(--ink); }

.contact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .96rem; color: var(--ink); background: var(--paper);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-400); background: #fff;
  box-shadow: 0 0 0 3px rgba(47,165,144,.18);
}
.field textarea { resize: vertical; }
.field .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: #c0392b; font-size: .82rem; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.contact-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .95rem; font-weight: 500; }
.alert--success { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); }
.alert--error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--teal-900); color: #b9ccc7; padding: 70px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 62px; margin-bottom: 16px; }
.footer-brand p { font-size: .95rem; max-width: 280px; color: #9db5b0; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer-col a, .footer-col li { font-size: .94rem; color: #9db5b0; transition: color .2s; }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom {
  margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .86rem; color: #7f9994;
}

/* ==========================================================================
   Floating WhatsApp
   ========================================================================== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37,211,102,.45);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
/* Content is visible by default; the hidden start-state only applies when JS
   is active (html.js), so no-JS users and crawlers always see everything. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .reasons-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .exp__grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-media { max-width: 460px; }
  .offices-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .gallery-item--wide, .gallery-item--tall { grid-column: auto; grid-row: auto; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: #fff; padding: 16px 24px 24px; box-shadow: var(--shadow-md);
  }
  .nav-links.is-open a { color: var(--slate); width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 20px 8px; }
  .services-grid, .reasons-grid, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-auto-rows: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .about-badge { left: 12px; bottom: -18px; }
}
