/* 2 Old Pye Residency — site styles
   Palette taken from the apartments themselves: deep textile green, oak floors,
   plaster white, and the blue of the terrace chairs for anything clickable. */

:root {
  --ink: #16211c;
  --ink-soft: #46544c;
  --green: #1e4536;
  --green-deep: #12291f;
  --paper: #fbfaf7;
  --paper-alt: #edefea;
  --line: #d8ddd5;
  --sky: #1d7fae;
  --sky-dark: #14607f;
  --oak: #c8a27c;

  --measure: 34rem;
  --shell: 76rem;
  --gap: clamp(1.25rem, 4vw, 3rem);
  --band: clamp(4rem, 9vw, 7.5rem);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-optical-sizing: auto;
}

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

a { color: var(--sky-dark); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #fff; padding: 0.75rem 1rem; z-index: 100;
  font-family: var(--sans); font-size: 0.9rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 0;
}
.wordmark {
  font-family: var(--serif); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.01em; color: var(--ink); text-decoration: none; line-height: 1.2;
}
.wordmark span { display: block; font-family: var(--sans); font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.04em; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav a {
  font-family: var(--sans); font-size: 0.9rem; color: var(--ink);
  text-decoration: none; padding: 0.3rem 0; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible { border-bottom-color: var(--oak); }
.nav a[aria-current="page"] { border-bottom-color: var(--green); }

.nav-toggle {
  display: none; font-family: var(--sans); font-size: 0.88rem;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  padding: 0.4rem 0.7rem; color: var(--ink); cursor: pointer;
}

@media (max-width: 42rem) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 0.6rem 0; width: 100%; }
}

/* ---------- hero ---------- */

.hero { position: relative; isolation: isolate; background: var(--green-deep); }
.hero img {
  width: 100%; height: clamp(24rem, 78vh, 46rem); object-fit: cover;
  opacity: 0.92;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 17, 0.82) 0%, rgba(10, 22, 17, 0.25) 45%, rgba(10, 22, 17, 0.05) 100%);
}
.hero__text {
  position: absolute; bottom: clamp(1.75rem, 5vw, 3.5rem); left: 0; right: 0; z-index: 2;
  color: #fff;
}
.hero__text h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem); line-height: 1.02;
  letter-spacing: -0.02em; margin: 0 0 0.6rem; max-width: 16ch;
  text-wrap: balance;
}
.hero__where {
  font-family: var(--sans); font-size: clamp(0.85rem, 1.6vw, 1rem);
  color: #e3e9e2; margin: 0; letter-spacing: 0.02em;
}
.hero--page img { height: clamp(16rem, 46vh, 26rem); }
.hero--page::after { background: linear-gradient(to top, rgba(10, 22, 17, 0.88) 0%, rgba(10, 22, 17, 0.42) 55%, rgba(10, 22, 17, 0.12) 100%); }
.hero--page h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 20ch; }

/* one orchestrated entrance, nothing else moves on its own */
.hero__text > * { animation: rise 900ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero__text > *:nth-child(2) { animation-delay: 140ms; }
@keyframes rise { from { opacity: 0; transform: translateY(1.1rem); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */

section { padding-block: var(--band); }
section + section { padding-top: 0; }
.band { padding-block: var(--band); }

.welcome {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 58rem) {
  .welcome { grid-template-columns: minmax(0, 15rem) minmax(0, var(--measure)); }
}
.welcome__lede {
  font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.45; font-style: italic; color: var(--green);
  margin: 0; border-top: 2px solid var(--oak); padding-top: 1rem;
}
.prose p { margin: 0 0 1.35em; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15;
  letter-spacing: -0.015em; margin: 0 0 1rem; max-width: 22ch;
}

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line); padding-bottom: 0.9rem;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.1;
  letter-spacing: -0.015em; margin: 0;
}
.section-head p { margin: 0; font-family: var(--sans); font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- feature rows ---------- */

.feature {
  display: grid; gap: var(--gap); align-items: center;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.feature:last-child { margin-bottom: 0; }
@media (min-width: 52rem) {
  .feature { grid-template-columns: 1.15fr 1fr; }
  .feature--flip .feature__media { order: 2; }
}
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature__body h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.2; margin: 0 0 0.6rem;
}
.feature__body p { margin: 0 0 1em; color: var(--ink-soft); max-width: 32rem; }
.feature__body p:last-child { margin-bottom: 0; }

/* ---------- gallery ---------- */

.grid-gallery { columns: 1; column-gap: 1rem; }
@media (min-width: 40rem) { .grid-gallery { columns: 2; } }
@media (min-width: 64rem) { .grid-gallery { columns: 3; column-gap: 1.25rem; } }

.shot {
  break-inside: avoid; margin: 0 0 1rem; padding: 0; border: 0;
  background: none; display: block; width: 100%; cursor: zoom-in;
  text-align: left; font: inherit; color: inherit;
}
.shot img { width: 100%; background: var(--paper-alt); }
.shot figcaption, .shot .cap {
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft);
  padding-top: 0.5rem; line-height: 1.45;
}
.shot:hover img { filter: brightness(1.04); }

.strip { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 52rem) { .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.strip img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(9, 20, 15, 0.94); padding: clamp(1rem, 4vw, 3rem);
  place-items: center;
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.lightbox figcaption {
  font-family: var(--sans); font-size: 0.88rem; color: #dfe6de;
  text-align: center; padding-top: 0.9rem;
}
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255, 255, 255, 0.1); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35); font-family: var(--sans);
  font-size: 1.1rem; line-height: 1; padding: 0.7rem 0.85rem; cursor: pointer;
  border-radius: 2px;
}
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- green band ---------- */

