:root {
  font-family: "Arial", sans-serif;
  color: #161a1e;
  --paper: #e9ebec;
  --hero-paper: #eeebe5;
  background: var(--paper);
  --blue: #173c65;
  --line: #cbced0;
}
* { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
button, a { color: inherit; }
button { font: inherit; }
a:hover, button:hover span { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1280px, 92vw); margin-inline: auto; }
.header { display: flex; justify-content: flex-end; align-items: center; min-height: 88px; gap: 20px; border-bottom: 1px solid var(--line); }
.header > a { margin-inline-end: auto; }
nav { display: flex; gap: clamp(12px, 3vw, 40px); }
nav a { text-decoration: none; }
.language-switch { display: flex; align-items: center; gap: 0; flex: none; font-size: .875rem; line-height: 1; }
.language-switch a { display: grid; place-items: center; min-width: 30px; min-height: 32px; color: #525b65; }
.language-switch a + a { position: relative; }
.language-switch a + a::before { content: ""; position: absolute; left: 0; height: 13px; width: 1px; background: #929aa1; }
.language-switch a[aria-current="page"], .language-switch a:hover { color: var(--blue); }
.language-switch a[aria-current="page"] { font-weight: 700; }
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: .7fr 1.3fr; align-items: center; gap: 40px; padding-block: 38px 64px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-paper);
  box-shadow: 0 0 0 100vmax var(--hero-paper);
  clip-path: inset(0 -100vmax);
}
.hero-heading { container-type: inline-size; }
h1 { display: grid; width: max-content; justify-items: start; gap: .35em; font-size: clamp(1.35rem, 9.25cqi, 4.35rem); letter-spacing: -.045em; line-height: 1; margin: 0; text-transform: uppercase; }
.hero-rule { justify-self: stretch; height: 1px; background: var(--blue); }
h2 { margin: 0 0 25px; font-size: clamp(1.75rem, 3vw, 2.75rem); letter-spacing: -.045em; }
figure { margin: 0; }
.hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
main section:not(.hero), footer { border-top: 1px solid var(--line); padding-block: 38px 60px; }
.works, .clients { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.works button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  border: 0;
  background: none;
  padding: 0 0 15px;
  text-align: left;
  cursor: pointer;
}
.works img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eeeee9; }
.works [data-project="casa"] img { object-position: center 36%; }
.works [data-project="campanario"] img { object-position: center 15%; }
.works span { display: block; margin-top: 12px; font-size: 1.08rem; line-height: 1.3; }
.work-image { position: relative; overflow: hidden; }
.works .work-overlay { display: none; }
.header > a { animation: entrance-fade 1s ease-out both; }
.header > nav { animation: entrance-fade 1s .35s ease-out both; }
.hero-heading { animation: entrance-rise 1.2s .55s ease-out both; }
.hero > figure { animation: entrance-rise 1.35s .8s ease-out both; }
@keyframes entrance-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes entrance-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 601px) and (hover: hover) and (pointer: fine) {
  .work-image img { transition: transform .4s ease; }
  .works .work-overlay {
    display: flex;
    align-items: flex-end;
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 20px;
    color: white;
    background: linear-gradient(transparent 15%, #173c65e6);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
  }
  .work-title { transition: opacity .3s ease; }
  .works button:is(:hover, :focus-visible) .work-overlay { opacity: 1; color: white; }
  .works button:is(:hover, :focus-visible) .work-title { opacity: 0; }
  .works button:is(:hover, :focus-visible) .work-image img { transform: scale(1.025); }
}
.expertise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  grid-template-areas: ". heading" "experience services";
  align-items: center;
  column-gap: clamp(30px, 6vw, 100px);
}
.expertise h2 { grid-area: heading; }
.experience { grid-area: experience; justify-self: center; margin: 0; display: grid; gap: 12px; line-height: 1.4; text-align: center; }
.experience-number { font-size: clamp(5.5rem, 10vw, 9.5rem); line-height: .85; letter-spacing: -.085em; color: var(--blue); }
.services { grid-area: services; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 0; margin: 0; list-style: none; }
.services li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 58px; padding-block: 10px; border-top: 1px solid var(--line); }
.service-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); }
.services svg { width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.clients { list-style: none; padding: 0; margin: 0; gap: 12px; }
.clients li { display: grid; place-items: center; aspect-ratio: 16/9; background: white; }
.clients img { width: 92%; height: auto; }
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(370px, 1fr); grid-template-areas: "controls ." "map details" "map channels"; column-gap: clamp(24px, 4vw, 48px); row-gap: 24px; align-items: start; line-height: 1.55; }
.contact-map { display: grid; grid-area: map; grid-template-rows: minmax(0, 1fr); align-self: stretch; }
.contact > .map-controls { grid-area: controls; }
.contact-map .map-panel, .contact-map iframe { min-height: 0; }
.contact-details { display: grid; gap: 20px; grid-area: details; text-align: left; }
.contact-details h3 { margin: 0; }
.contact-details a, .contact-channels a, .service-area a { color: var(--blue); }
.contact-channels { grid-area: channels; align-self: end; min-width: 0; line-height: 1.55; }
.contact-phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 0;
}
.contact-phones div { padding-top: 10px; border-top: 1px solid var(--line); }
.contact-phones dt { color: #525b65; font-size: .9rem; }
.contact-phones dd { display: flex; align-items: center; gap: 4px; min-height: 36px; margin: 0; }
.contact-phones a[href^="tel:"] { white-space: nowrap; }
.office-phone { display: inline-flex; align-items: center; gap: 4px; }
.contact-phone-icon { display: grid; place-items: center; width: 36px; height: 36px; }
.contact-phone-icon img { object-fit: contain; }
.map-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.map-controls button { padding: 8px 14px; background: transparent; border: 1px solid var(--line); cursor: pointer; }
.map-controls button[aria-pressed="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.map-panel { display: grid; min-height: clamp(260px, 34vw, 400px); border: 1px solid var(--line); background: #e0e2e3; }
.map-panel iframe { width: 100%; height: 100%; min-height: 260px; border: 0; }
#contacto { padding-bottom: 0; }
.service-area { margin: 28px 0 0; padding-block: 38px; border-top: 1px solid var(--line); text-align: center; color: #525b65; font-size: .95rem; line-height: 1.6; }
.service-area-email { white-space: nowrap; }
.reviews-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.reviews-heading h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.reviews-heading a { color: var(--blue); font-size: .9rem; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.review { padding-inline: 24px; }
.review:first-child { padding-left: 0; }
.review:last-child { padding-right: 0; }
.review + .review { border-left: 1px solid var(--line); }
.review-stars { margin: 0 0 12px; color: var(--blue); font-size: .875rem; letter-spacing: .15em; }
.review blockquote { margin: 0; line-height: 1.6; }
.review blockquote p { margin: 0; }
.review figcaption { margin-top: 16px; font-size: .9rem; color: #525b65; }
.reviews-note { margin: -12px 0 22px; color: #525b65; font-size: .875rem; }
address { font-style: normal; }
footer { color: #525b65; font-size: .9rem; }
.site-footer { text-align: center; }
.site-footer p { margin: 0 0 14px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.legal-page { max-width: 730px; padding-block: 50px; line-height: 1.65; }
.legal-page h1 { display: block; width: auto; margin: 24px 0; font-size: clamp(2rem, 5vw, 3.2rem); text-transform: none; }
.legal-page a { color: var(--blue); }
.legal-navigation { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
dialog { width: min(900px, 94vw); max-height: 90vh; background: var(--paper); color: inherit; border: 1px solid var(--line); padding: clamp(16px, 3vw, 32px); }
dialog::backdrop { background: #151b21b3; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2.1rem); }
.dialog-head button { background: white; border: 1px solid var(--line); padding: 8px 12px; cursor: pointer; }
#galeria-fotos { display: grid; gap: 22px; }
#galeria-fotos img { width: 100%; max-height: 75vh; object-fit: contain; background: #e0e2e3; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1.2fr; gap: 24px; }
  .works { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; grid-template-areas: "details" "controls" "map" "channels"; }
  .contact-map { min-height: 300px; }
  .contact-details { text-align: center; }
  .map-controls { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .header > a, .header > nav, .hero-heading, .hero > figure { animation: none; }
  .work-image img, .works .work-overlay, .work-title { transition: none; }
  .works button:is(:hover, :focus-visible) .work-image img { transform: none; }
}
@media (max-width: 600px) {
  .header { min-height: 72px; gap: 11px; }
  .header img { width: 89px; }
  nav a { font-size: .875rem; }
  .hero, .contact, .expertise { grid-template-columns: 1fr; }
  .hero h1 { margin-inline: auto; justify-items: center; text-align: center; }
  main h2, .service-area, .contact-phones { text-align: center; }
  .works { --work-gap: 16px; gap: var(--work-gap); }
  .works button { text-align: center; }
  .works span { font-size: .95rem; overflow-wrap: anywhere; }
  .expertise { grid-template-areas: "experience" "heading" "services"; row-gap: 20px; }
  .expertise h2 { margin-bottom: 0; }
  .services { column-gap: 12px; }
  .services li { gap: 8px; font-size: .9375rem; }
  .hero { padding-block: 27px 42px; }
  .contact-phones > div { min-width: 0; text-align: center; }
  .contact-phones dd { justify-content: center; width: fit-content; max-width: 100%; margin-inline: auto; }
  .map-controls { justify-content: center; }
  .reviews-heading { flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; gap: 8px; }
  .reviews-heading h2 { margin-bottom: 0; }
  .reviews-grid { grid-template-columns: 1fr; }
  .review, .review:first-child, .review:last-child { padding: 20px 0; }
  .review:first-child { padding-top: 0; }
  .review:last-child { padding-bottom: 0; }
  .review + .review { border-left: 0; border-top: 1px solid var(--line); }
  .reviews-note { text-align: center; }
  .service-area-email { display: block; }
  .service-area-divider { display: none; }
  .clients { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  main section:not(.hero), footer { padding-block: 28px 40px; }
}

@media (365px < width <= 600px) {
  .works > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - var(--work-gap)) / 2);
  }
}

@media (max-width: 420px) {
  .header { display: grid; grid-template-columns: 1fr auto; padding-block: 10px; }
  .header nav:not(.language-switch) { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; }
  .header .language-switch { grid-column: 2; grid-row: 1; }
}

@media (max-width: 365px) {
  .works { grid-template-columns: 1fr; }
  .contact-phones { column-gap: 12px; }
  .contact-phones dd, .office-phone { flex-wrap: wrap; }
}
