/* ==========================================================
   JAVIER COBOS · PINTURA Y REFORMAS
   Diseño editorial y artesanal, responsive y sin JavaScript.

   La intención visual es evitar el aspecto de plantilla:
   - composiciones asimétricas;
   - sombras planas y marcos tipo papel;
   - pequeños trazos irregulares;
   - protagonismo de las fotografías reales.
   ========================================================== */

:root {
  --navy-950: #062f43;
  --navy-900: #083c53;
  --navy-800: #0a4c64;
  --teal-700: #087a82;
  --teal-600: #0b9297;
  --teal-100: #e3f1ef;
  --orange-700: #dc7838;
  --orange-600: #ed8d4a;
  --orange-500: #f2a36d;
  --orange-100: #fbe7d8;
  --ink: #153542;
  --muted: #61747a;
  --paper: #f7f3eb;
  --paper-deep: #eee6da;
  --surface: #fffdf8;
  --white: #ffffff;
  --line: #cfd9d6;
  --success: #197b60;
  --shadow-paper: 7px 8px 0 rgba(6, 47, 67, 0.12);
  --shadow-paper-dark: 8px 9px 0 rgba(2, 28, 40, 0.36);
  --container: 1180px;
  --header-height: 92px;
  --transition: 180ms ease;
}

/* ==========================================================
   1. BASE
   ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 22px);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(6, 47, 67, 0.025) 0 1px, transparent 1.4px),
    radial-gradient(circle at 76% 68%, rgba(237, 141, 74, 0.028) 0 1px, transparent 1.4px);
  background-size: 18px 18px, 23px 23px;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  color: var(--white);
  background: var(--teal-700);
}

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

svg {
  display: block;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
p,
figure,
address {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.05rem, 4vw, 3.45rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.27rem;
}

p:last-child {
  margin-bottom: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(76px, 9vw, 124px);
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  color: var(--white);
  background: var(--navy-950);
  border: 2px solid var(--white);
  transform: translateY(-180%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 4px;
}

/* ==========================================================
   2. ELEMENTOS COMUNES
   ========================================================== */

.eyebrow {
  position: relative;
  width: fit-content;
  margin-bottom: 15px;
  color: var(--teal-700);
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow::after {
  display: block;
  width: 76px;
  height: 7px;
  margin-top: 4px;
  content: "";
  background: var(--orange-500);
  clip-path: polygon(0 48%, 8% 24%, 20% 40%, 35% 18%, 53% 43%, 69% 19%, 84% 36%, 100% 12%, 96% 77%, 82% 67%, 64% 88%, 47% 68%, 29% 90%, 13% 70%, 0 82%);
  transform: rotate(-1.5deg);
}

.section-heading {
  max-width: 820px;
  margin: 0 0 clamp(40px, 5vw, 66px);
  text-align: left;
}

.section-heading h2 {
  max-width: 760px;
  margin-bottom: 15px;
}

.section-heading > p:last-child {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
}

.section-heading-light h2,
.section-heading-light > p:last-child {
  color: var(--white);
}

.section-heading-light .eyebrow {
  color: #a6dddd;
}

.hand-note {
  width: fit-content;
  margin: 24px 0 0;
  color: var(--navy-800);
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 0.93rem;
  line-height: 1.45;
  transform: rotate(-1deg);
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  color: var(--navy-950);
  background: var(--surface);
  border: 2px solid currentColor;
  border-radius: 7px 16px 8px 13px;
  box-shadow: 4px 4px 0 rgba(6, 47, 67, 0.15);
  font-size: 0.89rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(6, 47, 67, 0.16);
}

.button-primary {
  color: var(--white);
  background: var(--teal-700);
  border-color: var(--navy-950);
  box-shadow: 4px 4px 0 var(--navy-950);
}

.button-primary:hover {
  background: var(--navy-800);
  box-shadow: 2px 2px 0 var(--navy-950);
}

.button-accent {
  color: var(--navy-950);
  background: var(--orange-500);
  border-color: var(--navy-950);
  box-shadow: 4px 4px 0 var(--navy-950);
}

.button-accent:hover {
  background: #f6b486;
  box-shadow: 2px 2px 0 var(--navy-950);
}

.button-outline {
  color: var(--teal-700);
  background: var(--surface);
  border-color: var(--teal-700);
}

.button-outline:hover {
  color: var(--white);
  background: var(--teal-700);
}

/* ==========================================================
   3. CABECERA SIN MENÚ
   ========================================================== */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  background: white;
  border-bottom: 1px solid rgba(6, 47, 67, 0.25);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 6px;
  content: "";
  background: linear-gradient(90deg, var(--teal-700) 0 72%, var(--orange-500) 72% 100%);
  clip-path: polygon(0 30%, 7% 5%, 15% 48%, 27% 18%, 39% 46%, 52% 12%, 64% 38%, 76% 8%, 88% 42%, 100% 18%, 100% 100%, 0 100%);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 2px;
  line-height: 1;
  text-transform: uppercase;
}

