/* ==========================================================================
   Araceli Bravo — New Jersey Real Estate
   Design tokens first; change colors and fonts here.
   ========================================================================== */

:root {
  /* Palette */
  --ivory: #faf8f4;        /* warm white page background */
  --sand: #f1ece3;         /* muted beige section background */
  --stone: #ddd3c3;        /* borders, hairlines on light */
  --taupe: #6b645b;        /* secondary text on light (4.9:1 on ivory) */
  --charcoal: #1f1e1c;     /* primary text, dark sections */
  --charcoal-2: #2a2825;
  --gold: #a8875a;         /* decorative gold: rules, icons */
  --gold-text: #7f6136;    /* gold for text on light (5.3:1 on ivory) */
  --gold-light: #c9a876;   /* gold on dark backgrounds */
  --white: #ffffff;

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--charcoal); color: var(--white); padding: .75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: flex; align-items: center; gap: .9rem;
  margin: 0 0 1.4rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-text);
}
.eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--light { color: var(--gold-light); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; color: var(--gold-text); }
.section--dark .section-title em { color: var(--gold-light); }

.lead { font-size: 1.125rem; line-height: 1.75; color: var(--charcoal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .9rem 2rem;
  font: 600 .74rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; border-radius: 0;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn--sm { min-height: 42px; padding: .7rem 1.35rem; }
.btn--block { width: 100%; }
.btn--light { background: var(--ivory); color: var(--charcoal); }
.btn--light:hover { background: var(--gold-light); }
.btn--outline-light { border-color: rgba(255,255,255,.75); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--charcoal); }
.btn--dark { background: var(--charcoal); color: var(--ivory); }
.btn--dark:hover { background: var(--gold-text); }
.btn--outline-dark { border-color: var(--charcoal); color: var(--charcoal); }
.btn--outline-dark:hover { background: var(--charcoal); color: var(--ivory); }
.btn--gold { background: var(--gold-light); color: var(--charcoal); }
.btn--gold:hover { background: var(--ivory); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--charcoal);
  padding-bottom: .35rem; border-bottom: 1px solid var(--gold);
}
.link-arrow::after { content: "→"; transition: transform .35s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--white);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(250, 248, 244, .96);
  color: var(--charcoal);
  box-shadow: 0 1px 0 var(--stone);
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; margin: 0; }
.wordmark__name { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: .02em; }
.wordmark__sub { margin-top: .4rem; font-size: .6rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; opacity: .8; }

.nav__list { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem); }
.nav__list a:not(.btn) {
  position: relative;
  font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; padding: .4rem 0;
}
.nav__list a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__list a:not(.btn):hover::after { transform: scaleX(1); }
.site-header.is-scrolled .btn--gold { background: var(--charcoal); color: var(--ivory); }
.site-header.is-scrolled .btn--gold:hover { background: var(--gold-text); }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: inherit; cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }

