/* ============================================================
   DRAKE CONSTRUCTION — Main Stylesheet
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-dark);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Design Tokens --- */
:root {
  --color-red: #E31B23;
  --color-red-dark: #c8161d;
  --color-cream: #F0EDED;
  --color-cream-warm: #F5F2EF;
  --color-dark: #3A3A3A;
  --color-dark-lighter: #474747;
  --color-medium: #6B6B6B;
  --color-footer: #2B2B2B;
  --color-white: #FFFFFF;
  --color-text-light: #D0D0D0;
  --color-border: #E0DCDA;

  --font-heading: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --text-xs: clamp(0.7rem, 0.8vw, 0.8rem);
  --text-sm: clamp(0.8rem, 1vw, 0.9rem);
  --text-base: clamp(0.95rem, 1.2vw, 1.1rem);
  --text-lg: clamp(1.1rem, 1.4vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.8vw, 1.5rem);
  --text-2xl: clamp(1.6rem, 2.5vw, 2rem);
  --text-3xl: clamp(2rem, 3.5vw, 2.8rem);
  --text-4xl: clamp(2.4rem, 4.5vw, 3.5rem);
  --text-hero: clamp(2.6rem, 5.5vw, 4.2rem);

  --spacing-section: clamp(80px, 10vw, 140px);
  --spacing-lg: clamp(40px, 5vw, 64px);
  --spacing-md: clamp(24px, 3vw, 40px);
  --spacing-sm: clamp(12px, 1.5vw, 20px);

  --max-width: 1240px;
  --max-width-narrow: 960px;

  --radius-sm: 2px;
  --radius-md: 4px;

  --shadow-subtle: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-card: 0 4px 30px rgba(0,0,0,0.08);
  --shadow-nav: 0 2px 24px rgba(0,0,0,0.08);

  --transition-base: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base),
              padding var(--transition-base);
}

.nav--scrolled {
  background-color: var(--color-cream);
  box-shadow: var(--shadow-nav);
  padding: 12px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.nav__logo {
  height: 48px;
  width: auto;
  transition: height var(--transition-base);
}

.nav--scrolled .nav__logo {
  height: 40px;
}

.nav__links {
  display: flex;
  gap: clamp(24px, 3vw, 44px);
  align-items: center;
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-base), text-shadow var(--transition-base);
}

.nav--scrolled .nav__link {
  text-shadow: none;
}

.nav--scrolled .nav__link {
  color: var(--color-dark);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-red);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--color-white);
  transition: transform var(--transition-base),
              opacity var(--transition-base),
              background-color var(--transition-base);
}

.nav--scrolled .nav__hamburger span {
  background-color: var(--color-dark);
}

.nav__hamburger--open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav__mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 43, 0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.nav__mobile-overlay--open {
  opacity: 1;
  visibility: visible;
}

.nav__mobile-overlay .nav__link {
  font-size: var(--text-xl);
  color: var(--color-white);
  letter-spacing: 0.2em;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* Carousel slides */
.hero__carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hero__slide--active {
  opacity: 1;
  z-index: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pagination dots */
.hero__dots {
  position: absolute;
  bottom: clamp(28px, 4vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.hero__dot {
  width: 32px;
  height: 2px;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.hero__dot:hover {
  background: rgba(255,255,255,0.6);
}

.hero__dot--active {
  background: rgba(255,255,255,0.25);
}

.hero__dot--active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-white);
  transform-origin: left;
  animation: dotProgress 5s linear forwards;
}

@keyframes dotProgress {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__dot--active::after {
    animation: none;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.15) 12%,
      transparent 22%
    ),
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.35) 35%,
      rgba(0, 0, 0, 0.08) 65%,
      transparent 100%
    );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(32px, 6vw, 80px);
  padding-bottom: clamp(60px, 10vh, 120px);
  max-width: 780px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.hero__title-accent {
  display: block;
  width: 72px;
  height: 3px;
  background: var(--color-red);
  margin-bottom: 20px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 36px;
  letter-spacing: 0.02em;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
}

.hero__scroll-indicator svg {
  width: 20px;
  height: 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-base),
              background-color var(--transition-base),
              box-shadow var(--transition-base);
}

.btn--primary {
  background-color: var(--color-red);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(227, 27, 35, 0.3);
}

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

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-dark);
  transform: translateY(-2px);
}

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