.brand-text strong {
  color: var(--navy-950);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(1.18rem, 2vw, 1.58rem);
  font-weight: 900;
  letter-spacing: 0.012em;
}

.brand-text span {
  color: var(--teal-700);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-phone {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--navy-950);
  background: transparent;
  border: 2px solid var(--teal-700);
  border-radius: 16px 7px 13px 8px;
  font-weight: 800;
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

.header-phone:hover {
  color: var(--white);
  background: var(--teal-700);
  transform: rotate(-0.5deg);
}

.button-header {
  min-height: 48px;
}

/* ==========================================================
   4. HERO
   ========================================================== */

.hero {
  overflow: hidden;
  padding-top: clamp(64px, 8vw, 108px);
  padding-bottom: clamp(84px, 10vw, 132px);
  background: var(--paper);
}

.hero::before {
  position: absolute;
  top: 9%;
  left: -5%;
  width: 38%;
  height: 56%;
  content: "";
  background: rgba(242, 163, 109, 0.15);
  clip-path: polygon(2% 7%, 94% 0, 100% 88%, 78% 96%, 55% 90%, 25% 100%, 0 82%);
  transform: rotate(-3deg);
}

.hero::after {
  position: absolute;
  right: -7%;
  bottom: 7%;
  width: 34%;
  height: 45%;
  content: "";
  background: rgba(8, 122, 130, 0.1);
  clip-path: polygon(5% 14%, 89% 0, 100% 78%, 85% 100%, 18% 91%, 0 45%);
  transform: rotate(4deg);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
}

.hero-copy {
  position: relative;
  padding-left: clamp(18px, 3vw, 36px);
}

.hero-copy::before {
  position: absolute;
  top: 4px;
  bottom: 7px;
  left: 0;
  width: 7px;
  content: "";
  background: var(--teal-700);
  clip-path: polygon(28% 0, 100% 4%, 68% 17%, 96% 31%, 58% 45%, 88% 62%, 52% 78%, 80% 94%, 20% 100%, 0 83%, 27% 66%, 5% 46%, 34% 28%, 8% 12%);
}

.hero-copy h1 span {
  position: relative;
  display: inline;
  color: var(--teal-700);
  font-style: italic;
  font-weight: 700;
}

.hero-copy h1 span::after {
  position: absolute;
  right: -4px;
  bottom: -8px;
  left: -5px;
  height: 9px;
  content: "";
  background: var(--orange-500);
  clip-path: polygon(0 47%, 7% 25%, 18% 45%, 33% 12%, 48% 41%, 64% 20%, 78% 44%, 91% 14%, 100% 40%, 97% 82%, 82% 66%, 67% 90%, 51% 67%, 36% 91%, 20% 68%, 6% 88%);
  opacity: 0.85;
}

.hero-lead {
  max-width: 660px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.hero-note .icon {
  color: var(--success);
}

.hero-visual {
  position: relative;
  min-height: 588px;
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  top: 29px;
  right: -24px;
  bottom: -24px;
  left: 28px;
  content: "";
  background: var(--teal-700);
  clip-path: polygon(2% 3%, 97% 0, 100% 94%, 92% 100%, 4% 97%, 0 10%);
}

.hero-visual > img {
  width: 100%;
  height: 588px;
  object-fit: cover;
  object-position: center 64%;
  border: 7px solid var(--surface);
  clip-path: polygon(1% 1%, 98% 0, 100% 95%, 96% 100%, 2% 98%, 0 7%);
  box-shadow: 12px 14px 0 rgba(6, 47, 67, 0.12);
}

.photo-note {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: -18px;
  padding: 9px 15px;
  color: var(--navy-950);
  background: #f4dfbd;
  border: 1px solid rgba(6, 47, 67, 0.3);
  box-shadow: 3px 4px 0 rgba(6, 47, 67, 0.15);
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 0.83rem;
  font-weight: 700;
  transform: rotate(-4deg);
}

.hero-card {
  position: absolute;
  right: -24px;
  bottom: 30px;
  width: min(365px, 88%);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 19px;
  background: var(--surface);
  border: 2px solid var(--navy-950);
  border-radius: 8px 18px 9px 15px;
  box-shadow: 6px 7px 0 rgba(6, 47, 67, 0.18);
  transform: rotate(1deg);
}

.hero-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--navy-950);
  background: var(--orange-500);
  border: 2px solid var(--navy-950);
  border-radius: 47% 53% 42% 58% / 55% 44% 56% 45%;
  flex: 0 0 auto;
}

