/* Karen Miller Homes: shared styles for every page. */

/* Self-hosted fonts (Latin subset, SIL Open Font License; see assets/fonts). Hanken Grotesk is a variable font.
   The brand kit sets headings in Julius Sans One and text in Cerebri Sans. Cerebri needs a paid web license,
   so the site uses Hanken Grotesk, the open-source grotesk from the same foundry (Hanken Design Co.). */
@font-face {
  font-family: "Julius Sans One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/julius-sans-one-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  /* Karen Miller Homes brand kit: navy and rust lead, then sage, linen, cream, tan, and blush. */
  --stone: #f3f1e8;
  --paper: #ffffff;
  --mist: #d8d0c3;
  --rule: #e8c8bf;
  --brand: #043b50;
  --brand-dark: #02293a;
  --banner: #0b4a63;
  --accent: #b34a2d;
  --accent-dark: #8a3822;
  --accent-light: #d7b8b4;
  --accent-text: #b34a2d;
  --sage: #9baf8d;
  --sage-light: #e1e7da;
  --tan: #bf9164;
  --ink: #1b2a31;
  --muted: #5a6468;

  --font-display: "Julius Sans One", "Avenir Next", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --measure: 66ch;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--brand); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Headings use Julius Sans One. Subheadings (h3) use the text font, as the brand kit sets them. */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--brand);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.25vw, 2.5rem); }
.cta h2 { color: inherit; }
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.25; margin: 0 0 0.5em; }

p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* Header */

.site-header { border-bottom: 1px solid var(--rule); background: var(--stone); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.wordmark { display: block; line-height: 0; }
.wordmark img { height: 3.5rem; width: auto; }
.site-nav { order: 2; margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--mist); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-contact { order: 3; padding: 0.375rem 1.125rem; }
.nav-contact[aria-current="page"] { background: var(--accent-dark); border-color: var(--accent-dark); }
.header-call { order: 4; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.header-call svg { display: none; }
.header-call:hover { text-decoration: underline; }

/* Buttons */

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--paper); }
.button:disabled { opacity: 0.6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* The arch: the one signature shape, used for Karen's portrait. */

.arch {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0.5rem 0.5rem;
  background: var(--brand);
  border: 10px solid var(--paper);
  box-shadow: 0 0 0 1px var(--mist);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--accent-light);
  text-align: center;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* Page sections */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-paper { background: var(--paper); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-links { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.section-links a { display: inline-block; padding: 0.25rem 0; }
.lede { font-size: 1.25rem; color: var(--muted); }
/* A small label above a heading, in the brand kit's bold capitals. */
.eyebrow { margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.split .button, .narrow > .button, .areas .button { margin-top: 0.5rem; }

/* Home hero */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero .arch { max-width: 24rem; width: 100%; justify-self: end; }

/* eXp Realty band under the home hero. The logo is white, so it sits on navy. */

.brokerage { background: var(--brand); color: var(--stone); padding: 1.5rem 0; }
.brokerage .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.brokerage img { height: 3.5rem; width: auto; }
.brokerage p { margin: 0; font-size: 1.25rem; font-weight: 500; }

/* Page header for inner pages */

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head + .section:not(.section-paper, .cta) { padding-top: 0; }

/* Listings */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 2.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.listing-photo {
  aspect-ratio: 3 / 2;
  border-radius: 0.375rem;
  background: var(--mist);
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}
.listing-photo svg { width: 3.5rem; opacity: 0.6; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-price { font-family: var(--font-display); font-size: 1.625rem; margin: 0.875rem 0 0.125rem; }
.listing-address { margin: 0; }
.listing-address a { color: var(--ink); }
.listing-address a:hover { color: var(--brand); }
.listing-link { margin: 0.5rem 0 0; font-size: 0.9375rem; }
.listing-link a { display: inline-block; padding: 0.25rem 0; }
.listing-facts { color: var(--muted); margin: 0.25rem 0 0; font-size: 0.95rem; }
.listing-status { display: inline-block; margin-top: 0.625rem; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--brand); background: var(--sage-light); }
.listing-status-closed { color: var(--ink); background: var(--accent-light); }

/* Buying page: the heading beside a pull quote, cards, and questions */

.buy-head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: center; }
.pull-quote { margin: 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 3px solid var(--accent); }
.pull-quote p { margin: 0; font-size: clamp(1.375rem, 2.5vw, 1.75rem); font-weight: 500; line-height: 1.35; color: var(--brand); }
.card-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem; }
.card { padding: 1.5rem; background: var(--paper); border-top: 3px solid var(--sage); border-radius: 0 0 0.5rem 0.5rem; }
.card p:last-child { margin: 0; }
.faq h3 { margin-top: 2rem; }
.faq h3:first-child { margin-top: 0.5rem; }

/* Buy / sell split */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--mist); border: 1px solid var(--mist); border-radius: 0.5rem; overflow: hidden; }
.split > div { background: var(--paper); padding: clamp(1.75rem, 4vw, 3rem); }
.split a:not(.button) { display: inline-block; padding: 0.25rem 0; }

