@charset "utf-8";

/* =========================================================
   Materia Salina Studio
   Hoja de estilo principal
   Paleta y tipografias tomadas del sitio original.
   ========================================================= */

/* ---------- Tipografias autoalojadas ---------- */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(../fuentes/playfair-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(../fuentes/playfair-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url(../fuentes/playfair-italic-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url(../fuentes/playfair-italic-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 200 700;
    font-display: swap;
    src: url(../fuentes/raleway-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 200 700;
    font-display: swap;
    src: url(../fuentes/raleway-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Variables ---------- */
:root {
    --crema:        #f7f3ed;
    --crema-hueso:  #fbf9f5;
    --arena:        #dccbb3;
    --arena-clara:  #ebdabe;
    --dorado:       #bf975d;
    --dorado-hondo: #9d7a44;
    --verde:        #447f74;
    --verde-hondo:  #2e5a52;
    --tinta:        #363636;
    --tinta-suave:  #605e5e;
    --tierra:       #342216;
    --blanco:       #ffffff;
    --linea:        rgba(54, 54, 54, .14);

    --serif: 'Playfair Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --sans:  'Raleway', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --ancho:      1280px;
    --ancho-texto: 760px;
    --margen:     clamp(1.25rem, 5vw, 4.5rem);
    --arco:       999px 999px 8px 8px;
    --transicion: .45s cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--crema);
    color: var(--tinta);
    font-family: var(--sans);
    font-size: 1.0625rem;
    font-weight: 300;
    line-height: 1.75;
    letter-spacing: .012em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -.005em;
    margin: 0 0 .6em;
    color: var(--tinta);
}

h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

::selection { background: var(--arena); color: var(--tierra); }

:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 3px;
}

/* ---------- Utilidades de composicion ---------- */
.contenedor {
    width: 100%;
    max-width: var(--ancho);
    margin-inline: auto;
    padding-inline: var(--margen);
}

.contenedor-estrecho {
    width: 100%;
    max-width: calc(var(--ancho-texto) + var(--margen) * 2);
    margin-inline: auto;
    padding-inline: var(--margen);
}

.seccion { padding-block: clamp(4rem, 9vw, 8rem); }
.seccion--corta { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.seccion--crema { background: var(--crema-hueso); }
.seccion--arena { background: linear-gradient(180deg, var(--crema) 0%, var(--arena-clara) 100%); }
.seccion--tierra { background: var(--tierra); color: rgba(255, 255, 255, .86); }
.seccion--tierra h2, .seccion--tierra h3 { color: var(--crema); }

.antetitulo {
    display: block;
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--dorado-hondo);
    margin-bottom: 1.2rem;
}

.entradilla {
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    font-weight: 300;
    line-height: 1.72;
    color: var(--tinta-suave);
    max-width: 60ch;
}

.centrado { text-align: center; }
.centrado .entradilla, .centrado .antetitulo { margin-inline: auto; }

.filete {
    width: 64px;
    height: 1px;
    border: 0;
    background: var(--dorado);
    margin: 2rem 0;
}
.centrado .filete { margin-inline: auto; }

/* ---------- Botones ---------- */
.boton {
    display: inline-flex;
    align-items: center;
    gap: .7em;
    padding: 1.05em 2.4em;
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    border: 1px solid var(--verde);
    background: var(--verde);
    color: var(--blanco);
    border-radius: 2px;
    cursor: pointer;
    transition: background var(--transicion), color var(--transicion), border-color var(--transicion), transform var(--transicion);
}
.boton:hover,
.boton:focus-visible {
    background: var(--verde-hondo);
    border-color: var(--verde-hondo);
    transform: translateY(-2px);
}

.boton--linea {
    background: transparent;
    color: var(--tinta);
    border-color: var(--tinta);
}
.boton--linea:hover,
.boton--linea:focus-visible {
    background: var(--tinta);
    color: var(--crema);
    border-color: var(--tinta);
}

.boton--claro {
    background: transparent;
    color: var(--crema);
    border-color: rgba(247, 243, 237, .55);
}
.boton--claro:hover,
.boton--claro:focus-visible {
    background: var(--crema);
    color: var(--tierra);
    border-color: var(--crema);
}

.enlace-flecha {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--dorado-hondo);
    transition: gap var(--transicion), color var(--transicion);
}
.enlace-flecha::after {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    transition: width var(--transicion);
}
.enlace-flecha:hover { gap: .9em; color: var(--verde); }
.enlace-flecha:hover::after { width: 34px; }

/* ---------- Salto al contenido ---------- */
.saltar {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: .9em 1.4em;
    background: var(--verde);
    color: #fff;
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.saltar:focus { left: 0; }

/* =========================================================
   Cabecera
   ========================================================= */
.cabecera {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding-block: .9rem;
    background: transparent;
    transition: background var(--transicion), box-shadow var(--transicion), padding var(--transicion);
}
.cabecera__caja {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cabecera.esta-fija,
body.menu-abierto .cabecera,
body:not(.tiene-hero) .cabecera {
    background: rgba(247, 243, 237, .94);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--linea);
}

.marca { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.marca img {
    width: auto;
    height: 62px;
    transition: height var(--transicion);
}
.cabecera.esta-fija .marca img { height: 50px; }

/* Sobre el hero el logo conserva su color: solo se le da una sombra suave
   para que se despegue de las zonas claras de la fotografia. */
body.tiene-hero:not(.menu-abierto) .cabecera:not(.esta-fija) .marca img {
    filter: drop-shadow(0 1px 10px rgba(28, 18, 10, .55)) drop-shadow(0 0 2px rgba(28, 18, 10, .35));
}

.navegacion ul {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2.3rem);
    margin: 0;
    padding: 0;
    list-style: none;
}
.navegacion a {
    position: relative;
    display: block;
    padding: .35rem 0;
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .21em;
    text-transform: uppercase;
    color: var(--tinta);
    transition: color var(--transicion);
}
body.tiene-hero:not(.menu-abierto) .cabecera:not(.esta-fija) .navegacion a { color: rgba(255, 255, 255, .92); }
.navegacion a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transicion);
}
.navegacion a:hover::after,
.navegacion a[aria-current]::after { width: 100%; }

.navegacion .tiene-submenu { position: relative; }
.navegacion .submenu {
    position: absolute;
    top: calc(100% + .9rem);
    left: 50%;
    translate: -50% 0;
    min-width: 270px;
    padding: .7rem 0;
    display: block;
    background: var(--crema-hueso);
    border: 1px solid var(--linea);
    box-shadow: 0 22px 50px rgba(52, 34, 22, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transicion), transform var(--transicion), visibility var(--transicion);
}
.navegacion .tiene-submenu:hover .submenu,
.navegacion .tiene-submenu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.navegacion .submenu li { width: 100%; }
.navegacion .submenu a {
    padding: .62rem 1.5rem;
    font-size: .72rem;
    letter-spacing: .13em;
    color: var(--tinta) !important;
    text-transform: none;
    font-weight: 400;
    letter-spacing: .06em;
    font-size: .92rem;
}
.navegacion .submenu a::after { display: none; }
.navegacion .submenu a:hover { background: var(--arena-clara); }

.navegacion .idiomas {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-left: clamp(1rem, 2.2vw, 2.3rem);
    border-left: 1px solid currentColor;
    opacity: .8;
}
.navegacion .idiomas a { padding: .35rem 0; letter-spacing: .1em; }
.navegacion .idiomas a::after { display: none; }
.navegacion .idiomas a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }

.cabecera__acciones { display: flex; align-items: center; gap: 1rem; }
.cabecera__acciones .boton { padding: .85em 1.7em; font-size: .7rem; }

/* Boton hamburguesa */
/* Con el menu abierto: sin desplazamiento de fondo y sin backdrop-filter.
   Un backdrop-filter en la cabecera la convertiria en el contenedor de
   referencia del panel position:fixed y lo recortaria a la altura de la barra. */
body.menu-abierto { overflow: hidden; }
body.menu-abierto .cabecera {
    backdrop-filter: none;
    background: var(--crema-hueso);
}

.hamburguesa {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
}
.hamburguesa span {
    position: absolute;
    left: 9px;
    width: 28px;
    height: 1.5px;
    background: var(--tinta);
    transition: var(--transicion);
}
body.tiene-hero:not(.menu-abierto) .cabecera:not(.esta-fija) .hamburguesa span { background: #fff; }
.hamburguesa span:nth-child(1) { top: 16px; }
.hamburguesa span:nth-child(2) { top: 23px; }
.hamburguesa span:nth-child(3) { top: 30px; }
.menu-abierto .hamburguesa span:nth-child(1) { top: 23px; rotate: 45deg; }
.menu-abierto .hamburguesa span:nth-child(2) { opacity: 0; }
.menu-abierto .hamburguesa span:nth-child(3) { top: 23px; rotate: -45deg; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    min-height: min(100svh, 900px);
    display: grid;
    align-items: end;
    padding-block: 9rem 4.5rem;
    color: #fff;
    overflow: hidden;
}
/* Capas: 0 imagen de fondo · 1 velo · 2 contenido.
   Con z-index negativos la imagen quedaba detras del fondo de la propia seccion. */
.hero > .contenedor,
.portada > .contenedor,
.portada > .contenedor-estrecho,
.llamada > .contenedor-estrecho {
    position: relative;
    z-index: 2;
}
.hero__fondo {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--tierra);
}
/* <picture> es inline: sin esto el img no puede heredar el alto del contenedor */
.hero__fondo picture,
.portada__fondo picture,
.llamada__fondo picture {
    display: block;
    width: 100%;
    height: 100%;
}
.hero__fondo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: acercar 22s ease-out forwards;
}
@keyframes acercar {
    from { scale: 1.08; }
    to   { scale: 1; }
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(52, 34, 22, .48) 0%, rgba(52, 34, 22, .12) 34%, rgba(52, 34, 22, .74) 100%);
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero__antetitulo {
    color: var(--arena-clara);
    letter-spacing: .38em;
}
.hero p {
    max-width: 52ch;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
}
.hero__acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.4rem;
}
.hero__pie {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, .22);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
}

