/* Aman Sierra — design tokens
   Design read: premium-consumer property landing for Malaysian homebuyers,
   editorial-township language, one locked accent (gold) on a forest-green /
   bone palette pulled from the brand poster. Plain CSS, no framework.
   Dials: variance 7, motion 5, density 3. */

:root {
  --forest: #16302a;
  --forest-deep: #0f221d;
  --bone: #f7f4ec;
  --bone-dim: #ece6d6;
  --ink: #1e2a22;
  --ink-soft: #4a564c;
  --gold: #b98b3e;
  --gold-soft: #d9b877;
  --line: rgba(30, 42, 34, 0.12);
  --line-on-dark: rgba(247, 244, 236, 0.18);

  --font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --radius-card: 14px;
  --radius-pill: 999px;

  --container: 1180px;
  --gap-section: clamp(4.5rem, 8vw, 7.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section {
  padding: var(--gap-section) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 55ch;
}

.section-head.on-dark h2 { color: var(--bone); }
.section-head.on-dark p { color: rgba(247, 244, 236, 0.72); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gold);
  color: var(--forest-deep);
}

.btn-primary:hover {
  background: var(--gold-soft);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-on-dark);
  color: var(--bone);
}

.btn-ghost:hover {
  background: rgba(247, 244, 236, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}

.btn-outline:hover {
  background: var(--forest);
  color: var(--bone);
  transform: translateY(-2px);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  background: rgba(247, 244, 236, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--forest);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2vw, 2.2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-cta { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--forest);
}

.nav-toggle svg { width: 26px; height: 26px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--forest-deep);
  overflow: hidden;
}

/* Fills the hero edge-to-edge, no side gaps, at the cost of a small
   top/bottom crop on very wide screens (the trade-off the client wants). */
.hero-media-fg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  transform: scale(1.12);
  transform-origin: center;
  will-change: transform;
}

/* Native scroll-driven parallax: ties the image's position directly to the
   page's scroll offset, no JS scroll listener involved. The scale(1.12)
   buffer above gives the translate room to move without exposing edges. */
@supports (animation-timeline: scroll()) {
  .hero-media-fg {
    animation: hero-parallax linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 100vh;
  }
}

@keyframes hero-parallax {
  from { transform: translate3d(0, 0, 0) scale(1.12); }
  to   { transform: translate3d(0, 6vh, 0) scale(1.12); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 34, 29, 0.35) 0%, rgba(15, 34, 29, 0.25) 40%, rgba(15, 34, 29, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 0 clamp(3rem, 8vw, 5.5rem);
}

.hero-content .wrap {
  max-width: 720px;
  margin: 0;
}

.hero-eyebrow {
  color: var(--gold-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero h1 {
  color: var(--bone);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.hero-tagline {
  color: var(--gold-soft);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero-blurb {
  color: rgba(247, 244, 236, 0.86);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-copy p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 52ch;
  margin-bottom: 1.4rem;
}

.stat-row {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--forest);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.about-media {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

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

/* Phases */
.phases {
  background: var(--bone-dim);
}

.phase-clusters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.phase-card {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.8rem;
}

.phase-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.phase-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.phase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.phase-chip {
  background: rgba(185, 139, 62, 0.12);
  color: var(--forest);
  border: 1px solid rgba(185, 139, 62, 0.3);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.phases-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

/* Lifestyle bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  gap: 1rem;
}

.bento-item {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  color: var(--bone);
}

.bento-item.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-item.photo:hover img { transform: scale(1.06); }

.bento-item.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 34, 29, 0) 40%, rgba(15, 34, 29, 0.82) 100%);
}

.bento-label {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  right: 1.1rem;
  z-index: 1;
  font-weight: 600;
  font-size: 0.98rem;
}

.bento-item.icon {
  background: var(--forest);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-item.icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--gold-soft);
}

.bento-item.icon .bento-label {
  position: static;
}

.bento-item.icon .bento-sub {
  font-size: 0.82rem;
  color: rgba(247, 244, 236, 0.68);
  margin-top: 0.3rem;
}

.b-span-2 { grid-column: span 2; }
.b-span-3 { grid-column: span 3; }
.b-span-4 { grid-column: span 4; }
.b-row-2 { grid-row: span 2; }

/* Central Park plan: click-to-enlarge */
.plan-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: zoom-in;
  display: inline-block;
  max-width: 640px;
  width: 100%;
}

.plan-trigger img {
  width: 100%;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.plan-trigger:hover img,
.plan-trigger:focus-visible img {
  transform: scale(1.015);
  box-shadow: 0 16px 36px rgba(22, 48, 42, 0.18);
}

.plan-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.plan-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 34, 29, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.plan-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.plan-modal img {
  max-width: min(92vw, 760px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

.plan-modal-close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
  background: rgba(247, 244, 236, 0.12);
  border: 1px solid var(--line-on-dark);
  color: var(--bone);
  border-radius: var(--radius-pill);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.plan-modal-close:hover { background: rgba(247, 244, 236, 0.22); }
.plan-modal-close svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .plan-modal { transition: none; }
  .plan-trigger img { transition: none; }
}

/* Progress gallery */
.progress-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}

.progress-photo {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
}

.progress-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progress-caption {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Location */
.location {
  background: var(--bone-dim);
}

.location-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.location-copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  max-width: 48ch;
}

.location-map {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Register */
.register {
  background: var(--bone);
}

.register-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.register-copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 44ch;
  margin-bottom: 1.5rem;
}

.register-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.register-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.register-points svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

form.lead-form {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.field-error {
  font-size: 0.82rem;
  color: #a3402d;
  min-height: 1.1em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

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

.form-status.success { color: #2f6b47; }
.form-status.error { color: #a3402d; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
footer {
  background: var(--forest-deep);
  color: rgba(247, 244, 236, 0.72);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-on-dark);
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer-brand .brand-word { color: var(--bone); }
.footer-brand .brand-mark { filter: none; }

.footer-col h4 {
  font-family: var(--font-body);
  color: var(--bone);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--gold-soft); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .bento-item.photo img { transition: none; }
  .hero-media-fg { transform: none; animation: none; }
}

/* Mobile nav panel */
.mobile-panel {
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--bone);
  z-index: 49;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel a {
  display: block;
  padding: 1rem 0;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid,
  .location-grid,
  .register-grid {
    grid-template-columns: 1fr;
  }

  .about-media { order: -1; }

  .phase-clusters {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 190px;
  }

  .b-span-2, .b-span-3, .b-span-4 { grid-column: span 2; }
  .b-row-2 { grid-row: span 1; }

  .progress-strip { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: inline-flex; }

  .form-row { grid-template-columns: 1fr; }

  .hero-content { padding-bottom: 3rem; }
}
