/* ==========================================================================
   MKN Constructions — Shared Stylesheet
   Palette: sand / brick / ochre / moss — grounded in site materials
   Type: Fraunces (display) + Public Sans (body/UI)
   Signature motif: blueprint dimension lines + corner registration marks
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,600&family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color tokens */
  --sand: #EDE3D0;
  --sand-deep: #E3D6BC;
  --paper: #FAF6EC;
  --ink: #2B2118;
  --ink-soft: #55483A;
  --brick: #A2462B;
  --brick-dark: #7C3420;
  --ochre: #BE8A2E;
  --ochre-dark: #9A6F22;
  --moss: #46543A;
  --moss-dark: #333E2A;
  --line: #D8C9A8;
  --line-strong: #C2AF87;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1160px;
  --radius: 6px;
  --shadow: 0 10px 30px -14px rgba(43, 33, 24, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.wrap { padding-top: 96px; } /* space below fixed header */

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 999; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Eyebrow / labels (blueprint annotation style) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brick);
}

/* ---------- Blueprint dimension-line divider ---------- */
.dim-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ochre-dark);
  margin: 56px 0;
  user-select: none;
}
.dim-divider::before, .dim-divider::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--line-strong);
}
.dim-divider .tick { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap; }
.dim-divider .tick::before { content: "⊢ "; }
.dim-divider .tick::after { content: " ⊣"; }

/* ---------- Corner registration marks (signature framing device) ---------- */
.blueprint-frame {
  position: relative;
  padding: 22px;
}
.blueprint-frame::before, .blueprint-frame::after,
.blueprint-frame .bp-tr, .blueprint-frame .bp-bl {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ochre);
}
.blueprint-frame::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.blueprint-frame::after { bottom: 0; right: 0; border-left: none; border-top: none; }
.blueprint-frame .bp-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.blueprint-frame .bp-bl { bottom: 0; left: 0; border-right: none; border-top: none; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(237, 227, 208, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
}
.logo span { color: var(--brick); }
.logo small {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brick); }
.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brick);
}

.nav-cta {
  background: var(--brick);
  color: var(--paper) !important;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 700 !important;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--brick-dark); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 9px 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 84px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav a { padding: 16px 24px; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 16px 24px; text-align: center; }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brick); color: var(--paper); }
.btn-primary:hover { background: var(--brick-dark); color: var(--paper); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 64px 0 88px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); }
.hero h1 em { font-style: italic; color: var(--brick); }
.hero .lead { font-size: 1.15rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 40px; }

.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-row .stat strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--brick); }
.stat-row .stat span { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- House line-art illustration (SVG styling) ---------- */
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.hero-art .dim-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  fill: var(--ochre-dark);
  letter-spacing: 0.04em;
}
.hero-art .dim-line { stroke: var(--ochre); stroke-width: 1.4; stroke-dasharray: 4 4; }
.hero-art .house-line { stroke: var(--ink); stroke-width: 2.4; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.hero-art .house-fill { fill: var(--paper); }
.hero-art .accent-fill { fill: var(--brick); }

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }

.bg-paper { background: var(--paper); }
.bg-moss { background: var(--moss); color: var(--paper); }
.bg-moss h2, .bg-moss h3, .bg-moss p { color: var(--paper); }
.bg-moss .eyebrow { color: var(--sand); }
.bg-moss .eyebrow::before { background: var(--sand); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .icon {
  width: 48px; height: 48px;
  margin-bottom: 18px;
  color: var(--brick);
}
.card h3 { font-size: 1.2rem; }
.card p { margin-bottom: 0; }
.card a.card-link { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--brick); }

