/* ==========================================================================
   Equicon Group — "Equicon Trust" theme (Direction A)
   Static, framework-free. CSS custom properties + mobile-first.
   Brand: dark green #1c6633 (kept). Navy/mint dropped as primary accents.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --brand:        #1c6633;
  --brand-deep:   #0f4d24;
  --brand-tint:   #eef5f0;
  --brand-tint-2: #e2ede6;

  /* Neutrals */
  --ink:     #1a1f1c;
  --body:    #3c4441;
  --muted:   #6b7470;
  --line:    #e4e8e5;
  --surface: #ffffff;
  --bg:      #ffffff;
  --bg-tint: #f6f8f6;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(20, 40, 28, 0.04), 0 1px 3px rgba(20, 40, 28, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 40, 28, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 40, 28, 0.12);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Spacing scale (8px base) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;

  /* Type */
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", "Open Sans", system-ui, sans-serif;

  /* Layout */
  --container: 1160px;
  --container-narrow: 820px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-deep); }
ul { list-style: none; padding: 0; }
address { font-style: normal; }
iframe { border: 0; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; font-weight: 700; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-2); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--tint { background: var(--bg-tint); }

.section__head { max-width: 720px; margin: 0 auto var(--s-5); text-align: center; }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--s-1);
}
.section__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: var(--s-2); }
.section__lead { color: var(--muted); font-size: 1.05rem; }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .75rem 1.4rem; border-radius: var(--r-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: all .2s ease; text-align: center;
}
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }
.btn--ghost { background: transparent; color: var(--body); border-color: var(--line); }
.btn--ghost:hover { color: var(--brand); border-color: var(--brand); }
.btn--small { padding: .5rem .9rem; font-size: .85rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #cfd6d1; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding-block: .35rem; }
.topbar__contact { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.topbar__contact a { color: #cfd6d1; display: inline-flex; align-items: center; gap: .4rem; }
.topbar__contact a:hover { color: #fff; }
.topbar__whatsapp { color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.topbar__whatsapp:hover { color: var(--brand-tint); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.header.is-scrolled { box-shadow: var(--shadow-md); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--s-2); }
.header__brand img { height: 40px; width: auto; }
.navbar { display: flex; align-items: center; gap: var(--s-3); }
.navbar__list { display: flex; gap: var(--s-2); }
.nav-link {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  color: var(--ink); padding: .5rem .25rem; position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--brand); transition: width .25s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--brand); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.header__cta { display: inline-flex; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; color: var(--ink); padding: .25rem;
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(520px, 80vh, 760px); display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.02); }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(15,40,24,.92) 0%, rgba(28,102,51,.78) 55%, rgba(15,40,24,.65) 100%); }
.hero__content { position: relative; z-index: 2; max-width: 760px; padding-block: var(--s-6); }
.hero__eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-tint);
  margin-bottom: var(--s-2);
}
.hero__title { color: #fff; font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; margin-bottom: var(--s-2); }
.hero__sub { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,.92); max-width: 620px; margin-bottom: var(--s-3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.hero__actions .btn--outline { color: #fff; border-color: rgba(255,255,255,.7); }
.hero__actions .btn--outline:hover { background: #fff; color: var(--brand); border-color: #fff; }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--s-4); padding-top: var(--s-3); border-top: 1px solid rgba(255,255,255,.25); }
.hero__trust li { display: flex; flex-direction: column; }
.hero__trust strong { font-family: var(--font-display); font-size: 1.4rem; color: #fff; }
.hero__trust span { font-size: .8rem; color: rgba(255,255,255,.8); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-5); align-items: start; }
.about__copy p { margin-bottom: var(--s-2); }
.about__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3); text-align: center; box-shadow: var(--shadow-sm);
}
.stat__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--brand); }
.stat__label { font-size: .85rem; color: var(--muted); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.cards--three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-4); box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.service__icon, .pillar__icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--brand-tint); color: var(--brand);
  font-size: 1.5rem; margin-bottom: var(--s-2);
}
.service__title, .pillar__title { font-size: 1.2rem; margin-bottom: var(--s-1); }
.service p, .pillar p { color: var(--body); }