/* Cabecera de pagina interior */
.portada {
    position: relative;
    padding-block: clamp(9rem, 16vw, 13rem) clamp(3rem, 6vw, 5rem);
    background: var(--crema-hueso);
    overflow: hidden;
}
/* El fondo propio de .portada taparia la imagen, que va en z-index negativo */
.portada--imagen { color: #fff; background: var(--tierra); }
.portada--imagen h1, .portada--imagen h2 { color: #fff; }
.portada--imagen .antetitulo { color: var(--arena-clara); }
.portada--imagen .entradilla { color: rgba(255, 255, 255, .88); }
.portada__fondo { position: absolute; inset: 0; z-index: 0; background: var(--tierra); }
.portada__fondo img { width: 100%; height: 100%; object-fit: cover; }
.portada--imagen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(52, 34, 22, .58) 0%, rgba(52, 34, 22, .34) 50%, rgba(52, 34, 22, .66) 100%);
}
.portada h1 { max-width: 20ch; }

/* Migas */
.migas {
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tinta-suave);
    margin-bottom: 1.6rem;
}
.portada--imagen .migas { color: rgba(255, 255, 255, .74); }
.migas ol { display: flex; flex-wrap: wrap; gap: .55em; margin: 0; padding: 0; list-style: none; }
.migas li + li::before { content: "·"; margin-right: .55em; }
.migas a:hover { color: var(--dorado); }