@media (max-width: 1180px) and (min-width: 961px) {
  .nav__list .nav__lang { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav__list .nav__lang { order: 10; border-left: 0; padding-left: 0; font-size: 1.25rem; color: var(--gold-light) !important; }
  .nav__list {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 1.6rem;
    background: var(--charcoal); color: var(--ivory);
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .nav__list a:not(.btn) { font-family: var(--serif); font-size: 2rem; letter-spacing: .02em; text-transform: none; }
  .nav__cta-item { margin-top: 1rem; }
  .menu-open .nav__list { opacity: 1; visibility: visible; }
  .menu-open .site-header { color: var(--ivory); }
  .menu-open .site-header.is-scrolled { background: transparent; box-shadow: none; backdrop-filter: none; }
  .menu-open .site-header .btn--gold { background: var(--gold-light); color: var(--charcoal); }
  .menu-open .wordmark { position: relative; z-index: 2; }
  .menu-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
  .menu-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh;
  color: var(--white);
  overflow: hidden;
}
/* Works for <picture>/<img> now and a <video> later */
.hero__media, .hero__media picture { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 52% 55%;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 22%),
    linear-gradient(90deg, rgba(20,19,17,.72) 0%, rgba(20,19,17,.38) 48%, rgba(20,19,17,.08) 100%),
    linear-gradient(0deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 45%);
}
.hero__content { padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(3.5rem, 9vh, 7rem); }
.hero__eyebrow { color: var(--white); text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.hero__eyebrow::before { background: var(--gold-light); opacity: 1; }
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.7rem, 6.4vw, 5.6rem);
  line-height: 1.02; letter-spacing: -.015em;
  max-width: 16ch; margin-bottom: 1.75rem; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero__title em { display: block; margin-top: .15em; font-style: italic; font-weight: 400; color: #e6d3b3; }
.hero__lead { max-width: 34rem; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.75; color: rgba(255,255,255,.9); margin-bottom: 2.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__lang {
  display: inline-flex; flex-direction: column; gap: .2rem;
  margin: 2.25rem 0 0; padding: .8rem 1.4rem .85rem 1.2rem;
  border-left: 2px solid var(--gold-light);
  background: rgba(20, 19, 17, .35);
  backdrop-filter: blur(4px);
}
.hero__lang span:first-child { font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1.1; color: #e6d3b3; }
.hero__lang-sub { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.82); }

/* Spanish callouts elsewhere */
.nav__lang {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--gold-light);
  padding-left: clamp(1.25rem, 2.4vw, 2.25rem); border-left: 1px solid currentColor;
}
.site-header.is-scrolled .nav__lang { color: var(--gold-text); }
.lang-em { font-family: var(--serif); font-size: 1.35em; color: var(--gold-text); white-space: nowrap; }
.footer__lang { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--gold-light); margin-top: -.25rem; }

@media (max-width: 700px) {
  .hero__media img { object-position: 50% 40%; }
  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 25%),
      linear-gradient(0deg, rgba(20,19,17,.88) 0%, rgba(20,19,17,.55) 45%, rgba(20,19,17,.05) 75%);
  }
  .hero__content { padding-bottom: 2.5rem; }
  .hero__title { font-size: clamp(2.4rem, 10.5vw, 2.9rem); margin-bottom: 1.1rem; }
  .hero__lead { font-size: .95rem; line-height: 1.65; margin-bottom: 1.6rem; }
  .hero__actions { gap: .6rem; }
  .hero__actions .btn { flex: 1 1 0; padding-inline: .75rem; letter-spacing: .14em; }
  .hero__lang { margin-top: 1.4rem; padding: .65rem 1rem .7rem .9rem; }
  .hero__lang span:first-child { font-size: 1.35rem; }
  .hide-sm { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--charcoal); color: var(--ivory); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .eyebrow::after { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .7; }
.section-head__lead { font-size: 1.075rem; color: rgba(250,248,244,.78); max-width: 38rem; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.about__portrait { position: sticky; top: calc(var(--header-h) + 2rem); margin: 0; }
/* Full-bleed square portrait. multiply turns the studio-white backdrop into a warm tan. */
.about__photo picture { display: block; background: #e6d7c4; overflow: hidden; }
.about__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 20%; mix-blend-mode: multiply; }
.about__portrait figcaption { display: flex; flex-direction: column; gap: .35rem; margin-top: 1.75rem; padding-left: 1.25rem; border-left: 1px solid var(--gold); }
.about__name { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.about__caption { font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--taupe); }
.about__body p:not(.lead):not(.eyebrow) { color: #3b3833; }

.about__points { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 2.5rem 0 2.75rem; border-top: 1px solid var(--stone); }
.about__points li { display: flex; flex-direction: column; gap: .25rem; padding: 1.4rem 1.25rem 1.4rem 0; border-bottom: 1px solid var(--stone); }
.about__points li:nth-child(odd) { border-right: 1px solid var(--stone); }
.about__points li:nth-child(even) { padding-left: 1.5rem; }
.about__k { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.about__points li span:last-child { font-size: .9rem; color: var(--taupe); }

/* ---------- Buy / Sell split ---------- */
.split__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { margin: 0; }
.split__media picture { display: block; overflow: hidden; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease); }
.split__media:hover img { transform: scale(1.03); }

.steps { counter-reset: step; margin: 2.25rem 0 2.75rem; border-top: 1px solid var(--stone); }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; align-items: baseline;
  padding: 1.1rem 0; border-bottom: 1px solid var(--stone);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif); font-size: 1.15rem; color: var(--gold-text);
}
.steps h3 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.3; }