.btn--dark:hover {
  background-color: var(--color-dark-lighter);
  transform: translateY(-2px);
}

/* ============================================================
   SECTION — General
   ============================================================ */
.section {
  padding: var(--spacing-section) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section__title--light {
  color: var(--color-white);
}

.section__line {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--color-red);
  margin: 0 auto;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--color-cream-warm);
}

.about__grid {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: stretch;
}

.about__image-wrap {
  position: relative;
}

.about__image-accent {
  position: absolute;
  left: -8px;
  top: 10%;
  width: 4px;
  height: 60%;
  background: var(--color-red);
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__content {
  max-width: 560px;
}

.about__heading {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.about__text {
  color: var(--color-medium);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about__stats {
  display: flex;
  gap: clamp(24px, 3vw, 48px);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.about__stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.about__stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-medium);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: var(--color-dark);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.service-card {
  padding: clamp(28px, 3vw, 40px);
  background: var(--color-dark-lighter);
  border-left: 3px solid transparent;
  transition: border-color var(--transition-base),
              background-color var(--transition-base);
}

.service-card:hover {
  border-left-color: var(--color-red);
  background: #4e4e4e;
}

.service-card__icon {
  width: clamp(44px, 3.6vw, 56px);
  height: clamp(44px, 3.6vw, 56px);
  margin-bottom: 18px;
  color: var(--color-red);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Partner card (Buildertrend) */
.service-card__icons-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.service-card__icons-row .service-card__icon {
  margin-bottom: 0;
}

.service-card__partner-logo {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 1;
  transition: opacity var(--transition-base);
}

.services__quote {
  text-align: center;
  padding: var(--spacing-lg) clamp(20px, 4vw, 80px);
  max-width: 720px;
  margin: 0 auto;
}

.services__quote p {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  letter-spacing: -0.01em;
  position: relative;
}

.services__quote p::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--color-red);
  opacity: 0.5;
  position: absolute;
  top: -20px;
  left: -24px;
  font-style: normal;
  line-height: 1;
}

.services__cta {
  text-align: center;
  margin-top: var(--spacing-md);
}

/* ============================================================
   PROJECTS PREVIEW (index.html)
   ============================================================ */
.projects-preview {
  background: var(--color-cream);
}

.section__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-medium);
  max-width: 520px;
  margin: 16px auto 0;
  line-height: 1.7;
}

.projects-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 12px;
}

.projects-preview__card {
  position: relative;
  overflow: hidden;
  display: block;
}

.projects-preview__card--tall {
  grid-row: span 2;
}

.projects-preview__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.projects-preview__card:hover img {
  transform: scale(1.04);
}

.projects-preview__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.projects-preview__cta {
  text-align: center;
  margin-top: var(--spacing-md);
}

/* ============================================================
   PAGE HERO (projects.html, inner pages)
   ============================================================ */
.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  margin-top: 72px;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.page-hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(32px, 6vw, 80px);
  padding-bottom: clamp(48px, 8vh, 80px);
  max-width: 700px;
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.page-hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* ============================================================
   PROJECTS PAGE (projects.html)
   ============================================================ */
.projects-page--top {
  padding-top: calc(72px + var(--spacing-lg));
}

/* Generic page header (about, services pages) */
.about--page,
.services--page {
  padding-top: calc(72px + var(--spacing-lg));
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: clamp(28px, 3vw, 40px);
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--color-dark);
}

.page-header__kicker {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-medium);
}

.page-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

/* Services & contractors pages: dark background — invert page header colors */
.services--page .page-header,
.page-header--light {
  border-bottom-color: rgba(255,255,255,0.2);
}

.services--page .page-header__kicker,
.page-header--light .page-header__kicker {
  color: rgba(255,255,255,0.55);
}

.services--page .page-header__title,
.page-header--light .page-header__title {
  color: var(--color-white);
}

.projects-page__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: clamp(28px, 3vw, 40px);
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--color-dark);
}

.projects-page__kicker {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-medium);
}

.projects-page__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.projects-page__subtitle {
  font-size: var(--text-base);
  color: var(--color-medium);
  max-width: 480px;
  line-height: 1.7;
}

/* Feature project — large editorial card */
.project-feature {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  margin-bottom: var(--spacing-section);
}

.project-feature__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
}

