/* site-additions.css: loaded on every page right after /assets/site.css.
   1. Mobile fit + sticky header fixes
   2. Floor Plans / Our Projects shared bits
   3. Our Projects components (progress, scope, timeline, updates) */

/* ---------- 1. mobile fit ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-x pan-y; }
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body { min-width: 0; }
img, video, iframe, svg { max-width: 100%; }
h1, h2, h3 { overflow-wrap: break-word; }
.mk-specs dd, .mk-specs dd a, .mk-footer__contact a { overflow-wrap: anywhere; min-width: 0; }

/* grids whose minimum column was wider than a small phone */
.mk-twocol, .hp-quotes, .rf-both, .wb-facts, .ab-word { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.ab-values, .mk-dir { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.hp-plans, .mk-grid, .nb-plans, .wb-cities { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.mk-grid--related { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.hp-split { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* header stays pinned to the top on every screen size */
.mk-header, .mk-header.is-scrolled { position: sticky; top: env(safe-area-inset-top, 0px); }
@media (max-width: 880px) {
  :root { --hdr-h: 58px; }
  .mk-header { position: sticky; padding: 12px 20px; gap: 12px; }
  .mk-header__nav { gap: 10px; }
  .mk-filterwrap { top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); }
  html { scroll-padding-top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px) + 12px); }
  .hp-mobilemenu { max-height: calc(100vh - var(--hdr-h)); max-height: calc(100dvh - var(--hdr-h)); overflow-y: auto; overscroll-behavior: contain; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 400px) {
  :root { --hdr-h: 54px; }
  .mk-header { padding: 10px 16px; gap: 8px; }
  .mk-header__logo img { width: 118px; }
  .mk-header__nav { gap: 6px; }
  .mk-header__nav .mk-btn, .hp-menubtn { padding: 9px 10px; font-size: 10px; letter-spacing: .1em; }
  .hp-mobilemenu { padding-left: 16px; padding-right: 16px; }
  .mk-section, .mk-section--tight, .hp-section, .mk-pagehead, .mk-cta, .mk-quote, .mk-footer, .rf-claim { padding-left: 16px; padding-right: 16px; }
  .mk-filters { padding: 0 16px; }
  .mk-btn--lg { padding: 16px 22px; font-size: 12px; }
  .hp-actions .mk-btn, .mk-cta__actions .mk-btn, .mk-rail__actions .mk-btn { flex: 1 1 100%; }
}
/* the desktop link row needs a little more room now that there are five links */
@media (min-width: 1181px) and (max-width: 1300px) {
  .mk-header { gap: 20px; }
  .mk-header__nav { gap: 18px; }
  .mk-header__link { letter-spacing: .1em; }
  .mk-header__logo img { width: 170px; }
}

/* ---------- 2. shared: page switcher between Floor Plans and Our Projects ---------- */
.mk-switch { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mk-switch a { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 10px 16px; border-radius: 2px; border: 1.5px solid rgba(255,255,255,.28); color: rgba(255,255,255,.82); }
.mk-switch a:hover { border-color: var(--mk-gold); color: var(--mk-gold); }
.mk-switch a[aria-current="page"] { background: var(--mk-gold); border-color: var(--mk-gold); color: var(--mk-navy); }
.mk-badge--precon { background: var(--mk-cloud); color: var(--mk-navy); box-shadow: inset 0 0 0 1.5px var(--mk-gold-mid); }
.mk-badge--completed { background: var(--mk-navy); color: var(--mk-white); }
.mk-badge--plan { background: var(--mk-white); color: var(--mk-navy); box-shadow: inset 0 0 0 1.5px var(--mk-navy); }

/* ---------- 3. Our Projects ---------- */
.pj-banner { background: var(--mk-gold); color: var(--mk-navy); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 10px 16px; line-height: 1.5; }
.pj-banner a { color: var(--mk-navy); }

/* progress meter (cards + rail) */
.pj-progress { display: flex; flex-direction: column; gap: 8px; }
.pj-progress__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pj-progress__label { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-gold-text); }
.pj-progress__pct { font-size: 13px; font-weight: 800; color: var(--mk-navy); }
.pj-progress__track { height: 6px; background: var(--mk-line); border-radius: 3px; overflow: hidden; }
.pj-progress__fill { display: block; height: 100%; background: var(--mk-gold); border-radius: 3px; }
.pj-progress--done .pj-progress__fill { background: var(--mk-forest); }
.pj-progress__phase { font-size: 12px; line-height: 1.5; color: var(--mk-ink); }
.pj-progress--lg .pj-progress__pct { font-size: 22px; }
.pj-progress--lg .pj-progress__track { height: 10px; border-radius: 5px; }

/* key dates in the rail */
.pj-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--mk-line); }
.pj-dates div { padding: 14px 0; border-bottom: 1px solid var(--mk-line); }
.pj-dates div:nth-child(odd) { padding-right: 12px; }
.pj-dates dt { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-gold-text); }
.pj-dates dd { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--mk-navy); }
.pj-dates { margin: 0; }

/* scope of work */
.pj-scopetags { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-scopetags span { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 7px 12px; border-radius: 2px; background: var(--mk-cloud); color: var(--mk-navy); border: 1px solid var(--mk-line); }
.pj-scope { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: clamp(16px, 2vw, 24px); counter-reset: pjscope; }
.pj-scope li { counter-increment: pjscope; background: var(--mk-white); border: 1px solid var(--mk-line); border-top: 2px solid var(--mk-gold); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.pj-scope li::before { content: counter(pjscope, decimal-leading-zero); font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--mk-gold-text); }
.pj-scope h3 { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--mk-navy); line-height: 1.3; }
.pj-scope p { font-size: 14px; line-height: 1.7; margin: 0; color: var(--mk-ink); }