.split__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.25rem; }

/* ---------- Communities ---------- */
.communities__grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.communities .section-head { margin-bottom: 0; }
.community-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 1px solid rgba(250,248,244,.14); }
.community-list li { padding: 1.4rem 0; border-bottom: 1px solid rgba(250,248,244,.14); }
.community-list h3 {
  display: inline-block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; padding-bottom: .2rem;
  background: linear-gradient(var(--gold-light), var(--gold-light)) left bottom / 0 1px no-repeat;
  transition: background-size .45s var(--ease);
}
.community-list li:hover h3 { background-size: 100% 1px; }
.community-list p { margin: .3rem 0 0; font-size: .9rem; color: rgba(250,248,244,.66); }
.communities__note { margin: 1rem 0 0; }
.communities__note a { color: var(--gold-light); font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding-bottom: .35rem; border-bottom: 1px solid var(--gold-light); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact__list { margin: 2.25rem 0; border-top: 1px solid var(--stone); }
.contact__list > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--stone); }
.contact__list dt { font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--taupe); padding-top: .3rem; }
.contact__list dd { margin: 0; font-size: 1.02rem; }
.contact__list a { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 1px no-repeat; padding-bottom: 2px; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--gold-text); }
.contact__quick { display: none; flex-wrap: wrap; gap: .85rem; }

.contact-form { background: var(--ivory); padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--stone); }
.field { display: flex; flex-direction: column; margin-bottom: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .55rem; }
.optional { font-weight: 500; letter-spacing: .05em; text-transform: none; color: var(--taupe); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--charcoal);
  background: transparent; border: 0; border-bottom: 1px solid #b9ad9b; border-radius: 0;
  padding: .65rem 0; transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--charcoal); box-shadow: 0 1px 0 var(--charcoal); }
.field [aria-invalid="true"] { border-bottom-color: #9b3b2e; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.field textarea::placeholder { color: #8d857a; }
.form-error { color: #9b3b2e; font-size: .92rem; }
.form-note, .form-success { margin: 1rem 0 0; font-size: .82rem; color: var(--taupe); line-height: 1.6; }
.form-success { color: var(--charcoal); padding: .9rem 1rem; background: var(--sand); border-left: 2px solid var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(250,248,244,.78); padding-top: clamp(3.5rem, 7vw, 5.5rem); font-size: .92rem; }
.site-footer a { text-decoration: none; color: inherit; transition: color .3s var(--ease); }
.site-footer a:hover { color: var(--gold-light); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 3rem; padding-bottom: 3rem; }
.wordmark--footer { color: var(--ivory); margin-bottom: 1.5rem; }
.footer__h { font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1.1rem; }
.footer__nav li, .footer__contact li { margin-bottom: .55rem; }
.footer__legal { border-top: 1px solid rgba(250,248,244,.14); padding-top: 1.75rem; padding-bottom: 2.5rem; font-size: .78rem; line-height: 1.7; color: rgba(250,248,244,.62); }
.footer__legal p { margin-bottom: .5rem; max-width: 60rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .about__grid, .split__grid, .contact__grid, .communities__grid { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 26rem; }
  .split--reverse .split__media { order: 0; }
  .split__media img { aspect-ratio: 4 / 3; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .wordmark__name { font-size: 1.45rem; }
  .about__points { grid-template-columns: 1fr; }
  .about__points li:nth-child(odd) { border-right: 0; }
  .about__points li:nth-child(even) { padding-left: 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact__list > div { grid-template-columns: 1fr; gap: .15rem; }
  .split__actions .btn { flex: 1 1 100%; }
  .split__actions .link-arrow { margin-top: .5rem; }
  .contact__quick { display: flex; margin-top: -.5rem; }
  .contact__quick .btn { flex: 1 1 0; padding-inline: .75rem; }
  .community-list { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}