.project-feature__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.project-feature__image-wrap:hover .project-feature__image {
  transform: scale(1.03);
}

.project-feature__image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-feature__image-wrap:hover .project-feature__image-overlay {
  opacity: 1;
}

.project-feature__view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1.5px solid var(--color-white);
  transition: background var(--transition-base);
}

.project-feature__view:hover {
  background: rgba(255,255,255,0.15);
}

.project-feature__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 12px;
}

.project-feature__name {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
  line-height: 1.15;
}

.project-feature__location {
  font-size: var(--text-base);
  color: var(--color-medium);
  margin-bottom: 20px;
}

.project-feature__desc {
  font-size: var(--text-base);
  color: var(--color-medium);
  line-height: 1.8;
  margin-bottom: 24px;
}

.project-feature__meta {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  font-size: var(--text-sm);
  color: var(--color-dark);
  font-weight: 500;
}

.project-feature__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-feature__meta span::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--color-red);
  border-radius: 50%;
}

/* Projects grid — 5 cards, 5th spans full width */
.projects-page__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3.4vw, 56px);
}

.project-tile--full {
  grid-column: 1 / -1;
}

.project-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-tile__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 22px;
  background: #1a1a1a;
}

.project-tile--full .project-tile__image-wrap {
  aspect-ratio: 21/9;
}

.project-tile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-tile:hover .project-tile__image {
  transform: scale(1.05);
}

/* Number badge — top-left, mix-blend for legibility */
.project-tile__number {
  position: absolute;
  top: clamp(16px, 1.8vw, 24px);
  left: clamp(16px, 1.8vw, 24px);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #fff;
  mix-blend-mode: difference;
  z-index: 1;
}

/* Hover arrow circle — bottom-right */
.project-tile__arrow {
  position: absolute;
  bottom: clamp(16px, 1.8vw, 24px);
  right: clamp(16px, 1.8vw, 24px);
  width: 48px;
  height: 48px;
  background: var(--color-white);
  color: var(--color-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(8px, 8px) scale(0.9);
  transition: opacity 0.4s ease,
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease,
              color 0.3s ease;
  z-index: 1;
}

.project-tile:hover .project-tile__arrow {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  background: var(--color-red);
  color: #fff;
}

.project-tile__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-tile__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.project-tile__location {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-medium);
}

.project-tile__count {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-medium);
}

.project-tile__name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.05;
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
}

.project-tile--full .project-tile__name {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
}

.project-tile:hover .project-tile__name {
  color: var(--color-red);
}

/* CTA block at bottom of projects page */
.projects-page__cta {
  text-align: center;
  padding: clamp(24px, 3vw, 40px) var(--spacing-lg);
  background: var(--color-cream-warm);
  border: 1px solid var(--color-border);
}

.projects-page__cta-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.projects-page__cta-text {
  color: var(--color-medium);
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.projects-page__cta--compact .projects-page__cta-text {
  margin-bottom: 0;
}

.projects-page:has(.projects-page__cta--compact) {
  padding-bottom: 64px;
}

.projects-page__cta--compact {
  margin-top: 64px;
}

/* old project-card styles kept for project-card__link reuse */
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
}

.project-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.project-card:hover .project-card__link svg {
  transform: translateX(4px);
}

/* ============================================================
   CONTRACTORS
   ============================================================ */
.contractors {
  background: var(--color-medium);
}

.contractors--page {
  padding-top: calc(72px + var(--spacing-lg));
}

.contractors__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.contractors__heading {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.025em;
  margin-bottom: var(--spacing-sm);
}

.contractors__text {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.contractors__addresses {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contractors__address {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-white);
  font-size: var(--text-base);
}

.contractors__address svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-red);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-footer);
  padding: clamp(40px, 5vw, 64px) 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: clamp(24px, 3vw, 48px);
  max-width: 1000px;
  padding-bottom: clamp(36px, 4vw, 52px);
}

.footer__logo {
  height: 32px;
  width: auto;
  margin-bottom: 16px;
}

.footer__company-name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer__info {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: 1.9;
}

.footer__info a {
  color: var(--color-text-light);
  transition: color var(--transition-base);
}

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

.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer__link {
  display: block;
  color: var(--color-text-light);
  font-size: var(--text-sm);
  padding: 4px 0;
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: var(--color-red);
}

