/* Ridgeline Contracting — bold, industrial contractor demo */

:root {
  --ink: #121212;
  --ink-2: #191919;
  --white: #f5f5f3;
  --grey: #a8a8a3;
  --orange: #ff5a1f;
  --line: rgba(245, 245, 243, 0.14);
  --display: "Archivo Black", sans-serif;
  --sans: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(245, 245, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 245, 243, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

main, .nav, .site-foot { position: relative; z-index: 1; }

a { color: inherit; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1, h2, h3 { margin: 0; }
h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
h3 { font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #141005; }
.btn-ghost { border-color: var(--line); color: var(--white); }
.btn-ghost:hover { border-color: var(--orange); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-mark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--white);
}
.nav-mark span { font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.28em; color: var(--orange); font-weight: 600; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 2.2rem; font-size: 0.9rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--grey); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  border: 2px solid var(--orange);
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  color: var(--white) !important;
  text-transform: uppercase;
  font-size: 0.78rem !important;
  letter-spacing: 0.03em;
  font-weight: 700 !important;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { width: 22px; height: 2px; background: var(--white); }

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

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  animation: heroZoom 26s ease-in-out infinite alternate;
  filter: saturate(1.02);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(255, 90, 31, 0.2), transparent 55%),
    linear-gradient(to top, rgba(18, 18, 18, 0.97) 8%, rgba(18, 18, 18, 0.68) 48%, rgba(18, 18, 18, 0.42));
}
@keyframes heroZoom {
  from { transform: scale(1.06) translate(0, 0); }
  to { transform: scale(1.14) translate(-1.5%, 1%); }
}

/* drifting job-site dust, given a boost while the page is actively scrolled */
.dust {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.6s ease;
}
.dust.is-scrolling { opacity: 1; }
.dust span {
  position: absolute;
  bottom: -5%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(245, 245, 243, 0.55);
  filter: blur(0.5px);
  opacity: 0;
  animation: dustRise linear infinite;
}
.dust span:nth-child(1) { left: 5%; animation-duration: 13s; animation-delay: 0s; }
.dust span:nth-child(2) { left: 16%; animation-duration: 17s; animation-delay: 2s; width: 2px; height: 2px; }
.dust span:nth-child(3) { left: 28%; animation-duration: 11s; animation-delay: 4s; }
.dust span:nth-child(4) { left: 37%; animation-duration: 15s; animation-delay: 1s; width: 4px; height: 4px; }
.dust span:nth-child(5) { left: 49%; animation-duration: 14s; animation-delay: 5s; }
.dust span:nth-child(6) { left: 58%; animation-duration: 18s; animation-delay: 3s; width: 2px; height: 2px; }
.dust span:nth-child(7) { left: 67%; animation-duration: 12s; animation-delay: 6s; }
.dust span:nth-child(8) { left: 78%; animation-duration: 16s; animation-delay: 2.5s; width: 3px; height: 3px; }
.dust span:nth-child(9) { left: 88%; animation-duration: 13.5s; animation-delay: 4.5s; }
.dust span:nth-child(10) { left: 95%; animation-duration: 15.5s; animation-delay: 1.5s; width: 2px; height: 2px; }

@keyframes dustRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  55% { transform: translateY(-48vh) translateX(6px); opacity: 0.4; }
  100% { transform: translateY(-88vh) translateX(-8px); opacity: 0; }
}

.hero-content { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
  .dust span { animation: none; display: none; }
}

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.98;
  text-transform: uppercase;
}
.hero-title span { color: var(--orange); }

.hero-sub { margin: 1.75rem 0 2.25rem; font-size: 1.1rem; color: var(--grey); max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem; }

.hero-stats { display: flex; gap: clamp(2rem, 5vw, 4rem); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 2rem; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--display); font-size: 2.2rem; color: var(--white); }
.hero-stats span { font-size: 0.82rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.3rem; }

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

.services { padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3.5rem); max-width: 1280px; margin: 0 auto; }
.services h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); max-width: 22ch; margin-bottom: 3.5rem; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.service-card {
  padding: 2.25rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--orange); background: rgba(255, 90, 31, 0.05); }
.service-num { font-family: var(--display); font-size: 1.6rem; color: var(--orange); display: block; margin-bottom: 1.5rem; }
.service-card h3 { font-size: 1.05rem; margin-bottom: 0.65rem; }
.service-card p { color: var(--grey); font-size: 0.92rem; margin: 0; }

/* ---------- before / after ---------- */

.before-after {
  padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3.5rem);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.before-after h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); max-width: 22ch; margin: 0 auto 1rem; }
.before-after .eyebrow { text-align: center; }
.ba-intro { color: var(--grey); font-size: 1rem; max-width: 52ch; margin: 0 auto 3rem; }

.ba-figure {
  margin: 0 auto;
  max-width: 1280px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.ba-figure img { width: 100%; height: auto; display: block; }

/* ---------- process ---------- */

.process { padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3.5rem); background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); max-width: 24ch; margin: 0 auto 3.5rem; text-align: center; }
.process .eyebrow { text-align: center; }

.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; max-width: 1280px; margin: 0 auto; }
.process-step { display: flex; flex-direction: column; gap: 1rem; }
.step-num { font-family: var(--display); font-size: 2.6rem; color: rgba(245, 245, 243, 0.16); }
.process-step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-step p { color: var(--grey); font-size: 0.9rem; margin: 0; }

/* ---------- projects ---------- */

.projects { padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3.5rem); max-width: 1280px; margin: 0 auto; }
.projects h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); max-width: 24ch; margin-bottom: 3.5rem; }

.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.project-card {
  margin: 0;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  transition: transform 0.3s ease;
}
.project-card:hover { transform: translateY(-6px); }
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.project-card:hover img { transform: scale(1.06); }
.project-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.75rem 1.6rem 1.5rem;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.95) 20%, rgba(18, 18, 18, 0.55) 60%, transparent 100%);
}
.project-type {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.9rem;
}
.project-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.project-card p { color: var(--grey); font-size: 0.86rem; margin: 0; }

/* ---------- quotes ---------- */

.quotes { padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3.5rem); background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quotes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; max-width: 1280px; margin: 0 auto; }
.quotes blockquote { margin: 0; }
.quotes p { font-size: 1.1rem; line-height: 1.45; margin: 0 0 1rem; font-weight: 500; }
.quotes cite { font-style: normal; font-size: 0.82rem; color: var(--grey); }

/* ---------- cta ---------- */

.cta { text-align: center; padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3.5rem); }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1rem; }
.cta p { color: var(--grey); margin-bottom: 2.25rem; font-size: 1.05rem; }

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

.site-foot { text-align: center; padding: 3rem 1.5rem 2.5rem; border-top: 1px solid var(--line); }
.foot-mark { font-family: var(--display); font-size: 1rem; display: flex; flex-direction: column; align-items: center; margin-bottom: 1rem; }
.foot-mark span { font-family: var(--sans); font-size: 0.58rem; letter-spacing: 0.28em; color: var(--orange); font-weight: 600; margin-top: 4px; }
.foot-meta { color: var(--grey); font-size: 0.85rem; margin: 0 0 1rem; }
.foot-credit { font-size: 0.78rem; color: rgba(245, 245, 243, 0.4); margin: 0; }
.foot-credit a { color: var(--orange); text-decoration: none; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2rem;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .quotes-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2.6rem, 13vw, 3.6rem); }
}
