/* ============================================================
   FERNHAVEN — design study
   Two-tone highland palette: dark umber / woven tan
   ============================================================ */

:root {
  --ink: #2b2620;
  --ink-soft: #353028;
  --tan: #b3a489;
  --tan-deep: #a2937a;
  --cream: #d9cbae;
  --indigo: #232c45;
  --serif: "Cormorant Garamond", serif;
  --mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  overflow-x: hidden;
}

::selection { background: var(--cream); color: var(--ink); }

canvas { display: block; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.8;
}

.section-mark {
  text-align: center;
  opacity: 0.55;
  margin-bottom: 4rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9em 1.8em;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  transition: background 0.35s, color 0.35s;
}
.btn--outline {
  border: 1px solid currentColor;
  color: inherit;
}
.btn--outline:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn--solid {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
}
.btn--solid:hover { background: transparent; color: var(--ink); }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.loader__weave { width: 99vw; margin-bottom: -1.5vh; }
.loader__tagline {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.7;
}
.loader__tagline em { font-style: italic; text-transform: lowercase; letter-spacing: 0.15em; }
.loader__progress {
  position: absolute;
  bottom: 36vh;
  right: 3rem;
  font-family: var(--mono);
  font-size: 2.4rem;
  color: var(--tan);
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.2rem;
  mix-blend-mode: difference;
  color: #e8ddc4;
}
.header a, .header button {
  color: inherit;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.header__left, .header__right { display: flex; align-items: center; gap: 2.2rem; flex: 1; }
.header__right { justify-content: flex-end; }
.header__brand {
  font-size: 15px;
  letter-spacing: 0.5em;
  font-weight: 500;
}
.header__menu-btn { display: flex; align-items: center; gap: 0.8rem; }
.header__menu-icon { display: flex; flex-direction: column; gap: 5px; }
.header__menu-icon i { display: block; width: 26px; height: 1px; background: currentColor; }
.header__lang span { opacity: 0.45; }
.header .btn--outline { padding: 0.7em 1.5em; }

/* ============================================================
   MENU OVERLAY
   ============================================================ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--tan);
  color: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 8vw;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__close {
  position: absolute;
  top: 1.8rem; right: 2.2rem;
  background: none; border: none; cursor: pointer;
  color: var(--ink);
}
.menu__list {
  list-style: none;
  counter-reset: m;
  position: relative;
  z-index: 2;
}
.menu__list a {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  transition: transform 0.4s, opacity 0.4s;
}
.menu__list a::before {
  content: attr(data-i);
  font-family: var(--mono);
  font-size: 11px;
  vertical-align: super;
  margin-right: 1em;
  opacity: 0.5;
}
.menu__list a:hover { transform: translateX(0.6em); opacity: 0.6; }
.menu__weave {
  position: absolute;
  right: 4vw; bottom: 0;
  width: min(40vw, 540px);
  opacity: 0.9;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 3vw 10vh;
  text-align: center;
}
.hero__eyebrow { opacity: 0.8; margin-bottom: 2rem; }
.hero__wordmark { width: 100%; margin: 0 auto; }
.hero__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 3.5rem;
  text-align: left;
  opacity: 0.85;
}
.hero__meta p:nth-child(2) { text-align: center; }
.hero__meta p:nth-child(3) { text-align: right; }
.hero__scroll {
  position: absolute;
  left: 2.2rem; bottom: 2.2rem;
  opacity: 0.6;
  z-index: 2;
}

/* ============================================================
   PROLOGUE  (dark, scattered serif)
   ============================================================ */
.prologue {
  position: relative;
  padding: 22vh 10vw 26vh;
  text-align: center;
}
.scatter {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 32ch;
  margin: 0 auto;
}
.scatter .w { display: inline-block; white-space: pre; }
.scatter .w i { display: inline-block; font-style: normal; }
.prologue__birds {
  position: absolute;
  top: 10vh; right: 8vw;
  width: 180px;
  opacity: 0.8;
}

/* ============================================================
   CONCEPT  (dark left text / photo right)
   ============================================================ */
.concept {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4vw;
  padding: 8vh 0 0 6vw;
  align-items: end;
}
.concept__lede { max-width: 42ch; opacity: 0.85; }
.concept__frame {
  margin-top: 8vh;
  width: min(280px, 60%);
  border: 1px solid rgba(217, 203, 174, 0.35);
  padding: 1rem;
}
.concept__frame canvas { width: 100%; }
.concept__frame figcaption { margin-top: 0.8rem; opacity: 0.6; }
.photo-block {
  background: var(--ink-soft);
  overflow: hidden;
}
.photo-block canvas { width: 100%; height: 100%; object-fit: cover; }
.photo-block--indigo { background: var(--indigo); }
.concept__photo { height: 78vh; }

/* ============================================================
   LOCATION  (dark map / tan info)
   ============================================================ */
.location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.location__map {
  position: relative;
  background: #221e19;
  overflow: hidden;
}
.location__contours { width: 100%; height: 100%; }
.location__pin {
  position: absolute;
  top: 46%; left: 42%;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--tan);
  border-bottom: 1px solid var(--tan);
}
.location__poi {
  position: absolute;
  top: var(--y); left: var(--x);
  opacity: 0.55;
}
.location__poi::before { content: "✛ "; }
.location__addr {
  position: absolute;
  left: 2rem; bottom: 2rem;
  opacity: 0.6;
}
.location__info {
  background: var(--tan);
  color: var(--ink);
  padding: 10vh 5vw;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: flex-start;
}
.location__lede { max-width: 40ch; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  margin-top: auto;
}
.stat-card {
  border: 1px solid rgba(43, 38, 32, 0.35);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  min-height: 240px;
}
.stat-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 4vw, 4rem);
  margin-top: auto;
}
.stat-card__unit { font-size: 0.4em; letter-spacing: 0.15em; margin-left: 0.2em; }
.stat-card--photo { padding: 0; border: none; background: var(--ink); }
.stat-card--photo canvas { width: 100%; height: 100%; }