.living {
  background: var(--green-deep); color: #eef2ec;
}
.living h2 {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.12; margin: 0 0 1.2rem; max-width: 20ch; color: #fff;
}
.living p { max-width: var(--measure); color: #d5ded3; margin: 0 0 1.2em; }
.living__list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .living__list { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.living__list li { border-top: 1px solid rgba(200, 162, 124, 0.5); padding-top: 0.9rem; }
.living__list strong {
  display: block; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: #fff;
  margin-bottom: 0.25rem;
}
.living__list span { font-size: 0.95rem; color: #c7d2c5; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font-family: var(--sans); font-size: 0.95rem;
  padding: 0.8rem 1.6rem; border-radius: 2px; text-decoration: none;
  background: var(--green); color: #fff; border: 1px solid var(--green);
  cursor: pointer; transition: background 160ms ease, color 160ms ease;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn--light:hover { background: #fff; color: var(--green-deep); }

.cta { background: var(--paper-alt); }
.cta__inner { display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 52rem) { .cta__inner { grid-template-columns: 1fr auto; } }
.cta h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0 0 0.5rem; line-height: 1.15; max-width: 18ch;
}
.cta p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* ---------- tour ---------- */

.tour-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  min-height: 26rem; background: var(--green-deep); border: 1px solid var(--line);
}
.tour-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour-note {
  font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft);
  margin-top: 0.85rem;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 46rem) { .facts { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; } }
.facts li { border-top: 1px solid var(--line); padding-top: 0.85rem; }
.facts strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.08rem; }
.facts span { font-family: var(--sans); font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- form ---------- */

.form-layout { display: grid; gap: var(--gap); }
@media (min-width: 58rem) { .form-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); } }

.field { margin-bottom: 1.35rem; }
.field label {
  display: block; font-family: var(--sans); font-size: 0.88rem;
  margin-bottom: 0.35rem; color: var(--ink);
}
.field .hint { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--serif); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: 0.7rem 0.8rem; line-height: 1.5;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sky); outline: 2px solid rgba(29, 127, 174, 0.25); outline-offset: 0;
}
.field--pair { display: grid; gap: 1.35rem; }
@media (min-width: 40rem) { .field--pair { grid-template-columns: 1fr 1fr; } }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  font-family: var(--sans); font-size: 0.92rem; padding: 0.85rem 1rem;
  border-left: 3px solid var(--green); background: var(--paper-alt); margin-bottom: 1.5rem;
}
.form-status--error { border-left-color: #a8322a; background: #fbeeec; }
.form-status[hidden] { display: none; }

.aside-card {
  background: var(--paper-alt); padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 2px solid var(--green);
}
.aside-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin: 0 0 0.6rem; }
.aside-card p { margin: 0 0 1em; font-size: 0.98rem; color: var(--ink-soft); }
.aside-card p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.foot {
  background: var(--green-deep); color: #c7d2c5; padding-block: clamp(2.5rem, 5vw, 4rem);
  font-family: var(--sans); font-size: 0.9rem;
}
.foot__inner { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .foot__inner { grid-template-columns: 1fr auto; align-items: start; } }
.foot a { color: #fff; }
.foot__name { font-family: var(--serif); font-size: 1.1rem; color: #fff; margin: 0 0 0.3rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot small { display: block; margin-top: 1.5rem; color: #92a191; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
