/* ==========================================================================
   DESIGN TWENTY THREE llc — site stylesheet
   One stylesheet for every page. Page-specific rules are grouped at the end.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  --ink:        #1c1c1c;
  --ink-soft:   #4a4a4a;
  --ink-faint:  #767676;
  --paper:      #ffffff;
  --paper-warm: #f6f4f0;
  --rule:       #ddd8d0;
  --rule-soft:  #ebe7e1;
  --iron:       #2b2b2b;   /* dark bands, header, footer */
  --iron-line:  #454545;
  --brass:      #a8864f;   /* accent */
  --brass-dark: #8c6f3f;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --script: "Hurricane", "Brush Script MT", cursive;

  --wrap: 1180px;
  --photo-max: 1240px;   /* picture width inside the iron surround */
  --gutter: 24px;
  --header-h: 142px;   /* topbar + compact masthead, desktop */
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;            /* no sideways scroll on any breakpoint */
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .45em; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--iron); color: #fff; padding: 12px 18px; font-family: var(--sans);
}
.skip-link:focus { left: 8px; top: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.topbar {
  background: var(--iron);
  color: #e8e4dd;
  font-family: var(--sans);
  font-size: 14.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--iron-line);
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  align-items: center; justify-content: center;
  min-height: 42px; padding-top: 8px; padding-bottom: 8px;
}
.topbar a { text-decoration: none; white-space: nowrap; }
.topbar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--iron);
  background-image: linear-gradient(rgba(24,24,24,.74), rgba(24,24,24,.8)), url("../img/texture-iron-top.jpg");
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--iron-line);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 158px;
  transition: min-height .22s ease;
}
.brand { display: flex; align-items: center; gap: 20px; text-decoration: none; color: #fff; }

/* The master lockup already reads "Design Twenty Three", so it carries the
   wordmark on its own — only the tagline sits beside it. */
.brand-mark {
  width: auto; height: 134px; flex: none;
  transition: height .22s ease;
}
.brand-tag {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .24em;
  text-transform: uppercase; color: #b9b2a6; line-height: 1.7;
  padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .22);
}

/* Shrink the lockup once the page scrolls so the sticky bar stays out of the
   way. site.js adds .is-compact past the first screenful. */
.masthead.is-compact .wrap { min-height: 98px; }
.masthead.is-compact .brand-mark { height: 78px; }
.masthead.is-compact .brand-tag { opacity: 0; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid #5a5a5a; border-radius: 3px;
  color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; padding: 9px 14px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brass); }

.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 16px; text-decoration: none; color: #ded9d1;
  font-family: var(--sans); font-size: 14.5px; letter-spacing: .14em;
  text-transform: uppercase; border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; border-bottom-color: var(--brass); }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass); }

/* ==========================================================================
   HERO / PAGE HEADS
   ========================================================================== */
/* The photograph sets the height of the section, so the whole house is always
   in frame — no matter how wide or narrow the window gets. The caption is laid
   over the picture on a desktop and drops underneath it on a phone, where a
   16:9 band is too short to hold the type. */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(rgba(20, 19, 17, .62), rgba(20, 19, 17, .62)),
    url("../img/texture-iron-frame.jpg") repeat;
  background-size: cover, 420px 420px;
  /* The surround is sized in vw, so it tracks the window. */
  padding: clamp(18px, 3.2vw, 60px) clamp(16px, 4.4vw, 104px);
}
.hero-media {
  position: relative;
  max-width: var(--photo-max); margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6),
              0 0 0 2px rgba(255, 255, 255, .06),
              0 18px 46px rgba(0, 0, 0, .5);
}

/* Keep the whole hero — and the scroll cue at the foot of it — on the first
   screen. The picture is 16:9, so capping the width caps the height; it is
   still never cropped, just narrower on a short window. */
@media (min-width: 861px) {
  .hero-media { max-width: min(var(--photo-max), calc((100vh - 300px) * 1.78)); }
}
.hero-photo { width: 100%; height: auto; display: block; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(0,0,0,.5) 0%, rgba(0,0,0,.2) 48%, rgba(0,0,0,.04) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.34) 0%, rgba(0,0,0,.08) 34%, rgba(0,0,0,.72) 100%);
}
.hero .wrap {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 1; padding-bottom: 38px;
}
.hero .btn { margin-bottom: 10px; }
/* Tag line centred over the picture; the plan count sits at the right edge
   below it, and the scroll cue at the foot. */