/* Steps: used on the buying and selling pages, which describe a real sequence. */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 46rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0 1.25rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent-text);
  grid-row: span 2;
}
.steps li > * { grid-column: 2; }
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; }
.steps p + p { margin-top: 0.75rem; }
.steps + .actions { margin-top: 2rem; }

/* Areas served */

.areas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.area-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem 1.5rem; }
.area-list li { padding-left: 1.25rem; position: relative; font-weight: 500; }
.area-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sage); }
.area-list li:last-child { color: var(--muted); font-weight: 400; }

.area-list a { color: var(--ink); }
.area-list a:hover { color: var(--brand); }

/* Areas hub and town pages */

.town-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0 2.5rem; }
.town-card { padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.town-card h2 { font-size: 1.75rem; margin-bottom: 0.125rem; }
.town-card h2 a { color: var(--brand); text-decoration: none; }
.town-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.town-county { margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.town-card p:last-child { margin: 0; }

.town-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.town-layout h3 { margin-top: 2rem; }
.town-facts { background: var(--stone); border-top: 3px solid var(--sage); border-radius: 0 0 0.5rem 0.5rem; padding: 1.5rem; }
.town-facts h2 { font-size: 1.5rem; }
.town-facts dl { margin: 0; display: grid; gap: 0.875rem; }
.town-facts dt { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.town-facts dd { margin: 0; font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; color: var(--brand); }
.town-facts .note { margin: 1rem 0 0; }

/* Recent sales */

.sale-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1.5rem; }
.sale-card { padding: 1.5rem; background: var(--stone); border-top: 3px solid var(--accent); border-radius: 0 0 0.5rem 0.5rem; }
.section:not(.section-paper) .sale-card { background: var(--paper); }
.sale-card h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }
.sale-card p:last-child { margin: 0; }
.sale-meta { margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.town-sales-head { margin-top: 3rem; }
.hood-list { padding-left: 1.25rem; }
.hood-list li + li { margin-top: 0.5rem; }

.more-areas { list-style: none; margin: 1.5rem 0 0; padding: 0; columns: 10rem 5; column-gap: 2rem; color: var(--muted); }
.more-areas li { break-inside: avoid; padding: 0.125rem 0; }

/* Quote */

.quote { max-width: 48rem; margin: 0 auto; text-align: center; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.3; color: var(--brand); }
.quote figcaption { margin-top: 1.25rem; color: var(--muted); }

/* Call to action band */

.cta { background: var(--banner); color: var(--stone); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta h2 { margin: 0 0 0.25rem; }
.cta p { margin: 0; color: var(--stone); }
.cta p + p { margin-top: 0.75rem; }
.cta :focus-visible { outline-color: var(--stone); }
.cta .actions { margin-top: 0; }

/* About */

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about h2 { margin-top: 2.5rem; }
.facts { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.75rem; max-width: var(--measure); }
.facts li { padding-left: 1.25rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sage); }

/* Contact */

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-form { display: grid; gap: 1.25rem; background: var(--paper); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 0.5rem; border: 1px solid var(--mist); }
.contact-form label, .calc-form label { display: grid; gap: 0.375rem; font-weight: 600; align-content: start; }
.contact-form .optional, .calc-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea,
.calc-form input, .calc-form select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--stone);
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--mist);
  border-radius: 0.375rem;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus,
