/* Villa Sofia — stylesheet
   Palette: ink (cypress green-black), paper, pool blue, olive, limestone.
   Type: Bodoni Moda for headings, Figtree for text. */

:root {
  --ink: #1e2723;
  --ink-soft: #3d4a44;
  --paper: #f4f3ef;
  --paper-deep: #e8e6df;
  --stone: #cfcbc0;
  --pool: #2f6f7e;
  --pool-deep: #235662;
  --olive: #7d8a5c;
  --white: #ffffff;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 34rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }

p { margin: 0 0 1rem; }
a { color: var(--pool-deep); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--pool); }

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

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  color: var(--white);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-nav { display: flex; gap: 2rem; align-items: center; }
.site-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-nav a:hover { border-color: currentColor; }
.nav-cta {
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
}
.nav-cta:hover { background: rgba(255,255,255,.12); border-bottom-color: transparent !important; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; align-items: center;
}
.menu-toggle span { width: 26px; height: 1.5px; background: currentColor; transition: transform .25s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 15;
  background: var(--ink);
  padding: 6rem var(--gutter);
  flex-direction: column; gap: 1.5rem;
}
.mobile-nav a {
  color: var(--white); text-decoration: none;
  font-family: var(--serif); font-size: 2.25rem;
}
.mobile-nav.open { display: flex; }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,30,27,.35) 0%, rgba(20,30,27,0) 30%, rgba(20,30,27,0) 55%, rgba(20,30,27,.65) 100%);
}
.hero-text {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: clamp(2rem, 6vh, 4.5rem);
}
.hero-kicker {
  font-size: 1rem;
  margin: 0 0 .5rem .25rem;
  opacity: .9;
}
.hero-title {
  font-size: clamp(4rem, 14vw, 12rem);
  font-style: italic;
  font-weight: 400;
  line-height: .9;
  margin: 0 0 1.5rem -0.04em;
  letter-spacing: -0.02em;
}
.hero-scroll {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid rgba(255,255,255,.6);
  padding-bottom: 2px;
  margin-left: .25rem;
}
.hero-scroll:hover { color: var(--white); border-color: var(--white); }

/* ---------- Sections (shared) ---------- */

main > section { padding: clamp(4rem, 9vw, 8rem) var(--gutter); }

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head p { color: var(--ink-soft); font-size: 1.125rem; }

/* ---------- The estate ---------- */

.estate {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.estate-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  position: sticky; top: 2rem;
}
.estate-body { max-width: var(--measure); }
.estate-body p { color: var(--ink-soft); }
.estate-body .lead { color: var(--ink); }

.facts {
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--stone);
}
.facts > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--stone);
}
.facts dt { font-family: var(--serif); font-size: 1.2rem; }
.facts dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 860px) {
  .estate { grid-template-columns: 1fr; }
  .estate-image img { position: static; }
  .facts > div { grid-template-columns: 6.5rem 1fr; }
}

/* ---------- Gallery ---------- */

.gallery { background: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery-sub { font-size: 1.6rem; margin: 2.5rem 0 1rem; color: var(--ink-soft); }
.gallery-sub:first-of-type { margin-top: 0; }
.gallery-grid a { display: block; overflow: hidden; background: var(--paper-deep); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-grid .wide { grid-column: span 2; }
.gallery-grid .tall { grid-row: span 2; }

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; gap: 6px; }
}

/* ---------- Film ---------- */

.film { background: var(--ink); color: var(--white); }
.film .section-head p { color: rgba(255,255,255,.75); }
.film-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.film-frame { margin: 0; }
.film-frame video, .film-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}
.film-frame figcaption {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-top: .75rem;
  color: rgba(255,255,255,.9);
}
@media (max-width: 760px) { .film-grid { grid-template-columns: 1fr; } }

/* ---------- Location ---------- */

.location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.location-body { max-width: var(--measure); }
.distances { margin: 2rem 0 1.5rem; padding: 0; border-top: 1px solid var(--stone); }
.distances > div {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--stone);
}
.distances dt { color: var(--ink); }
.distances dd { margin: 0; color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: .95rem; }
.location-map img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.location-map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; }

@media (max-width: 860px) {
  .location { grid-template-columns: 1fr; }
  .location-map { order: -1; }
}

/* ---------- Services ---------- */

.services { background: var(--white); }
.services-list {
  list-style: none; margin: 0; padding: 0;
  max-width: 44rem;
  columns: 2; column-gap: 3rem;
}
.services-list li {
  break-inside: avoid;
  padding: .8rem 0;
  border-bottom: 1px solid var(--stone);
  color: var(--ink-soft);
}
@media (max-width: 640px) { .services-list { columns: 1; } }

/* ---------- Enquire ---------- */

.enquire {
  background: var(--pool);
  color: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.enquire-intro { max-width: 28rem; }
.enquire-intro p { color: rgba(255,255,255,.85); }
.enquire-intro a { color: var(--white); }
.contact-line { margin-top: 2rem; }
.contact-line p { margin: 0 0 .35rem; }

.enquiry-form { max-width: 40rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: .9rem; margin-bottom: .35rem; color: rgba(255,255,255,.85); }
.optional { color: rgba(255,255,255,.55); margin-left: .25rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: .8rem .9rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--white); outline-offset: 2px; }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 6rem; gap: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.button {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.8rem;
  cursor: pointer;
  transition: background .2s;
}
.button:hover { background: var(--white); }
.button[disabled] { opacity: .6; cursor: default; }

.form-status { margin-top: 1rem; min-height: 1.5em; }
.form-status.error { color: #ffd9c9; }

@media (max-width: 860px) {
  .enquire { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:last-child { grid-column: span 2; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--stone);
  font-size: .95rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }
.footer-main { flex: 1 1 18rem; }
.cin { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem !important; }
.footer-plaque { width: 150px; border-radius: 3px; }
.copyright { flex-basis: 100%; }
.wordmark-small { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); margin-bottom: .25rem !important; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20,30,27,.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button {
  position: absolute;
  background: none; border: 0; color: var(--white);
  font-size: 2.5rem; line-height: 1; cursor: pointer;
  width: 56px; height: 56px;
  opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .5rem; top: 50%; transform: translateY(-50%); }
