/* ================================================================
   ACACIO ABOGADOS — Stylesheet
   All styles for the single-page site.
   Architecture:
     1.  CSS Variables
     2.  Reset & Base
     3.  Typography utilities
     4.  Buttons
     5.  Navbar
     6.  Hero
     7.  Services
     8.  Team
     9.  Contact
     10. Footer
     11. Reveal animations
     12. Responsive — tablet (≤ 900px)
     13. Responsive — mobile  (≤ 640px)
================================================================ */


/* ----------------------------------------------------------------
   1. CSS Variables
---------------------------------------------------------------- */
:root {
  /* Brand palette built around #663333 */
  --burgundy: #663333;
  --burgundy-mid: #7d3e3e;
  --burgundy-dark: #4a2525;
  --burgundy-deep: #2c1616;

  /* Gold accent — champagne, never bright */
  --gold: #c8a96e;
  --gold-light: #e2d0a8;

  /* Backgrounds */
  --bg: #f6f1ec;
  /* warm off-white */
  --bg-alt: #ede7df;
  /* warm beige — team section */
  --white: #ffffff;

  /* Text */
  --text: #1a1210;
  --text-muted: #6e5f55;
  --text-light: #9a8b81;

  /* Borders */
  --border: #ddd3c8;
  --border-light: #ede7df;

  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --sp-1: 0.5rem;
  /*  8px */
  --sp-2: 1rem;
  /* 16px */
  --sp-3: 1.5rem;
  /* 24px */
  --sp-4: 2rem;
  /* 32px */
  --sp-6: 3rem;
  /* 48px */
  --sp-8: 4rem;
  /* 64px */
  --sp-12: 6rem;
  /* 96px */
  --sp-16: 8rem;
  /* 128px */

  /* Layout */
  --max-w: 1200px;
  --nav-h: 72px;
  --radius: 2px;

  /* Easing */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}


/* ----------------------------------------------------------------
   2. Reset & Base
---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

hr {
  border: none;
}


/* ----------------------------------------------------------------
   3. Typography utilities
---------------------------------------------------------------- */
.label {
  display: block;
  font-family: var(--sans);
  font-size: 1rem;
  /* 11px */
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: var(--sp-3);
}


/* ----------------------------------------------------------------
   4. Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--sans);
  font-size: 0.8125rem;
  /* 13px */
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: 1px solid transparent;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--primary {
  background-color: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}

.btn--primary:hover {
  background-color: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled svg {
  transform: none;
}


/* ----------------------------------------------------------------
   5. Navbar
---------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  /* Transition to solid background on scroll (JS adds .scrolled) */
  transition:
    background-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.navbar.scrolled {
  background-color: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}

.navbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo wordmark (SVG image) */
.navbar__logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.navbar__logo img {
  height: 48px;
  width: auto;
  display: block;
  transition: filter 0.4s var(--ease);
}

/* Hide navbar logo while the hero video is visible — the large hero logo
   takes its place. It reappears once the navbar gains .scrolled. */
.navbar:not(.scrolled) .navbar__logo {
  opacity: 0;
  pointer-events: none;
}

.navbar__logo {
  transition: opacity 0.4s var(--ease);
}

/* Desktop nav links */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-link {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease);
}

/* Underline reveal on hover / active */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--burgundy);
  transition: width 0.25s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--text);
  transform-origin: center;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}

.hamburger.open .hamburger__line:first-child {
  transform: translateY(4px) rotate(45deg);
}

.hamburger.open .hamburger__line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}


/* ----------------------------------------------------------------
   6. Hero
---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

/* Full-bleed background video */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Left-side dark gradient — keeps the rest of the video bright */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.45) 35%,
      rgba(0, 0, 0, 0.00) 80%);
  pointer-events: none;
}

/* Inner container — content anchored to the lower-left of the hero */
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--sp-12)) var(--sp-6) var(--sp-12);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero__content {
  max-width: 840px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: var(--white);
}

/* Hero logo — large brand wordmark over the video */
.hero__logo {
  width: clamp(260px, 38vw, 520px);
  height: auto;
  margin: 0 0 var(--sp-6);
  filter: brightness(0) invert(1) drop-shadow(0 2px 32px rgba(0, 0, 0, 0.5));
}

/* Accessory headline — smaller serif line under the logo */
.hero__heading {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 var(--sp-4);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  max-width: 54ch;
}