.hero-card strong,
.hero-card small {
  display: block;
}

.hero-card strong {
  margin-bottom: 3px;
  color: var(--navy-950);
  line-height: 1.25;
}

.hero-card small {
  color: var(--muted);
  line-height: 1.35;
}

/* ==========================================================
   5. FRANJA DE VENTAJAS
   ========================================================== */

.benefits {
  position: relative;
  z-index: 3;
  margin-top: -42px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 2px solid var(--navy-950);
  border-bottom: 2px solid var(--navy-950);
  box-shadow: 0 7px 0 rgba(6, 47, 67, 0.1);
}

.benefit-item {
  position: relative;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 21px 18px;
}

.benefit-item + .benefit-item::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 2px;
  content: "";
  background: var(--line);
  transform: rotate(1deg);
}

.icon-bubble {
  width: 53px;
  height: 53px;
  display: grid;
  place-items: center;
  color: var(--white);
  border: 2px solid var(--navy-950);
  border-radius: 44% 56% 47% 53% / 59% 43% 57% 41%;
  box-shadow: 3px 3px 0 rgba(6, 47, 67, 0.14);
  flex: 0 0 auto;
}

.icon-bubble .icon {
  width: 25px;
  height: 25px;
}

.icon-bubble-teal {
  background: var(--teal-700);
}

.icon-bubble-orange {
  color: var(--navy-950);
  background: var(--orange-500);
}

.benefit-item strong,
.benefit-item small {
  display: block;
  line-height: 1.35;
}

.benefit-item strong {
  color: var(--navy-950);
}

.benefit-item small {
  color: var(--muted);
}

/* ==========================================================
   6. SERVICIOS
   ========================================================== */

.services {
  padding-top: clamp(112px, 11vw, 154px);
  background: var(--surface);
}

.services::after {
  position: absolute;
  right: 3%;
  bottom: 7%;
  width: 170px;
  height: 55px;
  content: "";
  background: rgba(242, 163, 109, 0.2);
  clip-path: polygon(0 31%, 12% 15%, 27% 37%, 45% 8%, 60% 29%, 77% 10%, 100% 28%, 95% 77%, 80% 64%, 62% 88%, 44% 65%, 25% 93%, 8% 72%);
  transform: rotate(-5deg);
}

.services-grid {
  counter-reset: service;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(38px, 6vw, 82px);
  border-top: 2px solid var(--navy-950);
}

.service-card {
  position: relative;
  min-height: 190px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 20px;
  align-content: start;
  padding: 30px 48px 28px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  counter-increment: service;
}

.service-card::after {
  position: absolute;
  top: 27px;
  right: 0;
  content: "0" counter(service);
  color: rgba(8, 122, 130, 0.28);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 700;
}

.service-card:nth-child(even)::after {
  color: rgba(237, 141, 74, 0.45);
}

.service-icon {
  grid-row: 1 / 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 1px 0 0;
  color: var(--teal-700);
  background: var(--teal-100);
  border: 1px solid var(--teal-700);
  border-radius: 43% 57% 49% 51% / 56% 42% 58% 44%;
  box-shadow: 3px 4px 0 rgba(8, 122, 130, 0.13);
  transform: rotate(-2deg);
}