/* "built from the ___ plan" card */
.pj-plan { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 20px; align-items: center; background: var(--mk-white); border: 1px solid var(--mk-line); padding: 14px; text-decoration: none; color: inherit; transition: box-shadow .2s var(--mk-ease); }
.pj-plan:hover { box-shadow: var(--mk-shadow-md); color: inherit; }
.pj-plan .mk-media { aspect-ratio: 4 / 3; }
.pj-plan__body { display: flex; flex-direction: column; gap: 6px; padding-right: 8px; }
.pj-plan__label { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mk-gold-text); }
.pj-plan__name { font-size: 17px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mk-navy); }
.pj-plan__specs { font-size: 13px; color: var(--mk-ink); }
.pj-plan__cta { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-gold-text); margin-top: 4px; }
@media (max-width: 520px) { .pj-plan { grid-template-columns: 1fr; } .pj-plan__body { padding: 0 6px 6px; } }

/* build timeline: segmented overview bar + detailed phase list */
.pj-phasebar { display: flex; gap: 4px; margin: 0 0 8px; }
.pj-phasebar span { flex: 1 1 0; height: 10px; border-radius: 2px; background: rgba(255,255,255,.16); position: relative; }
.pj-phasebar span.is-done { background: var(--mk-gold); }
.pj-phasebar span.is-current { background: linear-gradient(90deg, var(--mk-gold) 0 50%, rgba(206,193,152,.35) 50% 100%); box-shadow: 0 0 0 2px rgba(206,193,152,.35); }
.pj-phasebar-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.62); margin-bottom: clamp(28px, 4vw, 44px); }
.pj-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pj-timeline li { display: grid; grid-template-columns: 190px 28px minmax(0, 1fr); gap: 0 18px; position: relative; padding-bottom: 28px; }
.pj-timeline li:last-child { padding-bottom: 0; }
.pj-timeline__date { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.62); padding-top: 3px; text-align: right; line-height: 1.5; }
.pj-timeline__rail { position: relative; display: flex; justify-content: center; }
.pj-timeline__rail::before { content: ""; position: absolute; top: 20px; bottom: -28px; left: 50%; width: 2px; margin-left: -1px; background: rgba(255,255,255,.16); }
.pj-timeline li:last-child .pj-timeline__rail::before { display: none; }
.pj-timeline li.is-done .pj-timeline__rail::before { background: var(--mk-gold); }
.pj-timeline__dot { position: relative; z-index: 1; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--mk-navy); border: 2px solid rgba(255,255,255,.35); }
.pj-timeline li.is-done .pj-timeline__dot { background: var(--mk-gold); border-color: var(--mk-gold); }
.pj-timeline li.is-current .pj-timeline__dot { background: var(--mk-navy); border-color: var(--mk-gold); box-shadow: 0 0 0 5px rgba(206,193,152,.25); }
.pj-timeline__body { display: flex; flex-direction: column; gap: 6px; }
.pj-timeline__body h3 { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0; color: var(--mk-white); line-height: 1.35; }
.pj-timeline li.is-upcoming .pj-timeline__body h3 { color: rgba(255,255,255,.72); }
.pj-timeline__body p { font-size: 14px; line-height: 1.7; margin: 0; color: rgba(255,255,255,.72); }
.pj-timeline__state { align-self: flex-start; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; background: var(--mk-gold); color: var(--mk-navy); }
@media (max-width: 640px) {
  .pj-timeline li { grid-template-columns: 22px minmax(0, 1fr); gap: 0 14px; }
  .pj-timeline__date { grid-column: 2; grid-row: 1; text-align: left; padding-top: 0; }
  .pj-timeline__rail { grid-column: 1; grid-row: 1 / span 2; }
  .pj-timeline__body { grid-column: 2; grid-row: 2; }
  .pj-timeline__dot { width: 14px; height: 14px; }
}

/* progress updates log */
.pj-updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--mk-line); }
.pj-updates li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px clamp(20px, 3vw, 40px); padding: 24px 0; border-bottom: 1px solid var(--mk-line); }
.pj-updates time { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mk-gold-text); padding-top: 3px; }
.pj-updates h3 { font-size: 16px; font-weight: 700; letter-spacing: .04em; margin: 0 0 6px; color: var(--mk-navy); }
.pj-updates p { font-size: 15px; line-height: 1.75; margin: 0; color: var(--mk-ink); }
.pj-updates__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 10px; margin-top: 14px; }
.pj-updates__photos .mk-media { aspect-ratio: 4 / 3; }
@media (max-width: 640px) { .pj-updates li { grid-template-columns: 1fr; gap: 8px; } }

/* empty state */
.pj-empty { background: var(--mk-white); border: 1px solid var(--mk-line); padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 64px); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.pj-empty__head { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 62ch; }
.pj-empty__head h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; line-height: 1.15; text-transform: uppercase; margin: 0; color: var(--mk-navy); text-wrap: balance; }
.pj-empty__head p { font-size: 16px; line-height: 1.75; margin: 0; color: var(--mk-ink); text-wrap: pretty; }
.pj-coming { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.pj-coming div { border-top: 2px solid var(--mk-gold); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.pj-coming h3 { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0; color: var(--mk-navy); }
.pj-coming p { font-size: 14px; line-height: 1.7; margin: 0; color: var(--mk-ink); }
.pj-coming span { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--mk-gold-text); }

/* completed-project quote */
.pj-quote { margin: 0; padding-left: 24px; border-left: 2px solid var(--mk-gold); display: flex; flex-direction: column; gap: 14px; }
.pj-quote blockquote { margin: 0; font-size: clamp(17px, 1.8vw, 21px); font-style: italic; line-height: 1.6; color: var(--mk-navy); }
.pj-quote figcaption { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-gold-text); }
