/* Samuel Adams Realty — samueladamsrealty.com
   Brand: roofline red, ink black, warm paper. Garamond throughout. */

:root {
  --red: #b3262b;
  --red-dark: #8e1c20;
  --ink: #16181b;
  --ink-2: #3a3f45;
  --muted: #6b7178;
  --paper: #f7f4ef;
  --stone: #ece6dc;
  --line: #ddd5c8;
  --white: #ffffff;
  --gold: #c8a96a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 24, 27, 0.08);
  --serif: "EB Garamond", Garamond, "Adobe Garamond Pro", Georgia, serif;
  --display: var(--serif);
  --sans: var(--serif);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-family: var(--display); font-size: clamp(2.6rem, 5.8vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.eyebrow {
  font-family: var(--sans); font-size: .9rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--red); margin-bottom: .9rem; display: inline-block;
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 .95rem/1 var(--sans); letter-spacing: .02em;
  padding: 15px 24px; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: all .2s ease; white-space: nowrap;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); transform: translateY(-1px); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--stone); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
/* The header and footer are baked into each page for crawlers; the wrappers add no box of their own. */
#site-header, #site-footer { display: contents; }
.topbar { background: var(--ink); color: #cfd2d6; font-size: .95rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(247, 244, 239, .94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark { display: flex; flex-direction: column; align-items: center; font-family: var(--serif); text-transform: uppercase; line-height: .92; color: inherit; }
.wordmark b { font-weight: 700; font-size: 1.2rem; letter-spacing: .03em; }
.wordmark span { font-weight: 500; font-size: 1.32rem; letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: 10px 12px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); }
.nav .btn { margin-left: 8px; padding: 12px 18px; color: var(--white); }
.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--ink); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
}
@media (max-width: 1120px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); padding: 12px 16px 24px; border-bottom: 1px solid var(--line);
    /* Closed: fully above the screen (clear of the top bar) and out of the tab order. */
    transform: translateY(calc(-100% - 120px)); visibility: hidden;
    transition: transform .25s ease, visibility .25s; box-shadow: var(--shadow);
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 14px 0 0; }
  .topbar .hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: stretch; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .lede { margin: 18px 0 30px; }
.hero-card {
  position: relative; background: var(--ink); color: var(--white); border-radius: 22px 22px 0 0;
  padding: 0; overflow: hidden; min-height: 460px; display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% 22%; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,10,12,.85)); }
.hero-card .caption { position: relative; z-index: 1; padding: 26px 28px; }
.hero-card .caption strong { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; display: block; }
.hero-card .caption .btn { display: flex; width: max-content; margin-top: 18px; }
.photo-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, #2a2e33, var(--ink));
}
.photo-fallback span { font-family: var(--display); font-size: 7rem; color: rgba(255,255,255,.08); letter-spacing: .05em; }
.skyline { display: block; width: 100%; height: auto; margin-top: -1px; color: var(--ink); }

