/* ==========================================================================
   Angela Cohen — North NJ Real Estate
   Design system. Static, dependency-free.
   Palette: warm neutral + deep ink, Sotheby's-adjacent restraint.
   ========================================================================== */

:root {
  /* Ink & neutrals */
  --ink:            #14161a;
  --ink-soft:       #3d434d;
  /* #6b7280 measured 4.25:1 on --paper-tint, under the WCAG AA 4.5:1 floor for
     small text. #616874 clears it on every background in the palette while
     staying visually "muted". Re-check with a contrast tool before lightening. */
  --ink-mute:       #616874;
  --rule:           #e4e2dd;
  --paper:          #ffffff;
  --paper-warm:     #faf8f5;
  --paper-tint:     #f3f0ea;

  /* Accent — muted brass, luxury without shouting */
  --accent:         #8a6d3b;
  --accent-deep:    #6d5530;
  --accent-wash:    #f6f1e7;

  /* Type scale */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing */
  --gap:      1.5rem;
  --section:  clamp(3rem, 7vw, 6rem);
  --measure:  68ch;

  /* Shape */
  --radius:   4px;
  --radius-lg: 8px;
  --shadow:   0 1px 2px rgba(20,22,26,.05), 0 8px 24px -12px rgba(20,22,26,.12);
  --shadow-lg: 0 2px 4px rgba(20,22,26,.06), 0 24px 48px -20px rgba(20,22,26,.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.22rem, 2.2vw, 1.55rem); }
h4 { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p, li { max-width: var(--measure); }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { font-weight: 650; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .8rem;
}
.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 52rem); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-warm); }
.section--rule { border-top: 1px solid var(--rule); }
.grid { display: grid; gap: var(--gap); }
@media (min-width: 40rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 60rem) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.stack > * + * { margin-top: var(--gap); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; }
.brand__name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.brand__meta { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { font-size: .92rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 650; }
.nav__toggle {
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .45rem .7rem; cursor: pointer; font: inherit;
}
@media (max-width: 56rem) {
  .nav__toggle { display: block; }
  .nav {
    display: none; position: absolute; inset: 100% 0 auto; flex-direction: column;
    align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1.25rem;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Hero ---------- */
.hero { background: var(--paper-warm); border-bottom: 1px solid var(--rule); }
.hero__inner { padding-block: clamp(3rem, 8vw, 6rem); }
.hero h1 { max-width: 20ch; }
.hero .lede { max-width: 52ch; margin-bottom: 1.75rem; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card__meta { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .5rem; }

.card--area { text-decoration: none; color: inherit; transition: box-shadow .15s ease, border-color .15s ease; }
.card--area:hover { box-shadow: var(--shadow-lg); border-color: var(--accent); }
.card--area:hover h3 { color: var(--accent-deep); }

/* ---------- Stat strip ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.stat { border-left: 2px solid var(--accent); padding-left: 1rem; }
.stat__num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat__label { font-size: .85rem; color: var(--ink-mute); }

/* ---------- Prose (guides, legal) ---------- */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.7em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 650; background: var(--paper-warm); }
.prose blockquote {
  margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid var(--accent); color: var(--ink-soft); font-style: italic;
}

/* ---------- Notice / callout ---------- */
.notice {
  background: var(--accent-wash); border: 1px solid #e6dcc6;
  border-radius: var(--radius-lg); padding: 1.25rem 1.4rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice--warn { background: #fdf4ec; border-color: #f0dcc6; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--ink-mute); }
.field .req { color: #a4341f; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  /* #c9c5bd measured 1.72:1 against white — below the WCAG 1.4.11 3:1 floor for
     the boundary that identifies a form control. #8b8880 clears it. */
  border: 1px solid #8b8880; border-radius: var(--radius);
  padding: .7rem .8rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid var(--accent-wash); }
textarea { min-height: 8rem; resize: vertical; }
.checkbox { display: flex; gap: .7rem; align-items: flex-start; }
.checkbox input { width: auto; margin-top: .3rem; flex: none; }
.checkbox label { font-weight: 400; font-size: .9rem; line-height: 1.5; }
.hp { position: absolute; left: -9999px; }
.form__status { font-size: .92rem; padding: .8rem 1rem; border-radius: var(--radius); display: none; }
.form__status[data-state="error"] { display: block; background: #fdf0ed; border: 1px solid #f0cfc6; color: #7a2a17; }
.form__status[data-state="ok"] { display: block; background: #eef6ef; border: 1px solid #c9e2cd; color: #1f4d29; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; padding: 1.05rem 0; font-weight: 600; font-size: 1.05rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq .faq__body { padding-bottom: 1.15rem; }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .84rem; color: var(--ink-mute); padding-top: 1.5rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.crumbs li { margin: 0; max-width: none; }
.crumbs li + li::before { content: "/"; margin-right: .45rem; color: var(--rule); }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c8cbd1; padding-block: 3.5rem 2rem; margin-top: 0; font-size: .92rem; }
.footer a { color: #e8e6e1; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer h2, .footer h3 { color: #fff; font-family: var(--font-body); font-size: .8rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5rem; max-width: none; }
.footer__legal { border-top: 1px solid #2b2f36; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; color: #9aa0a8; }
.footer__legal p { max-width: none; }
.footer__legal p + p { margin-top: .7rem; }
.footer__badges { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.footer__badges img { height: 30px; width: auto; }

/* ---------- N.J.A.C. 11:5-6.1 compliant broker attribution ----------
   (b)1: the broker's regular business name must be MORE PROMINENT than the
         salesperson's or team's name.
   (b)2/(b)3: the required office-telephone / link information must appear in
         wording AS LARGE AS THE PREDOMINANT SIZE WORDING on the page.
   The size below is therefore deliberately large and NOT footer-small.
   Verify the final rendered size against the largest text on each page
   before launch. */
.footer__broker {
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  margin-bottom: 1.4rem;
}
.footer__broker-name {
  font-family: var(--font-display);
  /* N.J.A.C. 11:5-6.1(b)1: the brokerage's regular business name must render
     LARGER/more prominent than the salesperson's name on EVERY viewport.
     .brand__name (the agent's name, in the masthead) is a fixed 1.4rem = 22.4px.
     The clamp floor therefore MUST stay above 22.4px: 1.55rem = 24.8px.
     An earlier floor of 1.35rem (21.6px) inverted the hierarchy below ~862px
     viewport — i.e. on mobile, the majority of sessions. Do not lower this. */
  font-size: clamp(1.55rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  margin: 0 0 .35rem;
  max-width: none;
}
.footer__broker-line {
  font-size: 1.0625rem;                        /* NOT .82rem — see (b)2/(b)3 */
  line-height: 1.55;
  color: #d7dae0;
  margin: 0;
  max-width: 60ch;
}
.footer__broker-line a { color: #ffffff; text-decoration: underline; }
/* Shown while the licensed office telephone is unconfirmed by the brokerage.
   Deliberately legible, not hidden — it is an honest disclosure, not fine print. */
.tel-pending { color: #ffffff; font-style: italic; }
.footer__agent-line { font-size: .95rem; color: #b6bbc3; }

/* ---------- Utility ---------- */
.muted { color: var(--ink-mute); }
.small { font-size: .88rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rule-list { list-style: none; padding: 0; }
.rule-list li { border-bottom: 1px solid var(--rule); padding: .8rem 0; margin: 0; max-width: none; }