.service-card:nth-child(even) .service-icon {
  transform: rotate(2deg);
}

.service-icon .icon {
  width: 29px;
  height: 29px;
}

.service-icon-orange {
  color: var(--orange-700);
  background: var(--orange-100);
  border-color: var(--orange-700);
  box-shadow: 3px 4px 0 rgba(237, 141, 74, 0.15);
}

.service-card h3 {
  align-self: end;
  margin-bottom: 8px;
}

.service-card p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

/* ==========================================================
   7. TRABAJOS REALIZADOS
   ========================================================== */

.portfolio {
  overflow: hidden;
  color: var(--white);
  background-color: #06151c;
  background-image:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.045) 0 1px, transparent 1.4px),
    radial-gradient(circle at 78% 70%, rgba(242, 163, 109, 0.055) 0 1px, transparent 1.4px);
  background-size: 19px 19px, 24px 24px;
}

.portfolio::before,
.portfolio::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 18px;
  content: "";
  background: var(--paper);
  pointer-events: none;
}

.portfolio::before {
  top: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 25%, 91% 62%, 82% 37%, 72% 77%, 61% 34%, 50% 70%, 40% 42%, 29% 79%, 19% 36%, 9% 68%, 0 38%);
}

.portfolio::after {
  bottom: -1px;
  clip-path: polygon(0 72%, 9% 35%, 19% 66%, 29% 27%, 40% 65%, 50% 31%, 61% 70%, 72% 25%, 82% 62%, 91% 31%, 100% 68%, 100% 100%, 0 100%);
}

.portfolio .container {
  position: relative;
  z-index: 1;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 230px;
  gap: 21px;
}

.project-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--navy-900);
  border: 6px solid var(--surface);
  border-radius: 5px 17px 7px 13px;
  box-shadow: var(--shadow-paper-dark);
  isolation: isolate;
}

.project-card:nth-child(1) {
  grid-column: span 5;
  grid-row: span 2;
  transform: rotate(-0.45deg);
}

.project-card:nth-child(2) {
  grid-column: span 7;
  grid-row: span 1;
  transform: rotate(0.35deg);
}

.project-card:nth-child(3) {
  grid-column: span 4;
  grid-row: span 1;
  transform: rotate(-0.25deg);
}

.project-card:nth-child(4) {
  grid-column: span 3;
  grid-row: span 1;
  transform: rotate(0.55deg);
}

.project-card::before {
  position: absolute;
  z-index: 4;
  top: -6px;
  left: 50%;
  width: 72px;
  height: 22px;
  content: "";
  background: rgba(246, 226, 190, 0.88);
  border-right: 1px solid rgba(6, 47, 67, 0.16);
  border-left: 1px solid rgba(6, 47, 67, 0.16);
  transform: translateX(-50%) rotate(-2deg);
  pointer-events: none;
}

.project-card::after {
  display: none;
}

.project-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform 420ms ease;
}

.project-card:nth-child(1) img {
  object-position: center 58%;
}

.project-card:nth-child(2) img {
  object-position: 56% center;
}

.project-card:nth-child(3) img {
  object-position: center 64%;
}

.project-card:hover img {
  transform: scale(1.025);
}

.project-overlay {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 16px 17px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  border-left: 6px solid var(--orange-500);
  box-shadow: 4px 5px 0 rgba(2, 28, 40, 0.22);
  transform: rotate(-0.45deg);
}

.project-card:nth-child(even) .project-overlay {
  border-left-color: var(--teal-700);
  transform: rotate(0.35deg);
}

.project-overlay h3,
.project-overlay p {
  color: var(--ink);
}

.project-overlay h3 {
  margin-bottom: 5px;
  font-size: 1.18rem;
}

.project-overlay > p:last-child {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.42;
}