.calc-form input:focus, .calc-form select:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 0; }
.contact-form .row, .calc-form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
.contact-form .row-3, .calc-form .row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.contact-form .button { justify-self: start; }
.form-note { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.honeypot { display: none; }
.form-status { margin: 0; }
.form-status:empty { display: none; }
.form-status.error { color: #a3261b; }
.form-status.sent { color: var(--brand); font-weight: 600; }
.contact-details { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.contact-details > h2 { font-size: 1.75rem; margin: 0; }
.contact-details .facts { margin: 0; }
.contact-details > p { margin: 0; }
.contact-details h3 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.contact-details p { margin: 0; font-size: 1.25rem; }

/* Blog */

.byline { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.byline img { width: 3rem; height: 3rem; border-radius: 999px 999px 0.25rem 0.25rem; object-fit: cover; object-position: center 20%; }
.byline p { margin: 0; font-size: 0.9375rem; line-height: 1.4; color: var(--muted); }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; max-width: 46rem; }
.post-card { padding-bottom: 2.5rem; border-bottom: 1px solid var(--rule); }
.post-card h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }

.post-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem); }
.post-head .wrap { max-width: 50rem; }
.post-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.post-series { margin: 0 0 1rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.post-series a { color: var(--accent-text); text-decoration: none; }
.post-series a:hover { text-decoration: underline; }

.post-body { max-width: 50rem; background: var(--paper); padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); border-radius: 0.5rem 0.5rem 0 0; }
.post-body h2 { margin-top: 2.5rem; }
.post-body h3 { font-size: 1.25rem; }
.post-body ul { padding-left: 1.25rem; margin: 0; }
.post-body li + li { margin-top: 0.5rem; }
.post-body .button { margin-top: 0.5rem; }
.note { font-size: 0.9375rem; color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 0 0 1rem; padding: 1.5rem 0; border-top: 2px solid var(--brand); border-bottom: 1px solid var(--mist); }
.stat-row-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-row div { display: flex; flex-direction: column; }
.stat-row dt { order: 2; font-weight: 600; font-size: 0.9375rem; }
.stat-row dd { order: 3; margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.stat-row .stat-value { order: 1; margin: 0 0 0.25rem; font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1; color: var(--brand); }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; margin: 1.5rem 0 2rem; background: var(--mist); border: 1px solid var(--mist); border-radius: 0.5rem; overflow: hidden; }
.compare > div { background: var(--stone); padding: 1.25rem 1.5rem; }
.compare .compare-lower { background: var(--sage-light); }
.compare-label { margin: 0; font-weight: 600; }
.compare-value { margin: 0.25rem 0 0; font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 2.75rem); line-height: 1.1; color: var(--brand); }
.compare-value span { font-family: var(--font-body); font-size: 1rem; color: var(--muted); }
.compare figcaption { grid-column: 1 / -1; background: var(--paper); padding: 1rem 1.5rem; font-size: 0.9375rem; color: var(--muted); }
.compare figcaption strong { color: var(--ink); }

.two-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; margin: 2rem 0; }

.market-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.market-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.market-table caption { text-align: left; color: var(--muted); padding-bottom: 0.5rem; }
.market-table th, .market-table td { text-align: left; padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--mist); vertical-align: top; }
.market-table thead th { font-weight: 600; border-bottom: 2px solid var(--brand); }
.market-table td { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; }
.market-table td span { display: block; font-family: var(--font-body); font-size: 0.875rem; color: var(--muted); }
.market-table-text td { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.5; }

.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--muted); }
.sources h2 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; margin: 0 0 0.5rem; }

/* Latest blog post on the home page */

