/* =====================================================================
   CATMAR CONSTRUCTION — styles.css
   Brand: black + gold, Cinzel display / Barlow body.
   Signature: gold hazard-stripe dividers (a real construction artifact).
   Mobile-first; breakpoints scale up from there.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Colour palette */
  --black:        #0d0d0f;   /* page background */
  --ink:          #16171a;   /* raised surfaces / cards on dark */
  --ink-2:        #1f2024;   /* hover surfaces */
  --paper:        #f4f2ee;   /* light section background */
  --paper-ink:    #1a1a1d;   /* text on light */
  --paper-muted:  #5a5852;   /* muted text on light */
  --line:         #2c2d31;   /* hairline borders on dark */

  --gold:         #c79a3a;   /* primary brand gold */
  --gold-light:   #e7c772;   /* highlight gold */
  --gold-deep:    #9c7726;   /* pressed / shadow gold */
  --whatsapp:     #25d366;

  --on-dark:      #ECEAE4;   /* body text on dark */
  --on-dark-mut:  #9a9a9f;   /* muted text on dark */

  /* Type */
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body:    "Barlow", system-ui, -apple-system, sans-serif;
  --font-cond:    "Barlow Semi Condensed", var(--font-body);

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --maxw: 1140px;
  --radius: 4px;        /* restrained — construction feels squared-off */
  --radius-lg: 8px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--s-4);
  letter-spacing: 0.01em;
}

p { margin: 0 0 var(--s-4); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

/* ---------- Accessibility helpers ---------- */
.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;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -3rem;
  background: var(--gold); color: var(--black);
  padding: var(--s-2) var(--s-4); border-radius: var(--radius);
  font-weight: 600; z-index: 200; transition: top 0.2s ease;
}
.skip-link:focus { top: var(--s-4); }

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--font-cond);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--s-3);
}
.eyebrow-dark { color: var(--gold-deep); }

.section { padding-block: var(--s-9); }

.section-head { max-width: 640px; margin-bottom: var(--s-7); }
.section-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.section-intro { color: var(--on-dark-mut); }

/* Hazard-stripe divider — the signature element, lifted from the brand. */
.hazard-stripe {
  height: 14px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--gold) 0, var(--gold) 18px,
    var(--black) 18px, var(--black) 36px
  );
  opacity: 0.92;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  min-height: 48px;          /* touch target */
}
.btn:hover { transform: translateY(-2px); }
.btn-icon { flex-shrink: 0; }

.btn-primary {
  background: var(--gold);
  color: var(--black);
}
.btn-primary:hover { background: var(--gold-light); }

.btn-ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #04361a;
}
.btn-whatsapp:hover { background: #38e077; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,15,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: var(--s-3);
  text-decoration: none; color: var(--on-dark);
}
.brand-logo {
  height: 46px; width: auto; display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.08em; color: #fff;
}
.brand-sub {
  font-family: var(--font-cond);
  font-size: 0.62rem; letter-spacing: 0.34em;
  color: var(--gold); margin-top: 2px;
}

.site-nav { display: flex; align-items: center; }
.nav-menu {
  list-style: none; display: flex; align-items: center;
  gap: var(--s-5); margin: 0; padding: 0;
}
.nav-menu a {
  text-decoration: none; color: var(--on-dark);
  font-family: var(--font-cond); font-weight: 500;
  font-size: 0.95rem; letter-spacing: 0.03em;
  padding: var(--s-2) 0; transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--gold-light); }
.nav-cta {
  border: 2px solid var(--gold);
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius);
  color: var(--gold) !important;
}
.nav-cta:hover { background: var(--gold); color: var(--black) !important; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 10px;
  width: 24px; height: 2px; background: var(--on-dark);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--s-9) 0;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(199,154,58,0.14), transparent 60%),
    linear-gradient(180deg, #121214, var(--black));
  overflow: hidden;
}
.hero-inner { padding-bottom: var(--s-9); max-width: 880px; }
.eyebrow { } /* already defined */
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: 0.005em;
  margin-bottom: var(--s-5);
}
.hero-accent { color: var(--gold); }
.hero-lead {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--on-dark-mut);
  max-width: 620px;
  margin-bottom: var(--s-6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- About ---------- */
.about { background: var(--paper); color: var(--paper-ink); }
.about h2 { color: var(--paper-ink); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.about p { color: var(--paper-muted); font-weight: 400; }
.about-grid { display: grid; gap: var(--s-8); }
.about-stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-5);
}
.about-stats li {
  border-left: 3px solid var(--gold);
  padding-left: var(--s-4);
}
.stat-num {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.4rem; color: var(--paper-ink); line-height: 1;
}
.stat-label {
  font-family: var(--font-cond);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; color: var(--paper-muted);
}