.project-category {
  margin-bottom: 5px;
  color: var(--orange-700) !important;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.portfolio-more {
  margin-top: 40px;
}

.portfolio-more summary {
  width: fit-content;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-inline: auto;
  padding: 12px 22px;
  color: var(--navy-950);
  background: var(--orange-500);
  border: 2px solid var(--surface);
  border-radius: 8px 17px 7px 14px;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  list-style: none;
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.portfolio-more summary::-webkit-details-marker {
  display: none;
}

.portfolio-more summary:hover {
  background: #f5b382;
  transform: translate(2px, 2px);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.28);
}

.summary-less {
  display: none;
}

.portfolio-more[open] .summary-more {
  display: none;
}

.portfolio-more[open] .summary-less {
  display: inline;
}

.portfolio-grid-extra {
  margin-top: 34px;
  grid-auto-rows: 300px;
}

.portfolio-grid-extra .project-card {
  grid-column: span 3;
  grid-row: span 1;
}

.portfolio-grid-extra .project-card:nth-child(odd) {
  transform: rotate(-0.35deg);
}

.portfolio-grid-extra .project-card:nth-child(even) {
  transform: rotate(0.35deg);
}

.project-card-small {
  min-height: 0;
}

.project-card-small img {
  min-height: 0;
}

/* ==========================================================
   8. ANTES Y DESPUÉS
   ========================================================== */

.comparisons {
  background: var(--paper);
}

.comparisons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.comparison-card {
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--navy-950);
  border-radius: 5px 16px 7px 12px;
  box-shadow: var(--shadow-paper);
}

.comparison-card:first-child {
  transform: rotate(-0.35deg);
}

.comparison-card:last-child {
  transform: rotate(0.35deg);
}

.comparison-images {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 372px;
  padding: 8px;
  background: #ebe4d8;
}

.comparison-side {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 4px solid var(--surface);
}

.comparison-side:first-child {
  border-right-width: 2px;
}

.comparison-side:last-child {
  border-left-width: 2px;
}

.comparison-side img {
  width: 100%;
  height: 100%;
  min-height: 356px;
  object-fit: cover;
}

.comparison-card:first-child .comparison-side img {
  object-position: center 55%;
}

.comparison-card:nth-child(2) .comparison-side:first-child img {
  object-position: center 35%;
}

.comparison-card:nth-child(2) .comparison-side:last-child img {
  object-position: 60% center;
}

.comparison-label {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  padding: 7px 11px;
  color: var(--navy-950);
  background: #f4dfbd;
  border: 1px solid rgba(6, 47, 67, 0.3);
  box-shadow: 2px 3px 0 rgba(6, 47, 67, 0.14);
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 0.74rem;
  font-weight: 700;
  transform: rotate(-3deg);
}

.comparison-label-after {
  color: var(--white);
  background: var(--teal-700);
  transform: rotate(2deg);
}

.comparison-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--navy-950);
  background: var(--orange-500);
  border: 3px solid var(--navy-950);
  border-radius: 47% 53% 43% 57% / 56% 44% 58% 42%;
  transform: translate(-50%, -50%) rotate(-2deg);
  box-shadow: 3px 4px 0 rgba(6, 47, 67, 0.22);
}

.comparison-copy {
  padding: 28px 29px 31px;
}

.comparison-copy h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.comparison-copy > p:last-child {
  color: var(--muted);
}

/* ==========================================================
   9. PROCESO
   ========================================================== */

.process {
  background: var(--surface);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--navy-950);
  border-bottom: 2px solid var(--navy-950);
}

.process-card {
  position: relative;
  overflow: visible;
  padding: 30px 28px 34px;
  background: transparent;
}

.process-card + .process-card {
  border-left: 1px solid var(--line);
}

.process-image {
  position: relative;
  height: 235px;
  margin-bottom: 25px;
  overflow: visible;
  background: var(--paper-deep);
}

.process-image::after {
  position: absolute;
  z-index: 2;
  top: -6px;
  left: 50%;
  width: 70px;
  height: 21px;
  content: "";
  background: rgba(246, 226, 190, 0.88);
  transform: translateX(-50%) rotate(-2deg);
}

.process-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 5px solid var(--surface);
  box-shadow: 5px 6px 0 rgba(6, 47, 67, 0.14);
  transform: rotate(-0.5deg);
}

.process-card:nth-child(2) .process-image img {
  transform: rotate(0.5deg);
}

.process-card:nth-child(3) .process-image img {
  object-position: center 68%;
  transform: rotate(-0.3deg);
}