.quick-search {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; display: flex; gap: 8px; max-width: 560px; border: 1px solid var(--line);
}
.quick-search input {
  flex: 1; border: 0; font: 500 1rem var(--sans); padding: 12px 14px; background: transparent; min-width: 0; color: var(--ink);
}
.quick-search input:focus { outline: none; }
.trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; font-size: 1.02rem; color: var(--ink-2); }
.trust b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); display: block; line-height: 1.1; }
.stars { color: var(--gold); letter-spacing: 2px; }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { min-height: 380px; border-radius: 22px 22px 0 0; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { margin-bottom: 44px; max-width: 760px; }
.section-head.center { margin-inline: auto; }
.bg-white { background: var(--white); }
.bg-stone { background: var(--stone); }
.bg-ink { background: var(--ink); color: #e9e9ea; }
.bg-ink h2, .bg-ink h3 { color: var(--white); }
.bg-ink .lede, .bg-ink .muted { color: #b9bdc2; }
.bg-ink .eyebrow { color: #ff8e8a; }
@media (max-width: 700px) { section { padding: 68px 0; } }

/* Service tiles — the "one stop shop" grid */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; text-decoration: none; color: var(--ink); transition: all .2s ease;
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.tile:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.tile .ico { width: 46px; height: 46px; border-radius: 12px; background: #f6e3e3; color: var(--red); display: grid; place-items: center; margin-bottom: 8px; }
.tile .ico svg { width: 24px; height: 24px; }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: .96rem; }
.tile .go { margin-top: auto; padding-top: 12px; font-weight: 700; font-size: .9rem; color: var(--red); }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .tiles.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tiles, .tiles.four { grid-template-columns: 1fr; } }

/* Split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--ink);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 30%; position: relative; z-index: 1; }
.portrait .badge {
  position: absolute; z-index: 2; left: 18px; bottom: 18px; background: var(--white); color: var(--ink);
  border-radius: 12px; padding: 12px 16px; font-size: .85rem; box-shadow: var(--shadow);
}
.portrait .badge b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; display: block; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 30px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--ink); }
.stat span { font-size: 1rem; color: var(--muted); }
.bg-ink .stats, .bg-ink .stat { border-color: #33373c; }
.bg-ink .stat b { color: var(--white); }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Checklist */
.checks { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 12px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M5 10.5l3 3 7-7'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Testimonials */
.reviews { columns: 3 320px; column-gap: 18px; }
.review {
  break-inside: avoid; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 0 0 18px; display: block;
}
.review blockquote { margin: 12px 0 18px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.6; color: var(--ink-2); }
.review figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.review .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--stone); color: var(--red);
  display: grid; place-items: center; font-weight: 800; flex: none;
}
.review .src { color: var(--muted); font-size: .8rem; display: block; }
.review.clamp blockquote { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.review .more { background: none; border: 0; color: var(--red); font: 700 .85rem var(--sans); padding: 0; cursor: pointer; margin: -8px 0 16px; }
.rating-bar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 30px;
}
.rating-bar .big { font-family: var(--display); font-size: 3rem; line-height: 1; }
.feature-quote { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35; margin: 0 0 22px; }
.feature-quote::before { content: "\201C"; color: var(--red); font-size: 1.4em; line-height: 0; vertical-align: -0.35em; margin-right: 4px; }

/* Market */
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.mcard .k { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mcard .v { font-family: var(--display); font-size: 2.3rem; line-height: 1.1; margin: 8px 0 6px; }
.mcard .d { font-size: .88rem; color: var(--ink-2); }
.up { color: #2e7d4f; } .down { color: var(--red); }
@media (max-width: 900px) { .market-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .market-grid { grid-template-columns: 1fr; } }
.source { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* Cards (blog / community) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .art { aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--white); position: relative; overflow: hidden; }
.card .art svg { width: 54px; height: 54px; opacity: .95; }
.card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .tag { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card a.go { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.art.a1 { background: linear-gradient(135deg, #b3262b, #6e1316); }
.art.a2 { background: linear-gradient(135deg, #2f3a44, #16181b); }
.art.a3 { background: linear-gradient(135deg, #c8a96a, #8a6b2f); }
.art.a4 { background: linear-gradient(135deg, #48625a, #233530); }
.art.a5 { background: linear-gradient(135deg, #5b4a6b, #2c2235); }
.art.a6 { background: linear-gradient(135deg, #3b5f86, #1d3047); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 34px; box-shadow: var(--shadow); color: var(--ink); }
.form-card h2, .form-card h3 { font-size: 1.6rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } .form-card { padding: 24px 20px; } }
label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea {
  width: 100%; font: 500 1rem var(--sans); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 14px; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); background: var(--white); }
textarea { min-height: 110px; resize: vertical; }
.consent { font-size: .88rem; color: var(--muted); margin: 14px 0 18px; line-height: 1.5; }
.form-success { display: none; background: #eaf5ee; border: 1px solid #b9dcc6; color: #1f5a37; padding: 16px 18px; border-radius: 12px; margin-top: 16px; }
.form-success.show { display: block; }
/* Honeypot for bots; never shown to people. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success.error { background: #fbeceb; border-color: #efc2c0; color: var(--red-dark); }
.steps-indicator { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-indicator span { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.steps-indicator span.on { background: var(--red); }
.step { display: none; }
.step.active { display: block; }

/* Page header (inner pages) */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); background:
  radial-gradient(1200px 300px at 85% -10%, rgba(179,38,43,.08), transparent 70%), var(--paper); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 14px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.calc-out { background: var(--ink); color: var(--white); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.calc-out .pay { font-family: var(--display); font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; margin: 10px 0 16px; }
.calc-out dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; font-size: .92rem; color: #c6c9cd; }
.calc-out dd { margin: 0; color: var(--white); text-align: right; }
@media (max-width: 800px) { .calc { grid-template-columns: 1fr; } }

/* Timeline (about) */
.timeline { border-left: 2px solid var(--line); padding-left: 26px; display: grid; gap: 26px; }
.timeline div { position: relative; }
.timeline div::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--paper); }
.timeline b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; display: block; }
.press { display: flex; gap: 20px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); }
.press:hover { border-color: var(--red); color: var(--ink); }
.press .pub { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.press h3 { margin: 4px 0; font-size: 1.2rem; }

/* CTA band */
.cta-band { background: var(--red); color: var(--white); border-radius: 24px; padding: 54px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
.cta-band h2 { color: var(--white); margin: 0 0 8px; }
.cta-band p { margin: 0; color: #ffe1df; }
.cta-band .btn-row { justify-content: flex-end; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; padding: 36px 26px; } .cta-band .btn-row { justify-content: flex-start; } }

/* Neighborhood chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: .9rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--red); color: var(--red); }

/* Footer */
.site-footer { background: var(--ink); color: #aeb3b8; padding: 72px 0 28px; font-size: .92rem; }
.site-footer a { color: #e8e9ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 16px; font-weight: 800; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.legal { border-top: 1px solid #2c3035; margin-top: 52px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: .8rem; color: #8d9298; }
.legal .kw-logo { height: 46px; width: auto; flex: none; }
.legal .eho { display: inline-flex; align-items: center; gap: 8px; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3a3f45; display: grid; place-items: center; }
.social svg { width: 17px; height: 17px; fill: #e8e9ea; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* Floating mobile call bar */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(22,24,27,.96);
  }
  .mobile-bar .btn { padding: 13px 10px; font-size: .9rem; }
  body { padding-bottom: 72px; }
}

/* Content is always visible; sections only lift gently as they arrive. */
.reveal { transition: transform .6s ease; }
.reveal:not(.in) { transform: translateY(10px); }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal:not(.in) { transform: none; transition: none; } html { scroll-behavior: auto; } }
