/* =========================================================
   Innovation MB Plastering — Stylesheet
   No external fonts, no @imports, no remote URLs.
   System font stack only — keeps CSP strict and pages fast.
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-surface: #f5f5f3;
  --color-surface-2: #ebeae6;
  --color-text: #1a1d23;
  --color-text-muted: #5b6371;
  --color-primary: #1f3a5f;       /* deep navy — trust, contractor-grade */
  --color-primary-dark: #142845;
  --color-accent: #c9893d;        /* warm ochre — plaster/clay reference */
  --color-border: #d8d6d0;
  --color-success: #2e7d32;

  --shadow-sm: 0 1px 2px rgba(20, 40, 69, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 40, 69, 0.10);
  --shadow-lg: 0 12px 32px rgba(20, 40, 69, 0.14);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;

  --container: 1180px;
  --gutter: 1.25rem;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-primary-dark);
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 999;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  text-decoration: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-primary-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.site-header .brand { margin-right: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}
.brand-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  color: #fff;
}
.brand-name small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 1rem;
  min-height: 44px;
}
.nav-toggle:hover, .nav-toggle:focus {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Language toggle (EN | ES | KO) ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.45rem;
  margin-right: 0.4rem;
  white-space: nowrap;
  min-height: 36px;
}
.lang-toggle a,
.lang-toggle .lang-current {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.35rem;
  border-radius: 3px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
}
.lang-toggle a:hover,
.lang-toggle a:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}
.lang-toggle .lang-current {
  color: var(--color-accent);
  cursor: default;
}
.lang-toggle .lang-sep {
  opacity: 0.4;
  user-select: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-primary-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 1.25rem 1rem;
    gap: 0;
  }
  .site-nav a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 44px;
  }
  .lang-toggle {
    padding: 0.2rem 0.3rem;
    margin-right: 0.2rem;
    font-size: 0.75rem;
    gap: 0.1rem;
  }
  .lang-toggle a,
  .lang-toggle .lang-current {
    padding: 0.3rem 0.25rem;
    min-height: 36px;
  }
  .brand-name { font-size: 1rem; }
  .brand-logo { width: 44px; height: 44px; flex: 0 0 44px; }
  .site-header .container {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    gap: 0.5rem;
  }
}

/* ---------- Hero ---------- */
/* Layered: navy gradient on top, stucco texture beneath. The gradient is
   semi-transparent so the trowel/grain texture shows through, giving the
   hero a tactile "freshly-finished plaster" feel without hurting readability. */
.hero {
  background:
    linear-gradient(135deg, rgba(20, 40, 69, 0.74) 0%, rgba(31, 58, 95, 0.66) 100%),
    url("../images/textures/stucco-dark.jpg") center/cover no-repeat,
    var(--color-primary-dark);
  color: #fff;
  padding: 5rem 0 4.5rem;
  position: relative;
}
.hero h1 { color: #fff; }
.hero p.lead {
  font-size: 1.2rem;
  max-width: 56ch;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.5rem;
}
.hero .btn-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: #b67a2c;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn:active { transform: translateY(1px); }

/* ---------- Sections ---------- */
section {
  padding: 4rem 0;
}
/* The "alt" section now uses a real stucco texture for a tactile feel.
   A near-white tint over the texture keeps card text readable. */
section.alt {
  background:
    linear-gradient(rgba(245, 240, 232, 0.55), rgba(245, 240, 232, 0.55)),
    url("../images/textures/stucco-cream.jpg") center/cover no-repeat;
  background-color: var(--color-surface);
}
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.5rem;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ---------- Grid utilities ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0.25rem; }
.card .icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
  background:
    linear-gradient(rgba(20, 40, 69, 0.78), rgba(31, 58, 95, 0.78)),
    url("../images/textures/stucco-dark.jpg") center/cover no-repeat;
  background-color: var(--color-primary-dark);
  color: #fff;
  padding: 2rem var(--gutter);
  border-radius: var(--radius-lg);
}
.trust-strip .stat {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.trust-strip .label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.gallery figure {
  margin: 0;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  position: relative;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery figure:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery figure .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
.gallery figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(20, 40, 69, 0) 30%, rgba(20, 40, 69, 0.92) 100%);
  color: #fff;
  padding: 2.5rem 1rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Before / after project pairs ---------- */
.project {
  margin: 0 auto 3.5rem;
  max-width: 940px;
}
.project:last-child { margin-bottom: 0; }
.project-head {
  margin-bottom: 1rem;
}
.project-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  font-family: var(--font-display);
}
.project-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}
.project-blurb {
  margin: 0.5rem 0 1.25rem;
  color: var(--color-text);
  line-height: 1.55;
}
.project-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.project-pair figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: relative;
  aspect-ratio: 3 / 4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-pair figure:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.project-pair figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-pair figure::before {
  content: attr(data-label);
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(20, 40, 69, 0.3);
}
.project-pair figure[data-label="AFTER"]::before {
  background: var(--color-accent);
}
.project-pair figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(20, 40, 69, 0) 30%, rgba(20, 40, 69, 0.92) 100%);
  color: #fff;
  padding: 2.5rem 0.9rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .project-pair { grid-template-columns: 1fr; }
}