/* Subheadline */
.hero__sub {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 var(--sp-8);
  max-width: 48ch;
}

/* Text-link CTA with arrow */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.hero__cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.hero__cta:hover {
  background-color: var(--white);
  color: var(--burgundy);
  border-color: var(--white);
}

.hero__cta:hover svg {
  transform: translateX(4px);
}

/* Navbar variants when over the dark hero */
.navbar:not(.scrolled) .navbar__logo {
  color: var(--white);
}

.navbar:not(.scrolled) .navbar__logo em {
  color: var(--gold-light);
}

.navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.78);
}

.navbar:not(.scrolled) .nav-link:hover,
.navbar:not(.scrolled) .nav-link.active {
  color: var(--white);
}

.navbar:not(.scrolled) .nav-link::after {
  background-color: var(--gold-light);
}

.navbar:not(.scrolled) .hamburger__line {
  background-color: var(--white);
}


/* ----------------------------------------------------------------
   6b. Intro Text (Macfarlanes Style)
---------------------------------------------------------------- */
.intro-text {
  background-color: var(--gold-light);
  padding: var(--sp-8) var(--sp-6);
  border-bottom: 1px solid var(--border-light);
}

.intro-text__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.intro-text p {
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
  max-width: 50ch;
  letter-spacing: -0.01em;
}


/* ----------------------------------------------------------------
   7. Services
---------------------------------------------------------------- */
.services {
  background-color: var(--bg-alt);
  padding: var(--sp-8) var(--sp-6);
  border-top: 1px solid var(--border-light);
}

.services__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.services__head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.services__head .label {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  margin-top: -0.5rem;
}

.services__title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.services__title em {
  font-style: italic;
  color: var(--burgundy);
}

.services__view-all {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}

.services__view-all:hover {
  opacity: 0.6;
}

.services__modern-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.service-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1;
}

/* Service-card backgrounds: image-set() prefers WebP and falls back to PNG.
   Browsers without image-set() use the plain url() declared first. */
.service-card__bg--tax        { background-image: url('serv_tax.png'); }
.service-card__bg--insolvency { background-image: url('serv_insolvency.png'); }
.service-card__bg--societary  { background-image: url('serv_societary.png'); }
.service-card__bg--corporate  { background-image: url('serv_corporate.png'); }

@supports (background-image: image-set(url('a') type('image/webp'))) {
  .service-card__bg--tax {
    background-image: image-set(
      url('serv_tax.webp')        type('image/webp') 1x,
      url('serv_tax.png')         type('image/png')  1x
    );
  }
  .service-card__bg--insolvency {
    background-image: image-set(
      url('serv_insolvency.webp') type('image/webp') 1x,
      url('serv_insolvency.png')  type('image/png')  1x
    );
  }
  .service-card__bg--societary {
    background-image: image-set(
      url('serv_societary.webp')  type('image/webp') 1x,
      url('serv_societary.png')   type('image/png')  1x
    );
  }
  .service-card__bg--corporate {
    background-image: image-set(
      url('serv_corporate.webp')  type('image/webp') 1x,
      url('serv_corporate.png')   type('image/png')  1x
    );
  }
}

/* On narrow screens load the 800w variant — the cards never render larger than that. */
@media (max-width: 900px) {
  @supports (background-image: image-set(url('a') type('image/webp'))) {
    .service-card__bg--tax        { background-image: image-set(url('serv_tax-800w.webp')        type('image/webp') 1x, url('serv_tax.png')        type('image/png') 1x); }
    .service-card__bg--insolvency { background-image: image-set(url('serv_insolvency-800w.webp') type('image/webp') 1x, url('serv_insolvency.png') type('image/png') 1x); }
    .service-card__bg--societary  { background-image: image-set(url('serv_societary-800w.webp')  type('image/webp') 1x, url('serv_societary.png')  type('image/png') 1x); }
    .service-card__bg--corporate  { background-image: image-set(url('serv_corporate-800w.webp')  type('image/webp') 1x, url('serv_corporate.png')   type('image/png') 1x); }
  }
}

.service-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.7) 55%,
      rgba(0, 0, 0, 0.3) 100%);
  z-index: 2;
  transition: background 0.6s ease;
}

.service-card__content {
  position: relative;
  z-index: 3;
  max-width: 600px;
}

.service-card__title {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--sp-3);
  color: var(--white);
  transition: color 0.4s ease;
  letter-spacing: -0.005em;
  line-height: 1.15;
}