/* ============================================================
   ACTIVITIES (dark, waterfall weave)
   ============================================================ */
.activities {
  position: relative;
  padding: 20vh 8vw 0;
  text-align: center;
  overflow: hidden;
}
.activities .btn { margin-top: 3rem; position: relative; z-index: 2; }
.activities__falls {
  width: min(70vw, 800px);
  margin: -6vh auto 0;
}

/* ============================================================
   WHY (tan interlude)
   ============================================================ */
.why {
  position: relative;
  background: var(--tan);
  color: var(--ink);
  padding: 26vh 8vw;
  text-align: center;
  overflow: hidden;
}
.why__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 2;
}
.why__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.why .section-mark { position: relative; z-index: 2; }

/* ============================================================
   AMENITIES (tan, alternating photo rows)
   ============================================================ */
.amenities {
  background: var(--tan);
  color: var(--ink);
  padding: 4vh 6vw 16vh;
  display: flex;
  flex-direction: column;
  gap: 14vh;
}
.amenity {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5vw;
  align-items: center;
}
.amenity--rev { grid-template-columns: 1fr 1.2fr; }
.amenity--rev .amenity__photo { order: 2; }
.amenity__photo { height: 62vh; }
.amenity__body h3 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.2rem 0;
}
.amenity__body .label { max-width: 38ch; opacity: 0.8; }
.amenity__index { opacity: 0.5; }

/* ============================================================
   RESIDENCES (tan)
   ============================================================ */
.residences {
  background: var(--tan);
  color: var(--ink);
  padding: 14vh 6vw;
}
.residences .section-mark { opacity: 0.5; }
.residences__title { margin-bottom: 12vh; }
.residences__grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.1fr;
  gap: 4vw;
  align-items: start;
}
.residences__types { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.residences__types-head { opacity: 0.5; margin-bottom: 1rem; }
.residences__types button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.residences__types button:hover, .residences__types button.is-active { opacity: 1; }
.residences__area {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 6vw, 5.4rem);
}
.residences__area sup { font-size: 0.4em; }
.residences__specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0;
}
.residences__specs li {
  border: 1px solid rgba(43, 38, 32, 0.4);
  border-radius: 999px;
  padding: 0.5em 1.1em;
}
.residences__note { max-width: 34ch; opacity: 0.75; margin-bottom: 2rem; }
.residences__price { opacity: 0.9; }
.residences__photo { height: 64vh; }

