/* ==========================================================
   MARCHENA ÁVILA & ABOGADOS ASOCIADOS
   INICIO
   ========================================================== */


/* ==========================================================
   HERO
   ========================================================== */

.hero {
  position: relative;
  display: flex;
  min-height: calc(100dvh - var(--header-h));
  overflow: hidden;
  align-items: stretch;
  background: var(--navy-2);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 26%;
  filter: saturate(0.88) contrast(1.03);
}

.hero-overlay {
  background:
    linear-gradient(90deg,
      rgba(5, 20, 36, 0.97) 0%,
      rgba(5, 20, 36, 0.94) 25%,
      rgba(5, 20, 36, 0.78) 47%,
      rgba(5, 20, 36, 0.40) 67%,
      rgba(5, 20, 36, 0.12) 100%);
}


/* ==========================================================
   HERO CONTENT
   ========================================================== */

.hero-content {
  position: relative;
  z-index: 2;

  display: flex;

  width: min(680px, 52%);
  min-height: calc(100dvh - var(--header-h));

  margin: 0;

  padding:
    86px 35px 150px clamp(35px, 7vw, 115px);

  flex-direction: column;

  justify-content: center;
  align-items: flex-start;

  text-align: left;
}

.hero-label {
  display: block;

  margin-bottom: 21px;

  color: var(--gold);

  font-family: "Montserrat", sans-serif;

  font-size: 0.67rem;
  font-weight: 600;

  letter-spacing: 0.18em;

  line-height: 1.5;

  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;

  margin: 0;

  color: #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-size:
    clamp(3rem, 4.9vw, 5.15rem);

  font-weight: 600;

  line-height: 1.02;

  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;

  margin-top: 2px;

  color: #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-weight: 600;
}

.hero-line {
  width: 76px;
  height: 2px;

  margin-top: 27px;

  background:
    var(--gold);
}

.hero-content>p {
  max-width: 510px;

  margin-top: 24px;

  color:
    rgba(255, 255, 255, 0.77);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 0.93rem;

  line-height: 1.85;
}

.hero-actions {
  display: flex;

  margin-top: 31px;

  flex-wrap: wrap;

  gap: 12px;
}


/* ==========================================================
   HERO PRINCIPIOS
   ========================================================== */

.hero-principles {
  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  z-index: 4;

  border-top:
    1px solid rgba(216, 181, 107, 0.17);

  background:
    rgba(5, 20, 36, 0.94);

  backdrop-filter:
    blur(9px);

  -webkit-backdrop-filter:
    blur(9px);
}

