/* ==========================================================================
   Madison Fields microsite — /madison-fields/
   Loads after styles.css and only on the microsite pages (the hub and the four
   cottage plan pages). Everything here is prefixed mf- or scoped to
   .site-header--bar, so the main site is untouched and the whole section can
   be removed in one go when the neighborhood sells out.
   ========================================================================== */

/* Keep in-page anchors clear of the sticky bar */
.mf-page [id] { scroll-margin-top: 90px; }

/* ==========================================================================
   Co-brand lockup — ABC wordmark × Madison Fields wordmark
   ========================================================================== */

.mf-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mf-lockup__row { display: flex; align-items: center; gap: var(--s-5); }
.mf-lockup__brand { display: block; line-height: 0; }
.mf-lockup__abc { width: auto; }
.mf-lockup__abc-mark { display: none; height: 34px; width: 34px; }
.mf-lockup__mf { width: auto; }
.mf-lockup__mf-mark { display: none; }
.mf-lockup a:hover img { opacity: 0.85; }

/* Hairline "×" — two crossed brass rules read lighter than a typed x */
.mf-lockup__x {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
}
.mf-lockup__x::before,
.mf-lockup__x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1px;
  background: var(--accent);
}
.mf-lockup__x::before { transform: translate(-50%, -50%) rotate(45deg); }
.mf-lockup__x::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Baselines: the ABC wordmark's text sits 32.6% up from its bottom edge and
   the Madison Fields script sits 2.5% up from its own (measured from the SVGs),
   so bottom-align both and lift the script by the difference. Sizes come from
   --abc-h / --mf-h on the bar and the footer. */
.mf-lockup--baseline .mf-lockup__row { align-items: flex-end; }
.mf-lockup--baseline .mf-lockup__abc { height: var(--abc-h); }
.mf-lockup--baseline .mf-lockup__mf {
  height: var(--mf-h);
  margin-bottom: calc(var(--abc-h) * 0.326 - var(--mf-h) * 0.025);
}
.mf-lockup--baseline .mf-lockup__x { margin-bottom: calc(var(--abc-h) * 0.326 + 1px); }

/* ==========================================================================
   Top bar — the site's green bar; lockup left, phone + Inquire right
   ========================================================================== */

.site-header--bar {
  --abc-h: 34px;
  --mf-h: 23px;
}
.site-header--bar .site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}
.site-header--bar .mf-lockup { align-items: flex-start; }
.site-header--bar .mf-lockup__row { gap: var(--s-4); }

.mf-bar-end { display: flex; align-items: center; gap: var(--s-6); }
.site-header--bar .nav-call { width: 36px; }

@media (max-width: 880px) {
  /* Phones: each brand's mark stands in for its wordmark */
  .site-header--bar .mf-lockup__abc,
  .site-header--bar .mf-lockup__mf { display: none; }
  .site-header--bar .mf-lockup__abc-mark { display: block; height: 30px; width: 30px; }
  .site-header--bar .mf-lockup__mf-mark { display: block; height: 30px; width: auto; }
  .site-header--bar .mf-lockup__row { align-items: center; gap: var(--s-3); }
  .site-header--bar .mf-lockup__x { margin-bottom: 0; }
  .mf-bar-end { gap: var(--s-3); }
}

/* ==========================================================================
   Buttons — both use the contact form's Send button (.contact-form__submit)
   metrics. Gold is primary (ink lettering: cream on this gold falls short of
   AA contrast); dark is secondary and is the Send button itself.
   ========================================================================== */

.mf-btn-gold,
.mf-btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 500 var(--type-small)/1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
  white-space: nowrap;
}
.mf-btn-gold { color: var(--ink); background: var(--accent); }
.mf-btn-gold:hover { background: var(--accent-bright); color: var(--ink); }
.mf-btn-dark { color: var(--surface); background: var(--ink); }
.mf-btn-dark:hover { background: var(--accent-deep); color: var(--surface); }
.mf-btn-gold--sm { padding: 11px 18px; font-size: 0.75rem; }

/* Download links carry a small tray-and-arrow icon */
.btn-link .mf-dl-icon { transform: none; }
.btn-link:hover .mf-dl-icon { transform: translateY(2px); }

/* ==========================================================================
   Shared type
   ========================================================================== */

