/* ============================================
   Central Residential Builders — Yeezy Clone
   Design: Brutalist-minimal, IBM Plex Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600&display=swap');

:root {
  /* Colors */
  --color-bg: #FFFFFF;
  --color-text: #000000;
  --color-heading: #000000;
  --color-accent: #000000;
  --color-border: #E5E7EB;
  --color-surface: #F9FAFB;
  --color-muted: #6B7280;
  --color-hover: #4B5563;

  /* Typography */
  --font-mono: 'IBM Plex Mono', monospace;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Spacing */
  --section-padding: 40px 0;
  --container-max-width: 1400px;
  --grid-gap: 2px;
  --nav-height: 60px;

  /* Effects */
  --border-radius: 0;
  --transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  --transition-transform: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Animation easing — confident, not bouncy */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul.services-list {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover { opacity: 0.6; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.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;
}

/* ============================================
   HEADER / NAV
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.header-inner {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.header-nav a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 12px 0;
}

.header-nav a.active {
  text-decoration: none;
}

.header-nav a:hover {
  opacity: 0.5;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.header-cta {
  font-size: 13px;
  font-weight: 400;
  border: 1px solid var(--color-text);
  padding: 8px 16px;
}

.header-cta {
  transition: var(--transition), transform 0.15s ease;
}

.header-cta:hover {
  background: var(--color-text);
  color: var(--color-bg);
  opacity: 1;
  transform: translateY(-1px);
}

.header-cta:active {
  transform: translateY(0);
}

/* ============================================
   HERO — Project Grid (Yeezy style)
   ============================================ */

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  padding: var(--grid-gap);
}

.hero-grid a {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.hero-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition), var(--transition-transform);
}

.hero-grid a:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

.hero-grid .project-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: 11px;
  color: var(--color-bg);
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0;
  transition: var(--transition);
}

.hero-grid a:hover .project-label {
  opacity: 1;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--section-padding);
  border-bottom: 1px solid var(--color-border);
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 20px;
}

/* ============================================
   PAGE HERO (Process, Contact)
   ============================================ */

.page-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 12px;
  text-wrap: balance;
}