.footer__hours {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.footer__bar {
  background: var(--color-red);
  padding: 14px 0;
  text-align: center;
}

.footer__copyright {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Scaled laptops (150% scaling on 1920x1200 = 1280x800 effective) */
@media (max-width: 1600px) and (min-width: 1024px) {
  :root {
    --max-width: 1080px;
    --text-base: 0.95rem;
    --text-lg: 1.1rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.6rem;
    --text-3xl: 2.2rem;
    --text-4xl: 2.8rem;
    --text-hero: 3.2rem;
    --spacing-section: clamp(60px, 7vw, 100px);
  }

  .about__grid {
    grid-template-columns: 38% 1fr;
    align-items: start;
  }

  .about__image {
    height: auto;
    max-height: 520px;
  }
}

/* Short viewports (laptops) */
@media (max-height: 800px) and (min-width: 1024px) {
  :root {
    --spacing-section: 56px;
  }

  .about__text {
    line-height: 1.55;
    margin-bottom: 8px;
  }

  .about__heading {
    margin-bottom: 12px;
  }

  .about__stats {
    padding-top: 16px;
    margin-top: 16px;
  }

  .projects-page--top {
    padding-top: calc(72px + 16px);
  }

  .projects-page__header {
    margin-bottom: 20px;
  }

  .projects-page__title {
    font-size: var(--text-3xl);
  }
}

/* Tablet */
@media (max-width: 1023px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .about__image {
    aspect-ratio: 16/9;
    max-height: 400px;
  }

  .about__content {
    max-width: 100%;
  }

  .projects-preview__grid {
    grid-template-rows: 240px 240px;
  }

  .project-feature {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

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

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__mobile-overlay {
    display: flex;
  }

  .hero__content {
    padding-bottom: 80px;
  }

  .about__stats {
    flex-wrap: wrap;
    gap: 24px;
  }

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

  .service-card {
    padding: 28px 24px;
  }

  .service-card__title {
    font-size: 1.25rem;
    margin-bottom: 10px;
  }

  .service-card__desc {
    font-size: 1rem;
    line-height: 1.55;
  }

  .about__text,
  .contractors__text,
  .projects-page__cta-text,
  .section__subtitle {
    font-size: 1rem;
    line-height: 1.65;
  }

  .projects-preview__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .projects-preview__card {
    aspect-ratio: 16/9;
  }

  .projects-preview__card--tall {
    grid-row: span 1;
  }

  .project-feature {
    grid-template-columns: 1fr;
  }

  .projects-page__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .project-tile--full .project-tile__image-wrap {
    aspect-ratio: 16/10;
  }

  .project-tile__arrow {
    opacity: 1;
    transform: scale(0.95);
    background: rgba(255,255,255,0.95);
  }

  .page-hero {
    min-height: 40vh;
  }

  .footer {
    padding: 24px 0 0;
  }

  .footer__logo {
    display: none;
  }

  .footer__company-name {
    font-size: var(--text-sm);
    margin-bottom: 6px;
  }

  .footer__info {
    line-height: 1.6;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 0 16px;
    padding-bottom: 24px;
  }

  .footer__grid > div:first-child {
    grid-column: 1 / -1;
    padding-bottom: 16px;
  }

  /* Info links — left col, spans rows 2+3 */
  .footer__grid > div:nth-child(2) {
    grid-column: 1;
    grid-row: 2 / 4;
  }

  /* Hours — right col top */
  .footer__grid > div:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    padding-bottom: 12px;
  }

  /* Get in Touch — right col, directly under hours */
  .footer__grid > div:last-child {
    grid-column: 2;
    grid-row: 3;
  }

  .footer__col-title {
    margin-bottom: 8px;
  }

  .footer__link {
    padding: 3px 0;
  }

  .btn {
    padding: 14px 28px;
    font-size: var(--text-xs);
  }
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */

/* Hero with overlay */
.pj-hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  margin-top: 72px;
}

.pj-hero__bg {
  position: absolute;
  inset: 0;
}

.pj-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pj-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

.pj-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 5vw, 64px);
  max-width: var(--max-width);
  margin: 0 auto;
}

.pj-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  transition: color var(--transition-base);
}

.pj-hero__back:hover {
  color: var(--color-white);
}

.pj-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.pj-hero__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
}

