/* ============================================================
   Feery Family Team — Design System
   Berkshire Hathaway HomeServices New England Properties
   Palette: Cabernet #552548 · Ink #221A20 · Cream #F7F3EE ·
            Warm white #FDFBFA · Gold #C9A227 · Sage #7A8B6F
   Headings: Playfair Display (self-hosted variable, 500–800)
   Body: system sans stack (zero-download)
   ============================================================ */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/playfair-display-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cabernet: #552548;
  --cabernet-deep: #3E1B35;
  --cabernet-soft: #6D3660;
  --ink: #221A20;
  --body: #453B42;
  --muted: #6E6069;
  --cream: #F7F3EE;
  --warm-white: #FDFBFA;
  --line: #E7DED9;
  --gold: #C9A227;
  --gold-deep: #7E620E;
  --gold-soft: #F0E3BC;
  --sage: #7A8B6F;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(34, 26, 32, .07), 0 1px 2px rgba(34, 26, 32, .05);
  --shadow-md: 0 6px 18px rgba(34, 26, 32, .09), 0 2px 6px rgba(34, 26, 32, .06);
  --shadow-lg: 0 18px 44px rgba(34, 26, 32, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1140px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--warm-white);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--cabernet); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cabernet-soft); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.18; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; }
h4 { font-family: var(--sans); font-size: .84rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5em; }
p { margin: 0 0 1.1em; }
strong { color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 74px 0; }
.section--cream { background: var(--cream); }
.section--cabernet { background: linear-gradient(160deg, var(--cabernet-deep), var(--cabernet)); color: #EFE4EB; }
.section--cabernet h2, .section--cabernet h3 { color: #FFF; }
.section--cabernet a { color: var(--gold-soft); }
.section--cabernet strong { color: #F5D889; }
.cta-band strong { color: #F5D889; }

.kicker {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px;
}
.section--cabernet .kicker { color: var(--gold); }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 46em; }
.section--cabernet .lede { color: #D9C7D3; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253, 251, 250, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; gap: 26px;
  max-width: var(--wrap); margin: 0 auto; padding: 12px 22px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__logo { height: 48px; width: auto; display: block; flex: none; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.18rem; color: var(--ink); line-height: 1.1; letter-spacing: .01em; }
.brand__sub { font-size: .64rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: .93rem; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 9px 12px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--cream); color: var(--cabernet); }

.btn {
  display: inline-block; font-weight: 700; text-decoration: none; text-align: center;
  border-radius: 10px; padding: 13px 26px; font-size: 1rem; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: #2A2109; box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: #D9B23A; color: #2A2109; box-shadow: var(--shadow-md); }
.btn--ghost { border-color: rgba(255,255,255,.65); color: #FFF; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #FFF; }
.btn--cabernet { background: var(--cabernet); color: #FFF; }
.btn--cabernet:hover { background: var(--cabernet-soft); color: #FFF; }
.btn--sm { padding: 9px 18px; font-size: .92rem; }

.header-phone { white-space: nowrap; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #FFF; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(41, 15, 35, .82) 0%, rgba(62, 27, 53, .58) 46%, rgba(62, 27, 53, .22) 100%);
}
.hero__inner {
  position: relative; z-index: 2; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(84px, 12vw, 150px) 22px;
}
.hero h1 { color: #FFF; max-width: 15em; text-wrap: balance; }
.hero .lede { color: #EBDCE6; font-size: 1.2rem; max-width: 36em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__trust { margin-top: 26px; font-size: .86rem; color: #D4BFCD; letter-spacing: .02em; }
.hero--page { text-align: left; }
.hero--page .hero__inner { padding: clamp(64px, 9vw, 110px) 22px; }

/* ---------- Stat bar ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-sm);
}
.stat__num { font-family: var(--serif); font-size: 2.15rem; font-weight: 750; color: var(--cabernet); line-height: 1; }
.stat__label { font-weight: 650; color: var(--ink); margin-top: 8px; font-size: .98rem; }
.stat__src { font-size: .74rem; color: var(--muted); margin-top: 6px; }
.stats__note { font-size: .78rem; color: var(--muted); margin-top: 20px; text-align: center; font-style: italic; }
.record-card { background: rgba(255,255,255,.06); border: 1px solid rgba(245,216,137,.38); border-radius: var(--radius); padding: 34px 30px; text-align: center; }
.record-card__tag { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.record-card__price { font-family: var(--serif); font-size: 3.6rem; font-weight: 750; color: #F5D889; line-height: 1; margin-top: 8px; }
.record-card__addr { margin-top: 12px; color: #FFF; font-weight: 600; }
.record-card__specs { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(245,216,137,.25); color: #D9C7D3; font-size: .95rem; display: grid; gap: 7px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card__body { padding: 22px 24px 24px; }
.card__body h3 a { text-decoration: none; color: var(--ink); }
.card__body h3 a:hover { color: var(--cabernet); }
.card__meta { font-size: .85rem; color: var(--muted); }
.card--flag { border-top: 4px solid var(--gold); }

/* Agent cards */
.agent-card { text-align: center; }
.agent-card__photo {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: top center;
  margin: 26px auto 0; border: 4px solid var(--cream); box-shadow: var(--shadow-sm);
}
.agent-card__role { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.agent-card__lic { font-size: .76rem; color: var(--muted); }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.split__img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 1.2em 0; }
.checklist li { padding-left: 34px; position: relative; margin-bottom: 13px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: var(--gold-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8861D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}

/* ---------- Testimonials ---------- */
.quote {
  background: var(--warm-white); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.quote p { font-size: 1.02rem; font-style: italic; color: var(--ink); }
.quote footer { font-size: .88rem; font-weight: 650; color: var(--muted); font-style: normal; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 24px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.faq summary {
  font-weight: 700; color: var(--ink); font-size: 1.04rem; cursor: pointer;
  padding: 14px 0; list-style: none; position: relative; padding-right: 34px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold-deep); transition: transform .18s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 18px; }

/* ---------- Forms ---------- */
.lead-form {
  background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 26px; box-shadow: var(--shadow-lg);
}
.lead-form h3 { margin-bottom: 4px; }
.lead-form .form-note { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .86rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #FFF;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.lead-form .btn { width: 100%; margin-top: 4px; }
.form-micro { font-size: .8rem; color: var(--muted); margin-top: 12px; text-align: center; }
.form-micro a { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--cabernet-deep) 0%, var(--cabernet) 70%, var(--cabernet-soft) 100%);
  border-radius: var(--radius); padding: clamp(38px, 6vw, 60px);
  color: #EFE4EB; display: grid; grid-template-columns: 1.4fr .8fr; gap: 30px; align-items: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #FFF; margin-bottom: .3em; }
.cta-band p { color: #DCC8D6; margin: 0; }
.cta-band__actions { display: flex; flex-direction: column; gap: 12px; }
.cta-band__actions .btn { width: 100%; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; background: var(--warm-white);
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; font-size: .97rem;
}
table.data th { background: var(--cream); text-align: left; padding: 12px 16px; color: var(--ink); font-size: .86rem; letter-spacing: .04em; text-transform: uppercase; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); }
table.data tr:nth-child(even) td { background: #FBF8F5; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .84rem; color: #D4BFCD; margin-bottom: 18px; }
.crumbs a { color: #E9D9E4; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-current] { color: #FFF; font-weight: 600; }
body > .crumbs, .crumbs--light { color: var(--muted); }
.crumbs--light a { color: var(--cabernet); }
.crumbs--light span[aria-current] { color: var(--ink); }

/* ---------- Byline ---------- */
.byline {
  display: flex; align-items: center; gap: 14px; margin: 34px 0 0;
  padding: 18px 22px; background: var(--cream); border-radius: var(--radius-sm); font-size: .92rem;
}
.byline img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top center; }
.byline strong { display: block; }

/* ---------- Sources ---------- */
.sources { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 44px; padding-top: 18px; }
.sources ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: #2B1526; color: #C9B3C2; font-size: .93rem; margin-top: 84px; }
.site-footer a { color: #E4D3DE; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 38px;
  max-width: var(--wrap); margin: 0 auto; padding: 58px 22px 40px;
}
.site-footer h3 { color: #FFF; font-family: var(--sans); font-size: .84rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 22px; text-align: center; font-size: .78rem; color: #9A8194; line-height: 1.7;
  max-width: var(--wrap); margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand__logo { height: 62px; width: auto; display: block; }
.footer-brand span { font-family: var(--serif); font-weight: 700; color: #FFF; font-size: 1.05rem; }
.eho { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; opacity: .85; }
.footer-social { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.footer-social a { display: inline-flex; align-items: center; gap: 8px; color: #E4D3DE; font-weight: 600; }
.footer-social a:hover { color: var(--gold); text-decoration: none; }
.footer-social svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 18px; } .mt-3 { margin-top: 30px; } .mt-4 { margin-top: 44px; }
.mb-2 { margin-bottom: 18px; } .mb-3 { margin-bottom: 30px; }
.small { font-size: .86rem; color: var(--muted); }
.gold-num { color: var(--gold-deep); font-weight: 750; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #2A2109; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Calculator (cost-to-sell) ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.calc__result {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; position: sticky; top: 90px;
}
.calc__row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .97rem; }
.calc__row--total { border-bottom: 0; border-top: 2px solid var(--gold); margin-top: 8px; padding-top: 14px; font-weight: 750; color: var(--ink); font-size: 1.12rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stats, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split, .calc { grid-template-columns: 1fr; }
  .split__img { order: -1; }
  .cta-band { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 54px 0; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--warm-white); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 10px; border-radius: 8px; }
  .nav-toggle { display: block; }
  .header-phone { padding: 9px 14px; font-size: .9rem; }
  .brand__logo { height: 40px; }
  .grid--2, .grid--3, .grid--4, .stats { grid-template-columns: 1fr; }
  .hero .lede { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card { transition: none; }
}