.page-hero .label {
  display: block;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 13px;
  color: var(--color-muted);
  max-width: 640px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ============================================
   FULL-WIDTH IMAGE
   ============================================ */

.full-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.section--flush {
  padding: 0;
  border-bottom: none;
}

/* ============================================
   CONTACT BLOCKS
   ============================================ */

.contact-block {
  margin-bottom: 24px;
}

.contact-phone {
  font-size: 18px;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row--two > * {
  flex: 1;
}

.form-group {
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ============================================
   ABOUT TEASER
   ============================================ */

.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-teaser h2 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 20px;
}

.about-teaser p {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.text-link {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-teaser-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.about-teaser-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-transform);
}

.about-teaser-image:hover img {
  transform: scale(1.02);
}

/* ============================================
   SERVICES
   ============================================ */

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0;
}

@media (max-width: 640px) {
  .services-list {
    grid-template-columns: 1fr;
  }
}

.service-item {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.service-item:last-child {
  border-bottom: none;
}

.service-item h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  text-wrap: balance;
}

.service-item p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ============================================
   PROCESS STEPS
   ============================================ */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.process-step {
  background: var(--color-bg);
  padding: 24px;
}

.process-step .step-num {
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.process-step h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.testimonial-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.testimonial-item:last-child {
  border-bottom: none;
}

.testimonial-item blockquote {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 12px;
  font-style: normal;
}

.testimonial-item cite {
  font-size: 11px;
  font-style: normal;
  color: var(--color-muted);
}

/* ============================================
   IMAGE GRID (Gallery / Our Work)
   ============================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--grid-gap);
}

.image-grid figure {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
  transition-property: scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.image-grid figure:active {
  scale: 0.96;
}

.image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease, transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-grid figure:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition-property: background-color;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.lightbox.open {
  background: rgba(0, 0, 0, 0.92);
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  scale: 0.92;
  filter: blur(4px);
  transition-property: opacity, scale, filter;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.lightbox.open .lightbox-img {
  opacity: 1;
  scale: 1;
  filter: blur(0px);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  opacity: 0;
  transition-property: opacity, color;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.lightbox.open .lightbox-close {
  opacity: 1;
}

.lightbox-close:hover {
  color: rgba(255, 255, 255, 1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 28px;
  cursor: pointer;
  padding: 16px;
  opacity: 0;
  transition-property: opacity, color;
  transition-duration: 200ms;
  transition-timing-function: ease;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.open .lightbox-nav {
  opacity: 1;
}

.lightbox-nav:hover {
  color: rgba(255, 255, 255, 1);
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition-property: opacity;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.lightbox.open .lightbox-counter {
  opacity: 1;
}

.image-grid figcaption {
  font-size: 11px;
  color: var(--color-muted);
  padding: 8px 0 4px;
}

/* ============================================
   PROJECT DETAIL
   ============================================ */

.project-hero {
  padding: 24px 0 0;
}

.project-hero h1 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 6px;
}

.project-hero .project-location {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info h3 {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
  margin-top: 24px;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-info p, .contact-info a {
  font-size: 14px;
  line-height: 1.6;
}

.contact-form label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 4px;
  margin-top: 16px;
}

.contact-form label:first-child {
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 0;
  outline: none;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-text);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid var(--color-text);
  padding: 12px 36px;
  cursor: pointer;
  border-radius: 0;
  transition: var(--transition), transform 0.15s ease;
}

.contact-form button:hover {
  background: var(--color-bg);
  color: var(--color-text);
  transform: translateY(-1px);
}

.contact-form button:active {
  transform: translateY(0);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  text-align: center;
  padding: 80px 20px;
  border-bottom: 1px solid var(--color-border);
}

.cta-section p {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.cta-section .cta-phone {
  font-size: 24px;
  font-weight: 400;
  display: block;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--color-text);
  padding: 10px 28px;
  transition: var(--transition), transform 0.15s ease;
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
  opacity: 1;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 40px 0;
  font-size: 12px;
  color: var(--color-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.footer-col p,
.footer-col a {
  font-size: 12px;
  line-height: 1.8;
  color: var(--color-muted);
}

.footer-col a {
  display: inline-block;
  padding: 4px 0;
}

.footer-col a:hover {
  color: var(--color-text);
  opacity: 1;
}

.footer-nav {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-nav--vertical {
  flex-direction: column;
  gap: 2px;
}

.footer-nav a {
  font-size: 12px;
  color: var(--color-muted);
  padding: 6px 0;
  display: inline-block;
}

.footer-credit {
  font-size: 11px;
  color: var(--color-muted);
  opacity: 0.5;
  margin-top: 24px;
  text-align: center;
  width: 100%;
}

/* ============================================
   ANIMATIONS — Brutalist-confident, not bouncy
   ============================================ */

/* --- Page load: Hero grid stagger --- */
.hero-grid a {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 600ms var(--ease-out) forwards;
}

.hero-grid a:nth-child(1) { animation-delay: 0ms; }
.hero-grid a:nth-child(2) { animation-delay: 80ms; }
.hero-grid a:nth-child(3) { animation-delay: 160ms; }
.hero-grid a:nth-child(4) { animation-delay: 240ms; }
.hero-grid a:nth-child(5) { animation-delay: 320ms; }
.hero-grid a:nth-child(6) { animation-delay: 400ms; }
.hero-grid a:nth-child(7) { animation-delay: 480ms; }
.hero-grid a:nth-child(8) { animation-delay: 560ms; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --- Button press feedback --- */
.btn,
.header-cta {
  transition-property: background-color, color, opacity, transform, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.btn:active,
.header-cta:active {
  transform: scale(0.96);
}

/* --- Nav link underline slide --- */
.header-nav a {
  position: relative;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

.header-nav a:hover::after {
  transform: scaleX(1);
}

.header-nav a.active::after {
  transform: scaleX(1);
}

/* Override default opacity hover for nav — underline is the feedback */
.header-nav a:hover {
  opacity: 1;
}



/* --- Contact form input focus glow --- */
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-text);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

/* --- Reduced motion: respect user preference --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-grid a {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .header-logo img {
    height: 40px;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px;
    gap: 12px;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    color: var(--color-text);
    font-size: 14px;
    padding: 8px 0;
  }

  .mobile-toggle {
    display: block;
    padding: 8px 4px;
  }

  .header-cta {
    display: none;
  }

  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-teaser {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .hero-grid a {
    aspect-ratio: 16 / 9;
  }

  /* Always show project labels on mobile (no hover on touch) */
  .hero-grid .project-label {
    opacity: 1;
  }

  .services-list {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: column;
    gap: 8px;
  }

  .cta-section {
    padding: 48px 20px;
  }

  .cta-section .cta-phone {
    font-size: 20px;
  }
}