.principles-grid {
  display: grid;

  width:
    min(1040px, calc(100% - 50px));

  margin:
    0 auto;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

.principle {
  display: flex;

  min-height: 94px;

  padding:
    20px 25px;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  border-right:
    1px solid rgba(255, 255, 255, 0.08);

  text-align: center;
}

.principle:last-child {
  border-right: 0;
}

.principle small {
  margin-bottom: 5px;

  color:
    var(--gold);

  font-size: 0.59rem;

  font-weight: 600;

  letter-spacing: 0.19em;
}

.principle strong {
  color:
    #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-size: 1.02rem;

  font-weight: 600;
}


/* ==========================================================
   FIRMA
   ========================================================== */

.firm-section {
  position: relative;

  padding:
    clamp(90px, 9vw, 135px) 0 clamp(115px, 10vw, 155px);

  overflow: hidden;

  background:
    #ffffff;
}

.firm-decoration {
  position: absolute;

  top: 0;
  right: -60px;

  width: 350px;
  height: 100%;

  overflow: hidden;

  opacity: 0.68;

  pointer-events: none;
}

.firm-decoration span {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 560px;
  height: 72px;

  background:
    rgba(7, 25, 44, 0.025);
}

.firm-decoration span:first-child {
  transform:
    translate(-50%, -50%) rotate(46deg);
}

.firm-decoration span:last-child {
  transform:
    translate(-50%, -50%) rotate(-46deg);
}

.firm-grid {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns:
    minmax(0, 0.93fr) minmax(0, 1.07fr);

  gap:
    clamp(55px, 8vw, 110px);

  align-items: center;
}


/* ==========================================================
   FOTO FIRMA
   ========================================================== */

.firm-image {
  position: relative;

  width: 100%;
}

.firm-image::before {
  content: "";

  position: absolute;

  top: -14px;
  left: -14px;

  z-index: -1;

  width: 82px;
  height: 82px;

  border-top:
    2px solid var(--gold);

  border-left:
    2px solid var(--gold);
}

.firm-image img {
  display: block;

  width: 100%;

  aspect-ratio:
    1.24 / 1;

  object-fit: cover;

  object-position: center;
}


/* ==========================================================
   FIRMA TEXTOS
   ========================================================== */

.firm-content {
  max-width: 610px;
}

.section-label {
  display: block;

  margin-bottom: 14px;

  color:
    var(--gold);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 0.65rem;

  font-weight: 700;

  letter-spacing: 0.18em;

  text-transform: uppercase;
}

.section-label.light {
  color:
    var(--gold-2);
}

.firm-content h2 {
  margin: 0;

  color:
    var(--navy);

  font-family:
    "Playfair Display",
    serif;

  font-size:
    clamp(2.4rem, 3.7vw, 4rem);

  font-weight: 600;

  line-height: 1.08;

  letter-spacing:
    -0.03em;
}

.title-rule {
  width: 58px;
  height: 2px;

  margin:
    27px 0 25px;

  background:
    var(--gold);
}

.firm-lead {
  color:
    var(--navy);

  font-size: 1rem;

  font-weight: 500;

  line-height: 1.85;
}

.firm-content p+p {
  margin-top: 17px;

  line-height: 1.85;
}


/* ==========================================================
   LINKS
   ========================================================== */

.elegant-link {
  position: relative;

  display: inline-flex;

  margin-top: 30px;

  padding-bottom: 7px;

  align-items: center;

  gap: 11px;

  color:
    var(--navy);

  font-size: 0.78rem;

  font-weight: 700;
}

.elegant-link::after {
  content: "";

  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  height: 1px;

  background:
    var(--gold);
}

.elegant-link span {
  transition:
    transform 0.25s ease;
}

.elegant-link:hover span {
  transform:
    translateX(5px);
}


/* ==========================================================
   SEPARADOR
   ========================================================== */

.section-divider {
  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  z-index: 5;

  display: grid;

  height: 70px;

  grid-template-columns:
    1fr 105px 1fr;

  align-items: end;

  pointer-events: none;
}

.divider-left,
.divider-right {
  height: 70px;

  background:
    var(--navy);
}

.divider-left {
  clip-path:
    polygon(0 100%,
      0 70%,
      100% 100%);
}

.divider-right {
  clip-path:
    polygon(0 100%,
      100% 70%,
      100% 100%);
}

.divider-center {
  position: relative;

  height: 70px;
}

.divider-center::before,
.divider-center::after {
  content: "";

  position: absolute;

  bottom: 0;

  width: 55%;
  height: 70px;

  background:
    var(--navy);
}

.divider-center::before {
  left: 0;

  clip-path:
    polygon(0 100%,
      100% 0,
      100% 100%);
}

.divider-center::after {
  right: 0;

  clip-path:
    polygon(0 0,
      100% 100%,
      0 100%);
}

.divider-center span {
  position: absolute;

  bottom: 16px;
  left: 50%;

  z-index: 4;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background:
    var(--gold);

  transform:
    translateX(-50%);
}


/* ==========================================================
   ÁREAS DE PRÁCTICA
   ========================================================== */

.practice {
  position: relative;

  padding:
    clamp(85px, 9vw, 125px) 0 clamp(90px, 9vw, 125px);

  overflow: hidden;

  background:
    var(--navy);
}

.practice-pattern {
  position: absolute;

  inset: 0;

  opacity: 0.32;

  pointer-events: none;

  background:
    linear-gradient(120deg,
      transparent 0 38%,
      rgba(255, 255, 255, .035) 38% 39%,
      transparent 39% 52%,
      rgba(255, 255, 255, .025) 52% 53%,
      transparent 53%);
}

.practice::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, .04),
      rgba(0, 0, 0, .16));

  pointer-events: none;
}

.practice>.container {
  position: relative;

  z-index: 2;
}

.practice-heading {
  max-width: 680px;

  margin:
    0 auto 58px;

  text-align: center;
}

.practice-heading h2 {
  margin: 0;

  color:
    #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-size:
    clamp(2.55rem, 4vw, 4.1rem);

  font-weight: 600;
}

.practice-heading p {
  max-width: 610px;

  margin:
    22px auto 0;

  color:
    rgba(255, 255, 255, .67);

  font-size: .9rem;

  line-height: 1.8;
}


/* ==========================================================
   PRÁCTICA GRID
   ========================================================== */

.practice-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  border-top:
    1px solid rgba(255, 255, 255, .12);

  border-bottom:
    1px solid rgba(255, 255, 255, .12);
}