.process-image span {
  position: absolute;
  z-index: 4;
  right: -10px;
  bottom: -15px;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  color: var(--navy-950);
  background: var(--orange-500);
  border: 2px solid var(--navy-950);
  border-radius: 48% 52% 43% 57% / 58% 42% 55% 45%;
  box-shadow: 3px 4px 0 rgba(6, 47, 67, 0.16);
  font-family: Georgia, serif;
  font-weight: 800;
}

.process-card > div:last-child {
  padding: 0;
}

.process-card p {
  color: var(--muted);
}

/* ==========================================================
   10. POR QUÉ ELEGIRNOS
   ========================================================== */

.reasons {
  background: var(--paper-deep);
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 42px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.reason-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: start;
  column-gap: 17px;
  padding: 24px 0;
  text-align: left;
  border-top: 2px solid var(--navy-950);
}

.reason-item + .reason-item::before {
  display: none;
}

.reason-icon {
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--white);
  background: var(--teal-700);
  border: 2px solid var(--navy-950);
  border-radius: 43% 57% 50% 50% / 57% 44% 56% 43%;
  box-shadow: 3px 4px 0 rgba(6, 47, 67, 0.14);
  transform: rotate(-2deg);
}

.reason-icon-orange {
  color: var(--navy-950);
  background: var(--orange-500);
  transform: rotate(2deg);
}

.reason-item h3 {
  align-self: end;
  margin-bottom: 7px;
  font-size: 1.12rem;
}

.reason-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ==========================================================
   11. CONTACTO
   ========================================================== */

.contact {
  padding-top: 0;
  background: var(--paper-deep);
}

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  overflow: visible;
  color: var(--white);
  background: #06151c;
  border: 3px solid var(--navy-950);
  border-radius: 6px 20px 8px 15px;
  box-shadow: 10px 11px 0 rgba(6, 47, 67, 0.18);
}

.contact-card::before {
  position: absolute;
  z-index: 4;
  top: -13px;
  left: 47%;
  width: 110px;
  height: 28px;
  content: "";
  background: rgba(246, 226, 190, 0.9);
  transform: translateX(-50%) rotate(-2deg);
}

.contact-photo {
  position: relative;
  min-height: 545px;
  margin: 16px 0 16px 16px;
  overflow: hidden;
  border: 6px solid var(--surface);
  clip-path: polygon(1% 1%, 99% 0, 100% 96%, 95% 100%, 0 98%);
}

.contact-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 62%, rgba(6, 47, 67, 0.28) 100%);
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.contact-content {
  padding: clamp(42px, 6vw, 74px);
}

.contact-content .eyebrow {
  color: #a6dddd;
}

.contact-content h2 {
  color: var(--white);
}

.contact-lead {
  max-width: 650px;
  margin-bottom: 31px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.07rem;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-bottom: 31px;
  font-style: normal;
}

.contact-list a,
.contact-list > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.contact-list a:hover {
  color: #b9eded;
}

.contact-list a > span:first-child,
.contact-list > div > span:first-child {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: var(--navy-950);
  background: var(--orange-500);
  border: 1px solid var(--white);
  border-radius: 46% 54% 42% 58% / 56% 44% 58% 42%;
  flex: 0 0 auto;
}

.contact-list small,
.contact-list strong {
  display: block;
  min-width: 0;
}

.contact-list small {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.contact-list strong {
  overflow-wrap: anywhere;
  font-size: 0.93rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.button-light {
  color: var(--white);
  background: transparent;
  border-color: var(--white);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2);
}

.button-light:hover {
  color: var(--navy-950);
  background: var(--white);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.2);
}

/* ==========================================================
   12. PIE
   ========================================================== */

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: #06151c;
  border-top: 6px solid var(--orange-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr;
  gap: clamp(36px, 6vw, 76px);
  padding-block: 58px;
}

.brand-footer .brand-text strong,
.brand-footer .brand-text span {
  color: var(--white);
}

.footer-brand > p {
  max-width: 380px;
  margin-top: 20px;
}