.mf-h2 {
  font-size: var(--type-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 300;
}

.mf-lead {
  font-size: var(--type-lead);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 54ch;
}
.bg-deep .mf-lead { color: var(--surface-stone); }

.mf-head { margin-bottom: var(--s-8); }
.mf-head .eyebrow { margin-bottom: var(--s-5); }
.mf-head .mf-h2 { margin-bottom: var(--s-5); max-width: 20ch; }
.mf-head--center { text-align: center; }
.mf-head--center .mf-h2,
.mf-head--center .mf-lead { margin-left: auto; margin-right: auto; }

@media (max-width: 880px) {
  .mf-head { margin-bottom: var(--s-7); }
}

.mf-head--center .mf-eyebrow-plain { margin-bottom: var(--s-4); }

/* Section heads that use the homepage's Selected Work head (.work__head). With an
   eyebrow above the title, line the subtitle up with the title's last line. */
.mf-work-head { align-items: flex-end; align-items: last baseline; }
/* The cottage note runs to three short lines beside the title */
#cottages .work__sub { max-width: 22ch; }
@media (max-width: 880px) {
  .mf-work-head { align-items: flex-start; }
}

/* Keeps a domain name from splitting at its hyphen */
.mf-nobreak { white-space: nowrap; }

/* ==========================================================================
   Hub hero — copy left, flyover right, half and half
   ========================================================================== */

.mf-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(560px, calc(100svh - 62px), 880px);
}

.mf-duo__copy {
  display: flex;
  align-items: center;
  /* line the copy up with the 1440 container's left edge on wide screens */
  padding: var(--s-9) clamp(1.5rem, 4vw, 3rem) var(--s-9) max(var(--container-x), calc((100vw - var(--max-w)) / 2 + var(--container-x)));
}
.mf-duo__inner { max-width: 40rem; }

.mf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-6);
  padding: 10px 22px 9px;
  background: rgba(185, 139, 71, 0.2);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* Verified seal before the words */
.mf-tag__icon { flex: none; width: 18px; height: 18px; }

.mf-duo .hero__title {
  font-size: clamp(2.5rem, 4.6vw, 4.75rem);
  line-height: 1.06;
  max-width: 14ch;
  margin-bottom: var(--s-6);
}
.mf-duo .mf-lead { margin-bottom: var(--s-7); }
.mf-duo .hero__meta { gap: var(--s-4) var(--s-6); align-items: center; padding-top: 0; border-top: 0; }

/* Phone link — the header's .nav-tel look (brass icon, jiggle on hover), in ink */
.mf-call {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--type-small);
  font-weight: 500;
  color: var(--ink);
}
.mf-call:hover { color: var(--accent-deep); }
.mf-call:hover .nav-tel__icon { animation: phone-jiggle 0.7s var(--ease-out-expo); }
@media (prefers-reduced-motion: reduce) {
  .mf-call:hover .nav-tel__icon { animation: none; }
}

.mf-duo__media {
  position: relative;
  background: var(--deep);
  isolation: isolate;
}
.mf-duo__media .mf-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 880px) {
  .mf-duo { grid-template-columns: 1fr; min-height: 0; }
  .mf-duo__media { order: -1; aspect-ratio: 4 / 3; }
  .mf-duo__copy { padding: var(--s-8) var(--container-x) var(--s-8); }
  .mf-duo .hero__title { font-size: clamp(2.25rem, 10vw, 2.875rem); max-width: none; }
}

/* ==========================================================================
   Two ways to build — tiles
   ========================================================================== */

.mf-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
}

.mf-tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  transition: border-color var(--t-med), box-shadow var(--t-med) var(--ease-out-expo), transform var(--t-med) var(--ease-out-expo);
}
.mf-tile:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.mf-tile__media { aspect-ratio: 4 / 3; overflow: hidden; background: #EFEBE5; }
.mf-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out-expo); }

/* The Brick Manor drawing is tall with the house in its lower half; the
   landscape crop on phones holds on the house */
.mf-feature__media img[src$="/custom-elevation-brick-manor.jpg"] { object-position: 50% 80%; }
.mf-tile:hover .mf-tile__media img { transform: scale(1.04); }

.mf-tile__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
}
.mf-tile__title { font-size: var(--type-h3); margin-bottom: var(--s-3); letter-spacing: -0.01em; }
.mf-tile__body p { color: var(--ink-muted); margin-bottom: var(--s-6); }