.service-card__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.9;
  margin-bottom: var(--sp-4);
  color: rgb(255, 255, 255);
  max-width: 58ch;
}

/* Extra paragraphs hidden by default, revealed by toggle */
.service-card__desc-extra {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.55s var(--ease), opacity 0.35s var(--ease);
}

.service-card.is-expanded .service-card__desc-extra {
  max-height: 1200px;
  opacity: 1;
}

.service-card__desc-extra p {
  margin-top: var(--sp-2);
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  /* Button reset (same rule serves both <a> and <button>) */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  align-self: flex-start;
}

.service-card__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.service-card__link-icon {
  display: inline-block;
  transition: transform 0.4s ease;
}

/* Hover effects */
.service-card:hover .service-card__bg {
  transform: scale(1.08);
}

.service-card:hover .service-card__overlay {
  background: linear-gradient(to top,
      rgba(102, 51, 51, 0.9) 0%,
      rgba(102, 51, 51, 0.65) 55%,
      rgba(102, 51, 51, 0.25) 100%);
}

.service-card:hover .service-card__title {
  color: var(--gold-light);
}

.service-card:hover .service-card__link-icon {
  transform: translateX(8px);
}

.service-card.is-expanded .service-card__link-icon {
  transform: rotate(90deg);
}

.service-card.is-expanded:hover .service-card__link-icon {
  transform: rotate(90deg) translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .service-card {
    min-height: 380px;
    padding: var(--sp-8);
  }
}

@media (max-width: 768px) {
  .services__modern-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }

  .service-card {
    min-height: 350px;
  }

  .services__head {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .services__view-all {
    justify-self: start;
  }
}


/* ----------------------------------------------------------------
   7b. About (Sobre nosotros)
---------------------------------------------------------------- */
.about {
  background-color: var(--bg);
  padding: var(--sp-12) var(--sp-6);
  border-top: 1px solid var(--border);
}

.about__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.about__head {
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--sp-4);
}

.about__head .label {
  margin-bottom: var(--sp-3);
}

.about__title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.about__title em {
  font-style: italic;
  color: var(--burgundy);
}

.about__main-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.about__hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.about__image-wrapper {
  overflow: hidden;
}

.about__image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about__hero:hover .about__image {
  transform: scale(1.04);
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding-top: 1rem;
}

.about__text {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.about__text--sub {
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 300;
}

.about__text strong,
.about__text--sub strong {
  font-weight: 700;
  color: var(--text);
}

/* Locations section — standalone (between Team and Contact) */
.locations {
  background-color: var(--bg);
  padding: var(--sp-16) var(--sp-6);
}

.locations__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Office Locations — editorial two-column block */
.about__locations-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
}

.about__locations-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}

.about__locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.location {
  position: relative;
  padding: var(--sp-4) var(--sp-6) var(--sp-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.location+.location {
  padding-left: var(--sp-8);
  padding-right: 0;
}

.location+.location::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--sp-2);
  bottom: var(--sp-2);
  width: 1px;
  background: linear-gradient(to bottom,
      transparent,
      var(--border) 15%,
      var(--border) 85%,
      transparent);
}

.location__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-1);
}

.location__eyebrow-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1;
}

.location__eyebrow-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  position: relative;
  padding-left: var(--sp-2);
}

.location__eyebrow-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1px;
  background-color: var(--gold);
  transform: translate(-100%, -50%);
}

.location__city {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 3.2vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--text);
  margin: 0;
}

.location__address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 400;
  margin-top: var(--sp-2);
}

.location__contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-3) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-light);
}

.location__contact-item dt {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--sp-1);
}

.location__contact-item dd {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.01em;
}

.location__contact-item dd a {
  color: inherit;
  transition: color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.location__contact-item dd a:hover {
  color: var(--burgundy);
  border-bottom-color: var(--gold);
}

.location__map {
  position: relative;
  margin: var(--sp-4) 0 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--burgundy-deep);
  border: 1px solid var(--border);
}

.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(0.85) contrast(0.95) brightness(0.98) sepia(0.08);
  transition: filter 0.9s var(--ease);
}

.location__map:hover iframe {
  filter: grayscale(0) contrast(1) brightness(1) sepia(0);
}

.location__map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg,
      rgba(102, 51, 51, 0.1) 0%,
      rgba(102, 51, 51, 0) 35%);
  transition: opacity 0.6s var(--ease);
}

