:root {
    color-scheme: light;
    --fondo: #f6f1e9;
    --papel: #fffdfa;
    --texto: #292924;
    --oscuro: #282923;
    --terracota: #a2442a;
    --borde: #decec0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font: 1rem/1.6 system-ui, sans-serif;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
a { color: var(--terracota); }
a:focus-visible, summary:focus-visible {
    outline: 3px solid #ce734a;
    outline-offset: 4px;
}

header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem max(1.25rem, calc((100% - 1120px) / 2));
    background: var(--oscuro);
    color: white;
}

.logo h1 { font-size: 1rem; letter-spacing: .08em; }
.subtitulo { color: #eed9c6; font-size: .86rem; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
nav a { color: white; padding-block: .25rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.principal {
    padding: clamp(4rem, 10vw, 8rem) max(1.25rem, calc((100% - 1120px) / 2));
    background: linear-gradient(90deg, #22231f 4%, #22231fe8 43%, #22231f70),
        url("imagenes/construccion/con1.jpeg") center / cover;
    color: white;
}

.contenido-principal { max-width: 680px; }
.principal h2 { font-size: clamp(2rem, 5vw, 4rem); }
.principal p { max-width: 50ch; margin-top: 1.2rem; }
.boton {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .8rem 1.25rem;
    border-radius: .4rem;
    background: #f0b187;
    color: #29231f;
    font-weight: 750;
    text-decoration: none;
}
.boton:hover { background: #ffd0ac; }

.seccion {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    scroll-margin-top: 1rem;
}

#servicios { padding-block: 3.5rem 2rem; }
.seccion h2 { margin-bottom: 1.4rem; font-size: clamp(1.65rem, 4vw, 2.4rem); }

.servicios-lista {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.servicio, details, .nosotros, .contacto {
    border: 1px solid var(--borde);
    border-radius: .7rem;
    background: var(--papel);
}

.servicio { overflow: hidden; }
.servicio img { display: block; width: 100%; height: 185px; object-fit: cover; }
.servicio-texto { padding: 1.35rem; }
.servicio h3 { font-size: 1.3rem; }
.servicio p { margin-block: .55rem .85rem; }
.servicio a { font-weight: 700; text-underline-offset: .2em; }

.galeria { margin-bottom: .65rem; }
summary { cursor: pointer; padding: .9rem 1.25rem; font-weight: 750; }
details p { padding: 0 1.25rem 1rem; }
.galeria-imagenes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: .75rem;
    padding: 0 1.25rem 1.25rem;
}

.galeria-imagenes img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: .4rem;
}

.nosotros, .contacto {
    margin-block: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.nosotros p + p, .contacto p + p { margin-top: .5rem; }
.contacto { background: var(--oscuro); color: white; }
footer { text-align: center; padding: 1.5rem; }

@media (max-width: 600px) {
    .servicios-lista { grid-template-columns: 1fr; }
    .principal { background-image: linear-gradient(#22231fbe, #22231fef), url("imagenes/construccion/con1.jpeg"); }
}

.contacto p a {
    color: #ffd0ac;
    overflow-wrap: anywhere;
}

.galeria-imagenes figure { margin: 0; }
.galeria-imagenes figcaption {
    padding-top: .35rem;
    font-size: .9rem;
}
