/* ==========================================================================
   City of Angels Construction Company - shared stylesheet
   ========================================================================== */

:root {
  --navy: #1C2E3D;
  --navy-dark: #111C25;
  --navy-light: #2E4356;
  --navy-muted: #AFB5BB;
  --navy-muted-dim: #88929A;
  --rust: #A23929;
  --rust-dark: #792A1E;
  --rust-light: #BC7064;
  --cream: #E8DCC0;
  --cream-light: #f5f0e3;
  --ink: #232C36;
  --gray: #5A6672;
  --border: #DADFE5;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(28, 46, 61, 0.14);
  --radius: 10px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--navy);
  line-height: 1.25;
  margin-top: 0;
}

a {
  color: inherit;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--rust);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(162, 57, 41, 0.35);
}

.btn-primary:hover {
  background: var(--rust-dark);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-dark-outline {
  background: transparent;
  color: var(--rust);
  border-color: var(--rust);
}

.btn-dark-outline:hover {
  background: var(--rust);
  color: var(--white);
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.home .site-header {
  background: var(--navy);
  border-bottom: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
}

.home .brand {
  color: var(--white);
}

.brand-logo-wrap {
  background: var(--cream);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text .name {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy);
}

.home .brand-text .name {
  color: var(--white);
}

.brand-text .lic {
  font-size: 0.72rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.home .brand-text .lic {
  color: var(--navy-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--navy);
  display: block;
}

.home .nav-toggle span {
  background: var(--white);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: inline-block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.home .main-nav a {
  color: var(--white);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--rust);
  color: var(--white);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-phone {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.nav-phone:hover {
  color: var(--rust);
}

.home .nav-phone {
  color: var(--white);
}

.home .nav-phone:hover {
  color: var(--rust-light);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--white);
  color: var(--ink);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-background.jpg") center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(162, 57, 41, 0.05);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rust);
  margin-bottom: 16px;
}

.hero h1 {
  color: var(--navy);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 18px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rust);
  text-decoration: none;
}

.hero-phone span.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--rust);
}

.hero-media {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
}

/* ---------- Page header (non-home) ---------- */

.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 48px;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--white);
  font-weight: 700;
  max-width: none;
  margin: 0 auto;
  font-size: 20px;
}

.services-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.section-divider {
  height: 10px;
  background: var(--rust);
}

/* ---------- Sections ---------- */

section {
  padding: 76px 0;
}

section.alt {
  background: var(--cream-light);
}

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-heading .kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rust);
  margin-bottom: 10px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.section-heading p {
  color: var(--gray);
  font-size: 1.05rem;
}

/* ---------- Intro / About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.about-grid h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  margin-bottom: 18px;
}

.about-grid p {
  color: var(--ink);
  margin-bottom: 16px;
}

.credential-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--rust);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.credential-card ul {
  margin: 0;
  padding-left: 20px;
}

.credential-card li {
  margin-bottom: 12px;
  color: var(--ink);
}

.credential-card li:last-child {
  margin-bottom: 0;
}

/* ---------- Services grid ---------- */

#services {
  position: relative;
  overflow: hidden;
}

#services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-background.jpg") center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

#services .container {
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(28, 46, 61, 0.18);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--rust);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--gray);
  margin: 0;
  font-size: 0.98rem;
}

/* ---------- Detailed service sections (services.html) ---------- */

.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-of-type {
  border-bottom: none;
}

.service-detail.reverse .service-detail-media {
  order: 2;
}

.service-detail.reverse .service-detail-text {
  order: 1;
}

.service-detail-text h2 {
  color: var(--rust);
  font-size: 1.7rem;
  margin-bottom: 14px;
}

.service-detail-text p {
  color: var(--ink);
}

.service-detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.service-detail-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ---------- Why choose us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card {
  text-align: center;
  padding: 28px 20px;
}

.why-card .why-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rust);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: Georgia, serif;
}

.why-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.why-card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Quote form ---------- */

.quote-section {
  background: var(--navy);
  color: var(--white);
}

.quote-section .section-heading h2 {
  color: var(--white);
}

.quote-section .section-heading p {
  color: var(--navy-muted);
}

.quote-form {
  background: var(--white);
  border-radius: 14px;
  padding: 44px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  max-width: 920px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
}

.form-field .required {
  color: var(--rust);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--cream-light);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(162, 57, 41, 0.15);
}

.file-upload {
  border: 2px dashed var(--rust-light);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  background: var(--cream-light);
}

.file-upload input[type="file"] {
  display: block;
  margin: 12px auto 0;
  font-size: 0.9rem;
}

.file-upload .hint {
  font-size: 0.82rem;
  color: var(--gray);
  margin-top: 8px;
}

.quote-form .submit-row {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 8px;
}

.quote-form .submit-row .btn {
  width: 100%;
  max-width: 320px;
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 14px;
}

/* ---------- Projects gallery ---------- */

.projects-photos {
  position: relative;
}

.projects-photos::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-background.jpg") center / cover no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.projects-photos .container {
  position: relative;
  z-index: 1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.project-photo {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    45deg,
    var(--cream),
    var(--cream) 12px,
    var(--cream-light) 12px,
    var(--cream-light) 24px
  );
  border-bottom: 3px solid var(--rust);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rust-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

.project-caption {
  padding: 18px 20px;
}

.project-caption h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.project-caption p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ---------- Resources ---------- */

.resource-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--rust);
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.resource-block h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.resource-block p {
  color: var(--ink);
  margin: 0 0 10px;
}

.resource-block p:last-child {
  margin-bottom: 0;
}

.resource-block .placeholder-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--rust);
  background: var(--cream);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* ---------- Privacy policy ---------- */

.policy-block {
  margin-bottom: 40px;
}

.policy-block h2 {
  font-size: 1.35rem;
  border-bottom: 2px solid var(--rust);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.policy-block p {
  color: var(--ink);
  margin-bottom: 12px;
}

.policy-updated {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 64px 0;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta-band p {
  color: var(--navy-muted);
  max-width: 560px;
  margin: 0 auto 30px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--navy-muted);
  padding: 56px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--navy-muted);
  max-width: 280px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 10px;
}

.footer-grid a {
  color: var(--navy-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--rust-light);
}

.footer-grid address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--navy-muted-dim);
}

.footer-bottom a {
  color: var(--navy-muted-dim);
  text-decoration: underline;
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

.mt-40 {
  margin-top: 40px;
}

.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;
}

/* ---------- Responsive ---------- */

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

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail {
    grid-template-columns: 1fr;
  }

  .service-detail.reverse .service-detail-media,
  .service-detail.reverse .service-detail-text {
    order: initial;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-content {
    max-width: none;
    margin: 0 auto;
  }

  .hero .eyebrow,
  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-media {
    order: -1;
  }

  .hero-logo {
    max-width: 320px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .home .main-nav {
    background: var(--navy);
    border-bottom: none;
  }

  .main-nav.open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 10px 24px 20px;
    gap: 4px;
  }

  .main-nav a {
    display: block;
    padding: 12px 10px;
  }

  .nav-cta .nav-phone {
    display: none;
  }

  .hero {
    padding: 70px 0 60px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .quote-form {
    padding: 28px 22px;
  }
}

@media (max-width: 620px) {
  .services-grid,
  .why-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 54px 0;
  }
}
