/* =========================================================
   Summit Construction — styles
   Palette: charcoal · white · safety orange
   ========================================================= */

:root {
  --charcoal:      #1b1e23;
  --charcoal-2:    #23272e;
  --charcoal-soft: #2c313a;
  --ink:           #14161a;
  --white:         #ffffff;
  --paper:         #f6f7f9;
  --paper-2:       #eceef1;
  --muted:         #6b7280;
  --muted-light:   #9aa3af;
  --line:          #e3e6ea;
  --orange:        #ff5a1f;
  --orange-dark:   #e64a13;
  --orange-soft:   rgba(255, 90, 31, 0.12);

  --radius:   14px;
  --radius-lg: 22px;
  --shadow:   0 18px 50px rgba(20, 22, 26, 0.10);
  --shadow-lg: 0 30px 80px rgba(20, 22, 26, 0.18);

  --container: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }

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

/* ---------- shared section bits ---------- */
.section { padding: 120px 0; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}
.section__head { max-width: 720px; margin-bottom: 64px; }
.section__title { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.section__intro { color: var(--muted); font-size: 1.1rem; margin-top: 20px; }

/* =========================================================
   Buttons — premium animated fill on hover
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  border-radius: 50px;
  overflow: hidden;
  z-index: 1;
  transition: color .45s var(--ease), border-color .45s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(1px); }

/* primary: orange -> fills to charcoal */
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary::before { background: var(--charcoal); }
.btn--primary:hover { color: #fff; }

/* primary invert (for dark band): white surface -> orange fill */
.btn--invert { background: #fff; color: var(--charcoal); }
.btn--invert::before { background: var(--orange); }
.btn--invert:hover { color: #fff; }

/* ghost: transparent on hero -> fills white */
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost::before { background: #fff; }
.btn--ghost:hover { color: var(--charcoal); border-color: #fff; }

/* nav cta */
.btn--nav { padding: 11px 22px; background: var(--orange); color: #fff; border-radius: 50px; font-size: 0.9rem; }
.btn--nav::before { background: var(--charcoal); }
.btn--nav:hover { color: #fff; }

.btn--block { width: 100%; }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
  padding: 22px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { display: inline-flex; }
.brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  display: flex;
  flex-direction: column;
  transition: color .4s var(--ease);
}
.brand__sub { font-size: 0.62rem; letter-spacing: 0.32em; color: var(--orange); font-weight: 600; margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__links a:not(.btn) {
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 0.96rem;
  position: relative;
  transition: color .3s var(--ease);
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .3s var(--ease);
}
.nav__links a:not(.btn):hover { color: #fff; }
.nav__links a:not(.btn):hover::after { width: 100%; }

/* scrolled state */
.nav.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 8px 30px rgba(20,22,26,0.08);
  padding: 13px 0;
}
.nav.is-scrolled .brand__text { color: var(--charcoal); }
.nav.is-scrolled .nav__links a:not(.btn) { color: var(--charcoal); }
.nav.is-scrolled .nav__toggle span { background: var(--charcoal); }

/* hamburger */
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav__toggle span { width: 26px; height: 2.5px; background: #fff; border-radius: 2px; transition: .3s var(--ease); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background-image: url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=2000&q=80");
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(110deg, rgba(20,22,26,0.92) 0%, rgba(20,22,26,0.72) 42%, rgba(20,22,26,0.35) 100%),
    linear-gradient(0deg, rgba(20,22,26,0.55), rgba(20,22,26,0.15));
}
.hero__content { position: relative; max-width: 820px; padding-top: 80px; }
.hero__eyebrow {
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.82rem;
  color: var(--orange); margin: 0 0 22px;
}
.hero__title { font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: 0.98; }
.hero__title .accent { color: var(--orange); }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: rgba(255,255,255,0.85); max-width: 600px; margin: 28px 0 40px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid rgba(255,255,255,0.5); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--orange); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 24px; } 100% { opacity: 0; } }

/* =========================================================
   Stats
   ========================================================= */
.stats { background: var(--charcoal); color: #fff; padding: 70px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 12%; height: 76%; width: 1px; background: rgba(255,255,255,0.12); }
.stat__num { font-family: var(--font-display); font-size: clamp(2.4rem, 4.5vw, 3.5rem); font-weight: 700; color: var(--orange); line-height: 1; }
.stat__label { margin-top: 12px; color: rgba(255,255,255,0.7); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }

/* =========================================================
   Services cards
   ========================================================= */
.services { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::after { content: ""; position: absolute; top: 0; left: 0; height: 4px; width: 0; background: var(--orange); transition: width .45s var(--ease); }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::after { width: 100%; }
.card__icon {
  width: 62px; height: 62px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--orange);
  margin-bottom: 24px; transition: background .4s var(--ease), color .4s var(--ease);
}
.card__icon svg { width: 30px; height: 30px; }
.card:hover .card__icon { background: var(--orange); color: #fff; }
.card__title { font-size: 1.32rem; margin-bottom: 12px; }
.card__text { color: var(--muted); font-size: 1rem; margin: 0; }

/* =========================================================
   About + Before/After slider
   ========================================================= */
.about { background: #fff; }
.about__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 70px; align-items: center; }
.about__lead { color: var(--muted); font-size: 1.1rem; margin: 22px 0 26px; }
.about__list { list-style: none; padding: 0; margin: 0 0 34px; }
.about__list li { position: relative; padding-left: 34px; margin-bottom: 14px; font-weight: 600; }
.about__list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange-soft);
  box-shadow: inset 0 0 0 2px var(--orange);
}
.about__list li::after {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--orange);
}

/* Before / After component */
.ba {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; }
/* the "before" image stays sized to the full frame (set in JS) so it clips
   from the right rather than squashing as the wrapper narrows */
.ba__before .ba__img { left: 0; height: 100%; max-width: none; object-fit: cover; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ba__line { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.05); }
.ba__grip {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 2;
}
.ba__tag {
  position: absolute; bottom: 16px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(20,22,26,0.65); padding: 6px 14px; border-radius: 50px;
  backdrop-filter: blur(4px);
}
.ba__tag--before { left: 16px; }
.ba__tag--after { right: 16px; }

/* =========================================================
   Projects gallery (masonry)
   ========================================================= */
.projects { background: var(--paper); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.filter {
  border: 1px solid var(--line); background: #fff; color: var(--charcoal);
  padding: 11px 22px; border-radius: 50px; font-weight: 600; font-size: 0.92rem;
  transition: all .3s var(--ease);
}
.filter:hover { border-color: var(--orange); color: var(--orange); }
.filter.is-active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }

/* CSS columns = masonry */
.gallery { column-count: 3; column-gap: 22px; }
.tile {
  break-inside: avoid;
  margin: 0 0 22px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.tile img { width: 100%; height: auto; transition: transform .6s var(--ease); display: block; }
.tile:hover img { transform: scale(1.07); }
.tile__cap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(0deg, rgba(20,22,26,0.85) 0%, rgba(20,22,26,0.1) 55%, transparent 100%);
  opacity: 0; transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.tile:hover .tile__cap { opacity: 1; transform: translateY(0); }
.tile__cat { color: var(--orange); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.tile__name { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-top: 4px; }
/* filter hide */
.tile.is-hidden { display: none; }

/* =========================================================
   Testimonials
   ========================================================= */
.testimonials { background: #fff; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.quote {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 38px 34px; margin: 0;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.quote:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.quote__stars { color: var(--orange); letter-spacing: 3px; font-size: 1.05rem; margin-bottom: 18px; }
.quote__text { font-size: 1.06rem; color: var(--charcoal-2); margin: 0 0 26px; }
.quote__by { display: flex; align-items: center; gap: 14px; }
.quote__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--charcoal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-display); font-size: 0.95rem;
  flex-shrink: 0;
}
.quote__by strong { display: block; font-family: var(--font-display); }
.quote__by small { color: var(--muted); font-size: 0.85rem; }

/* =========================================================
   CTA band
   ========================================================= */
.cta-band { background: var(--orange); color: #fff; padding: 80px 0; }
.cta-band__inner { text-align: center; }
.cta-band__title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.cta-band__text { font-size: 1.15rem; opacity: 0.92; margin: 16px 0 32px; }

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--charcoal); color: #fff; }
.contact .eyebrow { color: var(--orange); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 70px; align-items: start; }
.contact__lead { color: rgba(255,255,255,0.72); font-size: 1.1rem; margin: 22px 0 36px; }
.contact__details { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.contact__details li { display: flex; gap: 16px; align-items: flex-start; color: rgba(255,255,255,0.85); }
.contact__ico {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.contact__ico svg { width: 22px; height: 22px; }

.contact__form {
  background: #fff; color: var(--charcoal);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; font-family: inherit; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper);
  color: var(--charcoal); transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); background: #fff;
  box-shadow: 0 0 0 4px var(--orange-soft);
}
.field input.invalid, .field textarea.invalid, .field select.invalid { border-color: #e23a2e; box-shadow: 0 0 0 4px rgba(226,58,46,0.12); }
.form__note { margin: 18px 0 0; color: #1f9d55; font-weight: 600; text-align: center; }

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 80px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.brand--footer .brand__text { color: #fff; }
.footer__about { margin: 22px 0 0; max-width: 320px; font-size: 0.96rem; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; letter-spacing: 0.02em; }
.footer__col a, .footer__muted { display: block; color: rgba(255,255,255,0.62); font-size: 0.95rem; margin-bottom: 12px; transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--orange); }
.footer__muted { color: rgba(255,255,255,0.4); }
.footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 26px; font-size: 0.88rem; }
.footer__bar p { margin: 0; }

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
/* stagger children inside grids */
.cards .reveal:nth-child(2), .quotes .reveal:nth-child(2), .gallery .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .quotes .reveal:nth-child(3), .gallery .reveal:nth-child(3) { transition-delay: .16s; }
.gallery .reveal:nth-child(4) { transition-delay: .08s; }
.gallery .reveal:nth-child(5) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { animation: none; transform: scale(1); }
  * { animation-duration: 0.001ms !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .cards, .quotes { grid-template-columns: repeat(2, 1fr); }
  .gallery { column-count: 2; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .stat:nth-child(2)::after { display: none; }
}

@media (max-width: 760px) {
  .section { padding: 84px 0; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px;
    background: var(--charcoal);
    padding: 40px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.4);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a:not(.btn) { color: #fff; font-size: 1.15rem; }
  .nav.is-scrolled .nav__links a:not(.btn) { color: #fff; }
  .nav__toggle { display: flex; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .stat::after { display: none !important; }
  .cards, .quotes { grid-template-columns: 1fr; }
  .gallery { column-count: 1; }
  .field-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bar { flex-direction: column; text-align: center; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; }
  .contact__form { padding: 28px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
}