.hero-inner {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: absolute; inset: 0;
}
.hero-main { width: 100%; padding: 0 var(--gutter); }
.hero-main h1 { margin: 0; }
/* The plan count is a figure, not a second headline — a big numeral over a
   small letterspaced label, sitting under a brass rule so it reads as its own
   designed block rather than stray text floating on the right. */
.hero .hero-stat {
  position: absolute; right: var(--gutter); bottom: 38px;
  margin: 0 0 .4em;
  text-align: right;
  padding-top: 16px;
  border-top: 2px solid var(--brass);
}
.hero-stat-num {
  display: block;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: .92; color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
.hero-stat-label {
  display: block; margin-top: 12px;
  font-family: var(--sans);
  font-size: clamp(.68rem, 1.05vw, .84rem);
  letter-spacing: .21em; text-transform: uppercase;
  color: #e2dacb; white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
.hero h1 {
  /* Same size and face as the tag lines on the sections below it. */
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  margin-bottom: .3em;
  text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 1px 30px rgba(0,0,0,.6);
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  max-width: 44ch; margin-bottom: 1.4em;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.hero-plan {
  position: absolute; z-index: 2;
  right: 18px; top: 18px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.28);
  padding: 7px 13px; border-radius: 2px; backdrop-filter: blur(2px);
}

.pagehead {
  background: var(--iron);
  background-image: linear-gradient(rgba(25,25,25,.72), rgba(25,25,25,.82)), url("../img/texture-iron-btm.jpg");
  background-size: cover; background-position: center;
  color: #fff; padding: 62px 0 54px; text-align: center;
}
.pagehead h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: .25em;
}
.pagehead p {
  margin: 0 auto; max-width: 60ch; color: #ddd7cd;
  font-size: clamp(1rem, 2vw, 1.2rem);
}
.pagehead .rule { margin: 18px auto 20px; }
.pagehead-logo {
  width: auto; height: 150px; margin: 0 auto 22px;
  filter: drop-shadow(0 3px 16px rgba(0, 0, 0, .5));
}

.rule {
  width: 84px; height: 1px; background: var(--brass);
  border: 0; margin: 20px 0;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* --- Image bands (the home page's four sections) -------------------------- */
.band {
  position: relative;
  color: #fff; text-align: center;
  background:
    linear-gradient(rgba(20, 19, 17, .62), rgba(20, 19, 17, .62)),
    url("../img/texture-iron-frame.jpg") repeat;
  background-size: cover, 420px 420px;
  /* The surround is sized in vw, so it tracks the window. */
  padding: clamp(18px, 3.2vw, 60px) clamp(16px, 4.4vw, 104px);
}
.band-media {
  position: relative;
  max-width: var(--photo-max); margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6),
              0 0 0 2px rgba(255, 255, 255, .06),
              0 18px 46px rgba(0, 0, 0, .5);
}
.band-photo { width: 100%; height: auto; display: block; }
.band-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.4) 0%, rgba(0,0,0,.44) 45%, rgba(0,0,0,.5) 100%);
}
.band-plain .band-media::after { background: none; }

.band-caption {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-top: 40px; padding-bottom: 40px;
}
.band-plan {
  position: absolute; z-index: 2;
  right: 18px; top: 18px;
  font-family: var(--sans); font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.28);
  padding: 7px 13px; border-radius: 2px; backdrop-filter: blur(2px);
}
.band h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  max-width: 34ch; margin: 0 auto .9em;
  text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 1px 30px rgba(0,0,0,.6);
}
.band .rule { margin: 0 auto 26px; }


/* A quiet nudge that there is more below. It fades out as soon as the visitor
   starts scrolling, and clicking it jumps to the first section. */