/* Tile number — a cream seal with a brass ring, half on the photo and half on
   the copy, echoing the hero badge. On hover it fills with gold. */
.mf-tile__seal {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: calc(-1 * (var(--s-6) + 32px)) 0 var(--s-4);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--surface), 0 6px 18px rgba(27, 23, 20, 0.12);
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: lining-nums;
  transition: background var(--t-med) var(--ease-out-expo), color var(--t-med) var(--ease-out-expo);
}
.mf-tile:hover .mf-tile__seal,
.mf-tile:focus-visible .mf-tile__seal { background: var(--accent); color: var(--surface); }

/* Tile link uses .btn-link; push it to the bottom and follow the tile's hover */
.mf-tile .btn-link { margin-top: auto; align-self: flex-start; padding: 0 0 4px; }
.mf-tile:hover .btn-link { color: var(--accent-deep); border-color: var(--accent); }

@media (max-width: 980px) {
  .mf-tiles { grid-template-columns: 1fr; gap: var(--s-5); }
  .mf-tile { display: grid; grid-template-columns: 38% 1fr; }
  .mf-tile__media { aspect-ratio: auto; height: 100%; }
  .mf-tile__body { padding: var(--s-5); }
  /* Side by side, the seal sits at the top of the copy instead */
  .mf-tile__seal { width: 52px; height: 52px; font-size: 1.125rem; margin: 0 0 var(--s-4); }
}
@media (max-width: 560px) {
  .mf-tile { display: flex; }
  .mf-tile__media { aspect-ratio: 16 / 10; height: auto; }
  .mf-tile__seal { margin: calc(-1 * (var(--s-5) + 26px)) 0 var(--s-4); }
}

/* ==========================================================================
   Cottage elevations — the A/B picture stage, tabs and number, shared by
   the hub's plan cards and the plan pages
   ========================================================================== */

/* Elevation stage: A and B stacked, the active one shown. On plan pages each
   image is a lightbox button. */
.mf-spread__stage {
  position: relative;
  aspect-ratio: 10 / 7;
  overflow: hidden;
  background: #EFEBE5;
}
.mf-spread__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-in-out);
}
.mf-spread__stage img.is-active { opacity: 1; }

/* Elevation A / B as text tabs with the nav's brass underline */
.mf-tabs { display: flex; gap: var(--s-6); margin-top: var(--s-4); }
.mf-tabs button {
  position: relative;
  padding: 4px 0;
  font-size: var(--type-small);
  font-weight: 500;
  color: var(--ink-muted);
}
.mf-tabs button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out-expo);
}
.mf-tabs button:hover,
.mf-tabs button[aria-pressed="true"] { color: var(--ink); }
.mf-tabs button:hover::after,
.mf-tabs button[aria-pressed="true"]::after { transform: scaleX(1); }

.mf-spread__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

/* Spec list — the plan page's "The Plan" */
.mf-table { border-top: 1px solid var(--rule); margin-bottom: var(--s-6); }
.mf-table div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--s-4);
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--type-small);
}
.mf-table dt { color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--type-tiny); padding-top: 3px; }
.mf-table dd { margin: 0; color: var(--ink); }

/* ==========================================================================
   Beyond the cottages — custom + turnkey feature rows
   ========================================================================== */

.mf-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-9);
  align-items: center;
}
.mf-feature + .mf-feature { margin-top: var(--s-10); }
.mf-feature--flip .mf-feature__media { order: 2; }

.mf-feature__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-stone); }
.mf-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.mf-feature__title { font-size: var(--type-h2); line-height: 1.1; letter-spacing: -0.015em; margin-bottom: var(--s-5); }
.mf-feature__body > p { color: var(--ink-muted); font-size: 1.0625rem; line-height: 1.65; }

.mf-checks { margin: var(--s-6) 0 var(--s-7); border-top: 1px solid var(--rule); }
.mf-checks li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid var(--rule);
}
.mf-checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: translateY(-50%) rotate(45deg);
}

@media (max-width: 880px) {
  .mf-feature { grid-template-columns: 1fr; gap: var(--s-6); }
  .mf-feature--flip .mf-feature__media { order: 0; }
  .mf-feature__media { aspect-ratio: 4 / 3; }
  .mf-feature + .mf-feature { margin-top: var(--s-9); }
}