.practice-item {
  position: relative;

  min-height: 390px;

  padding:
    42px 36px 38px;

  border-right:
    1px solid rgba(255, 255, 255, .1);

  text-align: center;

  transition:
    background .3s ease;
}

.practice-item:last-child {
  border-right: 0;
}

.practice-item:hover {
  background:
    rgba(255, 255, 255, .035);
}

.practice-number {
  color:
    rgba(216, 181, 107, .62);

  font-size: .59rem;

  font-weight: 700;

  letter-spacing: .18em;
}

.practice-icon {
  display: flex;

  width: 58px;
  height: 58px;

  margin:
    24px auto 26px;

  align-items: center;

  justify-content: center;

  border:
    1px solid rgba(216, 181, 107, .72);

  border-radius: 50%;
}

.practice-icon span {
  color:
    var(--gold-2);

  font-family:
    "Playfair Display",
    serif;

  font-size: 1.45rem;
}

.practice-item h3 {
  max-width: 290px;

  margin:
    0 auto;

  color:
    #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-size: 1.35rem;

  font-weight: 600;
}

.practice-item p {
  max-width: 300px;

  margin:
    16px auto 0;

  color:
    rgba(255, 255, 255, .62);

  font-size: .82rem;

  line-height: 1.75;
}

.practice-item>a {
  display: inline-flex;

  margin-top: 22px;

  align-items: center;

  gap: 8px;

  color:
    var(--gold-2);

  font-size: .7rem;

  font-weight: 700;

  text-transform: uppercase;
}

.practice-footer {
  margin-top: 35px;

  text-align: center;
}

.practice-all {
  display: inline-flex;

  padding-bottom: 6px;

  gap: 9px;

  border-bottom:
    1px solid rgba(216, 181, 107, .6);

  color:
    #ffffff;

  font-size: .75rem;

  font-weight: 600;
}


/* ==========================================================
   TRANSICIÓN
   ========================================================== */

.angled-transition {
  position: relative;

  height: 70px;

  overflow: hidden;

  background:
    #ffffff;
}

.angled-transition::before,
.angled-transition::after {
  content: "";

  position: absolute;

  top: 0;

  width: 50%;
  height: 70px;

  background:
    var(--navy);
}

.angled-transition::before {
  left: 0;

  clip-path:
    polygon(0 0,
      100% 0,
      100% 10%,
      0 100%);
}

.angled-transition::after {
  right: 0;

  clip-path:
    polygon(0 0,
      100% 0,
      100% 100%,
      0 10%);
}

.transition-line {
  position: absolute;

  top: 18px;
  left: 50%;

  z-index: 3;

  width: 58px;
  height: 2px;

  background:
    var(--gold);

  transform:
    translateX(-50%);
}


/* ==========================================================
   MÉTODO
   ========================================================== */

.method {
  padding:
    clamp(80px, 9vw, 125px) 0;

  background:
    #ffffff;
}

.method-grid {
  display: grid;

  grid-template-columns:
    minmax(0, .88fr) minmax(0, 1.12fr);

  gap:
    clamp(60px, 9vw, 125px);

  align-items: start;
}

.method-intro {
  max-width: 530px;
}

.method-intro h2 {
  margin: 0;

  color:
    var(--navy);

  font-family:
    "Playfair Display",
    serif;

  font-size:
    clamp(2.45rem, 3.6vw, 3.8rem);

  font-weight: 600;

  line-height: 1.07;
}

.method-intro>p {
  margin-top: 24px;

  font-size: .92rem;

  line-height: 1.85;
}

.method-list {
  border-top:
    1px solid var(--line);
}

.method-item {
  display: grid;

  grid-template-columns:
    46px minmax(0, 1fr);

  gap: 22px;

  padding:
    25px 0;

  border-bottom:
    1px solid var(--line);
}

.method-number {
  color:
    var(--gold);

  font-family:
    "Playfair Display",
    serif;

  font-size: 1.05rem;

  font-weight: 600;
}

.method-item h3 {
  color:
    var(--navy);

  font-family:
    "Playfair Display",
    serif;

  font-size: 1.22rem;

  font-weight: 600;
}

.method-item p {
  margin-top: 7px;

  font-size: .84rem;

  line-height: 1.75;
}


/* ==========================================================
   CTA FINAL
   MÁS BAJO + COMPLETAMENTE CENTRADO
   ========================================================== */