/* =========================================================
   Rejillas y tarjetas
   ========================================================= */
.rejilla { display: grid; gap: clamp(1.5rem, 3vw, 2.6rem); }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rejilla--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Tarjeta de servicio */
.servicio {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--crema-hueso);
    border: 1px solid var(--linea);
    padding: clamp(1.8rem, 3vw, 2.6rem);
    transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.servicio:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(52, 34, 22, .1);
    border-color: var(--arena);
}
.servicio__numero {
    font-family: var(--serif);
    font-size: .95rem;
    font-style: italic;
    color: var(--dorado);
    margin-bottom: 1.4rem;
}
.servicio h3 { margin-bottom: .7rem; }
.servicio p {
    color: var(--tinta-suave);
    font-size: .98rem;
    flex: 1;
}
.servicio .enlace-flecha { margin-top: 1.8rem; }
.servicio__enlace { position: absolute; inset: 0; }

/* Tarjeta de proyecto */
.proyecto {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--arena-clara);
}
.proyecto__imagen {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
}
.proyecto__imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 1.1s cubic-bezier(.22, .61, .36, 1);
}
.proyecto:hover .proyecto__imagen img { scale: 1.06; }
.proyecto__velo {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(52, 34, 22, 0) 42%, rgba(52, 34, 22, .78) 100%);
    opacity: .9;
    transition: opacity var(--transicion);
}
.proyecto:hover .proyecto__velo { opacity: 1; }
.proyecto__texto {
    position: absolute;
    inset: auto 0 0 0;
    padding: clamp(1.2rem, 2.4vw, 2rem);
    color: #fff;
}
.proyecto__texto h3 {
    color: #fff;
    font-size: clamp(1.1rem, 1.7vw, 1.45rem);
    margin-bottom: .2rem;
}
.proyecto__meta {
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--arena-clara);
}

/* Arco mediterraneo */
.arco { border-radius: var(--arco); overflow: hidden; }
.arco-suave { border-radius: 220px 220px 6px 6px; overflow: hidden; }

/* Bloque texto + imagen */
.duo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.duo--invertido .duo__medio { order: 2; }
.duo__medio img { width: 100%; }
.duo__texto h2 { margin-bottom: 1.2rem; }

/* Lista con marcas */
.lista-marcas { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.lista-marcas li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: .85rem;
    color: var(--tinta-suave);
}
.lista-marcas li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 12px;
    height: 1px;
    background: var(--dorado);
}
.seccion--tierra .lista-marcas li { color: rgba(255, 255, 255, .8); }