.footer-contact h2,
.footer-cta h2 {
  margin-bottom: 19px;
  color: var(--white);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-contact {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-contact a,
.footer-contact span {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
}

.footer-contact a:hover {
  color: var(--white);
}

.footer-cta p {
  margin-bottom: 18px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  font-size: 0.83rem;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================
   13. RESPONSIVE
   ========================================================== */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
    gap: 54px;
  }

  .hero-visual,
  .hero-visual > img {
    min-height: 530px;
    height: 530px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 330px;
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .portfolio-grid-extra .project-card {
    grid-column: span 1;
    grid-row: span 1;
  }

  .project-card:nth-child(1) {
    grid-row: span 2;
  }

  .portfolio-grid-extra .project-card:nth-child(1) {
    grid-row: span 1;
  }

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

@media (max-width: 900px) {
  :root {
    --header-height: 82px;
  }

  .header-inner {
    gap: 15px;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .button-header span,
  .header-phone span {
    display: none;
  }

  .button-header,
  .header-phone {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

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

  .hero-copy {
    max-width: 770px;
  }

  .hero-visual,
  .hero-visual > img {
    min-height: 570px;
    height: 570px;
  }

  .hero-visual > img {
    object-position: center 58%;
  }

  .hero-card {
    right: 16px;
  }

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

  .benefit-item:nth-child(3)::before {
    display: none;
  }

  .benefit-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .services-grid {
    column-gap: 32px;
  }

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

  .comparison-images {
    min-height: 440px;
  }

  .comparison-side img {
    min-height: 424px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    border-top: 2px solid var(--navy-950);
    border-bottom: 2px solid var(--navy-950);
  }

  .process-card + .process-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .process-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    align-items: center;
    gap: 30px;
  }

  .process-image {
    margin-bottom: 0;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-card::before {
    left: 50%;
  }

  .contact-photo {
    min-height: 390px;
    margin: 15px 15px 0;
  }

  .contact-photo::after {
    background: linear-gradient(0deg, rgba(6, 47, 67, 0.35) 0%, transparent 58%);
  }

  .contact-photo img {
    height: 430px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .section {
    padding-block: 76px;
  }

  .site-header {
    position: relative;
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text span {
    font-size: 0.64rem;
  }

  .hero {
    padding-top: 52px;
  }

  .hero-copy {
    padding-left: 19px;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .hero-visual,
  .hero-visual > img {
    min-height: 470px;
    height: 470px;
  }

  .photo-note {
    left: 7px;
  }

  .hero-card {
    right: 13px;
    bottom: 17px;
    width: calc(100% - 26px);
  }

  .benefits {
    margin-top: -30px;
  }

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

  .benefit-item {
    min-height: 88px;
    justify-content: flex-start;
  }

  .benefit-item + .benefit-item::before {
    display: none;
  }

  .benefit-item:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .services {
    padding-top: 108px;
  }

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

  .portfolio-grid,
  .portfolio-grid-extra {
    grid-template-columns: 1fr;
    grid-auto-rows: 430px;
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .portfolio-grid-extra .project-card,
  .portfolio-grid-extra .project-card:nth-child(1) {
    grid-column: auto;
    grid-row: auto;
  }

  .process-card {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .process-image {
    height: 280px;
  }

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

  .contact-list {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.35rem, 12vw, 3.35rem);
  }

  .header-inner {
    align-items: center;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-phone,
  .button-header {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .hero-visual,
  .hero-visual > img {
    min-height: 405px;
    height: 405px;
  }

  .hero-visual::before {
    right: -11px;
    bottom: -15px;
    left: 15px;
  }

  .hero-card {
    align-items: flex-start;
    padding: 14px;
  }

  .hero-card-icon {
    width: 42px;
    height: 42px;
  }

  .service-card {
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 15px;
    padding-right: 36px;
  }

  .service-icon {
    width: 50px;
    height: 50px;
  }

  .project-overlay > p:last-child {
    display: none;
  }

  .comparison-images {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .comparison-side:first-child {
    border-right-width: 4px;
    border-bottom-width: 2px;
  }

  .comparison-side:last-child {
    border-top-width: 2px;
    border-left-width: 4px;
  }

  .comparison-side img {
    height: 285px;
    min-height: 285px;
  }

  .comparison-arrow {
    transform: translate(-50%, -50%) rotate(88deg);
  }

  .contact-content {
    padding: 40px 24px;
  }

  .contact-card::before {
    width: 88px;
  }
}

/* Respeta la preferencia de reducción de movimiento. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