/* ============================================================
   TIMELINE (tan→photo band)
   ============================================================ */
.timeline {
  background: var(--tan);
  color: var(--ink);
  padding: 0 0 16vh;
}
.timeline__photo { height: 56vh; }
.timeline__years {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3vw;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  padding: 6vh 0 4vh;
}
.timeline__dash { width: 12vw; height: 1px; background: currentColor; opacity: 0.5; }
.timeline__panel {
  width: min(560px, 86vw);
  margin: 0 auto;
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 2rem;
}
.timeline__row {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(217, 203, 174, 0.18);
}
.timeline__row:last-child { border-bottom: none; }

/* ============================================================
   DEVELOPER (dark)
   ============================================================ */
.developer {
  position: relative;
  padding: 20vh 8vw 0;
  text-align: center;
  overflow: hidden;
}
.developer__eyebrow { opacity: 0.5; margin-bottom: 6vh; }
.developer__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2vw;
  margin-top: 14vh;
  text-align: left;
  position: relative;
  z-index: 2;
}
.dev-stat h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 8vw, 7rem);
  border-bottom: 1px solid rgba(217, 203, 174, 0.3);
  margin-bottom: 1rem;
}
.dev-stat p { opacity: 0.65; }
.developer__ridge {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: min(88vw, 1240px);
  opacity: 0.75;
  z-index: 0;
}
.developer__eyebrow, .developer .scatter { position: relative; z-index: 2; }
.developer { padding-bottom: 14vh; }

/* ============================================================
   GALLERY (dark)
   ============================================================ */
.gallery { padding: 14vh 0 10vh; overflow: hidden; position: relative; }
.gallery__card {
  position: absolute;
  left: 4vw;
  top: calc(14vh + 64vh - 210px);
  width: 280px;
  background: var(--tan);
  color: var(--ink);
  padding: 1.8rem 1.6rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
}
.gallery__card-head {
  border-bottom: 1px solid rgba(43, 38, 32, 0.35);
  padding-bottom: 0.8rem;
  width: 100%;
}
.gallery__card > .label:not(.gallery__card-head) { opacity: 0.75; }
.gallery__track {
  display: flex;
  gap: 2vw;
  padding-left: 6vw;
  cursor: grab;
}
.gallery__track:active { cursor: grabbing; }
.gallery__slide {
  flex: 0 0 min(72vw, 980px);
  height: 64vh;
  position: relative;
}
.gallery__slide figcaption {
  position: absolute;
  left: 1.4rem; bottom: 1.2rem;
  opacity: 0.8;
}
.gallery__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 6vw 0;
}
.gallery__arrow {
  background: none;
  border: 1px solid rgba(217, 203, 174, 0.4);
  border-radius: 999px;
  color: var(--cream);
  width: 52px; height: 52px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.gallery__arrow:hover { background: var(--cream); color: var(--ink); }
.gallery__note {
  max-width: 44ch;
  margin: 8vh auto 0;
  padding: 0 6vw;
  opacity: 0.6;
}

/* ============================================================
   NEWS (dark)
   ============================================================ */
.news { padding: 6vh 6vw 14vh; }
.news__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8vh;
}
.news__list { list-style: none; max-width: 920px; }
.news__row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 2.5rem;
  align-items: baseline;
  padding: 1.8rem 0;
  border-top: 1px solid rgba(217, 203, 174, 0.2);
  cursor: pointer;
}
.news__row:last-child { border-bottom: 1px solid rgba(217, 203, 174, 0.2); }
.news__row .label { opacity: 0.5; }
.news__row p {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: opacity 0.3s;
}
.news__row:hover p { opacity: 0.6; }
.news__arrow { font-family: var(--mono); opacity: 0.6; }

/* ============================================================
   CTA (dark pines + tan panel)
   ============================================================ */