/* Proceso */
.proceso { counter-reset: paso; }
.proceso__paso {
    position: relative;
    padding: 2rem 0 2rem 5rem;
    border-top: 1px solid var(--linea);
}
.proceso__paso:last-child { border-bottom: 1px solid var(--linea); }
.proceso__paso::before {
    counter-increment: paso;
    content: counter(paso, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 2rem;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--dorado);
}
.proceso__paso h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.proceso__paso p { color: var(--tinta-suave); margin: 0; }
.seccion--tierra .proceso__paso { border-color: rgba(255, 255, 255, .16); }
.seccion--tierra .proceso__paso p { color: rgba(255, 255, 255, .72); }

/* Cifras */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.cifra { text-align: center; }
.cifra strong {
    display: block;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 400;
    color: var(--dorado);
    line-height: 1;
    margin-bottom: .5rem;
}
.cifra span {
    font-size: .76rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}

/* Cita */
.cita {
    max-width: 24ch;
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3.4vw, 2.9rem);
    font-style: italic;
    line-height: 1.28;
    margin: 0 auto;
    text-align: center;
    color: var(--tinta);
}
.seccion--tierra .cita { color: var(--crema); }

/* =========================================================
   Galerias
   ========================================================= */
.galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(.6rem, 1.4vw, 1.2rem); }
.galeria figure { margin: 0; overflow: hidden; background: var(--arena-clara); }
.galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: scale 1s cubic-bezier(.22, .61, .36, 1); }
.galeria figure:hover img { scale: 1.04; }
.galeria button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

/* Mosaico del portafolio */
.mosaico { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(.7rem, 1.5vw, 1.4rem); }
.mosaico > * { grid-column: span 6; }
.mosaico > *:nth-child(6n + 1) { grid-column: span 7; }
.mosaico > *:nth-child(6n + 2) { grid-column: span 5; }
.mosaico > *:nth-child(6n + 3) { grid-column: span 5; }
.mosaico > *:nth-child(6n + 4) { grid-column: span 7; }
.mosaico > *:nth-child(6n + 5) { grid-column: span 6; }
.mosaico > *:nth-child(6n + 6) { grid-column: span 6; }

/* Carrusel horizontal */
.carrusel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 30%);
    gap: clamp(.8rem, 2vw, 1.6rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--arena) transparent;
}
.carrusel > * { scroll-snap-align: start; }
.carrusel::-webkit-scrollbar { height: 4px; }
.carrusel::-webkit-scrollbar-thumb { background: var(--arena); }

/* Visor de imagen */
.visor {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(28, 20, 14, .93);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transicion), visibility var(--transicion);
}
.visor[data-abierto] { opacity: 1; visibility: visible; }
.visor img { max-width: 100%; max-height: 86svh; object-fit: contain; }
.visor__cerrar,
.visor__nav {
    position: absolute;
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transicion);
}
.visor__cerrar:hover, .visor__nav:hover { background: rgba(255, 255, 255, .16); }
.visor__cerrar { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.visor__nav--ant { left: clamp(.6rem, 3vw, 2rem); top: 50%; translate: 0 -50%; }
.visor__nav--sig { right: clamp(.6rem, 3vw, 2rem); top: 50%; translate: 0 -50%; }
.visor__pie {
    position: absolute;
    bottom: clamp(1rem, 3vw, 2rem);
    left: 50%;
    translate: -50% 0;
    color: rgba(255, 255, 255, .74);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* =========================================================
   Blog
   ========================================================= */
.articulo { position: relative; display: flex; flex-direction: column; background: var(--crema-hueso); border: 1px solid var(--linea); }
.articulo__imagen { aspect-ratio: 16 / 11; overflow: hidden; }
.articulo__imagen img { width: 100%; height: 100%; object-fit: cover; transition: scale 1s cubic-bezier(.22, .61, .36, 1); }
.articulo:hover .articulo__imagen img { scale: 1.05; }
.articulo__cuerpo { padding: clamp(1.4rem, 2.6vw, 2rem); display: flex; flex-direction: column; flex: 1; }
.articulo__meta { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dorado-hondo); margin-bottom: .9rem; }
.articulo h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.articulo p { font-size: .95rem; color: var(--tinta-suave); flex: 1; }
.articulo .enlace-flecha { margin-top: 1.4rem; }
.articulo__enlace { position: absolute; inset: 0; }

/* Texto largo */
.texto-largo { font-size: 1.08rem; line-height: 1.85; }
.texto-largo h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.6em; }
.texto-largo h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-top: 2em; }
.texto-largo h2:first-child, .texto-largo h3:first-child { margin-top: 0; }
.texto-largo ul, .texto-largo ol { padding-left: 1.3rem; margin: 0 0 1.4em; }
.texto-largo li { margin-bottom: .55em; }
.texto-largo ul { list-style: none; padding-left: 0; }
.texto-largo ul li { position: relative; padding-left: 1.8rem; }
.texto-largo ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .78em;
    width: 10px;
    height: 1px;
    background: var(--dorado);
}
.texto-largo img { margin: 2.4rem 0; width: 100%; }
.texto-largo a { color: var(--verde); text-decoration: underline; text-underline-offset: .22em; }

