/*
Theme Name: Martin Construction Services
Theme URI: https://martincsllc.com
Author: Martin Construction Services LLC
Description: Clean, professional theme for Martin Construction Services LLC — deep slate and warm copper, built for a home builder and remodeler. Editable pages, services and contact details.
Version: 1.5.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcs
Tags: business, custom-menu, custom-logo, featured-images, two-columns, right-sidebar
*/

/* ---------- Design tokens ---------- */
:root {
  --radius: 0.375rem;
  --radius-lg: 0.375rem;

  --background: oklch(0.995 0.003 95);
  --foreground: oklch(0.24 0.018 248);
  --card: oklch(1 0 0);
  --primary: oklch(0.29 0.028 250);
  --primary-foreground: oklch(0.985 0.004 95);
  --muted-foreground: oklch(0.52 0.016 250);
  --accent: oklch(0.58 0.135 47);
  --accent-hover: oklch(0.52 0.14 45);
  --accent-foreground: oklch(0.99 0.005 95);
  --border: oklch(0.9 0.008 250);
  --input: oklch(0.88 0.008 250);
  --surface: oklch(0.965 0.011 85);
  --ink: oklch(0.22 0.02 250);
  --ink-foreground: oklch(0.97 0.006 95);

  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;

  --shadow-card: 0 1px 2px oklch(0.25 0.02 250 / 0.06), 0 12px 32px -12px oklch(0.25 0.02 250 / 0.18);
  --shadow-lift: 0 2px 4px oklch(0.25 0.02 250 / 0.08), 0 28px 56px -20px oklch(0.25 0.02 250 / 0.28);
}

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

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

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed; top: 0.5rem; left: 0.5rem;
  width: auto; height: auto; clip: auto;
  z-index: 100; padding: 0.75rem 1rem;
  background: var(--card); box-shadow: var(--shadow-card);
}

/* ---------- Layout utilities ---------- */
.container-page {
  width: 100%;
  margin-inline: auto;
  max-width: 76rem;
  padding-inline: 1.25rem;
}

.section { padding-block: 4.5rem; }
@media (min-width: 768px) { .section { padding-block: 6rem; } }

.bg-surface { background-color: var(--surface); }
.stack > * + * { margin-top: 1rem; }
.lead { font-size: 1.125rem; color: var(--muted-foreground); }
.muted { color: var(--muted-foreground); }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.promise-grid,
.service-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise-grid,
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-split { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
  .grid-contact { grid-template-columns: 1.4fr 1fr; gap: 3.5rem; }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-rule::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  background-color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.5rem;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-accent { background-color: var(--accent); color: var(--accent-foreground); box-shadow: var(--shadow-card); }
.btn-accent:hover { background-color: var(--accent-hover); color: var(--accent-foreground); }

.btn-primary { background-color: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background-color: oklch(0.24 0.026 250); color: var(--primary-foreground); }

.btn-onink { border: 1px solid oklch(1 0 0 / 0.35); color: var(--ink-foreground); background: transparent; }
.btn-onink:hover { background-color: oklch(1 0 0 / 0.1); border-color: oklch(1 0 0 / 0.6); color: var(--ink-foreground); }

/* ---------- Cards ---------- */
.card-surface {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 1.5rem; }
.card-hover { transition: box-shadow 220ms ease, transform 220ms ease; }
.card-hover:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: oklch(0.995 0.003 95 / 0.95);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  flex: none;
  border-radius: var(--radius);
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.brand-logo {
  width: 2.5rem !important; height: 2.5rem !important;
  max-width: 2.5rem !important;
  flex: none;
  border-radius: var(--radius);
  object-fit: cover;
}
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.15;
}
.brand-sub {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-phones { display: none; flex-direction: column; gap: 0.25rem; }
.header-phone-loc {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
}
.header-phone {
  display: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}
@media (min-width: 768px) { .header-phones { display: flex; } .header-phone { display: inline-flex; align-items: center; gap: 0.5rem; } }

.header-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--input);
  color: var(--foreground);
  transition: background-color .2s, color .2s;
}
.header-social:hover { background-color: var(--accent); color: #fff; }

.primary-nav { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--foreground); }
@media (min-width: 1024px) { .primary-nav { display: block; } }

