/* ============================================================
   MERAZ AUTO UPHOLSTERY — Design System
   Concept: the stitch line. Every divider on this site is built
   from the same double-row saddle-stitch pattern that holds
   together everything Ramon reupholsters — leather, vinyl,
   canvas, carpet. Clean, modern, workshop-precise.
   ============================================================ */

:root {
  /* Color: materials of the trade */
  --canvas: #FAF8F4;        /* raw canvas / muslin */
  --canvas-alt: #F1EBE0;    /* deeper canvas, section break */
  --ink: #1E1A16;           /* near-black, warm */
  --ink-soft: #4A433C;      /* softened body text */
  --leather: #5B2F22;       /* cognac/oxblood leather */
  --leather-deep: #371C14;  /* dark leather, footer/CTA bg */
  --thread: #C2502F;        /* waxed thread orange-rust — primary accent */
  --thread-soft: #E2A185;   /* light thread tint */
  --steel: #8A8274;         /* warm steel gray, secondary text */
  --line: #DEd5C5;          /* hairline border, warm tan-gray */
  --white: #FFFCF8;

  /* Type */
  --font-display: 'Archivo', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.25rem;
  --sp-5: 3.5rem;
  --sp-6: 5.5rem;
  --sp-7: 8rem;

  --radius: 3px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--thread);
  text-decoration: none;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 var(--sp-2);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 var(--sp-2); color: var(--ink-soft); }
p.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 640px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thread);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--sp-2);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--thread);
  display: inline-block;
}

/* ---------- Stitch line: the signature element ---------- */
.stitch {
  height: 10px;
  width: 100%;
  background-image:
    repeating-linear-gradient(90deg, var(--thread) 0 7px, transparent 7px 16px),
    repeating-linear-gradient(90deg, transparent 0 4px, var(--thread) 4px 11px, transparent 11px 20px);
  background-position: 0 0, 5px 7px;
  background-size: 100% 2px;
  background-repeat: repeat-x;
  opacity: 0.85;
}
.stitch.on-dark {
  background-image:
    repeating-linear-gradient(90deg, var(--thread-soft) 0 7px, transparent 7px 16px),
    repeating-linear-gradient(90deg, transparent 0 4px, var(--thread-soft) 4px 11px, transparent 11px 20px);
  background-position: 0 0, 5px 7px;
  background-size: 100% 2px;
}

/* ---------- Header / Nav ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  gap: var(--sp-3);
}
.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
}
.brand span {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--steel);
  margin-top: 3px;
}
nav.main-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
nav.main-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
}
nav.main-links a:hover,
nav.main-links a.active {
  color: var(--ink);
  border-bottom-color: var(--thread);
}
.nav-call {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.phone-link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95em 1.7em;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--thread); border-color: var(--thread); transform: translateY(-1px); }
.btn.outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.outline:hover { background: var(--ink); color: var(--white); }
.btn.on-dark { background: var(--thread); border-color: var(--thread); color: var(--white); }
.btn.on-dark:hover { background: var(--white); color: var(--leather-deep); border-color: var(--white); }
.btn-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }

/* ---------- Sections ---------- */
section { padding: var(--sp-6) 0; }
section.tight { padding: var(--sp-5) 0; }
.section-alt { background: var(--canvas-alt); }
.section-dark {
  background: var(--leather-deep);
  color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #D9C9BC; }
.section-dark .eyebrow { color: var(--thread-soft); }
.section-dark .eyebrow::before { background: var(--thread-soft); }

.section-head { max-width: 680px; margin-bottom: var(--sp-5); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--sp-6) 0 var(--sp-5);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-5);
  align-items: center;
}
.hero h1 { margin-bottom: var(--sp-3); }
.hero-stats {
  display: flex;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}
.stat .num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.1rem;
  color: var(--leather);
  display: block;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- Photo placeholder frames ---------- */
