/* ============================
   Codename Echoes — styles
   ============================ */

:root {
  --bg: #f4efe6;          /* warm cream */
  --bg-deep: #ece4d5;     /* deeper cream */
  --ink: #1c1b18;         /* near-black */
  --ink-soft: #4a463d;
  --moss: #4a5d3a;        /* deep moss green */
  --moss-deep: #2f3e23;
  --gold: #b18b4a;        /* brass accent */
  --gold-soft: #c9a467;
  --line: rgba(28,27,24,.14);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 18px;
}
.eyebrow.light { color: var(--gold-soft); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 24px;
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--moss);
}
.section-head { margin-bottom: 60px; }
.section-head.center { text-align: center; }

.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 18px;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), box-shadow .35s var(--ease);
}
.nav.scrolled {
  background: rgba(244, 239, 230, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif);
  font-size: 20px; font-weight: 600;
  letter-spacing: -.02em;
  border-radius: 4px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-weight: 600; font-size: 14px; letter-spacing: .04em; }
.brand-text em {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: var(--ink-soft);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13.5px; font-weight: 500;
  letter-spacing: .03em; color: var(--ink);
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--ink);
  transition: width .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: #f7f3eb;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px;
  transition: background .3s var(--ease);
}
.nav-cta span { transition: transform .3s var(--ease); }
.nav-cta:hover { background: var(--moss-deep); }
.nav-cta:hover span { transform: translateX(3px); }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: #f7f3eb;
  padding: 120px 0 80px;
}
.hero-media, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,22,18,.55) 0%, rgba(20,22,18,.15) 40%, rgba(20,22,18,.85) 100%),
    radial-gradient(60% 60% at 30% 30%, rgba(74,93,58,.35), transparent 60%);
}
.hero-content {
  position: relative;
  max-width: var(--maxw);
  width: 100%;
  padding: 0 var(--pad);
  text-align: left;
}
.hero-content .eyebrow { color: var(--gold-soft); }
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 168px);
  line-height: .95;
  letter-spacing: -.02em;
  margin-bottom: 32px;
  color: #f7f3eb;
}
.hero-title .line { display: block; }
.hero-title .italic { font-style: italic; color: #e6c98a; }
.hero-sub {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.55;
  max-width: 52ch;
  color: rgba(247, 243, 235, .88);
  margin-bottom: 36px;
  font-weight: 300;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-size: 13.5px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-primary {
  background: #f7f3eb; color: var(--ink);
}
.btn-primary:hover { background: var(--gold); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: #f7f3eb;
  border: 1px solid rgba(247,243,235,.5);
}
.btn-ghost:hover { background: rgba(247,243,235,.1); border-color: #f7f3eb; }
.btn-block { width: 100%; justify-content: center; }

.hero-stats {
  position: absolute;
  bottom: 40px; left: 0; right: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  color: #f7f3eb;
  z-index: 2;
}
.hero-stats > div { border-left: 1px solid rgba(247,243,235,.2); padding-left: 18px; }
.hero-stats strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 500;
  line-height: 1;
  color: #fff;
  margin-bottom: 4px;
}
.hero-stats strong sup { font-size: .5em; color: var(--gold-soft); }
.hero-stats span {
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(247,243,235,.7);
}
.hero-scroll {
  position: absolute; bottom: 40px; right: var(--pad);
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(247,243,235,.7);
}
.hero-scroll-line {
  width: 60px; height: 1px; background: rgba(247,243,235,.4);
  position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; top: 0; left: -30px;
  width: 30px; height: 100%; background: var(--gold-soft);
  animation: scroll-line 2.4s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { left: -30px; }
  100% { left: 100%; }
}

/* ===== MARQUEE ===== */
.marquee {
  background: var(--ink);
  color: var(--bg);
  padding: 18px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.marquee-track {
  display: inline-flex; white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: #f7f3eb;
}
.marquee-track span { padding-right: 16px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== STORY ===== */
.story { padding: clamp(80px, 12vw, 160px) 0; }
.story-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.story-text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 60ch; }
.story-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 28px;
}
.story-tags span {
  padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12.5px; letter-spacing: .04em;
  color: var(--moss); background: rgba(74,93,58,.05);
}
.story-media { position: relative; }
.story-media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(28,27,24,.35);
}
.img-caption {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(244,239,230,.95);
  padding: 8px 14px; font-size: 12px; letter-spacing: .04em;
  color: var(--ink-soft);
  border-radius: 2px;
}

/* ===== RESIDENCES ===== */
.residences { padding: clamp(80px, 12vw, 160px) 0; background: var(--bg-deep); }
.residence-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.residence-card {
  background: #fdfaf3;
  border-radius: 4px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: 0 10px 40px -20px rgba(28,27,24,.15);
}
.residence-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -25px rgba(28,27,24,.3);
}
.residence-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.residence-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.residence-card:hover .residence-img img { transform: scale(1.05); }
.residence-tag {
  position: absolute; top: 16px; left: 16px;
  background: rgba(28,27,24,.85); color: var(--bg);
  padding: 6px 14px; font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; border-radius: 999px;
  backdrop-filter: blur(8px);
}
.residence-body { padding: 32px 32px 36px; }
.residence-body h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 28px; margin-bottom: 18px;
}
.residence-meta {
  list-style: none; padding: 16px 0; margin-bottom: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.residence-meta li {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px;
}
.residence-meta span { color: var(--ink-soft); }
.residence-meta strong { font-weight: 500; }
.residence-body p { color: var(--ink-soft); font-size: 15px; margin-bottom: 20px; }
.link-arrow {
  display: inline-block; font-size: 13px; letter-spacing: .04em;
  color: var(--moss); font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color .3s var(--ease);
}
.link-arrow:hover { color: var(--gold); }

/* ===== EDITORIAL SPLIT ===== */
.editorial {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}
.editorial-img { position: relative; overflow: hidden; }
.editorial-img img { width: 100%; height: 100%; object-fit: cover; }
.editorial-text {
  background: var(--moss);
  color: #f7f3eb;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 8vw, 120px);
}
.editorial-text .eyebrow { color: var(--gold-soft); }
.editorial-text h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1; margin-bottom: 28px;
}
.editorial-text p {
  color: rgba(247,243,235,.85); max-width: 50ch;
  margin-bottom: 14px; font-size: 16px;
}