.header-cta { display: none; }
@media (min-width: 768px) { .header-cta { display: inline-flex; } }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-nav { display: none; border-top: 1px solid var(--border); background-color: var(--background); }
.mobile-nav.is-open { display: block; }
@media (min-width: 1024px) { .mobile-nav.is-open { display: none; } }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--border); }
.mobile-nav li:last-child { border-bottom: 0; }
.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.mobile-nav .btn { margin-block: 1rem; width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to right,
    oklch(0.2 0.02 250 / 0.9) 0%,
    oklch(0.2 0.02 250 / 0.72) 45%,
    oklch(0.2 0.02 250 / 0.35) 100%
  );
}
.hero-body { position: relative; padding-block: 6rem; }
@media (min-width: 768px) { .hero-body { padding-block: 9rem; } }
.hero-body h1 { color: var(--ink-foreground); margin-top: 1.25rem; }
.hero-body .lead { color: oklch(0.97 0.006 95 / 0.85); margin-top: 1.5rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.page-hero { border-bottom: 1px solid var(--border); background-color: var(--surface); }
.page-hero-inner { padding-block: 3.5rem; }
@media (min-width: 768px) { .page-hero-inner { padding-block: 5rem; } }
.page-hero h1 { margin-top: 1rem; }

/* ---------- About ---------- */
.about-intro-grid,
.project-management-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}
.about-copy { max-width: 46rem; }
.about-copy p { color: var(--muted-foreground); font-size: 1.125rem; }
.about-copy p + p { margin-top: 1.25rem; }
.about-figure { margin: 0; }
.about-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.project-features { padding: 2rem; }
.about-offices-section { padding-top: 0; }
.office-address { margin-top: 1rem; font-style: normal; }
.office-address span { display: block; }
@media (min-width: 1024px) {
  .about-intro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
  .project-management-grid { grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 1fr); gap: 4rem; align-items: center; }
}

/* ---------- Services ---------- */
.service-card { overflow: hidden; }
.service-card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}
.link-arrow:hover { text-decoration: underline; }

.service-nav { border-bottom: 1px solid var(--border); }
.service-nav .inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-block: 1rem; }
.service-nav a { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; color: var(--muted-foreground); }

.service-row { scroll-margin-top: 6rem; }
.service-row .inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) {
  .service-row .inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
  .service-row.is-alt .service-figure { order: 2; }
}
.service-figure img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); object-fit: cover; }
.check-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.check-list li { display: flex; gap: 0.75rem; margin-top: 0.625rem; }
.check-list li::before { content: "✓"; color: var(--accent); font-weight: 700; }

.btn-outline { border: 1px solid var(--border); color: var(--foreground); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Photo galleries ---------- */
.gallery-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery-item { display: block; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.03); }

/* ---------- Bands ---------- */
.cta-band { background-color: var(--ink); color: var(--ink-foreground); }
.cta-band .inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 3.5rem;
}
.cta-band h2 { color: var(--ink-foreground); }
.cta-band p { color: oklch(0.97 0.006 95 / 0.75); margin-top: 0.75rem; max-width: 34rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 768px) {
  .cta-band .inner { flex-direction: row; align-items: center; justify-content: space-between; padding-block: 4rem; }
}

.finance-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
}
@media (min-width: 768px) {
  .finance-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 2.5rem; }
}

/* ---------- Contact ---------- */
.contact-aside > * + * { margin-top: 2rem; }
.contact-heading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.contact-list li + li { margin-top: 0.875rem; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}
.hours-row dt { color: var(--muted-foreground); margin: 0; }
.hours-row dd { margin: 0; font-weight: 600; }
.bt-form { overflow: visible; }
.bt-form iframe { display: block; width: 100%; height: 1200px; min-height: 1200px; border: 0; margin: 0 auto; background: transparent; }
@media (max-width: 640px) { .bt-form iframe { height: 1500px; min-height: 1500px; } }

/* ---------- Footer ---------- */
.site-footer { background-color: var(--ink); color: var(--ink-foreground); }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 4rem; } }
.footer-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.footer-grid h2 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.footer-grid ul { list-style: none; margin: 1rem 0 0; padding: 0; font-size: 0.9375rem; }
.footer-grid li + li { margin-top: 0.625rem; }
.footer-grid a { color: oklch(0.97 0.006 95 / 0.75); }
.footer-grid a:hover { color: var(--ink-foreground); }
.footer-note { color: oklch(0.97 0.006 95 / 0.7); font-size: 0.9375rem; margin-top: 0.75rem; max-width: 24rem; }
.footer-badge {
  display: inline-flex;
  margin-top: 1.25rem;
  border: 1px solid oklch(1 0 0 / 0.25);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-office { display: block; margin-bottom: 0.75rem; }
.footer-office-label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.footer-bar { border-top: 1px solid oklch(1 0 0 / 0.15); }
.footer-bar .inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1.5rem;
  font-size: 0.8125rem;
  color: oklch(0.97 0.006 95 / 0.6);
}
@media (min-width: 640px) {
  .footer-bar .inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Editor content ---------- */
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content p,
.entry-content li { color: var(--muted-foreground); font-size: 1.0625rem; }
.entry-content h2 { margin-top: 2.5rem; }
.entry-content h3 { margin-top: 2rem; }
.entry-content a { color: var(--accent); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  font-style: italic;
}
