/* Villa Sparto – lime-washed white, Aegean blue, carved-stone headings */

/* Fonts are served from this site (latin subset, from Google Fonts), so the
   page doesn't wait on two other servers before it can draw any text.
   Hanken Grotesk is a variable font: one file covers weights 300–500. */
@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url("../fonts/hanken-grotesk-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: "Marcellus";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/marcellus-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;
}

:root {
    --white: #ffffff;
    --limewash: #f2f5f4;
    --ink: #14232e;
    --ink-soft: #4f5f69;
    --aegean: #1d5c7e;
    --aegean-deep: #154760;
    --line: #dce2e3;

    --serif: "Marcellus", "Times New Roman", serif;
    --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 48px);
    --section: clamp(80px, 11vw, 160px);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.005em;
}

p { margin: 0 0 1em; }
.prose p:last-child,
.feature p:last-child,
.plan-text p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--aegean);
    outline-offset: 3px;
}

.wrap {
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.wrap-wide {
    max-width: calc(1480px + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.muted { color: var(--ink-soft); }

.section { padding: var(--section) 0; }

.section-title {
    font-size: clamp(2rem, 3.6vw, 3rem);
    margin-bottom: 0.6em;
}

.prose { max-width: 62ch; color: var(--ink-soft); }

.text-link {
    color: var(--aegean);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color .2s;
}
.text-link:hover { color: var(--aegean-deep); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    border: 0;
    border-radius: 999px;
    background: var(--aegean);
    color: var(--white);
    font: 500 1rem/1 var(--sans);
    padding: 1.05em 1.8em;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s var(--ease);
}
.btn:hover { background: var(--aegean-deep); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-small { padding: .8em 1.3em; font-size: .9rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 72px;
}

.wordmark {
    font-family: var(--serif);
    font-size: 1.4rem;
    text-decoration: none;
    letter-spacing: .01em;
    margin-right: auto;
}

.nav { display: flex; gap: 2rem; }
.nav a {
    text-decoration: none;
    font-size: .95rem;
    color: var(--ink-soft);
    transition: color .2s;
}
.nav a:hover { color: var(--ink); }

@media (max-width: 860px) {
    .nav { display: none; }
}

/* Hero */
.hero { padding-top: clamp(32px, 5vw, 64px); }

.hero-title {
    font-size: clamp(2.6rem, 6vw, 5.25rem);
    line-height: 1.02;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: block; }

.hero-place {
    margin: 1.2rem 0 clamp(32px, 4vw, 48px);
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.hero-figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 21 / 9;
    background: var(--limewash);
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 80%;
}

/* The two "doors" that slide into the walls to reveal the view */
.door {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.5%;
    background: var(--limewash);
    display: none;
}
.door-left { left: 0; box-shadow: inset -1px 0 0 var(--line); }
.door-right { right: 0; box-shadow: inset 1px 0 0 var(--line); }
.anim .door { display: block; }
.anim .hero-title .line > span,
.anim .hero-place { visibility: hidden; }

@media (max-width: 640px) {
    .hero-figure { aspect-ratio: 4 / 5; }
    .hero-img { object-position: 30% 50%; }
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    border-bottom: 1px solid var(--line);
}
.facts > div {
    padding: 28px 0 32px;
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
}
.facts > div + div { padding-left: clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); font-size: .95rem; }
.facts dd { margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }

@media (max-width: 640px) {
    .facts { grid-template-columns: 1fr 1fr; }
    .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(40px, 7vw, 120px);
    align-items: start;
}
.about-lead {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.25;
}
@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* The house */
.house { background: var(--limewash); }

.house-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 96px);
}

.house-media { position: relative; }
.house-frame {
    position: sticky;
    top: 112px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    background: var(--line);
}
.house-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .9s var(--ease), transform 1.4s var(--ease);
}
.house-frame img.is-active { opacity: 1; transform: scale(1); }

.feature {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    color: var(--ink-soft);
    max-width: 52ch;
}
.feature h3 {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    color: var(--ink);
    margin-bottom: .7em;
}
.feature-img { display: none; }

@media (max-width: 860px) {
    .house-grid { grid-template-columns: 1fr; gap: 0; }
    .house-media { display: none; }
    .feature { min-height: 0; padding: 0 0 64px; }
    .feature-img {
        display: block;
        width: 100%;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        border-radius: 4px;
        margin-bottom: 24px;
    }
}

/* Amenities */
.amenities { padding-bottom: 0; }
.amenities-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(32px, 6vw, 96px);
}
.amenity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(24px, 4vw, 56px);
}
.amenity-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
}
.line-icon {
    flex: none;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--aegean);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 860px) {
    .amenities-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .amenity-list { grid-template-columns: 1fr; }
}