/* Swap any .photo-frame div for: <img src="images/your-file.jpg" alt="..."> */
.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, #EFE7D8 0 14px, #E7DCC8 14px 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.photo-frame.square { aspect-ratio: 1/1; }
.photo-frame.wide { aspect-ratio: 16/9; }
.photo-frame.tall { aspect-ratio: 3/4; }
.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-frame .cap {
  position: relative;
  z-index: 2;
  width: 100%;
  background: rgba(30,26,22,0.78);
  color: #EFE7DA;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.7em 0.9em;
}
.photo-frame .cap b { color: var(--thread-soft); font-weight: 500; }
.photo-frame .icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 38px;
  height: 38px;
  opacity: 0.35;
}

/* ---------- Small inset "snapshot" for lower-resolution shop photos ---------- */
.photo-snap-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: var(--canvas-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.photo-snap {
  max-width: 240px;
  width: 100%;
  background: var(--white);
  padding: 10px 10px 14px;
  box-shadow: 0 8px 20px rgba(30,20,14,0.12);
  transform: rotate(-1.2deg);
}
.photo-snap img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
}
.photo-snap .snap-cap {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 0.6em;
}

/* ---------- Soft placeholder (no photo available yet) ---------- */
.placeholder-soft {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  height: 100%;
  color: var(--steel);
  text-align: center;
  padding: var(--sp-3);
}
.placeholder-soft svg { width: 32px; height: 32px; opacity: 0.5; }
.placeholder-soft span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Mosaic wall ---------- */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.mosaic-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  filter: saturate(1.03);
  transition: transform 0.2s ease;
}
.mosaic-grid a:hover img { transform: scale(1.06); }
.mosaic-grid a { display: block; overflow: hidden; cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.gallery-grid .photo-frame img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,16,12,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 56px 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border-radius: 2px;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 6px 12px;
}
.lightbox-close:hover { color: var(--thread-soft); }

/* ---------- Capability / service cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--thread); transform: translateY(-3px); }
.card .ic { width: 34px; height: 34px; margin-bottom: var(--sp-2); color: var(--leather); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.card p { font-size: 0.92rem; margin-bottom: 0; }
.card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--thread);
  margin-bottom: 0.6em;
  display: block;
}

/* ---------- Trust / quote-style block ---------- */
.trust-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: center;
}
.trust-block blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--leather-deep);
  color: var(--white);
  padding: var(--sp-5) 0;
}
.cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.cta-row h2 { color: var(--white); margin-bottom: 0.2em; }
.cta-row p { color: #D9C9BC; margin-bottom: 0; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink);
  color: #C9C2B6;
  padding: var(--sp-5) 0 var(--sp-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
}
footer.site h4 {
  color: var(--white);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
footer.site a { color: #C9C2B6; }
footer.site a:hover { color: var(--thread-soft); }
footer.site .brand { color: var(--white); }
footer.site .brand span { color: #8C8478; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid #3A352D;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8C8478;
}
footer.site p { color: #C9C2B6; font-size: 0.92rem; }

/* ---------- Floating call button (mobile) ---------- */
.float-call {
  display: none;
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 60;
  background: var(--thread);
  color: var(--white);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.float-call svg { width: 24px; height: 24px; }

/* ---------- Page header (sub-pages) ---------- */
.page-head {
  padding: var(--sp-5) 0 var(--sp-4);
}
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }

/* ---------- Filters (gallery) ---------- */
.filter-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--thread); color: var(--ink); }
.filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.gallery-grid .photo-frame { cursor: default; }
.hidden-item { display: none !important; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-5);
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.contact-card .row {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}
.contact-card .row:last-child { border-bottom: none; }
.contact-card .row .ic { width: 22px; height: 22px; color: var(--thread); flex-shrink: 0; margin-top: 2px; }
.contact-card .row .lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  display: block;
  margin-bottom: 0.2em;
}
.contact-card .row .val { font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.contact-card .row a.val { color: var(--ink); }
.contact-card .row a.val:hover { color: var(--thread); }
.map-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ============================================================ */
@media (max-width: 880px) {
  .hero-grid, .trust-block, .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  nav.main-links { display: none; }
  .menu-toggle { display: block; }
  .float-call { display: flex; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .mosaic-grid { grid-template-columns: repeat(8, 1fr); }
}

nav.main-links.open {
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3);
  gap: var(--sp-2);
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: var(--sp-3); flex-wrap: wrap; }
  .mosaic-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}

:focus-visible {
  outline: 2px solid var(--thread);
  outline-offset: 2px;
}