/* =========================================================
   Formularios
   ========================================================= */
.formulario { display: grid; gap: 1.4rem; }
.campo { display: grid; gap: .5rem; }
.campo label {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}
.campo input,
.campo textarea,
.campo select {
    width: 100%;
    padding: .95em 1.1em;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--tinta);
    background: var(--blanco);
    border: 1px solid var(--linea);
    border-radius: 2px;
    transition: border-color var(--transicion), box-shadow var(--transicion);
}
.campo input:focus,
.campo textarea:focus,
.campo select:focus {
    outline: 0;
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(68, 127, 116, .12);
}
.campo textarea { min-height: 160px; resize: vertical; }
.campo--doble { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.campo-oculto { position: absolute; left: -9999px; }

.campo--conforme { display: flex; align-items: flex-start; gap: .8rem; }
.campo--conforme input { width: auto; margin-top: .35em; }
.campo--conforme label {
    font-size: .86rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 300;
    color: var(--tinta-suave);
    line-height: 1.6;
}
.campo--conforme a { color: var(--verde); text-decoration: underline; }

.aviso {
    padding: 1.1em 1.4em;
    border-left: 3px solid var(--verde);
    background: rgba(68, 127, 116, .08);
    font-size: .95rem;
}
.aviso--error { border-color: #a8452f; background: rgba(168, 69, 47, .08); }
.aviso ul { margin: .6em 0 0; padding-left: 1.2rem; }

/* Ficha de contacto */
.datos-contacto { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.datos-contacto dt {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--dorado-hondo);
    margin-bottom: .3rem;
}
.datos-contacto dd { margin: 0; font-size: 1.05rem; }
.datos-contacto a:hover { color: var(--verde); }

/* =========================================================
   Llamada final
   ========================================================= */
.llamada {
    position: relative;
    padding-block: clamp(4.5rem, 10vw, 8rem);
    color: #fff;
    text-align: center;
    overflow: hidden;
}
.llamada__fondo { position: absolute; inset: 0; z-index: 0; background: var(--tierra); }
.llamada__fondo img { width: 100%; height: 100%; object-fit: cover; }
.llamada::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(52, 34, 22, .66);
}
.llamada h2 { color: #fff; }
.llamada p { color: rgba(255, 255, 255, .86); max-width: 56ch; margin-inline: auto; }
.llamada .antetitulo { color: var(--arena-clara); }

/* =========================================================
   Pie
   ========================================================= */
.pie {
    background: var(--tierra);
    color: rgba(255, 255, 255, .72);
    padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
    font-size: .95rem;
}
.pie a { transition: color var(--transicion); }
.pie a:hover { color: var(--arena-clara); }
.pie__rejilla {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: 3rem;
}
.pie__marca img { height: 96px; width: auto; margin-bottom: 1.4rem; }
.pie h4 {
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--arena);
    margin-bottom: 1.3rem;
}
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.pie__redes-titulo { margin-top: 1.8rem; }
.pie__redes { grid-auto-flow: column; justify-content: start; gap: 1.6rem; }
.pie__redes a { display: inline-flex; align-items: center; gap: .5rem; }
.pie__redes svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.pie__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
}
.pie__legal ul { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* Boton flotante de WhatsApp */
.whatsapp {
    position: fixed;
    right: clamp(1rem, 2.5vw, 2rem);
    bottom: clamp(1rem, 2.5vw, 2rem);
    z-index: 90;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 30px rgba(37, 211, 102, .34);
    transition: transform var(--transicion), box-shadow var(--transicion);
}
.whatsapp:hover { transform: translateY(-4px) scale(1.05); }
.whatsapp svg { width: 28px; height: 28px; fill: currentColor; }

/* =========================================================
   Animacion de entrada
   ========================================================= */
.revelar {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s cubic-bezier(.22, .61, .36, 1), transform .9s cubic-bezier(.22, .61, .36, 1);
}
.revelar.visible { opacity: 1; transform: none; }

/* =========================================================
   Adaptaciones
   ========================================================= */
@media (max-width: 1080px) {
    .pie__rejilla { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hamburguesa { display: block; }
    .cabecera__acciones .boton { display: none; }

    .navegacion {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(88vw, 400px);
        padding: 7rem 2.2rem 2.5rem;
        background: var(--crema-hueso);
        box-shadow: -20px 0 60px rgba(52, 34, 22, .16);
        translate: 100% 0;
        transition: translate var(--transicion);
        overflow-y: auto;
    }
    .menu-abierto .navegacion { translate: 0 0; }
    .navegacion ul { flex-direction: column; align-items: stretch; gap: 0; }
    .navegacion > ul > li { border-bottom: 1px solid var(--linea); }
    .navegacion a { padding: 1.05rem 0; font-size: .82rem; color: var(--tinta) !important; }
    .navegacion a::after { display: none; }
    .navegacion .submenu {
        position: static;
        translate: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        padding: 0 0 .8rem .9rem;
    }
    .navegacion .submenu a { padding: .5rem 0; font-size: .88rem; }
    .navegacion .submenu a:hover { background: none; color: var(--verde) !important; }

    .duo--invertido .duo__medio { order: 0; }
    .mosaico > *, .mosaico > *:nth-child(n) { grid-column: span 12; }
    .carrusel { grid-auto-columns: minmax(230px, 74%); }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .marca img { height: 50px; }
    .hero { min-height: 88svh; padding-block: 8rem 3rem; }
    .proceso__paso { padding-left: 3.4rem; }
    .pie__rejilla { grid-template-columns: 1fr; }
    .pie__legal { flex-direction: column; align-items: flex-start; }
    .galeria { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .revelar { opacity: 1; transform: none; }
}

@media print {
    .cabecera, .whatsapp, .llamada, .pie__rejilla { display: none; }
    body { background: #fff; }
}

/* =========================================================
   Calculadora de presupuesto
   ========================================================= */
.portada--presupuesto { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.presu__reja {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.presu__columna { min-width: 0; }

/* El panel del precio solo tiene sentido si el navegador puede calcular */
.presu__panel { display: none; }
.con-js .presu__panel { display: block; position: sticky; top: 110px; }

/* ---------- Barra de pasos ---------- */
.presu-barra { display: none; }
.con-js .presu-barra {
    display: flex;
    align-items: center;
    gap: .5rem;
    list-style: none;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
    padding: 0;
    counter-reset: paso;
}
.presu-barra li {
    flex: 1;
    height: 3px;
    background: var(--linea);
    border-radius: 3px;
    position: relative;
    transition: background var(--transicion);
}
.presu-barra li span { position: absolute; left: -9999px; }
.presu-barra li.es-hecho  { background: var(--arena); }
.presu-barra li.es-actual { background: var(--dorado); }

/* ---------- Pasos ---------- */
.presu-paso { border: 0; margin: 0; padding: 0; min-width: 0; }
.con-js .presu-paso { display: none; }
.con-js .presu-paso.es-visible { display: block; animation: presu-entra .5s cubic-bezier(.22,.61,.36,1) both; }
.presu-paso + .presu-paso { margin-top: clamp(3rem, 6vw, 4.5rem); }
.con-js .presu-paso + .presu-paso { margin-top: 0; }

@keyframes presu-entra {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.presu-paso__titulo {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.16;
    padding: 0;
    margin-bottom: .5rem;
}
.presu-paso__texto {
    color: var(--tinta-suave);
    max-width: 54ch;
    margin-bottom: clamp(2rem, 4vw, 2.8rem);
}

.presu-grupo { margin-bottom: clamp(2rem, 4vw, 2.8rem); }
.presu-grupo[hidden] { display: none; }

.presu-etiqueta {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--dorado-hondo);
    margin-bottom: 1rem;
}
.presu-ayuda {
    margin: .9rem 0 0;
    font-size: .87rem;
    color: var(--tinta-suave);
}

/* ---------- Tarjetas de opción ---------- */
.presu-opciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .9rem;
}
.presu-opciones--compacto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.presu-op { display: block; cursor: pointer; }
.presu-op[hidden] { display: none; }
.presu-op input { position: absolute; opacity: 0; width: 0; height: 0; }

.presu-op__caja {
    position: relative;
    display: block;
    height: 100%;
    padding: 1.3rem 1.4rem;
    background: var(--blanco);
    border: 1px solid var(--linea);
    border-radius: 3px;
    transition: border-color var(--transicion), box-shadow var(--transicion), transform var(--transicion);
}
.presu-op:hover .presu-op__caja { border-color: var(--arena); transform: translateY(-2px); }

.presu-op input:checked + .presu-op__caja {
    border-color: var(--verde);
    box-shadow: 0 0 0 2px var(--verde) inset, 0 12px 28px rgba(46, 90, 82, .1);
}
.presu-op input:focus-visible + .presu-op__caja {
    outline: 2px solid var(--dorado);
    outline-offset: 3px;
}

.presu-icono {
    width: 30px;
    height: 30px;
    margin-bottom: .8rem;
    color: var(--dorado);
    transition: color var(--transicion);
}
.presu-op input:checked + .presu-op__caja .presu-icono { color: var(--verde); }

.presu-op__titulo {
    display: block;
    font-family: var(--serif);
    font-size: 1.12rem;
    line-height: 1.3;
    color: var(--tinta);
}
.presu-op__texto {
    display: block;
    margin-top: .35rem;
    font-size: .85rem;
    line-height: 1.55;
    color: var(--tinta-suave);
}

.presu-op__sello {
    position: absolute;
    top: -1px;
    right: -1px;
    padding: .2rem .55rem;
    background: var(--dorado);
    color: #fff;
    font-size: .7rem;
    line-height: 1.4;
    border-radius: 0 3px 0 3px;
}

/* Extras: casilla en vez de icono */
.presu-op--extra .presu-op__caja { padding-left: 3.4rem; }
.presu-op__marca {
    position: absolute;
    left: 1.3rem;
    top: 1.45rem;
    width: 18px;
    height: 18px;
    border: 1px solid var(--linea);
    border-radius: 2px;
    background: var(--crema-hueso);
    transition: background var(--transicion), border-color var(--transicion);
}
.presu-op input:checked + .presu-op__caja .presu-op__marca {
    background: var(--verde);
    border-color: var(--verde);
}
.presu-op input:checked + .presu-op__caja .presu-op__marca::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

/* ---------- Metros y contador ---------- */
.presu-medida { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.presu-medida input[type="range"] {
    flex: 1;
    min-width: 200px;
    height: 3px;
    appearance: none;
    background: var(--linea);
    border-radius: 3px;
    outline: 0;
}
.presu-medida input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--verde);
    border: 4px solid var(--crema);
    box-shadow: 0 3px 12px rgba(46, 90, 82, .3);
    cursor: pointer;
}
.presu-medida input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--verde);
    border: 4px solid var(--crema);
    cursor: pointer;
}

.presu-medida__cifra {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    padding: .5rem .9rem;
    background: var(--blanco);
    border: 1px solid var(--linea);
    border-radius: 3px;
}
.presu-medida__cifra input {
    width: 4.5ch;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--tinta);
    text-align: right;
}
.presu-medida__cifra input:focus { outline: 0; }
.presu-medida__cifra span { font-size: .9rem; color: var(--tinta-suave); }

.presu-contador {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--linea);
    border-radius: 3px;
    background: var(--blanco);
    overflow: hidden;
}
.presu-contador__boton {
    width: 46px;
    border: 0;
    background: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--verde);
    cursor: pointer;
    transition: background var(--transicion);
}
.presu-contador__boton:hover { background: var(--crema); }
.presu-contador input {
    width: 4ch;
    padding: .8rem 0;
    border: 0;
    border-inline: 1px solid var(--linea);
    background: none;
    font-family: var(--serif);
    font-size: 1.25rem;
    text-align: center;
    color: var(--tinta);
}
.presu-contador input:focus { outline: 0; }

