/* ============================================================
   Meridian Residences — boutique real estate (LIGHT theme)
   Warm paper, charcoal ink, muted sage accent, Fraunces serif.
   Calm, editorial, premium. Photo placeholders mark exactly
   where property photography goes.
   ============================================================ */

:root {
  --bg:       #f6f3ee;
  --bg-soft:  #efe9e0;
  --panel:    #fffdf9;
  --ink:      #211f1b;
  --ink-soft: #45413a;
  --muted:    #6f6a5f;
  --muted-2:  #9a9488;
  --line:     rgba(33, 31, 27, 0.12);
  --line-soft:rgba(33, 31, 27, 0.07);

  --accent:   #5f6f5a;   /* muted sage */
  --accent-2: #74866d;
  --accent-deep: #46533f;
  --accent-ink: #fbfdf8;

  --radius:    10px;
  --radius-sm: 6px;
  --maxw:      1160px;

  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --body:  "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 45% at 85% -8%, rgba(95,111,90,0.08), transparent 60%),
    radial-gradient(50% 40% at 6% 2%, rgba(95,111,90,0.05), transparent 55%),
    var(--bg);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
::selection { background: rgba(95,111,90,0.25); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 6px; font-weight: 600; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

/* ---------------- buttons / links ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--body); font-weight: 600; font-size: 0.92rem; padding: 12px 24px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .25s var(--ease); }
.btn--lg { padding: 14px 30px; font-size: 0.98rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.link-quiet { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.link-quiet:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link-quiet--lg { font-family: var(--serif); font-size: 1rem; white-space: nowrap; }

/* ---------------- nav ---------------- */
.nav { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); background: rgba(246,243,238,0.7); border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s var(--ease); }
.nav.is-scrolled { background: rgba(246,243,238,0.94); border-bottom-color: var(--line); }
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; }
.brand__mark { width: 16px; height: 16px; flex: none; border-radius: 3px; background: var(--accent); transform: rotate(45deg); box-shadow: inset 0 0 0 3px var(--bg); }
.brand__name { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: 0.01em; display: inline-flex; flex-direction: column; line-height: 1; }
.brand__sub { font-family: var(--body); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; position: relative; transition: color .25s var(--ease); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 18px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile { display: none; flex-direction: column; padding: 6px 24px 22px; border-bottom: 1px solid var(--line); background: rgba(246,243,238,0.98); }
.nav__mobile a { padding: 13px 4px; color: var(--ink-soft); font-size: 1rem; border-bottom: 1px solid var(--line-soft); }
.nav__mobile a:last-child { border-bottom: 0; }
.nav__mobile-cta { margin-top: 14px; color: var(--accent-ink); }
.nav__mobile.is-open { display: flex; }

/* ---------------- layout ---------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; position: relative; }
.section__head { max-width: 680px; margin: 0 0 50px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section__title { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 14px; }
.section__lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; }
.kicker { display: inline-block; font-family: var(--body); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* ---------------- hero ---------------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 76px 24px 84px; }
.hero__grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.hero__title { font-size: clamp(2.8rem, 7vw, 4.6rem); font-weight: 400; letter-spacing: -0.02em; margin-bottom: 22px; text-wrap: balance; }
.hero__sub { color: var(--muted); font-size: 1.16rem; max-width: 500px; margin-bottom: 30px; }

.search { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 20px 50px -34px rgba(33,31,27,0.4); }
.search__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 130px; }
.search__field label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.search__field input, .search__field select { font-family: var(--body); font-size: 0.95rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 6px 2px; }
.search__field input:focus, .search__field select:focus { outline: none; border-bottom-color: var(--accent); }
.search .btn { flex: none; }

/* featured listing card */
.hero__feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -44px rgba(33,31,27,0.45); }
.feature__body { padding: 22px 24px 26px; }
.feature__flag { display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.listing__price { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; letter-spacing: -0.01em; }
.listing__title { font-size: 1.3rem; margin: 6px 0 4px; }
.listing__addr { color: var(--muted); font-size: 0.94rem; }
.listing__specs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; color: var(--ink-soft); font-size: 0.88rem; }
.listing__specs li { position: relative; padding-left: 16px; }
.listing__specs li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------------- placeholders ---------------- */
.ph { position: relative; display: grid; place-items: center; align-content: center; text-align: center; gap: 9px; padding: 22px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: repeating-linear-gradient(45deg, rgba(33,31,27,0.03) 0 14px, transparent 14px 28px), var(--bg-soft); color: var(--muted); overflow: hidden; }
.ph::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: rgba(95,111,90,0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6f5a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 17l-5-5L5 21'/%3E%3C/svg%3E") center / 19px no-repeat; border: 1px solid rgba(95,111,90,0.3); }
.ph__tag { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.ph__desc { font-size: 0.8rem; line-height: 1.5; max-width: 30ch; color: var(--muted); }

/* real photography frames */
.shot { position: relative; overflow: hidden; background: var(--bg-soft); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.shot.listing__img, .shot.listing__img--feature { border: 0; }
.shot.area__img, .shot.agent__photo { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.listing:hover .shot.listing__img img { transform: scale(1.04); }
.area:hover .shot.area__img img { transform: scale(1.05); }

/* ---------------- strip ---------------- */
.strip { border-block: 1px solid var(--line); background: var(--bg-soft); }
.strip__row { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 30px; }
.strip__item { font-size: 0.96rem; color: var(--muted); }
.strip__item strong { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.1rem; margin-right: 4px; }

/* ---------------- listings grid ---------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.listing { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.listing:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -34px rgba(33,31,27,0.4); }
.listing__img { aspect-ratio: 4 / 3; border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; }
.listing__img--feature { aspect-ratio: 16 / 10; border-radius: 0; border: 0; border-bottom: 1px dashed var(--line); }
.listing__body { padding: 20px 22px 24px; }
.listing__body .listing__price { font-size: 1.4rem; }
.listing__body .listing__title { font-size: 1.18rem; }

/* ---------------- why ---------------- */
.why { }
.why__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 54px; align-items: start; }
.why__list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 32px; }
.why__list li { display: flex; gap: 14px; }
.why__icon { color: var(--accent); font-size: 0.8rem; margin-top: 5px; }
.why__list h3 { font-size: 1.14rem; margin-bottom: 6px; }
.why__list p { color: var(--muted); font-size: 0.95rem; }

/* ---------------- neighbourhoods ---------------- */
.areas__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.area { display: block; }
.area__img { aspect-ratio: 3 / 4; margin-bottom: 12px; transition: transform .35s var(--ease); }
.area:hover .area__img { transform: translateY(-4px); }
.area__name { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.16rem; }
.area__meta { color: var(--muted); font-size: 0.85rem; }

/* ---------------- stats ---------------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-soft); }
.stats__grid { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat__num { font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--accent-deep); line-height: 1; margin-bottom: 8px; }
.stat__label { color: var(--muted); font-size: 0.92rem; }

/* ---------------- agent ---------------- */
.agent__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 54px; align-items: center; }
.agent__photo { aspect-ratio: 4 / 5; }
.agent__quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 20px; margin: 22px 0; max-width: 46ch; }