.cta {
  position: relative;
  padding: 10vh 6vw 18vh;
  overflow: hidden;
}
.cta__pines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.cta__panel {
  position: relative;
  z-index: 2;
  width: min(620px, 92vw);
  margin: 14vh auto 0;
  background: var(--tan);
  color: var(--ink);
  padding: 4rem 3.4rem;
  text-align: center;
}
.cta__panel > .label { opacity: 0.8; }
.cta__dots { margin: 2.4rem 0; letter-spacing: 0.6em; }
.cta__panel h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3rem;
}
.cta__form { display: flex; flex-direction: column; gap: 1rem; }
.cta__form input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(43, 38, 32, 0.45);
  padding: 0.9em 0.2em;
  color: var(--ink);
  outline: none;
}
.cta__form input::placeholder { color: rgba(43, 38, 32, 0.55); }
.cta__form .btn { margin-top: 1.6rem; }
.cta__figures {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 3rem;
  opacity: 0.7;
}

/* ============================================================
   FAQ (dark)
   ============================================================ */
.faq { padding: 16vh 8vw; }
.faq__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  margin-bottom: 12vh;
}
.faq__letter {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
}
.faq__head .label { opacity: 0.55; }
.faq__list { max-width: 760px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid rgba(217, 203, 174, 0.2); }
.faq__item summary {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 1.6rem 0;
  cursor: pointer;
  font-size: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary span { opacity: 0.45; }
.faq__item summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  transition: transform 0.3s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 0 1.8rem 5.4rem; opacity: 0.7; max-width: 52ch; }

/* ============================================================
   FOOTER (dark)
   ============================================================ */
.footer {
  padding: 10vh 6vw 2vh;
  position: relative;
}
.footer__sheep { width: 240px; margin: 0 auto 8vh; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2vw;
  border-top: 1px solid rgba(217, 203, 174, 0.2);
  padding-top: 3rem;
}
.footer__cols p:first-child { opacity: 0.45; margin-bottom: 0.8rem; }
.footer__wordmark { width: 100%; margin-top: 8vh; }
.footer__fine { opacity: 0.35; text-align: center; padding: 2rem 0 1rem; }

/* ============================================================
   TEXTURE — film grain + ragged weave edges
   ============================================================ */
.grain {
  position: fixed;
  inset: -20px;
  z-index: 85;
  pointer-events: none;
  background-repeat: repeat;
  opacity: 0.55;
}
.why::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 48px;
  background-repeat: repeat-x;
  pointer-events: none;
  z-index: 3;
}
.why::before { top: -47px; background-image: var(--edge-up); }
.timeline { position: relative; }
.timeline::after { bottom: -47px; background-image: var(--edge-down); }

/* ============================================================
   FLOATING UI
   ============================================================ */
.cookies {
  position: fixed;
  left: 2rem; bottom: 2rem;
  z-index: 60;
  width: 280px;
  background: var(--tan);
  color: var(--ink);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.cookies__head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(43, 38, 32, 0.35);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}
.cookies button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.cookies p { opacity: 0.75; }
.cookies__ok { display: block; margin-top: 1rem; }
.cookies__ok span { display: block; }
.cookies.is-hidden { display: none; }

.invest-badge {
  position: fixed;
  right: 2rem; bottom: 2rem;
  z-index: 60;
  width: 110px; height: 110px;
  display: block;
}
.invest-badge svg { width: 100%; height: 100%; overflow: visible; }
.invest-badge__text {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--cream);
}
.invest-badge__arrow { font-size: 20px; fill: var(--cream); }
.invest-badge:hover .invest-badge__arrow { fill: var(--tan); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .concept, .location, .amenity, .amenity--rev { grid-template-columns: 1fr; }
  .amenity--rev .amenity__photo { order: 0; }
  .concept { padding-right: 6vw; }
  .concept__photo, .amenity__photo, .residences__photo { height: 52vh; }
  .residences__grid { grid-template-columns: 1fr; gap: 3rem; }
  .developer__stats { grid-template-columns: repeat(2, 1fr); gap: 3rem 4vw; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 4vw; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .stat-card--photo { display: none; }
  .hero__meta { flex-direction: column; gap: 1.4rem; }
  .hero__meta p { text-align: left !important; }
  .header__aero { display: none; }
  .cookies { left: 1rem; bottom: 1rem; width: 240px; }
  .invest-badge { right: 1rem; bottom: 1rem; width: 84px; height: 84px; }
  .gallery__card { position: static; width: auto; margin: 2rem 6vw 0; }
  .news__row { grid-template-columns: 80px 1fr auto; gap: 1.2rem; }
}