/* ==========================================================================
   About Madison Fields — aerial + facts
   ========================================================================== */

.mf-community {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-9);
  align-items: center;
}
.mf-community__media { aspect-ratio: 4 / 5; overflow: hidden; }
.mf-community__media img { width: 100%; height: 100%; object-fit: cover; }

.mf-facts { border-top: 1px solid var(--rule); margin-bottom: var(--s-6); }
.mf-facts div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: var(--s-4);
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.mf-facts dt { font-size: var(--type-tiny); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); padding-top: 4px; }
.mf-facts dd { margin: 0; }

@media (max-width: 880px) {
  .mf-community { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-community__media { aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   Why build with us — local story, stats, three homes nearby
   ========================================================================== */

.mf-local {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-10);
  align-items: start;
}
.mf-local__body p { font-size: var(--type-lead); line-height: 1.6; color: var(--ink-muted); }
.mf-local__body p strong { color: var(--ink); font-weight: 500; }

.mf-stats { border-top: 1px solid var(--rule); }
.mf-stat {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
}
.mf-stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1;
  color: var(--accent-deep);
}
.mf-stat__label { font-size: var(--type-body); color: var(--ink-muted); }
.mf-stat__label strong { display: block; color: var(--ink); font-weight: 500; }

/* A nod to the press under the stats — the homepage press logos, at their
   smallest size */
.mf-press {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-6);
  margin-top: var(--s-7);
}
.mf-press .press__item-logo--gng       { height: 14px; width: 107px; }
.mf-press .press__item-logo--veranda   { height: 20px; width:  84px; }
.mf-press .press__item-logo--southern  { height: 18px; width:  87px; }
.mf-press .press__item-logo--bhg       { height: 25px; width:  96px; }
.mf-press .press__item-logo--trad-home { height: 25px; width:  71px; }

/* Three portfolio cards (reuses .project from styles.css), titled so they
   don't read as Madison Fields homes */
.mf-recent {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin: var(--s-9) 0 var(--s-6);
}
.mf-recent__title { font-size: var(--type-h3); letter-spacing: -0.01em; }
.mf-recent__note { font-size: var(--type-small); color: var(--ink-muted); }
.mf-work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
.mf-work .project__media { aspect-ratio: 4 / 5; }
.mf-work .project__name { white-space: normal; }

@media (max-width: 880px) {
  .mf-local { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-stat { grid-template-columns: 3.5rem 1fr; }
  .mf-press { justify-content: center; gap: var(--s-4) var(--s-6); }
  .mf-recent { margin-top: var(--s-8); }
  .mf-work { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-work .project__media { aspect-ratio: 3 / 2; }
}

/* ==========================================================================
   Inquiry — green band with the contact form
   ========================================================================== */

.mf-inquire {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--s-9);
  align-items: start;
}
.mf-inquire .cta__title { margin-bottom: var(--s-6); }
.mf-inquire .cta__details { margin-top: var(--s-7); }
.mf-inquire .contact-form { color: var(--ink); }
.mf-inquire .contact-form h3 { color: var(--ink); }

.field__select {
  font: 400 1rem/1.5 var(--font-body);
  color: var(--ink);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23615A52' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 12px 40px 12px 14px;
  width: 100%;
  appearance: none;
}
.field__select:focus { outline: none; border-color: var(--accent); background-color: var(--surface); }

/* Fields already carry their own bottom margin; a row gap doubles it once the row stacks */
#mf-form .field__row { row-gap: 0; }

@media (max-width: 880px) {
  .mf-inquire { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-inquire .contact-form { padding: var(--s-6) var(--s-5); }
}

/* ==========================================================================
   Microsite footer — cream, lockup centered
   ========================================================================== */

.mf-foot {
  --abc-h: 40px;
  --mf-h: 27px;
  background: var(--bg);
  padding: var(--s-9) 0 var(--s-6);
  text-align: center;
}
.mf-foot .mf-lockup { margin-bottom: var(--s-5); }
.mf-foot__tag { color: var(--ink-muted); max-width: 46ch; margin: 0 auto var(--s-7); }

.mf-foot__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin: var(--s-6) 0;
  font-size: var(--type-small);
  color: var(--ink-muted);
}
.mf-foot__links a:hover { color: var(--accent-deep); }

.mf-foot__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  font-size: var(--type-tiny);
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.mf-foot__meta a:hover { color: var(--accent-deep); }

.mf-credit {
  max-width: 90ch;
  margin: var(--s-4) auto 0;
  padding-top: var(--s-5);
  font-size: var(--type-tiny);
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 880px) {
  .mf-foot { --abc-h: 26px; --mf-h: 18px; }
  .mf-foot .mf-lockup__row { gap: var(--s-3); }
}

/* ==========================================================================
   Cottage plan pages — /madison-fields/cottage-*.html
   ========================================================================== */

.mf-plan-hero { padding-top: var(--s-6); padding-bottom: var(--s-9); }
.mf-plan-hero .project-hero__crumb { margin-bottom: var(--s-7); }
.mf-plan-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: var(--s-9);
  align-items: center;
}
.mf-plan-hero .project-hero__title { text-align: left; margin-bottom: var(--s-4); }
.mf-plan-hero .mf-lead { margin-bottom: var(--s-6); }


