:root {
  --paper: #f7f5f0;
  --paper-strong: #ffffff;
  --ink: #3f403d;
  --muted: #747167;
  --line: #d8d0c5;
  --olive: #8e967e;
  --olive-dark: #46533f;
  --sepia: #a87b6e;
  --rust: #8d3f2c;
  --steel: #5e6770;
  --shadow: 0 20px 60px rgba(40, 36, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.top-anchor {
  left: 0;
  position: absolute;
  top: 0;
}

.intro-screen {
  align-items: center;
  background:
    linear-gradient(rgba(247, 245, 240, 0.88), rgba(247, 245, 240, 0.92)),
    url("assets/pages/page-01.jpg") center / cover;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: fixed;
  transition: opacity 520ms ease, visibility 520ms ease;
  z-index: 120;
}

.intro-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.intro-frame {
  color: var(--ink);
  max-width: 760px;
  padding: 52px 28px;
  position: relative;
  text-align: center;
  width: min(760px, 92vw);
}

.intro-frame::before,
.intro-frame::after {
  background: var(--sepia);
  content: "";
  height: 1px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: min(520px, 72vw);
  animation: introRule 980ms ease forwards;
}

.intro-frame::before {
  top: 0;
}

.intro-frame::after {
  animation-delay: 120ms;
  bottom: 0;
}

.intro-line {
  background: var(--sepia);
  height: 72px;
  opacity: 0;
  position: absolute;
  width: 1px;
  animation: introLine 760ms ease 260ms forwards;
}

.intro-line-top {
  left: 50%;
  top: -34px;
}

.intro-line-bottom {
  bottom: -34px;
  left: 50%;
}

.intro-frame p {
  color: var(--sepia);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  opacity: 0;
  text-transform: uppercase;
  animation: introFadeUp 700ms ease 420ms forwards;
}

.intro-frame h2 {
  color: var(--ink);
  font-size: 2.8rem;
  font-weight: 560;
  line-height: 1.12;
  margin-bottom: 28px;
  opacity: 0;
  animation: introFadeUp 780ms ease 580ms forwards;
}

.intro-frame button {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: white;
  min-height: 42px;
  opacity: 0;
  padding: 10px 16px;
  animation: introFadeUp 680ms ease 900ms forwards;
}

.intro-frame button:hover,
.intro-frame button:focus-visible {
  background: var(--rust);
  border-color: var(--rust);
}

@keyframes introRule {
  to {
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes introLine {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-frame::before,
  .intro-frame::after,
  .intro-line,
  .intro-frame p,
  .intro-frame h2,
  .intro-frame button {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  align-items: center;
  background: rgba(247, 245, 240, 0.88);
  border-bottom: 1px solid rgba(216, 208, 197, 0.72);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 14px 4vw;
  position: fixed;
  right: 0;
  top: 0;
  transition: background 180ms ease, box-shadow 180ms ease;
  z-index: 50;
}

.site-header.is-scrolled {
  background: rgba(247, 245, 240, 0.96);
  box-shadow: 0 10px 35px rgba(38, 34, 30, 0.09);
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--olive);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: white;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  font-weight: 650;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

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

.top-nav a {
  color: var(--ink);
  font-size: 0.88rem;
  padding: 8px 10px;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--rust);
}

.hero {
  background: #1d211d;
  min-height: 84vh;
  overflow: hidden;
  position: relative;
}

.hero-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 19, 15, 0.74), rgba(15, 19, 15, 0.36) 45%, rgba(15, 19, 15, 0.08)),
    linear-gradient(0deg, rgba(15, 19, 15, 0.5), rgba(15, 19, 15, 0));
  inset: 0;
  position: absolute;
}

.hero-copy {
  bottom: 9vh;
  color: white;
  left: 4vw;
  max-width: 760px;
  position: absolute;
  width: min(760px, 88vw);
}

.eyebrow {
  color: var(--sepia);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e6c4b7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 3.6rem;
  font-weight: 580;
  line-height: 1.04;
  margin-bottom: 18px;
  max-width: 780px;
  text-transform: uppercase;
}

h2 {
  color: var(--ink);
  font-size: 2.25rem;
  font-weight: 560;
  line-height: 1.12;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.46rem;
  font-weight: 560;
  line-height: 1.18;
  margin-bottom: 12px;
}

.hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
  max-width: 620px;
}