/* Quitar las flechitas nativas de los number */
.presu-medida__cifra input::-webkit-outer-spin-button,
.presu-medida__cifra input::-webkit-inner-spin-button,
.presu-contador input::-webkit-outer-spin-button,
.presu-contador input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.presu-medida__cifra input, .presu-contador input { -moz-appearance: textfield; }

/* ---------- Navegación entre pasos ---------- */
.presu-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-top: 2rem;
    border-top: 1px solid var(--linea);
}
/* Sin JavaScript se ven los cinco pasos seguidos, asi que Atras y Siguiente
   sobran. Solo con JS aparecen. Todo con clases: si aqui se usa un id, pesa
   mas que la clase y el boton se queda oculto para siempre. */
.presu-nav__paso { display: none; }
.con-js .presu-nav__paso { display: inline-flex; }
.presu-nav [hidden] { display: none; }
.presu-nav__siguiente { margin-left: auto; }

/* ---------- Ficha del precio ---------- */
.presu-ficha {
    padding: clamp(1.8rem, 3vw, 2.4rem);
    background: var(--crema-hueso);
    border: 1px solid var(--linea);
    border-radius: 3px;
    box-shadow: 0 24px 60px rgba(54, 54, 54, .07);
}
.presu-ficha .antetitulo { margin-bottom: .8rem; }