/* Gallery: every tile is cropped to the same 3:2 frame */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.section-head .section-title { margin-bottom: 0; }
.section-head p { margin: 0; }

.gallery-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.gallery-grid li { aspect-ratio: 3 / 2; }
.gallery-grid .g-feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

.gallery-grid button {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--limewash);
    cursor: zoom-in;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease), opacity .3s;
}
.gallery-grid button:hover img { transform: scale(1.04); }

@media (max-width: 860px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Plans */
.plans { background: var(--limewash); }

.plan-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
}
.plan-row + .plan-row { margin-top: clamp(64px, 8vw, 120px); }

.plan-figure {
    margin: 0;
    background: var(--white);
    border-radius: 4px;
    padding: clamp(16px, 3vw, 40px);
}
.plan-figure img { width: 100%; height: auto; }

.plan-text { color: var(--ink-soft); max-width: 46ch; }
.plan-text h3 {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    color: var(--ink);
    margin-bottom: .6em;
}

@media (max-width: 860px) {
    .plan-row { grid-template-columns: 1fr; }
}

/* Location */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
}
.distances { margin: 2rem 0 0; }
.distances > div {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.distances > div:last-child { border-bottom: 1px solid var(--line); }
.distances dt { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); }
.distances dd { margin: 0; font-family: var(--serif); font-size: 1.3rem; }

.map-frame {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--limewash);
}
.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(.55) contrast(1.02);
}
@media (max-width: 860px) {
    .location-grid { grid-template-columns: 1fr; }
}

/* Contact */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    border-top: 1px solid var(--line);
}
.contact-photo { position: relative; overflow: hidden; }
.contact-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-body {
    padding: var(--section) var(--gutter);
    padding-left: clamp(24px, 6vw, 96px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
}
.contact-body > .muted { margin-bottom: 2rem; }

@media (max-width: 860px) {
    .contact { grid-template-columns: 1fr; min-height: 0; }
    .contact-photo { aspect-ratio: 3 / 2; }
    .contact-body { padding: 64px var(--gutter) 80px; }
}

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .9rem; color: var(--ink-soft); }
.field input {
    width: 100%;
    font: 400 1.05rem var(--sans);
    color: var(--ink);
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    transition: border-color .25s;
}
.field input:focus { outline: none; border-bottom-color: var(--aegean); }
.field input:focus-visible { box-shadow: 0 1px 0 var(--aegean); }
.field input[aria-invalid="true"] { border-bottom-color: #b3261e; }
.form .btn { justify-self: start; margin-top: 12px; }
.turnstile:empty { display: none; }
.form-error { color: #b3261e; margin: 0; }

/* Form and success message share one cell, so swapping them keeps the height */
.form-stage { display: grid; }
.form-stage > * { grid-area: 1 / 1; }
.form { transition: opacity .4s var(--ease), visibility 0s .4s; }
.form-success {
    align-self: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s var(--ease) .35s, transform .6s var(--ease) .35s;
}
.form-stage.is-sent .form { opacity: 0; visibility: hidden; }
.form-stage.is-sent .form-success { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .form, .form-success { transition: none; }
}

.form-success h3 { font-size: 1.8rem; margin-bottom: .4em; outline: none; }
.form-success p { color: var(--ink-soft); }

/* intl-tel-input, restyled to match the underlined fields */
.iti { display: block; width: 100%; }
.iti input[type="tel"] { padding-left: 52px !important; }
.iti__flag-container { padding: 0; }
.iti__selected-flag { padding: 0 8px 0 0; background: transparent !important; }
.iti__country-list {
    z-index: 30;
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(20, 35, 46, .12);
    font-family: var(--sans);
}

.direct {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.direct p { margin: 0; }
.direct-name { font-family: var(--serif); font-size: 1.3rem; margin: 4px 0 2px !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 28px;
    padding-bottom: 28px;
}
.site-footer .wordmark { margin: 0; font-size: 1.2rem; }

/* Lightbox */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, .97);
    color: var(--ink);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }

.lightbox figure {
    margin: 0;
    display: grid;
    gap: 14px;
    max-width: calc(100vw - 160px);
}
.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 2px;
    margin: 0 auto;
}
.lightbox figcaption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink-soft);
    font-size: .95rem;
}

.lb-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    transition: border-color .2s;
}
.lb-btn:hover { border-color: var(--ink); }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 860px) {
    .lightbox figure { max-width: calc(100vw - 32px); }
    .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
    .lb-prev { left: calc(50% - 60px); }
    .lb-next { right: calc(50% - 60px); }
    .lightbox img { max-height: calc(100vh - 200px); }
}