.hero-actions,
.module-actions,
.studio-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action,
button,
.file-button {
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 42px;
}

.primary-action,
.secondary-action {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
}

.primary-action {
  background: #f8f2ea;
  color: #2c2d2a;
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.58);
  color: white;
}

.chapter-rail {
  align-items: stretch;
  background: var(--paper-strong);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  scroll-margin-top: 82px;
}

.chapter-chip {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  justify-content: flex-start;
  padding: 20px 4vw;
  text-align: left;
}

.chapter-chip:last-child {
  border-right: 0;
}

.chapter-chip span {
  color: var(--rust);
  display: block;
  font-size: 1.2rem;
  font-weight: 650;
  margin-bottom: 4px;
}

.chapter-chip:hover,
.chapter-chip:focus-visible {
  background: #f0ece4;
  color: var(--ink);
}

.section {
  padding: 96px 4vw;
  scroll-margin-top: 82px;
}

.section-heading {
  margin-bottom: 40px;
  max-width: 780px;
}

.section-heading.compact {
  display: grid;
  gap: 0 40px;
  grid-template-columns: 280px minmax(0, 680px);
  max-width: none;
}

.section-heading.compact .eyebrow {
  grid-row: span 2;
}

.section-heading p:not(.eyebrow),
.location-copy p,
.module-copy p {
  color: var(--muted);
  font-size: 1.02rem;
}

.concept-section {
  background: var(--paper);
}

.concept-grid {
  align-items: stretch;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(300px, 0.58fr) minmax(460px, 1fr);
}

.tab-panel,
.zone-detail,
.studio-controls,
.module-builder {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  padding: 28px;
}

.segmented-control,
.zone-tabs,
.gallery-controls {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 26px;
}

.segmented-control button,
.zone-tabs button,
.gallery-controls button {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: 40px;
  padding: 8px 12px;
}

.segmented-control button.is-active,
.zone-tabs button.is-active,
.gallery-controls button.is-active {
  color: var(--rust);
  box-shadow: inset 0 -2px 0 var(--rust);
}

.concept-copy {
  min-height: 210px;
}

.number-label {
  color: var(--sepia);
  display: inline-block;
  font-size: 2.1rem;
  font-weight: 650;
  line-height: 1;
  margin-bottom: 18px;
}

.image-stage {
  background: #fbfaf7;
  border: 1px solid var(--line);
  margin: 0;
  min-height: 420px;
  overflow: hidden;
}

.image-stage img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.location-section {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(280px, 0.4fr) minmax(520px, 1fr);
}

.location-visual {
  border-left: 1px solid var(--line);
  padding-left: 44px;
}

.masterplan-section {
  background: #eeede7;
}

.masterplan-layout {
  align-items: stretch;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(500px, 1fr) minmax(300px, 380px);
}

.plan-map {
  background: #f7f5f0;
  border: 1px solid var(--line);
  min-height: 620px;
  overflow: hidden;
  position: relative;
}

.plan-map img {
  height: 100%;
  object-fit: cover;
  object-position: 24% center;
  width: 100%;
}

.hotspot {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rust);
  border-radius: 50%;
  color: var(--rust);
  display: flex;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  position: absolute;
  width: 44px;
}

.hotspot.is-active,
.hotspot:hover,
.hotspot:focus-visible {
  background: var(--rust);
  color: white;
}

.hotspot-work {
  left: 42%;
  top: 22%;
}

.hotspot-retreat {
  left: 26%;
  top: 34%;
}

.hotspot-villas {
  left: 46%;
  top: 56%;
}

.hotspot-admin {
  left: 22%;
  top: 78%;
}

.hotspot-entry {
  left: 51%;
  top: 82%;
}

.zone-detail {
  align-self: stretch;
}

.zone-detail dl {
  border-top: 1px solid var(--line);
  margin: 28px 0 0;
  padding-top: 18px;
}

.zone-detail div {
  display: grid;
  gap: 14px;
  grid-template-columns: 98px 1fr;
  padding: 9px 0;
}

.zone-detail dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.zone-detail dd {
  margin: 0;
}

.zones-section {
  background: var(--paper);
}

.zone-showcase {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 0.5fr);
  padding-top: 28px;
}

.zone-image-wrap {
  background: #e8e3db;
  min-height: 520px;
  overflow: hidden;
}

.zone-image-wrap img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 160ms ease, transform 420ms ease;
  width: 100%;
}