/* ---------- Assets ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: var(--s-4); }
.filter {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  padding: .45rem 1rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: all .2s ease;
}
.filter:hover { color: var(--brand); border-color: var(--brand); }
.filter.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.assets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.asset {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, opacity .3s ease;
}
.asset:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.asset.is-hidden { display: none; }
.asset__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--brand-tint); }
.asset__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.asset:hover .asset__media img { transform: scale(1.04); }
.asset__overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15,40,24,.55); opacity: 0; transition: opacity .25s ease;
}
.asset:hover .asset__overlay { opacity: 1; }
.asset__zoom {
  width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 1.2rem;
}
.asset__body { padding: var(--s-2) var(--s-3) var(--s-3); }
.asset__tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); background: var(--brand-tint);
  padding: .2rem .6rem; border-radius: var(--r-pill); margin-bottom: var(--s-1);
}
.asset__title { font-size: 1.1rem; margin-bottom: var(--s-2); }
.asset__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Offices ---------- */
.offices { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); margin-bottom: var(--s-4); }
.office {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-3); box-shadow: var(--shadow-sm);
}
.office__flag {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  margin-bottom: var(--s-2);
}
.office__name { font-size: 1.15rem; margin-bottom: .25rem; }
.office__address { color: var(--muted); font-size: .92rem; margin-bottom: var(--s-2); }
.office__contact { font-size: .9rem; margin-bottom: .25rem; }
.office__contact i { color: var(--brand); margin-right: .35rem; }

.map { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: var(--s-4); border: 1px solid var(--line); }
.map iframe { display: block; }

.inquiry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--shadow-sm); }
.inquiry__title { font-size: 1.3rem; margin-bottom: var(--s-2); text-align: center; }
.inquiry iframe { border-radius: var(--r-md); }
.inquiry__fallback { text-align: center; color: var(--muted); font-size: .9rem; margin-top: var(--s-2); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfd6d1; padding-top: var(--s-6); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: var(--s-5); padding-bottom: var(--s-5); }
.footer__brand img { height: 40px; width: auto; margin-bottom: var(--s-2); filter: brightness(0) invert(1); }
.footer__brand p { color: #aeb8b2; font-size: .92rem; max-width: 360px; }
.footer__heading { color: #fff; font-size: 1rem; margin-bottom: var(--s-2); }
.footer__links ul, .footer__offices ul { display: grid; gap: .5rem; }
.footer__links a, .footer__offices a { color: #cfd6d1; }
.footer__links a:hover, .footer__offices a:hover { color: #fff; }
.footer__offices li { font-size: .9rem; }
.footer__email { margin-top: var(--s-2); font-size: .9rem; }
.footer__email i { color: var(--brand-tint); margin-right: .35rem; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); padding-block: var(--s-2); }
.footer__bar-inner { display: flex; justify-content: center; }
.footer__bar p { font-size: .85rem; color: #9aa39d; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 1.5rem; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-deep); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .about__grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .assets-grid { grid-template-columns: repeat(2, 1fr); }
  .offices { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .navbar {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    background: var(--surface); flex-direction: column; align-items: stretch;
    gap: var(--s-2); padding: calc(var(--header-h) + var(--s-2)) var(--s-3) var(--s-4);
    box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s ease;
    z-index: 95;
  }
  .navbar.is-open { transform: translateX(0); }
  .navbar__list { flex-direction: column; gap: .25rem; }
  .nav-link { display: block; padding: .75rem .5rem; border-radius: var(--r-sm); }
  .nav-link:hover, .nav-link.is-active { background: var(--brand-tint); }
  .nav-link::after { display: none; }
  .header__cta { width: 100%; justify-content: center; }

  .topbar__contact { gap: var(--s-2); }
  .topbar__contact a span { display: none; }
  .topbar__whatsapp span { display: inline; }

  .cards, .cards--three { grid-template-columns: 1fr; }
  .hero__trust { gap: var(--s-3); }
}

@media (max-width: 560px) {
  .assets-grid { grid-template-columns: 1fr; }
  .offices { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .asset:hover .asset__media img { transform: none; }
}