/* ===== AMENITIES ===== */
.amenities { padding: clamp(80px, 12vw, 160px) 0; }
.amenity-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.amenity {
  background: var(--bg);
  padding: 40px 32px;
  transition: background .3s var(--ease);
}
.amenity:hover { background: #fdfaf3; }
.amenity-icon {
  font-size: 32px; margin-bottom: 16px; line-height: 1;
  filter: grayscale(.1);
}
.amenity h4 {
  font-family: var(--serif); font-weight: 500;
  font-size: 22px; margin-bottom: 8px;
}
.amenity p { font-size: 14px; color: var(--ink-soft); }

/* ===== GALLERY ===== */
.gallery { overflow: hidden; padding: 40px 0 60px; }
.gallery-track {
  display: flex; gap: 16px;
  width: max-content;
  animation: gallery-scroll 50s linear infinite;
}
.gallery-track figure { flex: 0 0 auto; }
.gallery-track img {
  height: 380px; width: 540px; object-fit: cover;
  border-radius: 4px;
}
@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== LOCATION ===== */
.location { padding: clamp(80px, 12vw, 160px) 0; background: var(--bg-deep); }
.location-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.location-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.loc-card {
  background: #fdfaf3;
  padding: 32px 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.loc-card:hover { transform: translateY(-4px); border-color: var(--moss); }
.loc-card strong {
  display: block; font-family: var(--serif);
  font-size: 40px; font-weight: 500;
  color: var(--moss-deep);
  line-height: 1; margin-bottom: 8px;
}
.loc-card span {
  font-size: 13px; color: var(--ink-soft);
  letter-spacing: .03em;
}

/* ===== BUILDER ===== */
.builder { padding: clamp(80px, 12vw, 160px) 0; }
.builder-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.builder-text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 60ch; }
.builder-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.builder-stats > div { padding: 24px 0; border-top: 1px solid var(--line); }
.builder-stats strong {
  display: block; font-family: var(--serif);
  font-size: clamp(40px, 5vw, 60px); font-weight: 500;
  line-height: 1; margin-bottom: 6px; color: var(--moss-deep);
}
.builder-stats strong sup { font-size: .4em; color: var(--gold); }
.builder-stats span {
  font-size: 12.5px; color: var(--ink-soft);
  letter-spacing: .04em;
}

/* ===== CONTACT ===== */
.contact {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0;
  color: #f7f3eb;
}
.contact-bg { position: absolute; inset: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; }
.contact-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,18,.85) 0%, rgba(20,22,18,.7) 100%);
}
.contact-inner { position: relative; }
.contact-card {
  max-width: 640px;
  background: rgba(244,239,230,.97);
  color: var(--ink);
  padding: 48px;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
}
.contact-card h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1; margin-bottom: 16px;
}
.contact-card p { color: var(--ink-soft); margin-bottom: 28px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: flex; flex-direction: column;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
  gap: 6px;
}
.contact-form input, .contact-form select {
  font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  transition: border-color .3s var(--ease);
}
.contact-form input:focus, .contact-form select:focus { outline: none; border-color: var(--moss); }
.form-ok {
  text-align: center; color: var(--moss);
  background: rgba(74,93,58,.1);
  padding: 12px; border-radius: 4px;
  font-size: 14px; letter-spacing: 0; text-transform: none;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.footer { background: var(--ink); color: #c4bfb4; padding: 48px 0; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 32px;
  align-items: flex-start; flex-wrap: wrap;
}
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand .brand-mark { background: #f7f3eb; color: var(--ink); }
.footer-brand strong { display: block; color: #f7f3eb; font-weight: 500; }
.footer-brand em { font-family: var(--serif); font-style: italic; font-size: 13px; color: #c4bfb4; }
.footer-meta { max-width: 540px; font-size: 12px; }
.footer-meta p { margin-bottom: 6px; opacity: .7; }

/* ===== REVEAL ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .story-grid, .location-grid, .builder-grid, .editorial { grid-template-columns: 1fr; }
  .editorial { min-height: 0; }
  .editorial-img { aspect-ratio: 16/10; }
  .residence-grid { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px; bottom: 100px; }
  .hero-scroll { display: none; }
  .hero-content { padding-bottom: 180px; }
}
@media (max-width: 640px) {
  .amenity-grid { grid-template-columns: 1fr; }
  .location-stats { grid-template-columns: 1fr; }
  .builder-stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 32px 24px; }
  .hero-stats { grid-template-columns: 1fr 1fr; bottom: 90px; }
  .hero-content { padding-bottom: 240px; }
  .gallery-track img { height: 260px; width: 360px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