/* ---------- Featured work strip on home page ---------- */
.featured-work {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.featured-work figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-work figure:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.featured-work figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-work figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(20, 40, 69, 0) 30%, rgba(20, 40, 69, 0.9) 100%);
  color: #fff;
  padding: 2rem 1rem 0.85rem;
  font-size: 0.85rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 380px);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.contact-card dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 1rem;
}
.contact-card dt:first-of-type { margin-top: 0; }
.contact-card dd {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .copyright {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.align-start { align-items: start; }
.note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}
.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;
}

/* ---------- Sticky mobile Call/Quote bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--color-primary-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -6px 18px rgba(20, 40, 69, 0.18);
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
}
.mobile-call-bar .mcb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-width: 540px;
  margin: 0 auto;
}
.mobile-call-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 0.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  min-height: 48px;
  border: 2px solid transparent;
}
.mobile-call-bar a.mcb-call {
  background: var(--color-accent);
  color: #fff;
}
.mobile-call-bar a.mcb-quote {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.mobile-call-bar svg {
  width: 18px; height: 18px;
  flex: 0 0 18px;
}

/* Pad the page so footer content isn't hidden behind the sticky bar on mobile */
@media (max-width: 760px) {
  .mobile-call-bar { display: block; }
  body { padding-bottom: 76px; }
  .site-footer { margin-bottom: 0; }
}

/* ---------- Tap-to-zoom lightbox (CSP-safe, JS-controlled, no inline styles) ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 18, 32, 0.94);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lightbox .lb-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox .lb-close:hover, .lightbox .lb-close:focus {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox .lb-caption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.zoomable {
  cursor: zoom-in;
}

/* When the lightbox is open, lock background scroll. CSP-safe: we toggle this
   class from JS instead of mutating element.style. */
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* ---------- Mobile typography & spacing polish ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 2.75rem 0; }
  .hero { padding: 3rem 0 2.75rem; }
  .hero p.lead { font-size: 1.05rem; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn-row .btn { text-align: center; }
  .btn { padding: 0.85rem 1.25rem; min-height: 48px; }
  .card { padding: 1.4rem; }
  .section-head { margin-bottom: 1.75rem; }
  .trust-strip { padding: 1.5rem 1rem; }
  .trust-strip .stat { font-size: 1.7rem; }

  /* Footer becomes single column with breathing room */
  .site-footer { padding: 2.25rem 0 1rem; }
  .site-footer .footer-grid { gap: 1.5rem; }
  .site-footer li { margin-bottom: 0.5rem; }
  .site-footer .copyright {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  /* Larger tap targets on every footer/contact link */
  .site-footer a,
  .contact-card dd a {
    display: inline-block;
    padding: 0.25rem 0;
    min-height: 32px;
  }
}