.location__map:hover::after {
  opacity: 0;
}

.location__map-link {
  position: absolute;
  left: var(--sp-2);
  bottom: var(--sp-2);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background-color: var(--white);
  color: var(--burgundy);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 2;
}

.location__map-link svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s var(--ease);
}

.location__map-link:hover {
  color: var(--burgundy-dark);
  border-color: var(--burgundy);
}

.location__map-link:hover svg {
  transform: translate(2px, -2px);
}

/* Minimal Stats Bar */
.about__stats-minimal {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-12) 0;
  margin-top: var(--sp-8);
  border-top: 1px solid var(--border-light);
  gap: var(--sp-8);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat-item__num {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--burgundy);
  line-height: 1;
}

.stat-item__label {
  font-family: var(--sans);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .about__hero {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .about__image {
    aspect-ratio: 16/9;
  }

  .about__locations-grid {
    gap: var(--sp-6);
  }
}

@media (max-width: 640px) {
  .about__locations-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .location {
    padding: var(--sp-6) 0;
  }

  .location+.location {
    padding-left: 0;
    padding-right: 0;
    border-top: 1px solid var(--border-light);
  }

  .location+.location::before {
    display: none;
  }

  .location__contact {
    grid-template-columns: 1fr 1fr;
  }

  .about__stats-minimal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8) var(--sp-4);
  }

  .stat-item__num {
    font-size: 2.5rem;
  }
}


/* ----------------------------------------------------------------
   7b. Method (Nuestra forma de trabajar) — compact horizontal band
---------------------------------------------------------------- */
.method {
  background-color: var(--bg);
  padding: 0 var(--sp-6) var(--sp-12);
}

.method__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.method__head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-6);
}

.method__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}

/* Five principles side-by-side on desktop */
.method__principles {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
}

.principle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-2);
  padding: 0;
  border: none;
}

.principle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(102, 51, 51, 0.08);
  color: var(--burgundy);
  flex-shrink: 0;
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease), color 0.35s var(--ease);
}

.principle:hover .principle__icon {
  background-color: var(--burgundy);
  color: var(--bg);
  transform: scale(1.06);
}

.principle__icon svg {
  width: 18px;
  height: 18px;
}

.principle__text {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: 0;
}

.method__outro {
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 72ch;
  margin: 0;
}

.method__outro strong {
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 900px) {
  .method__principles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .method__principles {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
}


/* ----------------------------------------------------------------
   8. Team
---------------------------------------------------------------- */
.team {
  background-color: var(--bg-alt);
  padding: var(--sp-16) var(--sp-6);
}

.team__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Header: title left, intro text right */
.team__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-12);
  flex-wrap: wrap;
}

.team__head-left {
  display: flex;
  flex-direction: column;
}

.team__head-left .label {
  margin-bottom: var(--sp-2);
}

.team__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1;
}

.team__intro {
  max-width: 380px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-muted);
  text-align: right;
}

/* Two mirrored full-width profile rows stacked vertically */
.team__profiles {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

.profile {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: var(--sp-8);
  align-items: center;
}

/* Mirrored row — photo on the right, body on the left */
.profile--reverse {
  grid-template-columns: 7fr minmax(280px, 5fr);
}

.profile--reverse .profile__portrait {
  order: 2;
}

/* Portrait figure — identical treatment for both profiles */
.profile__portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--burgundy-deep);
  margin: 0;
}

.profile__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(0.35) contrast(1.02) brightness(0.97);
  transition: filter 0.9s var(--ease), transform 1.2s var(--ease);
  will-change: transform;
}

.profile__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(44, 22, 22, 0.0) 40%,
      rgba(44, 22, 22, 0.35) 100%);
  opacity: 1;
  transition: opacity 0.7s var(--ease);
  pointer-events: none;
}

.profile:hover .profile__portrait img {
  filter: grayscale(0) contrast(1.02) brightness(1);
  transform: scale(1.03);
}

.profile:hover .profile__portrait::after {
  opacity: 0.55;
}

.profile__body {
  display: flex;
  flex-direction: column;
}

.profile__role {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.profile__role::before {
  content: "";
  width: 36px;
  height: 1px;
  background-color: var(--burgundy);
}

.profile__name {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 var(--sp-3);
  transition: color 0.3s var(--ease);
}

.profile:hover .profile__name {
  color: var(--burgundy);
}

.profile__bio {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0;
}

.profile__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-6) 0 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.profile__meta-item dt {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--sp-1);
}