.scroll-cue {
  position: absolute; z-index: 2;
  left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: #fff; text-decoration: none;
  font-family: var(--sans); font-size: 10px;
  letter-spacing: .26em; text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .85);
  opacity: .8;
  transition: opacity .35s ease;
}
.scroll-cue:hover { opacity: 1; }
.scroll-cue svg {
  width: 19px; height: auto; display: block;
  animation: scroll-cue-bob 2s ease-in-out infinite;
}
.scroll-cue.is-gone { opacity: 0; pointer-events: none; }

@keyframes scroll-cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* --- Home page: larger photographs, heavier iron surround ------------------ */
.page-home { --photo-max: 1426px; }   /* ~15% over the inner pages */
.page-home .hero,
.page-home .band {
  background-size: cover, 640px 640px;
  padding: clamp(26px, 3.8vw, 72px) clamp(22px, 4.4vw, 104px);
}
@media (min-width: 861px) {
  .page-home .hero-media { max-width: min(var(--photo-max), calc((100vh - 268px) * 1.78)); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 14px 30px; border: 1px solid var(--brass); border-radius: 2px;
  background: var(--brass); color: #fff; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--brass-dark); border-color: var(--brass-dark); }
.btn + .btn { margin-left: 10px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn-dark { background: var(--iron); border-color: var(--iron); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-sm { padding: 10px 20px; font-size: 12px; }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: 76px 0; }
.section-warm { background: var(--paper-warm); }
.section-dark {
  background: var(--iron);
  background-image: linear-gradient(rgba(25,25,25,.78), rgba(25,25,25,.86)), url("../img/texture-iron-btm.jpg");
  background-size: cover; background-position: center;
  color: #ece7df;
}
.section-dark h2 { color: #fff; }

.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: .05em; text-transform: uppercase;
}
.section-title p { color: var(--ink-soft); max-width: 62ch; margin: 0 auto; }
.section-dark .section-title p { color: #c9c3b8; }

.eyebrow {
  display: block; font-family: var(--sans); font-size: 12px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--brass);
  margin-bottom: 12px;
}

/* --- Feature rows (image + text) ----------------------------------------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.feature + .feature { margin-top: 76px; }
.feature.reverse .feature-media { order: 2; }
.feature-media img {
  width: 100%; border: 1px solid var(--rule);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .1);
}
.feature-body h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.feature-body p { color: var(--ink-soft); }

/* --- Card grids ---------------------------------------------------------- */
.cards {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--paper); border: 1px solid var(--rule);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,0,0,.11); }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: #fff; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 24px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.32rem; letter-spacing: .04em; text-transform: uppercase; }
.card-body p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card-body .btn { align-self: flex-start; margin-top: 8px; }

/* --- Prose (Services / About run the original copy straight down) --------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose .lede { font-size: 1.22em; color: var(--ink); }
.prose .lede-lg { font-size: 1.45em; line-height: 1.5; }
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: .05em; text-transform: uppercase;
  margin-top: 1.6em; margin-bottom: .7em;
}
.prose h2:first-child { margin-top: 0; }
.prose-figure { margin: 40px 0; }
.prose-figure img {
  width: 100%; border: 1px solid var(--rule);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .1);
}

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin-bottom: .35em; }
.plain-list a { text-decoration: none; border-bottom: 1px solid var(--brass); }
.plain-list a:hover { color: var(--brass-dark); }
.plain-list-lg { font-size: 1.15em; line-height: 1.9; }

.contact-card-center {
  max-width: 560px; margin: 0 auto; text-align: center;
}
.contact-actions { margin: 30px 0 0; }

/* --- Service list -------------------------------------------------------- */
.svc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.svc-list li {
  position: relative; padding: 14px 0 14px 34px; margin: 0;
  border-bottom: 1px solid var(--rule-soft);
}
.svc-list li::before {
  content: ""; position: absolute; left: 6px; top: 25px;
  width: 9px; height: 9px; background: var(--brass); transform: rotate(45deg);
}

/* --- Stats band ---------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat-num {
  display: block; font-size: clamp(2rem, 5vw, 3rem); color: #fff; line-height: 1;
}
.stat-label {
  display: block; font-family: var(--sans); font-size: 11.5px;
  letter-spacing: .18em; text-transform: uppercase; color: #b7b0a4; margin-top: 10px;
}

/* --- Contact ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-card {
  background: var(--paper); border: 1px solid var(--rule);
  padding: 38px 34px; box-shadow: 0 12px 30px rgba(0,0,0,.06);
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule-soft); margin: 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-label {
  flex: none; width: 92px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint); padding-top: 6px;
}
.contact-value { font-size: 1.12rem; }
.contact-value a { text-decoration: none; border-bottom: 1px solid var(--brass); }
.contact-value a:hover { color: var(--brass-dark); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--iron);
  background-image: linear-gradient(rgba(25,25,25,.84), rgba(25,25,25,.9)), url("../img/texture-iron-btm.jpg");
  background-size: cover; background-position: center;
  color: #c9c3b8; padding: 56px 0 30px;
  font-size: .95rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 34px; border-bottom: 1px solid var(--iron-line);
}
.site-footer h4 {
  color: #fff; font-family: var(--sans); font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: 16px;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-logo { width: auto; height: 160px; margin-bottom: 20px; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 9px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: .85rem; color: #8f8980;
  font-family: var(--sans); letter-spacing: .04em;
}

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */
.wrap-wide { max-width: 1480px; }

.portfolio-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px;
  align-items: start; padding: 22px 0 84px;
}