.zone-showcase.is-switching .zone-image-wrap img {
  opacity: 0.4;
  transform: scale(1.015);
}

.zone-content {
  align-self: center;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.metrics span {
  border: 1px solid var(--line);
  color: var(--olive-dark);
  padding: 8px 10px;
}

.module-section {
  align-items: center;
  background: #fff;
  display: grid;
  gap: 52px;
  grid-template-columns: minmax(260px, 0.36fr) minmax(520px, 1fr);
}

.module-actions button,
.studio-actions button,
.file-button {
  background: var(--ink);
  color: white;
  padding: 10px 14px;
}

.module-actions button:nth-child(2),
.studio-actions button:nth-child(2) {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.module-grid {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    #f9f8f5;
  background-size: 12.5% 20%;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(5, 1fr);
  padding: 16px;
}

.module-cell {
  background: linear-gradient(135deg, #d4bca7, #f1e7d8);
  border: 1px solid rgba(141, 63, 44, 0.35);
  box-shadow: 0 8px 22px rgba(84, 61, 44, 0.12);
  min-height: 54px;
  transition: transform 220ms ease, grid-column 220ms ease, grid-row 220ms ease;
}

.module-cell.alt {
  background: linear-gradient(135deg, #9aa58a, #e7eadf);
}

.module-cell.dark {
  background: linear-gradient(135deg, #52614c, #b5b99e);
}

.module-stats {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
}

.module-stats strong {
  color: var(--rust);
  font-size: 1.45rem;
}

.gallery-section {
  background: #efede8;
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.slide-card {
  background: white;
  border: 1px solid var(--line);
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.slide-card[hidden] {
  display: none;
}

.slide-card img {
  aspect-ratio: 1.414 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.slide-card span {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
}

.slide-card strong {
  color: var(--rust);
}

.studio-section {
  background: var(--paper);
}

.studio-layout {
  align-items: stretch;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(520px, 1fr) minmax(340px, 0.46fr);
}

.studio-preview {
  background: #20231f;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.studio-preview img,
.studio-preview video {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.studio-controls {
  display: grid;
  gap: 16px;
}

.studio-controls label {
  color: var(--muted);
  display: grid;
  font-size: 0.84rem;
  gap: 7px;
}

select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 12px;
}

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

.file-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.file-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.lightbox {
  align-items: center;
  background: rgba(16, 16, 14, 0.88);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 56px 72px;
  position: fixed;
  z-index: 90;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  max-height: 88vh;
  max-width: 92vw;
}

.lightbox img {
  box-shadow: var(--shadow);
  max-height: 82vh;
  object-fit: contain;
  width: auto;
}

.lightbox figcaption {
  color: white;
  margin-top: 12px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  color: var(--ink);
  display: flex;
  justify-content: center;
  position: fixed;
}

.lightbox-close {
  font-size: 1.7rem;
  height: 44px;
  right: 24px;
  top: 22px;
  width: 44px;
}

.lightbox-nav {
  font-size: 1.4rem;
  height: 54px;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

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

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

  h1 {
    font-size: 2.75rem;
  }

  .chapter-rail,
  .concept-grid,
  .location-section,
  .masterplan-layout,
  .zone-showcase,
  .module-section,
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .chapter-rail {
    overflow-x: auto;
  }

  .chapter-chip {
    min-width: 180px;
  }

  .section-heading.compact {
    display: block;
  }

  .location-visual {
    border-left: 0;
    padding-left: 0;
  }

  .plan-map {
    min-height: 520px;
  }

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

@media (max-width: 720px) {
  .site-header {
    padding: 10px 16px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-copy {
    bottom: 7vh;
    left: 18px;
    width: calc(100% - 36px);
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .intro-frame {
    padding: 42px 16px;
  }

  .intro-frame h2 {
    font-size: 1.86rem;
  }

  .section {
    padding: 68px 18px;
  }

  .tab-panel,
  .zone-detail,
  .studio-controls,
  .module-builder {
    padding: 20px;
  }

  .image-stage,
  .zone-image-wrap,
  .studio-preview {
    min-height: 360px;
  }

  .plan-map {
    min-height: 420px;
  }

  .hotspot {
    height: 38px;
    width: 38px;
  }

  .module-grid {
    aspect-ratio: 1 / 1;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox {
    padding: 54px 16px;
  }

  .lightbox-nav {
    bottom: 18px;
    top: auto;
    transform: none;
  }
}