.contact-section {
  position: relative;

  display: flex;

  /*
    Antes era demasiado alto.
    Ahora queda mucho más compacto.
  */
  min-height: 350px;

  overflow: hidden;

  align-items: center;

  padding:
    58px 0;

  background:
    var(--navy-2);
}


/* ==========================================================
   CTA IMAGEN
   ========================================================== */

.contact-background {
  position: absolute;

  inset: 0;

  z-index: 0;
}

.contact-background img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position:
    center 48%;
}


/* ==========================================================
   CTA OVERLAY
   ========================================================== */

.contact-overlay {
  position: absolute;

  inset: 0;

  z-index: 1;

  /*
    Al estar todo centrado ya no necesitamos
    una zona excesivamente oscura solo a la izquierda.
  */

  background:
    linear-gradient(90deg,
      rgba(5, 20, 36, .90) 0%,
      rgba(5, 20, 36, .82) 35%,
      rgba(5, 20, 36, .78) 65%,
      rgba(5, 20, 36, .88) 100%);
}


/* ==========================================================
   CTA DECORACIÓN
   ========================================================== */

.contact-decoration {
  position: absolute;

  top: 50%;
  right: -105px;

  z-index: 2;

  width: 320px;
  height: 320px;

  border:
    1px solid rgba(216, 181, 107, .18);

  transform:
    translateY(-50%) rotate(45deg);

  pointer-events: none;
}

.contact-decoration::before {
  content: "";

  position: absolute;

  inset: 36px;

  border:
    1px solid rgba(216, 181, 107, .09);
}


/* ==========================================================
   CTA CONTENEDOR
   ========================================================== */

.contact-section .container {
  position: relative;

  z-index: 3;

  /*
    Obliga a que el contenido no quede pegado
    a los bordes incluso si base.css tiene
    alguna regla diferente.
  */

  width:
    min(1180px, calc(100% - 48px));

  margin-inline:
    auto;
}


/* ==========================================================
   CTA CONTENT
   ========================================================== */

.contact-box {
  display: flex;

  width: 100%;

  max-width: 900px;

  margin-inline:
    auto;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  gap: 27px;

  text-align: center;
}

.contact-copy {
  width: 100%;

  max-width: 720px;

  margin-inline:
    auto;

  text-align: center;
}

.contact-copy .section-label {
  margin-bottom: 12px;

  text-align: center;
}

.contact-copy h2 {
  max-width: 720px;

  margin:
    0 auto;

  color:
    #ffffff;

  font-family:
    "Playfair Display",
    serif;

  font-size:
    clamp(2.3rem, 3.4vw, 3.5rem);

  font-weight: 600;

  line-height: 1.06;

  letter-spacing:
    -0.025em;

  text-align:
    center;
}


/* ==========================================================
   CTA LINE
   ========================================================== */

.contact-rule {
  width: 55px;
  height: 2px;

  margin:
    18px auto 16px;

  background:
    var(--gold);
}

.contact-copy p {
  max-width: 590px;

  margin:
    0 auto;

  color:
    rgba(255, 255, 255, .75);

  font-size:
    .87rem;

  line-height:
    1.75;

  text-align:
    center;
}


/* ==========================================================
   CTA BOTONES
   ========================================================== */

.contact-actions {
  display: flex;

  width: auto;

  min-width: 0;

  align-items: center;

  justify-content: center;

  flex-direction: row;

  flex-wrap: wrap;

  gap: 12px;
}

.contact-actions .btn {
  min-width: 205px;

  justify-content:
    center;
}

.contact-secondary {
  border:
    1px solid rgba(255, 255, 255, .56);

  background:
    rgba(255, 255, 255, .04);

  color:
    #ffffff;

  backdrop-filter:
    blur(5px);

  -webkit-backdrop-filter:
    blur(5px);

  transition:
    background .3s ease,
    border-color .3s ease,
    transform .3s ease;
}

.contact-secondary:hover {
  border-color:
    var(--gold);

  background:
    rgba(216, 181, 107, .13);

  color:
    #ffffff;

  transform:
    translateY(-2px);
}


/* ==========================================================
   RESPONSIVE 1100
   ========================================================== */

@media (max-width: 1100px) {

  .hero-content {
    width: 58%;

    padding-left:
      clamp(35px, 5vw, 70px);
  }

  .firm-grid {
    gap: 55px;
  }

  .practice-item {
    padding:
      38px 26px 34px;
  }

}


/* ==========================================================
   RESPONSIVE TABLET
   ========================================================== */