.profile__meta-item dd {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}


/* ----------------------------------------------------------------
   9. Contact
---------------------------------------------------------------- */
.contact {
  background-color: var(--bg);
  padding: var(--sp-16) var(--sp-6);
}

.contact__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--sp-16);
  align-items: start;
}

/* Left column */
.contact__title {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 0.95;
  margin-bottom: var(--sp-8);
}

.contact__details {
  border-top: 1px solid var(--border);
}

.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-light);
}

.contact__dl {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.contact__dv {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.contact__link {
  transition: color 0.2s var(--ease);
}

.contact__link:hover {
  color: var(--burgundy);
}

/* Right column: form */
.contact__form {
  padding-top: var(--sp-8);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--sp-4);
}

.form-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text);
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus {
  border-color: var(--burgundy);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
}

/* Bottom of form: note + submit */
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.65;
  max-width: 260px;
}

/* Success state (shown by JS) */
.form-success {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background-color: #f0f7f2;
  border-left: 3px solid #4a9e6b;
  font-size: 0.9rem;
  color: #2d6a4a;
  line-height: 1.5;
}


/* ----------------------------------------------------------------
   10. Footer
---------------------------------------------------------------- */
.footer {
  background-color: var(--burgundy-deep);
  padding: var(--sp-12) var(--sp-6);
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-6);
}

/* Left: logo + tagline — inherits left alignment from grid */

.footer__logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.6rem;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

.footer__logo:hover {
  opacity: 1;
}

.footer__logo img {
  height: 38px;
  width: auto;
  display: block;
  /* The SVG is dark-on-light by default; invert for the burgundy-deep footer */
  filter: brightness(0) invert(1);
}

.footer__tagline {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* Center: nav links */
.footer__nav {
  display: flex;
  gap: var(--sp-6);
}

.footer__link {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s var(--ease);
}

.footer__link:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Right: copyright */
.footer__copy {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
  text-align: right;
  line-height: 1.6;
}


/* ----------------------------------------------------------------
   11. Reveal animations (powered by IntersectionObserver in main.js)
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ----------------------------------------------------------------
   12. Responsive — Tablet (≤ 900px)
---------------------------------------------------------------- */
@media (max-width: 900px) {

  /* About: single column, values full width */
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .about__values {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Services header stacks vertically */
  .services__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  /* Team header stacks */
  .team__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  .team__intro {
    text-align: left;
    max-width: 100%;
  }

  /* Profile rows collapse to single column; photo on top in both rows */
  .team__profiles {
    gap: var(--sp-12);
  }

  .profile,
  .profile--reverse {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .profile--reverse .profile__portrait {
    order: 0;
  }

  .profile__portrait {
    aspect-ratio: 4 / 3;
  }

  .profile__meta {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  /* Contact splits to single column */
  .contact__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  /* Footer goes single column */
  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
  }

  .footer__copy {
    text-align: center;
  }
}


/* ----------------------------------------------------------------
   13. Responsive — Mobile (≤ 640px)
---------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
    --sp-16: 5rem;
    --sp-12: 4rem;
    --sp-8: 3rem;
  }

  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  .navbar__nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background-color: var(--bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--border);
    /* Hidden via clip-path (no layout shift) */
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.35s var(--ease);
    pointer-events: none;
  }

  .navbar__nav.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: all;
  }

  .nav-link {
    display: block;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    color: var(--text);
  }

  .nav-link::after {
    display: none;
  }

  /* Hero inner padding tightens on mobile */
  .hero__inner {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }

  .hero__sub {
    max-width: 100%;
  }

  /* Services: collapse to 2-col (num + body), icon below num */
  .service {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 0 var(--sp-3);
  }

  .service__num {
    grid-column: 1;
    grid-row: 1;
  }

  .service__icon {
    grid-column: 1;
    grid-row: 2;
    width: 36px;
    height: 36px;
    margin-top: var(--sp-2);
  }

  .service__body {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  /* Team: tighten spacing between profile rows on mobile */
  .team__profiles {
    gap: var(--sp-8);
  }

  /* Contact form row stacks */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Footer */
  .footer {
    padding: var(--sp-8) var(--sp-4);
  }

  .footer__inner {
    gap: var(--sp-3);
  }

  .footer__nav {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }
}