.ma-footer {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #f5f8e8;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
.ma-footer__scene {
  flex: 1;
  display: grid;
  align-items: center;
  padding: clamp(4.5rem, 6vw, 5.5rem) 0 max(8.5rem, 8vw);
  position: relative;
  z-index: 1;
  background-color: #302e29;
  background-image:
    var(--underground-art, url("subsuelo.svg")),
    radial-gradient(ellipse at 15% 5%, #524a3780, transparent 58%),
    linear-gradient(165deg, #3f3d30, #32362e 46%, #302e29);
  background-position: center bottom, center, center;
  background-repeat: repeat-x, no-repeat, no-repeat;
  background-size: 900px 116px, cover, cover;
  box-shadow: 0 -5px 15px -5px #243a2955;
}
.ma-footer__scene::before {
  content: "";
  position: absolute;
  inset: -20px 0 auto;
  height: 80px;
  pointer-events: none;
  background: var(--surface-art, url("superficie.svg")) repeat-x center top / 720px 80px;
  filter: drop-shadow(0 -2px 2px #29482d30);
}
.ma-footer *, .ma-footer *::before, .ma-footer *::after { box-sizing: border-box; }
.ma-footer__layout, .ma-footer__legal-content {
  width: min(1380px, calc(100% - clamp(2rem, 7.4vw, 7rem)));
  margin-inline: auto;
}
.ma-footer__layout {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.68fr) minmax(0,1.06fr);
  align-items: start;
  gap: clamp(2rem, 5.2vw, 6rem);
}
.ma-footer__layout > div { min-width: 0; }
.ma-footer .ma-footer__logo { display: block; width: clamp(155px, 13vw, 193px); height: auto; margin: 0 0 1.3rem; }
.ma-footer__company p, .ma-footer__address { max-width: 42ch; margin: 0; color: #d5e5d8; font-size: 1rem; line-height: 1.6; }
.ma-footer .ma-footer__heading {
  margin: 0 0 1rem;
  color: #f7faee;
  font: 700 clamp(1.15rem, 1.5vw, 1.45rem)/1.2 'DM Sans', Arial, sans-serif;
  letter-spacing: -.035em;
}
.ma-footer__address { font-style: normal; }
.ma-footer .ma-footer__address strong { color: #f7faee; }
.ma-footer a { color: inherit; }
.ma-footer .ma-footer__social-links { display: flex; list-style: none; gap: .6rem; margin: 1.25rem 0 0; padding: 0; }
.ma-footer__social-link, .ma-footer__contact-link {
  display: inline-flex; align-items: center; justify-content: center;
  color: #f7faee; background: linear-gradient(165deg, #ffffff22, #ffffff08 55%);
  border: 1px solid #97b7a280; text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.ma-footer .ma-footer__social-link { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.ma-footer .ma-footer__contact-link { gap: .65rem; min-height: 44px; margin-top: 1.25rem; padding: .56rem 1.05rem; border-radius: 40px; font-weight: 700; }
.ma-footer__legal {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, #05060563, transparent 40%, #080a09a8),
    repeating-linear-gradient(162deg, transparent 0 72px, #9e91741c 73px, #080a0970 74px 77px, transparent 78px 196px),
    linear-gradient(110deg, #242621, #191d1b 42%, #232620 74%, #151917);
  border-top: 1px solid #685d4a;
  box-shadow: inset 0 5px 12px #05060549;
  color: #ebeee5;
  font-size: .86rem;
}
.ma-footer__legal::before, .ma-footer__legal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ma-footer__legal::before {
  background: linear-gradient(172deg, #2b302b, #151816 54%, #101210);
  clip-path: polygon(0 42%, 12% 59%, 23% 45%, 31% 67%, 46% 53%, 54% 71%, 68% 39%, 77% 58%, 88% 48%, 100% 64%, 100% 100%, 0 100%);
}
.ma-footer__legal::after {
  background:
    linear-gradient(142deg, transparent 24%, #59605a81 28%, #bec2ae68 36%, #474e4673 42%, #111412 69%, transparent 73%) 19% 84% / 23px 9px,
    linear-gradient(32deg, transparent 18%, #111413 23%, #46504b 56%, #a8b5ab59 61%, #5a6459a1 67%, transparent 72%) 33% 20% / 17px 9px,
    linear-gradient(150deg, transparent 29%, #555c558a 33%, #b5bdb26b 39%, #555e556b 46%, #121513 70%, transparent 75%) 66% 80% / 24px 10px,
    linear-gradient(151deg, transparent 14%, #161a16 19%, #424a43 45%, #a5aea251 53%, #555e55a3 59%, transparent 65%) 83% 21% / 24px 8px,
    radial-gradient(ellipse 2.6px 1.2px at 14px 8px, #c8c8ab60 0 40%, transparent 90%) 2% 97% / 127px 11px,
    radial-gradient(ellipse 1.5px 1px at 55px 4px, #a9b7ab53 0 40%, transparent 90%) 6% 68% / 173px 12px;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat-x, repeat-x;
}
.ma-footer__legal-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .5rem 1rem;
  padding-block: .8rem;
}
.ma-footer__copyright { font-size: inherit; }
.ma-footer .ma-footer__legal a {
  text-decoration: underline;
  text-decoration-color: #a8bcaa;
  text-underline-offset: .2em;
}
.ma-footer .ma-footer__legal a:hover { color: #fffdf4; }
.ma-footer__credit {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.ma-footer__credit img { display: block; width: 18px; height: 18px; }
.ma-footer__social-link svg, .ma-footer__contact-link svg { flex-shrink: 0; }
.ma-footer .ma-footer__map { position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 470/220; min-height: 154px; border: 1px solid #749687; border-radius: 15px; background: #e3ebdc; }
.ma-footer__map-view, .ma-footer__interactive-map, .ma-footer__map iframe, .ma-footer__map-view img {
  position: absolute;
  inset: 0;
}
.ma-footer__map iframe, .ma-footer__map-view img { display: block; width: 100%; height: 100%; border: 0; }
.ma-footer__map-view img { object-fit: cover; }
.ma-footer__interactive-map { pointer-events: none; }
.ma-footer__interactive-map iframe, .ma-footer__interactive-map summary { pointer-events: auto; }
.ma-footer__map:has(.ma-footer__interactive-map[open]) .ma-footer__map-view { visibility: hidden; }
.ma-footer .ma-footer__map-action {
  position: absolute;
  z-index: 1;
  inset-block-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 36px;
  padding: .33rem .62rem;
  border: 1px solid #a3bb9c;
  border-radius: 9px;
  background: #fafbf1;
  color: #214c38;
  box-shadow: 0 2px 8px #29493429;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}
.ma-footer .ma-footer__map-action:hover { background: #edf4e0; }
.ma-footer__map-route { inset-inline-start: 8px; }
.ma-footer__interactive-map summary { inset-inline-end: 8px; }
.ma-footer__interactive-map summary::-webkit-details-marker { display: none; }
.ma-footer__interactive-map:not([open]) .ma-footer__map-close,
.ma-footer__interactive-map[open] .ma-footer__map-open { display: none; }
.ma-footer .ma-footer__map-credit {
  position: absolute;
  inset: auto 0 0 auto;
  padding: .1rem .35rem;
  border-radius: 6px 0 0;
  background: #fcfdf3ed;
  color: #325442;
  font-size: .64rem;
  text-decoration: underline;
  text-underline-offset: .14em;
}
.ma-footer a:focus-visible, .ma-footer button:focus-visible { outline: 3px solid #d4f491; outline-offset: 3px; }
@media (hover: hover) {
  .ma-footer .ma-footer__social-link:hover, .ma-footer .ma-footer__contact-link:hover { transform: translateY(-3px); background-color: #ffffff1a; }
}
@media (max-width: 910px) {
  .ma-footer__layout { grid-template-columns: 1fr 1fr; gap: 2.3rem; }
  .ma-footer__company { grid-column: 1/-1; }
  .ma-footer__company p { max-width: 65ch; }
}
@media (max-width: 620px) {
  .ma-footer__scene { background-position: 19% bottom, center, center; }
  .ma-footer__legal-content { display: flex; flex-wrap: wrap; justify-content: center; }
  .ma-footer__copyright { width: 100%; text-align: center; }
  .ma-footer__layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .ma-footer .ma-footer__contact, .ma-footer .ma-footer__location { padding-top: 1.4rem; border-top: 1px solid #628576; }
  .ma-footer__company { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .ma-footer__social-link, .ma-footer__contact-link { transition: none; } }

.ma-footer__scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: clamp(215px, 20vw, 270px);
  aspect-ratio: 25 / 12;
  left: clamp(16px, 7vw, 120px);
  bottom: 0;
  background: var(--burrow-art, url("madriguera.svg")) center bottom / contain no-repeat;
}

@media (min-width: 1000px) and (max-height: 810px) {
  .contact-screen .ma-footer__scene {
    padding-block: clamp(40px, 8vh, 68px) clamp(82px, 14vh, 114px);
    background-size: 683px 88px, cover, cover;
  }
  .contact-screen .ma-footer__scene::after { width: clamp(166px, 29vh, 225px); }
  .contact-screen .ma-footer__logo { margin-bottom: .9rem; }
  .contact-screen .ma-footer__social-links { margin-top: 1rem; }
  .contact-screen .ma-footer .ma-footer__map {
    aspect-ratio: auto;
    height: clamp(154px, 27vh, 204px);
  }
  .contact-screen .ma-footer__legal-content { padding-block: .6rem; }
}

@media (min-width: 1000px) and (max-height: 650px) {
  .contact-screen .ma-footer__layout { gap: clamp(1.25rem, 3vw, 3.25rem); }
  .contact-screen .ma-footer__company p, .contact-screen .ma-footer__address { line-height: 1.45; }
  .contact-screen .ma-footer__heading { margin-bottom: .75rem; }
  .contact-screen .ma-footer__contact-link { margin-top: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ma-footer {
    --surface-art: url("superficie.svg#quieto");
    --underground-art: url("subsuelo.svg#quieto");
    --burrow-art: url("madriguera.svg#quieto");
  }
}