@media (max-width: 920px) {

  .hero {
    min-height: 730px;
  }

  .hero-media img {
    object-position:
      64% center;
  }

  .hero-content {
    width: 70%;

    min-height: 730px;

    padding:
      70px 30px 155px 40px;
  }

  .hero h1 {
    font-size:
      clamp(2.8rem, 7vw, 4.25rem);
  }


  .principles-grid {
    width:
      calc(100% - 32px);
  }


  .firm-grid {
    grid-template-columns:
      minmax(0, .95fr) minmax(0, 1.05fr);

    gap:
      42px;
  }


  .practice-grid {
    grid-template-columns:
      repeat(3, 1fr);
  }

  .practice-item {
    padding:
      34px 20px;
  }


  .method-grid {
    grid-template-columns:
      1fr;

    gap:
      50px;
  }


  /* CTA */

  .contact-section {
    min-height:
      340px;

    padding:
      52px 0;
  }

  .contact-box {
    max-width:
      750px;

    gap:
      25px;
  }

  .contact-copy {
    max-width:
      650px;
  }

  .contact-copy h2 {
    font-size:
      clamp(2.2rem, 5vw, 3.15rem);
  }

}


/* ==========================================================
   RESPONSIVE MOBILE
   ========================================================== */

@media (max-width: 720px) {

  .hero {
    min-height:
      720px;
  }

  .hero-media img {
    object-position:
      62% center;
  }

  .hero-content {
    width:
      100%;

    min-height:
      720px;

    padding:
      60px 25px 190px;

    justify-content:
      flex-end;
  }

  .hero h1 {
    font-size:
      clamp(2.55rem, 10vw, 3.55rem);
  }


  .principles-grid {
    width:
      100%;
  }


  .firm-section {
    padding:
      78px 0 120px;
  }

  .firm-grid {
    grid-template-columns:
      1fr;

    gap:
      44px;
  }


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

  .practice-item {
    min-height:
      auto;

    border-right:
      0;

    border-bottom:
      1px solid rgba(255, 255, 255, .1);
  }


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


  /* CTA */

  .contact-section {
    min-height:
      360px;

    padding:
      55px 0;
  }

  .contact-section .container {
    width:
      min(100% - 36px, 1180px);
  }

  .contact-background img {
    object-position:
      center center;
  }

  .contact-overlay {
    background:
      rgba(5, 20, 36, .83);
  }

  .contact-decoration {
    right:
      -190px;

    opacity:
      .55;
  }

  .contact-copy h2 {
    max-width:
      520px;

    font-size:
      clamp(2rem, 8vw, 2.7rem);
  }

  .contact-copy p {
    max-width:
      500px;

    font-size:
      .84rem;
  }

  .contact-actions {
    width:
      100%;
  }

}


/* ==========================================================
   MOBILE PEQUEÑO
   ========================================================== */

@media (max-width: 520px) {

  .hero {
    min-height:
      735px;
  }

  .hero-content {
    min-height:
      735px;

    padding:
      55px 21px 215px;
  }

  .hero h1 {
    font-size:
      clamp(2.3rem, 11vw, 3rem);
  }

  .hero-actions {
    width:
      100%;
  }

  .hero-actions .btn {
    width:
      100%;

    justify-content:
      center;
  }


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

  .principle {
    min-height:
      49px;

    padding:
      9px 20px;

    border-right:
      0;

    border-bottom:
      1px solid rgba(255, 255, 255, .07);

    flex-direction:
      row;

    gap:
      12px;
  }

  .principle small {
    width:
      24px;

    margin-bottom:
      0;
  }

  .principle strong {
    min-width:
      180px;

    text-align:
      left;
  }


  /* CTA móvil */

  .contact-section {
    min-height:
      390px;

    padding:
      48px 0;
  }

  .contact-box {
    gap:
      24px;
  }

  .contact-copy h2 {
    max-width:
      400px;

    font-size:
      clamp(2rem, 10vw, 2.55rem);
  }

  .contact-rule {
    margin:
      16px auto;
  }

  .contact-actions {
    flex-direction:
      column;

    gap:
      10px;
  }

  .contact-actions .btn {
    width:
      min(100%, 320px);

    min-width:
      0;
  }

}


/* ==========================================================
   380 PX
   ========================================================== */

@media (max-width: 380px) {

  .hero h1 {
    font-size:
      2.25rem;
  }

  .firm-content h2,
  .practice-heading h2,
  .method-intro h2 {
    font-size:
      2.1rem;
  }


  .contact-section {
    min-height:
      380px;
  }

  .contact-copy h2 {
    font-size:
      2rem;
  }

  .contact-copy p {
    font-size:
      .8rem;
  }

}