/* ---------- Process steps (legitimate numbered sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 0 24px 0 0;
  border-right: 1px dashed var(--line-strong);
}
.step:last-child { border-right: none; }
@media (max-width: 900px) {
  .step { border-right: none; border-bottom: 1px dashed var(--line-strong); padding: 0 0 32px 0; margin-bottom: 32px; }
  .step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
}
.step .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--sand-deep);
  -webkit-text-stroke: 1.5px var(--brick);
  color: transparent;
  display: block;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--paper);
  border-left: 4px solid var(--brick);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 30px 32px;
}
.testimonial p.quote { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; color: var(--ink); }
.testimonial .who { font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); }
.testimonial .who span { color: var(--brick); }
.stars { color: var(--ochre); letter-spacing: 2px; margin-bottom: 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--paper); margin-bottom: 8px; }
.cta-band p { color: var(--sand-deep); margin-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--moss-dark); color: var(--sand); padding: 72px 0 28px; }
.site-footer h4 { color: var(--paper); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer a { color: var(--sand); opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: var(--ochre); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid li { margin-bottom: 12px; }
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--paper); margin-bottom: 14px; }
.footer-logo span { color: var(--ochre); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 246, 236, 0.15);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem; opacity: 0.75;
}

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */
.page-header { padding: 56px 0 48px; }
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.page-header .lead { max-width: 60ch; font-size: 1.08rem; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { color: var(--brick); font-weight: 600; }

/* ==========================================================================
   Services page
   ========================================================================== */
.service-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.service-row:last-child { border-bottom: none; }
.service-row.reverse .service-visual { order: 2; }
@media (max-width: 900px) {
  .service-row, .service-row.reverse { grid-template-columns: 1fr; }
  .service-row.reverse .service-visual { order: 0; }
}
.service-visual {
  background: var(--paper);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.service-visual svg { width: 62%; height: 62%; color: var(--brick); }
.service-copy ul { margin: 18px 0 0; }
.service-copy ul li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.service-copy ul li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 12px; height: 12px;
  border: 2px solid var(--brick);
  transform: rotate(45deg);
}

/* ==========================================================================
   Portfolio page
   ========================================================================== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.filter-btn:hover { border-color: var(--brick); color: var(--brick); }
.filter-btn.active { background: var(--brick); border-color: var(--brick); color: var(--paper); }

.project-card { cursor: pointer; padding: 0; overflow: hidden; }
.project-thumb {
  aspect-ratio: 4/3;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
}
.project-thumb svg { width: 55%; height: 55%; color: var(--brick); opacity: 0.85; }
.project-body { padding: 24px; }
.project-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ochre-dark); margin-bottom: 8px;
}
.project-card[hidden] { display: none; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43, 33, 24, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  z-index: 200;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--paper); border-radius: var(--radius); max-width: 620px; width: 100%;
  padding: 40px; position: relative; max-height: 88vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--ink-soft);
}
.modal-box .project-thumb { margin-bottom: 24px; border-radius: var(--radius); border: 1px solid var(--line); }

/* ==========================================================================
   About page
   ========================================================================== */
.value-card { text-align: center; }
.team-card { text-align: center; }
.team-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--brick);
}
.team-avatar svg { width: 46px; height: 46px; }
.team-card .role { color: var(--brick); font-weight: 700; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==========================================================================
   Blog
   ========================================================================== */
.post-card { overflow: hidden; padding: 0; }
.post-thumb { aspect-ratio: 16/10; background: var(--sand-deep); display: flex; align-items: center; justify-content: center; }
.post-thumb svg { width: 40%; height: 40%; color: var(--brick); opacity: 0.7; }
.post-body { padding: 26px; }
.post-meta { font-size: 0.8rem; color: var(--ochre-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }

.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { margin-top: 1.6em; font-size: 1.6rem; }
.article-body p { font-size: 1.06rem; }
.article-hero { max-width: 720px; margin: 0 auto 40px; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.info-item { display: flex; gap: 16px; margin-bottom: 28px; }
.info-item .icon { width: 26px; height: 26px; color: var(--brick); flex-shrink: 0; margin-top: 3px; }
.info-item h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 4px; }
.info-item p { margin-bottom: 0; font-weight: 600; color: var(--ink); }

.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 32px; }
.map-frame iframe { width: 100%; height: 260px; border: 0; display: block; }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.field .required { color: var(--brick); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brick); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 16px; }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