/* Sq ft / beds / baths — icon on top, then the figure, then its label */
.mf-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: var(--s-6) 0 var(--s-7);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.mf-trio div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-3);
  text-align: center;
  border-left: 1px solid var(--rule);
}
.mf-trio div:first-child { border-left: 0; }
.mf-trio__icon { width: 20px; height: 20px; color: var(--accent-deep); }
.mf-trio dt {
  order: 3;
  font-size: var(--type-tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.mf-trio dd { margin: 0; font-family: var(--font-display); font-size: 1.375rem; }

.mf-plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); }
.mf-plan-actions .btn-link { padding: 0 0 4px; }

/* Hero elevations: each is a lightbox button, stacked like the plain images */
.mf-spread__stage > button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: zoom-in;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-slow) var(--ease-in-out), visibility 0s linear var(--t-slow);
}
.mf-spread__stage > button.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.mf-spread__stage > button img { position: static; opacity: 1; width: 100%; height: 100%; object-fit: cover; }
.mf-spread__stage > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* The plan */
.mf-about-plan {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--s-10);
  align-items: start;
}
.mf-about-plan .mf-h2 { max-width: none; font-size: var(--type-h2); line-height: 1.15; letter-spacing: -0.015em; }
.mf-about-plan__body p { color: var(--ink-muted); font-size: 1.0625rem; line-height: 1.7; max-width: 58ch; }

/* Floor-plan sheets — one full-width sheet at a time, tap to open the lightbox */
.mf-sheets {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--s-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.mf-sheets::-webkit-scrollbar { display: none; }
.mf-sheet {
  scroll-snap-align: start;
  display: block;
  width: 100%;
  padding: var(--s-5);
  background: #fff;
  border: 1px solid var(--rule);
  cursor: zoom-in;
}
.mf-sheet img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.mf-sheet:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.mf-sheets-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.mf-sheets-bar__caption {
  font-size: var(--type-tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.mf-sheets-bar__nav { display: flex; align-items: center; gap: var(--s-4); }
.mf-sheets-bar__count {
  min-width: 4.5em;
  text-align: center;
  font-size: var(--type-small);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
.mf-rail__btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mf-rail__btn:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mf-rail__btn:disabled { opacity: 0.35; pointer-events: none; }

/* "View larger" hint in the corner on hover */
.mf-spread__stage > button::after {
  content: "";
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(251, 248, 242, 0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1714' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") no-repeat center / 16px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out-expo);
  pointer-events: none;
}
.mf-spread__stage > button:hover::after,
.mf-spread__stage > button:focus-visible::after { opacity: 1; transform: none; }

/* Plan set — the PDF's cover sheet rises out of the bottom of the section */
.mf-download { max-width: 40rem; margin: 0 auto; text-align: center; }
.mf-download .mf-h2 { margin-bottom: var(--s-5); }
.mf-download .mf-lead { margin: 0 auto var(--s-6); }

.mf-plan-set { padding-bottom: 0; overflow: hidden; }
.mf-peek {
  display: block;
  width: min(100%, 980px);
  height: clamp(200px, 24vw, 330px);
  margin: var(--s-8) auto 0;
  clip-path: inset(-60px -60px 0 -60px);
}
.mf-peek img {
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 23, 20, 0.06), 0 22px 50px rgba(27, 23, 20, 0.16);
  transform: rotate(-1.25deg) translateY(14px);
  transition: transform var(--t-slow) var(--ease-out-expo);
}
.mf-peek:hover img { transform: rotate(-0.5deg) translateY(-6px); }
@media (prefers-reduced-motion: reduce) {
  .mf-peek img, .mf-peek:hover img { transition: none; }
}

/* Plan cards — a title block, after the stamp on an architect's sheet. On
   the plan pages ("More plans") each card is a link. */
.mf-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.mf-block {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--ink);
  transition: box-shadow var(--t-med) var(--ease-out-expo), transform var(--t-med) var(--ease-out-expo);
}
.mf-block:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.mf-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mf-block__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-bottom: 1px solid var(--ink); }
.mf-block__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Name block: the gold number on its own line (the hub cards put their A | B
   switch at its right end), then the name and line */
.mf-block__title { flex: 1; padding: var(--s-5); border-bottom: 1px solid var(--ink); }
.mf-block__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-2);
}
.mf-block__row .mf-spread__num { margin: 0; }
.mf-block__name {
  margin: 0 0 var(--s-2);
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.mf-block__line { color: var(--ink-muted); }

/* The plan pages' Sq ft / Beds / Baths trio, ruled in ink: the icon sits
   level with the figure, the label under the figure */
.mf-block__trio { margin: 0; border: 0; border-bottom: 1px solid var(--ink); }
.mf-block__trio div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s-2);
  row-gap: 2px;
  align-items: center;
  padding: var(--s-4);
  text-align: left;
  border-left-color: var(--ink);
}
.mf-block__trio .mf-trio__icon { grid-column: 1; grid-row: 1; }
.mf-block__trio dd { grid-column: 2; grid-row: 1; line-height: 1.1; }
.mf-block__trio dt { grid-column: 2; grid-row: 2; }