/* --- Filter sidebar ------------------------------------------------------ */
.filters {
  position: sticky; top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 34px);
  overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--rule); background: var(--paper-warm);
  padding: 22px 20px 26px;
}
.filters h2 {
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px;
}
.fgroup { border-top: 1px solid var(--rule); padding: 14px 0 4px; }
.fgroup:first-of-type { border-top: 0; padding-top: 0; }
.fgroup > summary {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; list-style: none; padding: 6px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after {
  content: "+"; font-family: var(--sans); font-size: 17px; font-weight: 400;
  color: var(--ink-faint); line-height: 1;
}
.fgroup[open] > summary::after { content: "\2212"; }
.fgroup-body { padding: 8px 0 12px; }

.opt {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--sans); font-size: 14px; line-height: 1.4;
  padding: 6px 0; cursor: pointer;
}
.opt input { margin: 2px 0 0; accent-color: var(--brass); flex: none; width: 16px; height: 16px; }
.opt .count { margin-left: auto; color: var(--ink-faint); font-size: 12px; padding-left: 8px; }
.opt.is-empty { opacity: .38; }

.range-row { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.range-row input[type="number"] {
  width: 100%; min-width: 0; font-family: var(--sans); font-size: 14px;
  padding: 9px 10px; border: 1px solid var(--rule); border-radius: 2px; background: #fff;
}
.range-row span { font-family: var(--sans); font-size: 13px; color: var(--ink-faint); flex: none; }

.chipset { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--sans); font-size: 13px;
  padding: 7px 13px; border: 1px solid var(--rule); border-radius: 2px;
  background: #fff; color: var(--ink); cursor: pointer; line-height: 1;
}
.chip:hover { border-color: var(--brass); }
.chip[aria-pressed="true"] { background: var(--iron); border-color: var(--iron); color: #fff; }
/* The category labels are long, so those chips run the full sidebar width. */
.chip-wide { width: 100%; text-align: left; padding: 9px 12px; }

/* --- Results ------------------------------------------------------------- */
.searchbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding-top: 40px;
}
.searchbar .search-field { flex: 1 1 320px; }
.search-field { position: relative; flex: 1 1 260px; min-width: 0; }
.search-field input {
  width: 100%; font-family: var(--sans); font-size: 15px;
  padding: 14px 42px 14px 16px;
  border: 1px solid var(--rule); border-radius: 2px; background: #fff;
}
.search-field input:focus { border-color: var(--brass); }
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: none; cursor: pointer;
  color: var(--ink-faint); font-size: 20px; line-height: 1; border-radius: 50%;
}
.search-clear:hover { color: var(--ink); background: var(--rule-soft); }
.searchbar select {
  font-family: var(--sans); font-size: 14px; padding: 13px 14px;
  border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink);
}

.filter-toggle { display: none; }

.resultbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between;
  padding: 0 0 16px; margin-bottom: 26px; border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 14px; color: var(--ink-soft);
}
.activefilters { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 12.5px;
  background: var(--paper-warm); border: 1px solid var(--rule);
  padding: 6px 8px 6px 11px; border-radius: 2px;
}
.tag button {
  border: 0; background: none; cursor: pointer; color: var(--ink-faint);
  font-size: 15px; line-height: 1; padding: 0 2px;
}
.tag button:hover { color: var(--ink); }
.link-btn {
  border: 0; background: none; cursor: pointer; padding: 4px 2px;
  font-family: var(--sans); font-size: 13px; color: var(--brass-dark);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

.plan-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.plan-card {
  border: 1px solid var(--rule); background: #fff;
  display: flex; flex-direction: column; text-align: left;
  padding: 0; cursor: pointer; font: inherit; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,.12); border-color: #c9c2b7; }
.plan-card-media {
  aspect-ratio: 3 / 4; background: #fff;
  border-bottom: 1px solid var(--rule-soft); overflow: hidden;
}
.plan-card-media img { width: 100%; height: 100%; object-fit: contain; }
.plan-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.plan-card h3 {
  font-size: 1.32rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px;
}
.plan-style {
  font-family: var(--sans); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass-dark); margin-bottom: 12px;
}
.plan-specs {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft);
  padding-top: 12px; border-top: 1px solid var(--rule-soft);
}
.plan-specs b { color: var(--ink); font-weight: 600; }