/* ---------------- valuation ---------------- */
.valbox { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 52px; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(80% 130% at 0% 0%, rgba(95,111,90,0.1), transparent 60%), var(--panel); box-shadow: 0 40px 90px -50px rgba(33,31,27,0.4); }
.valbox__title { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.valbox__sub { color: var(--muted); font-size: 1.04rem; }
.valform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input { font-family: var(--body); font-size: 0.96rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; }
.field input:focus { outline: none; border-color: var(--accent); }
.valform .btn { grid-column: 1 / -1; }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 64px 24px 34px; }
.footer__top { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.footer__tag { color: var(--muted); font-size: 0.94rem; margin-top: 14px; max-width: 280px; }
.footer__col { display: flex; flex-direction: column; }
.footer__col h4 { font-family: var(--body); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.footer__col a, .footer__col span { color: var(--muted); font-size: 0.93rem; padding: 5px 0; transition: color .25s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { max-width: var(--maxw); margin: 24px auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 0.82rem; }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: var(--accent); }

/* ---------------- reveal ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--reveal-delay, 0ms); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- responsive ---------------- */
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: 1fr; gap: 36px; }
  .areas__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .agent__grid { grid-template-columns: 1fr; gap: 32px; }
  .agent__photo { max-width: 360px; }
  .valbox { grid-template-columns: 1fr; padding: 40px 30px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .nav__links, .nav__actions .link-quiet { display: none; }
  .nav__toggle { display: flex; }
  .section { padding: 78px 24px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .why__list { grid-template-columns: 1fr; }
  .areas__grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .valform { grid-template-columns: 1fr; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .nav__inner { gap: 12px; padding: 12px 16px; }
  .section, .hero { padding-left: 16px; padding-right: 16px; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
