:root {
  --red: #b71224;
  --red-hover: #920c1a;
  --ink: #171717;
  --muted: #515151;
  --line: #dedbd8;
  --paper: #f6f5f3;
  --white: #fff;
  --wrap: 1180px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--white); color: var(--ink); font: 1rem/1.6 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.09; letter-spacing: -.045em; }
h1 { max-width: 850px; font-size: clamp(2.75rem, 6.4vw, 6rem); font-weight: 825; }
h2 { font-size: clamp(2rem, 4.5vw, 4rem); font-weight: 790; }
h3 { font-size: clamp(1.22rem, 2.25vw, 1.7rem); font-weight: 750; letter-spacing: -.025em; }
p { margin: .75rem 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #cc4354; outline-offset: 4px; }
.wrap { width: min(var(--wrap), calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; left: 1rem; top: 1rem; transform: translateY(-200%); background: white; padding: .75rem; }
.skip:focus { transform: none; }
.contact-bar { background: var(--ink); color: #f1f1f1; font-size: .875rem; }
.contact-bar .wrap { min-height: 39px; display: flex; gap: .5rem 1rem; justify-content: space-between; align-items: center; }
.crm-access { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding-inline: .2rem; color: inherit; font-weight: 700; text-underline-offset: .2em; }
.crm-access:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.whatsapp-float {
  position: fixed;
  z-index: 3;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem .9rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #08634b;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px #0003;
}
.whatsapp-float:hover { background: #064e3b; color: #fff; }
.whatsapp-float:focus-visible { outline: 2px solid #08634b; outline-offset: 2px; }
body { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
header { background: var(--white); }
.header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { flex: none; display: inline-block; }
.brand img { width: 174px; height: auto; }
nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.25rem); }
nav a { font-size: .94rem; font-weight: 700; text-decoration: none; }
nav a:not(.button):hover { color: var(--red); text-decoration: underline; }
.menu-button { border: 1px solid var(--line); padding: .55rem .8rem; border-radius: 3px; background: white; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.button { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; padding: .7rem 1.14rem; border: 1px solid transparent; border-radius: 4px; background: var(--red); color: white; font: inherit; font-weight: 740; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--red-hover); }
.button:disabled { cursor: wait; opacity: .75; }
.button.outline { background: transparent; border-color: #eee; }
.button.outline:hover { background: #ffffff20; }
.button-light { background: white; color: var(--ink); border-color: #a9a6a4; }
.button-light:hover { background: var(--paper); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.hero { position: relative; background: #101010; color: white; }
.hero-figure { position: absolute; inset: 0 0 0 21%; margin: 0; overflow: hidden; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 49%; }
.hero-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #101010 1%, #101010e8 18%, #10101098 38%, #10101024 61%, transparent 76%); }
.hero-content { position: relative; z-index: 1; padding-block: clamp(4.6rem, 8vw, 8.2rem); }
.hero h1 { max-width: min(680px, 57%); font-size: clamp(3rem, 5.5vw, 5.7rem); text-wrap: balance; }
.hero .lead { max-width: min(545px, 52%); }
.image-caption { position: absolute; right: .65rem; bottom: .65rem; z-index: 1; width: max-content; max-width: calc(100% - 1.3rem); padding: .15rem .55rem; border-radius: 3px; background: #141414dd; color: white; font-weight: 620; font-size: .8rem; }
.kicker { font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: .105em; color: var(--red); margin: 0 0 .9rem; }
.hero .kicker, .dark-section .kicker { color: #ffa4ac; }
.hero .kicker::before { content: ""; display: inline-block; width: 28px; height: 3px; margin-right: .7rem; vertical-align: middle; background: #ed3d52; }
.lead { max-width: 590px; margin: 1.45rem 0 1.7rem; color: #f6f3f2; font-size: clamp(1.04rem, 2.1vw, 1.25rem); }
.expertise { border-bottom: 1px solid var(--line); }
.expertise-inner { display: grid; grid-template-columns: .92fr 1fr 1.1fr; }
.expertise-inner > div { padding: 1.25rem 1.35rem; border-inline-start: 1px solid var(--line); }
.expertise-inner > div:first-child { padding-inline-start: 0; border: none; }
.expertise strong, .expertise span { display: block; }
.expertise span { color: var(--muted); font-size: .93rem; }
.section { padding-block: clamp(3.7rem, 8vw, 6.4rem); }
.section-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem 2.5rem; margin-bottom: 2.15rem; }
.section-intro > p { flex: 0 1 345px; color: var(--muted); margin: 0; }
.solution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.solution-grid.water-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.water-entry .solution-image { aspect-ratio: 16 / 9; }
.water-entry .solution-content { padding: 1.25rem 1.3rem 1.35rem; }
.other-solutions { margin-top: 1.1rem; }
.solution { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: white; }
.solution > img, .solution-image { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.housing-cover { background: #e1e5df url('/media/viviendas/fachadas.webp') right bottom / 200% auto no-repeat; }
.solution-image { position: relative; margin: 0; }
.solution-image img { width: 100%; height: 100%; object-fit: cover; }
.solution-content { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 1.2rem 1.05rem 1.35rem; }
.solution-content p { margin: .72rem 0; color: var(--muted); }
.detail { font-size: .92rem; color: var(--muted); }
.solution-content .detail { margin-bottom: 1rem; padding-top: .45rem; border-top: 1px solid var(--line); width: 100%; }
.solution-content .text-link { margin-top: auto; }
.text-link { min-height: 32px; color: var(--red-hover); font-weight: 750; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--red); text-decoration-thickness: 2px; }
.secondary-link { min-height: 29px; font-size: .93rem; font-weight: 680; }
.dark-section { background: #181818; color: white; }
.dark-section .section-intro > p, .experience-grid p { color: #d9d5d4; }
.experience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.7vw, 2.3rem); }
.experience-grid article { border-top: 2px solid #d84b59; padding-block: 1.2rem; }
.experience-actions { margin-top: 1rem; }
.process-layout { display: grid; grid-template-columns: 1.04fr 1fr; gap: clamp(2rem, 5.5vw, 5.3rem); align-items: center; }
.process-figure { position: relative; margin: 0; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 6px; background: var(--paper); }
.process-figure img { width: 100%; height: 100%; object-fit: cover; }
.steps { display: grid; gap: .9rem; list-style: none; margin: 1.6rem 0; padding: 0; }
.steps li { border-inline-start: 3px solid var(--red); padding-inline-start: 1rem; }
.steps h3 { font-size: clamp(1.12rem, 2vw, 1.4rem); }
.steps p { margin: .35rem 0 0; }
.steps p, .training p:not(.kicker), .quote-intro > p:not(.kicker) { color: var(--muted); }
.light-section { background: var(--paper); }
.catalog { border-top: 1px solid var(--line); background: white; }
.catalog:last-child { border-bottom: 1px solid var(--line); }
.catalog > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; font-weight: 780; font-size: 1.07rem; cursor: pointer; list-style: none; }
.catalog > summary::-webkit-details-marker { display: none; }
.catalog > summary::after { content: ""; flex: none; width: .55rem; height: .55rem; margin-right: .2rem; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: translateY(-.13rem) rotate(45deg); }
.catalog[open] > summary::after { transform: translateY(.13rem) rotate(225deg); }
.catalog-body { padding: .25rem 1.25rem 1.15rem; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.options article { border-top: 1px solid var(--line); padding: .9rem .2rem; }
.options article p { margin: .45rem 0; }
.training { display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 1rem clamp(1.3rem, 6vw, 5.5rem); }
.training img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.training .actions { margin-top: 1.15rem; }
.training .catalog { grid-column: 1 / -1; }
.course-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; }
.course-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .6rem; border-bottom: 1px solid var(--line); padding: .55rem .35rem; }
.course-list a { display: inline-flex; align-items: center; }
.quote-section { background: var(--paper); border-top: 1px solid var(--line); }
.quote-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(1.8rem, 6vw, 5rem); align-items: start; }
.quote-intro > p:not(.kicker) { margin: 1rem 0 1.5rem; }
.quote-contact { display: grid; gap: .85rem; border-left: 3px solid var(--red); padding-left: 1rem; }
.quote-contact strong, .quote-contact a { display: block; }
.quote-contact a { color: var(--red-hover); overflow-wrap: anywhere; }
form { background: white; border: 1px solid var(--line); border-radius: 6px; padding: clamp(1rem, 3vw, 2rem); }
fieldset { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
legend { font-size: 1.35rem; font-weight: 780; padding: 0; margin-bottom: 1.15rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 680; min-width: 0; }
label span { font-weight: 450; font-size: .85rem; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: .25rem; min-height: 43px; display: block; padding: .57rem .6rem; background: white; border: 1px solid #a19e9c; border-radius: 4px; color: var(--ink); font: inherit; font-weight: 450; }
textarea { resize: vertical; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.privacy-note { font-size: .9rem; color: var(--muted); margin-block: 1rem; }
#status { border-left: 3px solid var(--red); padding: .65rem .8rem; background: var(--paper); margin: .9rem 0 .5rem; }
#status[data-state="success"] { border-color: #2b6b36; }
footer { background: #151515; color: white; }
.footer-inner { display: grid; grid-template-columns: 1.2fr .7fr 1fr; gap: 1.2rem; padding-block: 2.1rem 1.2rem; }
footer .brand img { background: white; border-radius: 3px; padding: .45rem; }
footer p, .footer-bottom { color: #ddd; }
.footer-inner > div > a:not(.brand) { display: block; margin-bottom: .45rem; overflow-wrap: anywhere; }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-top: 1px solid #454545; padding-block: .95rem; font-size: .9rem; }
.footer-bottom summary { cursor: pointer; }
.footer-bottom details p { max-width: 580px; }
.footer-bottom span { flex: none; }
@media (max-width: 980px) {
  .solution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solution > img, .solution-image { aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .hero { display: flex; flex-direction: column; }
  .hero-content { padding-block: 3.05rem 1.8rem; }
  .hero h1 { max-width: 620px; font-size: clamp(2.6rem, 7vw, 4.25rem); text-wrap: initial; }
  .hero .lead { max-width: 540px; }
  .hero-figure { position: relative; inset: auto; height: clamp(200px, 53vw, 340px); }
  .hero-figure img { object-position: 72% 44%; }
  .hero-figure::after { background: linear-gradient(180deg, #10101066, transparent 35%); }
  .process-layout { grid-template-columns: 1fr; }
  .process-figure { aspect-ratio: 16 / 10; }
  .header { flex-wrap: wrap; min-height: 72px; padding-block: .55rem; }
  .brand img { width: 144px; }
  nav { width: 100%; align-items: flex-start; flex-wrap: wrap; gap: .4rem .95rem; padding-bottom: .45rem; }
  nav a { align-self: center; padding-block: .35rem; }
  .section-intro { display: block; margin-bottom: 1.5rem; }
  .section-intro > p { margin-top: .75rem; }
  .experience-grid, .course-list, .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .contact-bar .wrap { padding-block: .35rem; line-height: 1.3; }
  .expertise-inner, .solution-grid, .experience-grid, .training, .form-grid, .footer-inner { grid-template-columns: 1fr; }
  .expertise-inner > div { padding: .65rem 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .solution-grid.water-entry { grid-template-columns: minmax(0, 1fr); }
  .options, .options.three, .course-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.video-section { background: var(--paper); }
.video-feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 6vw, 5rem); }
.video-cover { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-copy h2 { font-size: clamp(2rem, 4.3vw, 3.7rem); }
.video-copy > p:not(.kicker) { color: var(--muted); font-size: 1.06rem; margin: 1rem 0 1.3rem; }
.video-service { display: inline-block; margin-top: 1rem; }
.video-dialog { border: 0; border-radius: 6px; color: var(--ink); background: white; padding: .9rem; max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); overflow: auto; }
.video-dialog::backdrop { background: #101010c4; }
.video-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.video-dialog-header h3 { font-size: 1.15rem; }
.video-dialog-header form { border: 0; padding: 0; background: none; }
.video-dialog-header .button { min-height: 42px; padding: .45rem .7rem; }
.video-player { width: min(340px, 86vw); margin-inline: auto; height: clamp(220px, 72dvh, 600px); background: #171717; border-radius: 4px; overflow: hidden; }
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-dialog-fallback { margin: .65rem 0 0; text-align: center; }

@media (max-width: 760px) {
  .video-feature { grid-template-columns: minmax(0, 1fr); }
  .video-cover { aspect-ratio: 16 / 10; }
}