.presu-ficha__cifra {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    line-height: 1.2;
    color: var(--verde-hondo);
    margin: 0 0 .3rem;
}
.presu-ficha__concepto {
    margin: 0;
    font-size: .8rem;
    color: var(--tinta-suave);
}

.presu-ficha__obra {
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--linea);
}
.presu-ficha__obra-titulo {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dorado-hondo);
    margin-bottom: .35rem;
}
.presu-ficha__obra strong {
    display: block;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--tinta);
}
.presu-ficha__obra-nota {
    display: block;
    margin-top: .5rem;
    font-size: .78rem;
    line-height: 1.55;
    color: var(--tinta-suave);
}

.presu-desglose { margin-top: 1.6rem; }
.presu-desglose summary {
    cursor: pointer;
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--verde);
    padding-block: .4rem;
}
.presu-desglose summary::marker { color: var(--arena); }
.presu-desglose ul {
    list-style: none;
    margin: .9rem 0 0;
    padding: 0;
    display: grid;
    gap: .55rem;
    font-size: .87rem;
}
.presu-desglose li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--tinta-suave);
}
.presu-desglose li span:last-child { color: var(--tinta); white-space: nowrap; }
.presu-desglose li.es-nota { font-style: italic; }

.presu-nota {
    margin: 1.6rem 0 0;
    padding-top: 1.3rem;
    border-top: 1px solid var(--linea);
    font-size: .78rem;
    line-height: 1.6;
    color: var(--tinta-suave);
}