.noresults { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.noresults h3 { font-size: 1.5rem; }

/* --- Plan dialog --------------------------------------------------------- */
dialog.plan-modal {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--paper); color: var(--ink); overflow: hidden;
}
dialog.plan-modal::backdrop { background: rgba(18,17,15,.72); backdrop-filter: blur(2px); }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--rule); flex: none;
}
.modal-head h2 { font-size: 1.6rem; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 4px; }
.modal-close {
  flex: none; width: 40px; height: 40px; border: 1px solid var(--rule);
  background: #fff; border-radius: 2px; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-soft);
}
.modal-close:hover { background: var(--paper-warm); color: var(--ink); }
.modal-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0; overflow: hidden; min-height: 0;
}
.modal-sheet {
  background: var(--paper-warm); padding: 18px;
  overflow: auto; display: flex; align-items: flex-start; justify-content: center;
}
.modal-sheet img {
  width: 100%; max-width: 780px; background: #fff;
  border: 1px solid var(--rule); box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.modal-side { padding: 22px; overflow-y: auto; border-left: 1px solid var(--rule); }
.spec-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; margin-bottom: 22px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); }
.spec-table th { font-weight: 500; color: var(--ink-faint); width: 48%; }
.spec-table td { text-align: right; font-weight: 600; }
.modal-side h3 {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px;
}
.featurelist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.featurelist span {
  font-family: var(--sans); font-size: 12.5px;
  background: var(--paper-warm); border: 1px solid var(--rule);
  padding: 5px 10px; border-radius: 2px;
}
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Small square icon button, sized to match the buttons beside it. */
.icon-btn {
  flex: none;
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 2px;
  background: #fff; color: var(--ink-soft); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.icon-btn:hover { border-color: var(--brass); color: var(--ink); background: var(--paper-warm); }
.icon-btn svg { width: 19px; height: 19px; display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1000px) {
  .portfolio-layout { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }

  .filter-toggle {
    display: inline-block; flex: none;
    font-family: var(--sans); font-size: 13px; letter-spacing: .1em;
    text-transform: uppercase; padding: 14px 20px;
    border: 1px solid var(--iron); background: var(--iron); color: #fff;
    border-radius: 2px; cursor: pointer;
  }
  .filters {
    position: static; max-height: none; overflow: visible;
    margin-bottom: 24px; display: none;
  }
  .searchbar { padding-top: 28px; }
  .filters.is-open { display: block; }
}

@media (max-width: 860px) {
  body { font-size: 18px; }
  :root { --header-h: 116px; }

  .masthead .wrap { min-height: 120px; }
  .brand-mark { height: 98px; }
  .brand-tag { display: none; }          /* no room beside the lockup */
  .masthead.is-compact .wrap { min-height: 90px; }
  .masthead.is-compact .brand-mark { height: 70px; }

  /* The caption is in normal flow here, so the cue has to be too — pinned to
     the bottom it would land on top of the plan count. */
  .hero-media { display: flex; flex-direction: column; }
  .hero-photo { order: 1; }
  .hero .wrap { order: 2; }
  .scroll-cue {
    order: 3; position: static; transform: none;
    margin: 0 auto 16px; padding-top: 14px;
  }
  .hero-inner { display: block; position: static; }
  .hero-main { margin-bottom: 0; }
  .hero .hero-stat {
    position: static;
    text-align: left; margin: 22px 0 0;
    display: inline-block; padding-top: 14px;
  }
  .hero-stat-label { margin-top: 9px; }
  .pagehead-logo { height: 120px; }
  .footer-logo { height: 130px; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--iron); border-top: 1px solid var(--iron-line);
    box-shadow: 0 14px 26px rgba(0,0,0,.3);
    max-height: calc(100vh - var(--header-h) - 42px); overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 6px 0; }
  .nav a {
    padding: 15px var(--gutter); border-bottom: 1px solid rgba(255,255,255,.07);
    border-left: 3px solid transparent;
  }
  .nav a:hover, .nav a[aria-current="page"] {
    border-bottom-color: rgba(255,255,255,.07); border-left-color: var(--brass);
    background: rgba(255,255,255,.05);
  }

  .feature, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-media { order: 0; }
  .feature + .feature { margin-top: 52px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  /* Too short to letter over: the caption moves below the photograph, which
     also keeps the house completely unobstructed. */
  /* The caption drops below the photograph, still inside the iron frame. A
     wash over the texture keeps the type clean against the scratches. */
  .hero .wrap, .band-caption {
    position: static;
    background: rgba(20, 19, 17, .74);
    padding: 24px 16px 20px;
  }
  .hero-media::after, .band-media::after {
    bottom: auto; aspect-ratio: 16 / 9;
    background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.04) 45%, rgba(0,0,0,.3) 100%);
  }

  .modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .modal-sheet { padding: 14px; overflow: visible; }
  .modal-side { border-left: 0; border-top: 1px solid var(--rule); overflow: visible; }
  dialog.plan-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .modal-inner { max-height: calc(100vh - 20px); }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .scroll-cue { bottom: 8px; font-size: 9px; letter-spacing: .2em; }
  .scroll-cue svg { width: 16px; }
  .topbar { font-size: 11.5px; }
  .topbar .wrap { gap: 4px 16px; }
  .brand { gap: 10px; }
  .masthead .wrap { min-height: 104px; }
  .brand-mark { height: 86px; }
  .masthead.is-compact .wrap { min-height: 82px; }
  .masthead.is-compact .brand-mark { height: 64px; }

  .pagehead-logo { height: 100px; }
  .footer-logo { height: 118px; }
  .nav-toggle { padding: 8px 12px; font-size: 12px; }
  /* Side-by-side buttons stack on a phone; the sibling margin would leave the
     second one indented, so let them go full width instead. */
  .hero .btn, .section-title .btn, .band .btn {
    display: block; width: 100%; text-align: center; margin-left: 0;
  }
  .plan-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .contact-list li { flex-direction: column; gap: 2px; }
  .contact-label { width: auto; padding-top: 0; }
  .contact-actions .btn { display: block; width: 100%; margin-left: 0; }
  .searchbar { gap: 10px; }
  .search-field { flex: 1 1 100%; }
  .searchbar select, .filter-toggle { flex: 1 1 calc(50% - 5px); min-width: 0; }
}

/* --- Print --------------------------------------------------------------- */
@media print {
  .masthead, .topbar, .site-footer, .filters, .searchbar, .resultbar,
  .nav-toggle, .filter-toggle, .modal-actions, .modal-close { display: none !important; }
  body { font-size: 12pt; }
  .hero, .pagehead { color: #000; background: none; min-height: 0; padding: 0 0 20px; }
  .hero::after { display: none; }
  dialog.plan-modal { position: static; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
