:root {
    color-scheme: light;
    --testo: #202020;
    --sfondo: #f0e9e2;
    --titoli: freight-big-pro, Georgia, serif;
    --corpo: Manrope, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--testo); font: 16px/1.6 var(--corpo); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font: 400 clamp(2.5rem, 5.2vw, 4.7rem)/.99 var(--titoli); margin: 0 0 .45em; }
p { margin: 0 0 1.15em; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid #3475b4; outline-offset: 4px; }
.salta { position: absolute; z-index: 4; left: 1rem; top: 1rem; transform: translateY(-200%); background: white; }
.salta:focus { transform: none; }
.testata { position: absolute; inset: 0 0 auto; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 1rem 1.8rem; color: #fff; }
.marchio img { display: block; width: clamp(110px, 13vw, 172px); height: auto; }
.apri-menu, .chiudi-menu { border: 0; background: none; color: inherit; padding: .5rem 0; justify-self: start; }
.apri-menu span { display: inline-block; margin-right: .55rem; }
.azione { display: inline-block; color: inherit; background: none; border: 0; border-bottom: 1px solid currentColor; padding: .43rem 0; text-decoration: none; text-transform: uppercase; }
.testata > .azione { justify-self: end; }
.video { position: relative; height: 100svh; min-height: 480px; background: #354139; }
.video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.azioni-rapide { position: absolute; bottom: 1rem; right: 1.8rem; display: flex; gap: 1rem; color: #fff; }
#menu-villa { width: 100%; height: 100%; max-height: 100%; max-width: 100%; margin: 0; background: var(--sfondo); color: var(--testo); border: none; }
#menu-villa::backdrop { background: #171913b8; }
.menu-interno { display: grid; max-width: 72rem; margin: auto; min-height: 90%; align-content: center; gap: 1.6rem; padding: 2rem; }
.chiudi-menu { position: absolute; top: 1rem; left: 2rem; }
.menu-interno nav:first-of-type a { display: block; font: 400 clamp(2rem, 5vw, 4.5rem)/1.1 var(--titoli); margin-bottom: .3em; text-decoration: none; }
.menu-interno nav a:hover { text-decoration: underline; }
.menu-interno nav:last-child, .contatti-rapidi { display: flex; flex-wrap: wrap; gap: 1rem; }
.introduzione { padding: clamp(3rem, 8vw, 6.25rem) 1.5rem; text-align: center; }
.introduzione h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.introduzione p { max-width: 50rem; margin-inline: auto; }
.introduzione-casale h2, .posizione h2 { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto-grande, .galleria.estesa .galleria-foto { height: min(74vw, 700px); min-height: 360px; }
.scheda-casale { position: relative; min-height: 430px; display: grid; place-items: center; isolation: isolate; color: #fff; text-align: center; }
.scheda-casale img { position: absolute; inset: 0; z-index: -2; }
.scheda-casale::after { content: ''; position: absolute; inset: 0; background: #17191360; z-index: -1; }
.scheda-casale > div { padding: 1.5rem; }
.contenitore { width: min(100% - 3rem, 74rem); margin-inline: auto; }
.appartamenti, .eventi { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(1.75rem, 6vw, 6rem); padding-block: clamp(3rem, 7vw, 7rem); }
.appartamenti h2, .eventi h2 { font-size: clamp(2.4rem, 4vw, 3.2rem); }
.appartamenti .galleria + .galleria { margin-top: 1rem; }
.galleria { position: relative; }
.galleria-foto { display: flex; overflow: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; height: clamp(230px, 38vw, 435px); }
.galleria-foto img { flex: 0 0 100%; scroll-snap-align: start; }
.galleria-comandi { position: absolute; right: 1rem; bottom: 1rem; display: flex; gap: .35rem; }
.galleria-comandi button { color: #202020; background: #fffffff0; border: 0; min-width: 44px; min-height: 44px; font-size: 1.6rem; line-height: 1; }
.mappa {
    width: 72%;
    margin: 5% auto;
}
.mappa iframe {
    display: block;
    width: 100%;
    height: 600px;
    border: 0;
}
.mappa iframe:not([src]),
.mappa iframe[src] + .mappa-alternativa {
    display: none;
}
.mappa-alternativa {
    display: grid;
    min-height: 15rem;
    place-content: center;
    padding: 1.5rem;
    background: var(--sfondo);
    text-align: center;
}
.mappa-azioni {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 1.25rem;
}
@media (max-width: 1024px) {
    .mappa { width: 100%; margin: 0; }
}
@media (max-width: 767px) {
    .mappa { width: 86%; margin: 0 auto 14%; }
    .mappa iframe { height: 350px; }
}
.contatti, .pie-pagina { color: white; background: var(--testo); text-align: center; padding: clamp(3rem, 6vw, 5rem) 1.5rem; }
.pigu-form { width: min(44rem, 100%); margin: 2rem auto 0; text-align: left; }
.griglia-modulo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.griglia-modulo label { display: flex; flex-direction: column; gap: .4rem; }
.griglia-modulo :is(input, select, textarea) { width: 100%; min-width: 0; background: #fff; color: #202020; border: 1px solid #d5ccc5; border-radius: 0; padding: .65rem; }
.riga-intera { grid-column: 1 / -1; }
.accettazione { display: flex; gap: .6rem; align-items: baseline; margin: 1.25rem 0; }
.pie-pagina { padding-top: 2rem; border-top: 1px solid #ffffff38; }
.pie-pagina img { display: block; margin: 0 auto 1.5rem; }
.pie-pagina a { display: inline-block; margin: .4rem; }
.documento-legale { padding: 3rem 1.5rem; margin: auto; max-width: 65rem; }
.documento-legale h1 { margin-top: .75em; }
.documento-legale div { white-space: pre-line; }
@media (max-width: 760px) {
    .testata { padding: .9rem 1rem; }
    .testata > .azione { font-size: .73rem; text-align: right; }
    .video { min-height: 430px; }
    .azioni-rapide { left: 1rem; right: 1rem; justify-content: center; }
    .appartamenti, .eventi, .griglia-modulo { grid-template-columns: 1fr; }
    .menu-interno { padding: 2rem 1rem; }
    .scheda-casale { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
    html, .galleria-foto { scroll-behavior: auto; }
}