.latest-post article { max-width: 46rem; }
.latest-post h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.latest-post h3 a { color: var(--ink); text-decoration: none; }
.latest-post h3 a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }
.post-date { font-size: 0.9375rem; color: var(--muted); }
.blog-follow { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.blog-follow a { display: inline-block; padding: 0.25rem 0; }

/* Tool links on the buy and sell pages */

.tool-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.tool-list a { display: grid; gap: 0.25rem; height: 100%; padding: 1.25rem 1.5rem; background: var(--paper); border: 1px solid var(--mist); border-left: 3px solid var(--tan); border-radius: 0 0.5rem 0.5rem 0; text-decoration: none; color: var(--ink); }
.tool-list a:hover { border-color: var(--brand); border-left-color: var(--tan); }
.tool-list strong { font-size: 1.25rem; font-weight: 600; color: var(--brand); }
.tool-list span { color: var(--muted); font-size: 0.9375rem; }

/* Mortgage calculator */

.calc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.calc-form { display: grid; gap: 1.25rem; }
.calc-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.calc-form legend { font-weight: 600; padding: 0; margin-bottom: 0.75rem; }
.hint { font-weight: 400; font-size: 0.875rem; color: var(--muted); }
.calc-result { position: sticky; top: 1.5rem; background: var(--brand); color: var(--paper); border-radius: 0.5rem; padding: clamp(1.5rem, 4vw, 2rem); }
.calc-label { margin: 0; color: #c8d3d8; font-weight: 600; }
.calc-total { margin: 0.25rem 0 1.25rem; font-family: var(--font-display); font-size: clamp(2.75rem, 7vw, 3.75rem); line-height: 1; }
.calc-breakdown { margin: 0; display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid #1d5a73; }
.calc-breakdown div { display: flex; justify-content: space-between; gap: 1rem; }
.calc-breakdown dt { color: #c8d3d8; }
.calc-breakdown dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-compare { margin: 1.25rem 0 0; padding: 1rem; background: #0a4c66; border-radius: 0.375rem; font-size: 0.9375rem; }
.narrow { max-width: 46rem; }

/* Footer */

.legal-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.5rem; }
.legal-links a { display: inline-block; padding: 0.25rem 0; color: #c8d3d8; }
.policy h2 { font-size: 1.625rem; margin-top: 2rem; }
.policy h2:first-child { margin-top: 0; }

.site-footer { background: var(--brand-dark); color: #c8d3d8; padding: 3rem 0 2.5rem; font-size: 0.95rem; }
/* The footer keeps plain fr columns, so the email address can widen its column instead of overflowing. */
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer a { color: var(--paper); }
.site-footer .wordmark { display: inline-block; margin-bottom: 1rem; }
.site-footer .wordmark img { height: 3rem; }
.footer-exp { height: 2.5rem; width: auto; margin-top: 1.25rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #1d4557; padding-top: 1.5rem; margin: 0; max-width: none; font-size: 0.875rem; color: #a9bbc3; }

/* Narrow screens */

@media (max-width: 52rem) {
  .about, .contact-layout, .split, .areas, .town-layout, .calc, .buy-head { grid-template-columns: minmax(0, 1fr); }
  .calc-result { position: static; }
  /* Phones and tablets: logo, call icon, and Contact on the first row; the links on the second row. */
  .site-header .wrap { gap: 0.75rem; }
  .wordmark img { height: 2.75rem; }
  .header-call { order: 2; margin-left: auto; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 2px solid var(--brand); border-radius: 50%; }
  .header-call svg { display: block; }
  .header-call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-contact { order: 3; }
  .site-nav { order: 4; width: 100%; margin-left: 0; }
  .site-nav ul { gap: 0.25rem 1.25rem; }
  .about .arch { max-width: 16rem; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
}

/* The hero stays in two columns on tablets and stacks on phones. */
@media (max-width: 44rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .arch { justify-self: start; max-width: 13rem; border-width: 6px; }
}

@media (max-width: 32rem) {
  .contact-form .row, .contact-form .row-3, .calc-form .row, .calc-form .row-3 { grid-template-columns: minmax(0, 1fr); }
  .stat-row, .compare, .two-lists { grid-template-columns: minmax(0, 1fr); }
}

/* Very narrow phones: keep the logo, call icon, and Contact button on one row. */
@media (max-width: 22.5rem) {
  .site-header .wrap { gap: 0.5rem; }
  .wordmark img { height: 2.25rem; }
  .nav-contact { padding: 0.375rem 0.875rem; }
  .site-nav ul { gap: 0.25rem 1rem; }
  /* One footer column, so the email address fits. */
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}

.actions + .note { margin-top: 1rem; }