.mf-block__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  padding: var(--s-4) var(--s-5);
}

/* "View this plan" as a text link across the foot, the arrow at the far right;
   it warms and the arrow nudges when the card is hovered */
.mf-block__go {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color var(--t-fast);
}
.mf-block__go svg { flex: none; transition: transform var(--t-med) var(--ease-out-expo); }
.mf-block:hover .mf-block__go { color: var(--accent-deep); }
.mf-block:hover .mf-block__go svg { transform: translateX(4px); }

@media (max-width: 980px) {
  .mf-plan-hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-plan-hero__grid > div:last-child { order: -1; }
  .mf-about-plan { grid-template-columns: 1fr; gap: var(--s-7); }
  .mf-blocks { grid-template-columns: 1fr; gap: var(--s-7); }
}
@media (max-width: 880px) {
  .mf-sheet { padding: var(--s-2); }
  .mf-sheets-bar__caption { display: none; }
  .mf-sheets-bar { justify-content: center; }
}

/* ==========================================================================
   Hub cottages — the plan cards two by two, each with an A | B switch
   ========================================================================== */

.mf-blocks--hub { grid-template-columns: repeat(2, 1fr); gap: var(--s-7); }
.mf-blocks--hub .mf-block__trio div { padding: var(--s-4) var(--s-5); column-gap: var(--s-3); }
.mf-blocks--hub .mf-trio__icon { width: 22px; height: 22px; }

/* The whole card opens the plan: "View this plan" stretches a layer over it.
   The A | B switch sits above that layer so it stays clickable. */
.mf-block--hub { position: relative; }
.mf-block__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mf-block__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The A/B stage fills the card's picture frame */
.mf-block--hub .mf-block__media { position: relative; }
.mf-block--hub .mf-spread__stage { position: absolute; inset: 0; aspect-ratio: auto; }

/* A | B elevation switch, at the right end of the No. line: a segmented
   control, the elevation showing inset 2px inside a white frame */
.mf-block__ab {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
}
.mf-block__ab button {
  width: 30px;
  height: 26px;
  border-radius: var(--r-sm);
  background: #fff;
  font: 500 0.8125rem/1 var(--font-body);
  color: var(--ink-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.mf-block__ab button:hover { color: var(--ink); background: var(--surface-stone); }
.mf-block__ab button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.mf-block__ab button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 880px) {
  .mf-blocks--hub { grid-template-columns: 1fr; }
  .mf-blocks--hub .mf-block__trio div { padding: var(--s-3) var(--s-4); column-gap: var(--s-2); }
  .mf-blocks--hub .mf-trio__icon { width: 18px; height: 18px; }
}