/* ---------- Pantalla de gracias ---------- */
.presu-gracias {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem);
    background: var(--crema-hueso);
    border: 1px solid var(--linea);
    border-radius: 3px;
}
.presu-gracias__marca { color: var(--verde); margin-bottom: 1.5rem; }
.presu-gracias__marca svg { width: 56px; height: 56px; margin-inline: auto; }
.presu-gracias__cifra {
    font-family: var(--serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    color: var(--verde-hondo);
    margin: 1.5rem 0 .4rem;
}
.presu-gracias__pie {
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tinta-suave);
    margin-bottom: 1.8rem;
}
.presu-gracias__obra {
    padding: 1rem 1.2rem;
    background: var(--crema);
    border-radius: 3px;
    font-size: .92rem;
    margin-bottom: 1.8rem;
}
.presu-gracias__botones {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ---------- Adaptación ---------- */
@media (max-width: 1080px) {
    .presu__reja { grid-template-columns: 1fr; }
    .con-js .presu__panel {
        position: sticky;
        top: auto;
        bottom: 0;
        order: -1;
        margin-bottom: 1rem;
    }
    .presu-ficha { box-shadow: 0 -10px 30px rgba(54, 54, 54, .08); }
    .presu-ficha__obra-nota, .presu-nota { display: none; }
    .presu-ficha__cifra { font-size: 1.6rem; }
}

@media (max-width: 640px) {
    .presu-opciones, .presu-opciones--compacto { grid-template-columns: 1fr; }
    .presu-op__caja { padding: 1.1rem 1.2rem; }
    .presu-icono { width: 26px; height: 26px; margin-bottom: .6rem; }
    .presu-nav { flex-direction: column-reverse; }
    .presu-nav button { width: 100%; justify-content: center; }
    .presu-nav__siguiente { margin-left: 0; }
}

/* =========================================================
   Aviso de cookies
   ========================================================= */
.cookies {
    position: fixed;
    left: clamp(1rem, 2.5vw, 1.6rem);
    right: clamp(1rem, 2.5vw, 1.6rem);
    bottom: clamp(1rem, 2.5vw, 1.6rem);
    z-index: 220;
    max-width: 460px;
    padding: 1.7rem 1.9rem;
    background: var(--crema-hueso);
    border: 1px solid var(--linea);
    border-radius: 3px;
    box-shadow: 0 20px 50px rgba(52, 34, 22, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity var(--transicion), visibility var(--transicion), transform var(--transicion);
}
.cookies[data-abierto] { opacity: 1; visibility: visible; transform: none; }

.cookies__titulo {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 400;
    margin: 0 0 .55em;
    color: var(--tinta);
}
.cookies__texto {
    font-size: .88rem;
    line-height: 1.65;
    color: var(--tinta-suave);
    margin: 0 0 .35em;
}
.cookies__enlace {
    display: inline-block;
    font-size: .82rem;
    color: var(--dorado-hondo);
    text-decoration: underline;
    text-underline-offset: .18em;
    margin-bottom: 1.2rem;
}
.cookies__enlace:hover, .cookies__enlace:focus-visible { color: var(--verde-hondo); }

.cookies__botones {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}
.cookies__botones .boton {
    padding: .85em 1.6em;
    font-size: .72rem;
}
.cookies__botones .boton--linea {
    border-color: var(--linea);
    color: var(--tinta-suave);
}
.cookies__botones .boton--linea:hover,
.cookies__botones .boton--linea:focus-visible {
    background: var(--tinta);
    color: var(--crema);
    border-color: var(--tinta);
}

/* Enlace del pie para reabrir preferencias */
.pie__preferencias {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .18em;
    cursor: pointer;
}
.pie__preferencias:hover, .pie__preferencias:focus-visible { color: var(--dorado); }

@media (max-width: 560px) {
    .cookies {
        left: .7rem;
        right: .7rem;
        bottom: .7rem;
        padding: 1.4rem 1.5rem;
        max-width: none;
    }
    .cookies__botones { flex-direction: column-reverse; }
    .cookies__botones .boton { width: 100%; justify-content: center; }
}
