/* CJW Building Services — design system
   Palette from the CJW logo: vermillion red, charcoal black, warm neutrals.
   Zero JavaScript, zero webfonts, zero third-party requests. */

:root {
  --red: #da1e01;
  --red-dark: #a81700;
  --red-tint: #ffb5a3;
  --ink: #211e19;
  --body: #45423a;
  --muted: #6b675d;
  --charcoal: #1c1a17;
  --charcoal-2: #262420;
  --charcoal-3: #302d28;
  --on-dark: #f2efe8;
  --on-dark-muted: #b9b3a6;
  --cream: #f6f2ea;
  --paper: #ffffff;
  --line: #e6dfd2;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: min(1120px, 92vw);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(33, 30, 25, 0.12);
  --shadow-lg: 0 18px 50px rgba(33, 30, 25, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--red-dark);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

section {
  scroll-margin-top: 5.5rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 9px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn svg {
  flex: none;
}

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(218, 30, 1, 0.3);
}

.btn-red:hover {
  background: var(--red-dark);
  color: #fff;
}

.btn-ghost {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  padding-block: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 48px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--ink);
  line-height: 1.1;
  display: block;
}

.brand-tag {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0.1rem;
}

.site-nav a:hover {
  color: var(--red);
}

.header-call {
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
}

/* ---------- hero ---------- */

.hero {
  background:
    linear-gradient(160deg, rgba(24, 22, 18, 0.96) 0%, rgba(24, 22, 18, 0.88) 55%, rgba(38, 24, 18, 0.86) 100%),
    url("../img/contact-mosaic.jpg") center / cover no-repeat;
  color: var(--on-dark);
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero-inner {
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.2rem;
}

.hero .eyebrow {
  color: var(--red-tint);
}

.eyebrow svg {
  flex: none;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.6rem, 6.2vw, 4.3rem);
  margin-bottom: 1.4rem;
}

.hero h1 em {
  font-style: italic;
  white-space: nowrap;
  background: linear-gradient(0deg, var(--red) 0 0.13em, transparent 0.13em);
  padding-bottom: 0.05em;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: #d9d4c8;
  max-width: 58ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-top: 3.2rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e7e2d6;
}

.tick {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- sections ---------- */

.section {
  padding: clamp(3.8rem, 8vw, 6.2rem) 0;
}

.section-dark {
  background: var(--charcoal);
  color: var(--on-dark);
}

.section-dark h2 {
  color: #fff;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.section-dark .section-head p {
  color: var(--on-dark-muted);
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.about-grid h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.about-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--paper);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.4rem;
  margin-top: 1.8rem;
  font-weight: 600;
  color: var(--ink);
}

.about-note a {
  white-space: nowrap;
}

.photo-frame {
  position: relative;
}

.photo-frame img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  z-index: -1;
}

.est-badge {
  position: absolute;
  top: -1.3rem;
  right: -0.6rem;
  background: var(--charcoal);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  text-align: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  border: 3px solid var(--cream);
  transform: rotate(6deg);
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 185px;
  object-fit: cover;
}

.card-body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body::before {
  content: "";
  width: 34px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--body);
  margin-bottom: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.chips li {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4a463d;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

/* ---------- recent work ---------- */

.work-figure {
  margin: 0;
}

.work-figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.work-figure figcaption {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.9rem;
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}

.contact-card {
  background: var(--charcoal-2);
  border: 1px solid var(--charcoal-3);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.7rem;
}

.contact-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.contact-card h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.contact-card p {
  color: var(--on-dark-muted);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.contact-card a {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

.contact-card a:hover {
  color: var(--red-tint);
  border-color: var(--red);
}

.contact-card .label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-top: 0.9rem;
  margin-bottom: 0.2rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: #141210;
  color: #98938a;
  font-size: 0.88rem;
  padding: 2.6rem 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 3rem;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-brand img {
  width: 40px;
  height: 29px;
  object-fit: contain;
}

.footer-brand strong {
  font-family: var(--serif);
  color: #e8e4da;
  font-size: 1.05rem;
  display: block;
  line-height: 1.2;
}

.footer-meta {
  text-align: right;
}

.footer-meta p {
  margin: 0.15rem 0;
}

.site-footer a {
  color: #cfc9bd;
}

.site-footer a:hover {
  color: #fff;
}

/* ---------- simple pages (privacy, 404) ---------- */

.page-simple {
  padding: clamp(3rem, 7vw, 5rem) 0;
  min-height: 55vh;
}

.page-simple .container {
  max-width: 720px;
}

.page-simple h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

.page-simple h2 {
  font-size: 1.3rem;
  margin-top: 2.2rem;
}

.page-updated {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- responsive ---------- */

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

  .photo-frame {
    order: -1;
    margin-bottom: 1rem;
  }

  .photo-frame::after {
    display: none;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header .container {
    justify-content: space-between;
    gap: 0.5rem 0.8rem;
    padding-block: 0.6rem;
  }

  .brand {
    margin-right: 0;
    gap: 0.55rem;
  }

  .brand img {
    width: 40px;
    height: 29px;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  .brand-tag {
    font-size: 0.52rem;
  }

  .header-call {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    gap: 0.2rem 1.1rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .est-badge {
    right: 0.4rem;
    width: 74px;
    height: 74px;
    font-size: 0.8rem;
  }

  .hero-trust {
    gap: 0.8rem 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .btn {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}
