:root {
  --ink: #1c1814;
  --ink-soft: #4d463d;
  --muted: #7a7166;
  --paper: #f4efe6;
  --paper-2: #e8e0d2;
  --cream: #fbf8f2;
  --white: #fffdf8;
  --forest: #2a4536;
  --forest-deep: #173026;
  --sage: #6d8b75;
  --clay: #b85c38;
  --clay-soft: #d9a48a;
  --slate: #3a464e;
  --blue: #2c4a5e;
  --gold: #c4a36a;
  --line: rgba(28, 24, 20, 0.12);
  --shadow: 0 24px 60px rgba(28, 24, 20, 0.12);
  --radius: 22px;
  --header-h: 76px;
  --max: 1180px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--forest);
  color: var(--white);
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.kicker {
  display: inline-block;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clay);
}

h1,
h2,
h3,
.serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0 0 0.6em;
}

h3 {
  font-size: 1.55rem;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: var(--white);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.header.is-solid,
.header.page-header {
  background: rgba(251, 248, 242, 0.92);
  color: var(--ink);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-inner .nav {
  margin-left: auto;
}

.logo {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo small {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--clay);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-light {
  background: var(--white);
  color: var(--forest-deep);
}

.btn-dark {
  background: var(--forest);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.header-tools {
  order: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lang-switch a {
  text-decoration: none;
  opacity: 0.65;
  padding: 5px 8px;
  border-radius: 999px;
}

.lang-switch a:hover,
.lang-switch a[aria-current="page"] {
  opacity: 1;
}

.lang-switch a[aria-current="page"] {
  background: rgba(255, 253, 248, 0.2);
}

.header.is-solid .lang-switch a[aria-current="page"],
.header.page-header .lang-switch a[aria-current="page"] {
  background: var(--paper-2);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: inherit;
  width: 42px;
  height: 42px;
  padding: 0;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 7px;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  color: var(--white);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.28) 0%, rgba(20, 16, 12, 0.15) 38%, rgba(20, 16, 12, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 48px;
  padding-top: 8px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7vw, 6.2rem);
  max-width: 14ch;
  margin: 0.15em 0 0.25em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.95rem;
  opacity: 0.92;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.price-pill {
  display: inline-flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.14);
  border: 1px solid rgba(255, 253, 248, 0.28);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 14px 18px;
  margin: 18px 0 8px;
}

.price-pill strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
}

.price-pill span {
  font-size: 0.86rem;
  opacity: 0.85;
}

/* Facts */
.facts {
  background: var(--forest-deep);
  color: var(--paper);
  padding: 28px 0;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.fact small {
  display: block;
  color: var(--clay-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.fact b {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 96px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.split img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.checklist li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.checklist li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage);
  position: absolute;
  left: 0;
  top: 18px;
}

/* Apartments */
.apartments {
  background: var(--cream);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.card-body {
  padding: 28px;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

/* Gallery */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

.masonry {
  columns: 3;
  column-gap: 14px;
}

.masonry figure {
  break-inside: avoid;
  margin: 0 0 14px;
  position: relative;
}

.masonry button {
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  cursor: zoom-in;
}

.masonry img {
  width: 100%;
  border-radius: 16px;
}

.masonry figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(28, 24, 20, 0.62);
  color: var(--white);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Amenities */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.amenity {
  background: var(--white);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--line);
}

.amenity h3 {
  font-size: 1.25rem;
}

/* Garden band */
.band {
  position: relative;
  min-height: 70vh;
  color: var(--white);
  display: grid;
  align-items: end;
}

.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.05), rgba(20, 16, 12, 0.7));
}

.band-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 64px;
  max-width: 680px;
}

/* Location */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.map-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  border: 1px solid var(--line);
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

.place-list {
  display: grid;
  gap: 16px;
}

.place {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.place strong {
  display: block;
}

/* Costs */
.cost-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.cost-box,
.energy-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--line);
}

.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cost-row.total {
  font-family: var(--serif);
  font-size: 1.4rem;
  border-bottom: 0;
  padding-top: 18px;
}

.note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Energy */
.energy {
  background: var(--cream);
}

.scale {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  margin: 22px 0 18px;
}

.scale span {
  text-align: center;
  color: #1c1814;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 6px;
}

.scale .a-plus { background: #00a651; }
.scale .a { background: #4caf50; }
.scale .b { background: #8bc34a; }
.scale .c { background: #cddc39; }
.scale .d { background: #ffeb3b; }
.scale .e { background: #ffc107; }
.scale .f { background: #ff9800; }
.scale .g { background: #ff7043; outline: 3px solid var(--ink); outline-offset: 2px; }
.scale .h { background: #e53935; color: white; }

.energy-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 18px;
}

.energy-meta div {
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
}

.energy-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Contact */
.contact-card {
  max-width: 640px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-status {
  min-height: 1.4em;
  font-size: 0.92rem;
}

.form-status.ok {
  color: var(--forest);
}

.form-status.err {
  color: var(--clay);
}

/* Footer */
.footer {
  background: var(--forest-deep);
  color: #d7dece;
  padding: 48px 0 28px;
}

.footer a {
  color: var(--white);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bottom {
  padding-top: 18px;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Legal pages */
.legal {
  padding: 140px 0 80px;
}

.legal-doc {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0.2em 0 0.6em;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 1.6em;
}

.legal-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 13, 10, 0.92);
  color: white;
  display: none;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 86vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox figcaption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  opacity: 0.85;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .facts-grid,
  .split,
  .card-grid,
  .amenity-grid,
  .location-grid,
  .cost-grid,
  .energy-meta,
  .form-row {
    grid-template-columns: 1fr;
  }

  .masonry {
    columns: 2;
  }

  .split img {
    height: 360px;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--cream);
    color: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }
}

@media (max-width: 640px) {
  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .masonry {
    columns: 1;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-content {
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 3.1rem);
  }

  .hero-content > p {
    font-size: 0.95rem;
  }

  .hero-meta {
    margin-bottom: 18px;
  }

  .section {
    padding: 72px 0;
  }

  .footer-top {
    flex-direction: column;
  }

  .scale {
    grid-template-columns: repeat(3, 1fr);
  }
}