.pj-hero__meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pj-hero__location::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--color-red);
  border-radius: 50%;
}

.pj-hero__count::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
}

/* Gallery section */
.pj-gallery-section {
  background: var(--color-cream);
}

.pj-gallery {
  padding: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 280px;
  gap: 12px;
}

/* Every group of 5: first image is tall (spans 2 rows), other 4 fill a 2×2 grid beside it */
.pj-gallery__item:nth-child(5n+1) {
  grid-row: span 2;
}

.pj-gallery__item {
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pj-gallery__item--visible {
  opacity: 1;
  transform: translateY(0);
}

.pj-gallery__item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.pj-gallery__item:hover img {
  transform: scale(1.03);
}

/* Bottom CTA */
.pj-bottom {
  background: var(--color-cream-warm);
  padding: clamp(32px, 4vw, 56px) 0;
  border-top: 1px solid var(--color-border);
}

.pj-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox--open {
  opacity: 1;
  visibility: visible;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox--open .lightbox__image {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: var(--color-white);
  font-size: 28px;
  padding: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 36px;
  padding: 16px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-base);
  user-select: none;
}

.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
}

@media (max-width: 1023px) {
  .pj-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .pj-gallery__item:nth-child(5n+1) { grid-row: span 2; }
  .pj-hero { height: 50vh; }
}

@media (max-width: 767px) {
  .pj-gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .pj-gallery__item:nth-child(5n+1) { grid-row: span 1; }
  .pj-hero { height: 40vh; min-height: 320px; }
  .pj-hero__title { font-size: var(--text-3xl); }
}


/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  min-height: calc(100vh - 72px - 280px);
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
  background: var(--color-cream);
}

.error-page__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.error-page__code {
  font-family: var(--font-heading);
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 800;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

.error-page__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.error-page__text {
  color: var(--color-medium);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: 32px;
}

.error-page__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   CONTRACTOR PASSWORD GATE (overlay)
   ============================================================ */
body.cg-locked {
  overflow: hidden;
}

.cg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: cgFadeIn 0.25s ease;
}

@keyframes cgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cg-overlay--leaving {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cg-panel {
  background: var(--color-white);
  width: 100%;
  max-width: 420px;
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.cg-panel--shake {
  animation: cgShake 0.4s ease;
}

@keyframes cgShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.cg-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  color: var(--color-red);
}

.cg-icon svg {
  width: 100%;
  height: 100%;
}

.cg-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cg-subtitle {
  font-size: 0.9rem;
  color: var(--color-medium);
  margin-bottom: 28px;
  line-height: 1.5;
}

.cg-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cg-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
  background: var(--color-cream-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.cg-input:focus {
  outline: none;
  border-color: var(--color-red);
  background: #fff;
}

.cg-button {
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-red);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.cg-button:hover {
  background: #b71b21;
}

.cg-button:active {
  transform: scale(0.98);
}

.cg-error {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--color-red);
  font-weight: 500;
}

/* ============================================================
   CONTRACTOR PROJECT PAGE
   ============================================================ */
/* Contractor pages: tighter vertical rhythm than other sections */
.section.contractor-page {
  background: var(--color-cream);
  padding-top: calc(72px + 28px);
  padding-bottom: 48px;
  min-height: auto;
}

.contractor-page .page-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
}

.contractor-page__intro {
  max-width: 720px;
  color: var(--color-medium);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
}

.contractor-page__intro a {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contractor-docs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin-top: var(--spacing-md);
}

.contractor-doc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-dark);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.contractor-doc:hover {
  border-color: var(--color-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.contractor-doc__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-red);
}

.contractor-doc__icon svg {
  width: 100%;
  height: 100%;
}

.contractor-doc__title {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
}

.contractor-doc__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-medium);
  transition: transform 0.2s ease, color 0.2s ease;
}

.contractor-doc:hover .contractor-doc__arrow {
  color: var(--color-red);
  transform: translateY(2px);
}

/* Contractors index — addresses list styling: link vs plain */
.contractors__address-link {
  color: var(--color-white);
  text-decoration: none;
  border-bottom: 1px solid var(--color-red);
  transition: color 0.2s ease;
  padding-bottom: 1px;
}

.contractors__address-link:hover {
  color: var(--color-red);
}

.contractors__address--locked {
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}