/* ---------- Services ---------- */
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-4);
  grid-template-columns: 1fr;
}
.service-card {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6) var(--s-5);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.service-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  background: var(--ink-2);
}
.service-icon {
  display: inline-block;
  font-size: 1.6rem; color: var(--gold);
  margin-bottom: var(--s-3); line-height: 1;
}
.service-card h3 { font-size: 1.2rem; color: #fff; margin-bottom: var(--s-2); }
.service-card p { color: var(--on-dark-mut); font-size: 0.95rem; margin: 0; }

/* ---------- Projects ---------- */
.project-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
.project-card {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.project-media {
  aspect-ratio: 3 / 2;
  background: var(--ink-2);
  overflow: hidden;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;   /* bias up: façade work sits in upper portion of these shots */
  display: block;
}
/* Per-photo crop tuning where the default focal point isn't ideal */
.project-card[data-shot="stoke-newington"] .project-media img { object-position: center 55%; }
.project-card[data-shot="montgomery"] .project-media img { object-position: center 38%; }
.project-body { padding: var(--s-5); }
.project-body h3 { font-size: 1.3rem; color: #fff; margin-bottom: var(--s-3); }
.project-meta {
  margin: 0 0 var(--s-4); display: grid; gap: var(--s-1);
}
.project-meta div { display: flex; gap: var(--s-2); font-size: 0.9rem; }
.project-meta dt {
  font-family: var(--font-cond);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.72rem; color: var(--gold);
  min-width: 118px; padding-top: 2px;
}
.project-meta dd { margin: 0; color: var(--on-dark); }
.project-body > p { color: var(--on-dark-mut); font-size: 0.95rem; margin: 0; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--ink); }
.quote-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
.quote-card {
  background: var(--black);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--s-6) var(--s-5);
}
.quote-tag {
  font-family: var(--font-cond);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.72rem; color: var(--gold); margin-bottom: var(--s-3);
}
.quote-card blockquote {
  margin: 0 0 var(--s-4); font-size: 1.02rem;
  line-height: 1.6; color: var(--on-dark);
}
.quote-card footer { font-size: 0.88rem; color: var(--on-dark-mut); }
.quote-card cite { font-style: normal; font-weight: 600; color: #fff; }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--paper); color: var(--paper-ink); }
.contact h2 { color: var(--paper-ink); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.contact p { color: var(--paper-muted); }
.contact-inner { display: grid; gap: var(--s-7); }
.contact-actions { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.contact-actions .btn { width: 100%; justify-content: center; }
.contact-direct { font-size: 1rem; color: var(--paper-muted); margin: var(--s-2) 0 0; }
.contact-direct a { color: var(--gold-deep); font-weight: 600; text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); border-top: 1px solid var(--line); padding-top: var(--s-8); }
.footer-grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: 1fr;
  padding-bottom: var(--s-7);
}
.footer-logo { height: 56px; width: auto; margin-bottom: var(--s-4); }
.footer-tagline { color: var(--on-dark-mut); font-size: 0.92rem; max-width: 240px; }
.footer-col h4 {
  font-family: var(--font-cond);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.8rem; color: var(--gold); margin-bottom: var(--s-3);
}
.footer-col p { margin: 0 0 var(--s-2); color: var(--on-dark-mut); font-size: 0.95rem; }
.footer-col a { color: var(--on-dark); text-decoration: none; }
.footer-col a:hover { color: var(--gold-light); }
.placeholder-text { color: #5e5f64; font-style: italic; }

.footer-bar { border-top: 1px solid var(--line); padding-block: var(--s-5); }
.footer-bar-inner {
  display: flex; flex-direction: column; gap: var(--s-2);
  align-items: flex-start;
  font-size: 0.85rem; color: var(--on-dark-mut);
}
.footer-bar-inner p { margin: 0; }
.back-to-top { text-decoration: none; color: var(--gold); font-family: var(--font-cond); }
.back-to-top:hover { color: var(--gold-light); }

/* =====================================================================
   RESPONSIVE — scale up from mobile
   ===================================================================== */

/* Mobile nav: collapse menu under a toggle below 860px */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: var(--s-3) var(--s-5) var(--s-5);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a { display: block; padding: var(--s-4) 0; }
  .nav-cta { text-align: center; margin-top: var(--s-3); }
}

/* ≥ 640px */
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid   { grid-template-columns: repeat(2, 1fr); }
  .contact-actions { flex-direction: row; flex-wrap: wrap; }
  .contact-actions .btn { width: auto; }
  .footer-bar-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ≥ 880px */
@media (min-width: 880px) {
  .about-grid { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .about-stats { gap: var(--s-6); }
  .contact-inner { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
}

/* ≥ 1000px */
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .project-grid { grid-template-columns: repeat(3, 1fr); }
  .quote-grid   { grid-template-columns: repeat(3, 1fr); }
}
