/* Nest Building Group — shared site stylesheet
   Ported from the approved design mockups (Art/Mockup/*.html). One stylesheet
   for every page — the mockups' per-page <style> blocks were byte-identical. */

:root {
  --ink: #1c1a17; --panel: #2b2822; --cream: #eeece6; --brass: #c99a4e;
  --brass-dark: #8a6a34; --terracotta: #a2532f; --line: rgba(244,239,228,0.16);
  --line-dark: rgba(28,26,23,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --section-pad: 96px; }
.section-pad { padding: var(--section-pad) 0; }
body { font-family: 'Inter', sans-serif; color: var(--ink); background: var(--cream); }
h1, h2, h3 { font-family: 'Jost', sans-serif; font-weight: 500; line-height: 1.1; letter-spacing: 0.005em; text-wrap: balance; }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 15px 30px; border-radius: 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: filter 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(201,154,78,0.3); }
.btn-line { border-color: var(--line); color: var(--cream); background: transparent; }
.btn-line:hover { background: rgba(244,239,228,0.1); border-color: var(--brass); color: var(--brass); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--panel); }
.btn svg { width: 16px; height: 16px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
header { background: var(--ink); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; max-width: 1100px; margin: 0 auto; }
.logo img { height: 58px; width: auto; display: block; }
nav { display: flex; gap: 32px; align-items: center; }
nav a { color: var(--cream); text-decoration: none; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
nav a.active { opacity: 1; color: var(--brass); }
nav a:hover { opacity: 1; }

.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--cream); cursor: pointer; align-items: center; justify-content: center; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 32px 24px; background: var(--ink); border-top: 1px solid var(--line); }
.mobile-nav a { color: var(--cream); text-decoration: none; padding: 13px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.mobile-nav a.active { color: var(--brass); }
.mobile-nav .mobile-sub { display: flex; flex-direction: column; padding-left: 16px; border-bottom: 1px solid var(--line); }
.mobile-nav .mobile-sub-link { border-bottom: none; padding: 10px 0; font-size: 13px; opacity: 0.75; }
.mobile-nav.open { display: flex; }

.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-panel { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px); margin-top: 18px; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 190px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease; box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.nav-dropdown:hover .nav-dropdown-panel, .nav-dropdown:focus-within .nav-dropdown-panel, .nav-dropdown.open .nav-dropdown-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-panel a { display: block; padding: 9px 12px; font-size: 13px; text-transform: none; letter-spacing: normal; border-radius: 6px; opacity: 0.85; }
.nav-dropdown-panel a:first-child { color: var(--brass); border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; padding-bottom: 12px; }
.nav-dropdown-panel a:hover { background: rgba(244,239,228,0.08); opacity: 1; }
.pillars-divider { display: flex; justify-content: center; gap: 6px; align-items: flex-end; padding: 64px 0 48px; }
.pillars-divider span { width: 6px; background: var(--brass); transform: scaleY(0); transform-origin: bottom; transition: transform 0.7s cubic-bezier(.22,.9,.3,1); }
.pillars-divider span:nth-child(1) { height: 18px; transition-delay: 0s; }
.pillars-divider span:nth-child(2) { height: 30px; transition-delay: 0.08s; }
.pillars-divider span:nth-child(3) { height: 22px; transition-delay: 0.16s; }
.pillars-divider span:nth-child(4) { height: 36px; transition-delay: 0.24s; }
.pillars-divider.in-view span { transform: scaleY(1); }
footer { background: var(--ink); color: var(--cream); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 56px; }
.footer-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.footer-icon { width: 38px; height: 38px; border-radius: 50%; background: rgba(201,154,78,0.14); display: flex; align-items: center; justify-content: center; color: var(--brass); }
.footer-icon svg { width: 18px; height: 18px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brass); margin-bottom: 6px; font-weight: 600; }
.footer-grid p, .footer-grid a { font-size: 14px; color: rgba(244,239,228,0.75); text-decoration: none; line-height: 1.6; transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--brass); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; font-size: 12px; color: rgba(244,239,228,0.5); }
.footer-legal { display: flex; gap: 18px; justify-content: center; margin-top: 18px; }
.footer-legal a { font-size: 11px; color: rgba(244,239,228,0.4); text-decoration: none; transition: color 0.2s ease; }
.footer-legal a:hover { color: var(--brass); text-decoration: underline; }
.text-link { transition: color 0.2s ease; }
.text-link:hover { text-decoration: underline; }
.page-hero { position: relative; height: 470px; display: flex; align-items: flex-end; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28,26,23,0.9) 10%, rgba(28,26,23,0.15) 100%); }
.page-hero-content { position: relative; z-index: 1; padding: 0 32px 40px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-hero h1 { color: var(--cream); font-size: 60px; }

.services { padding: 96px 0; background: var(--panel); color: var(--cream); }
.services-head { max-width: 560px; margin-bottom: 48px; }
.services-head h2 { font-size: 38px; margin-top: 10px; color: var(--cream); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { background: rgba(244,239,228,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 28px 22px; transition: transform 0.15s ease, border-color 0.15s ease; }
.service-card:hover { transform: translateY(-3px); border-color: var(--brass); }
.service-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(201,154,78,0.16); color: var(--brass); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.contact-info-item span { font-size: 13px; font-weight: 600; line-height: 1.5; }
.contact-info-item { transition: background 0.2s ease; }
.contact-info-item:hover { background: rgba(201,154,78,0.06); }
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 17px; margin-bottom: 8px; color: var(--cream); }
.service-card p { font-size: 13px; color: rgba(244,239,228,0.65); line-height: 1.55; margin-bottom: 14px; }
.service-tag-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brass); text-decoration: none; font-weight: 600; transition: gap 0.2s ease, color 0.2s ease; }
.service-tag-link:hover { color: var(--cream); gap: 10px; }
.service-tag-link svg { width: 13px; height: 13px; }

.cta-banner { background: var(--cream); padding: var(--section-pad) 0; text-align: center; }
.cta-card { width: 100%; padding: 0; }
.cta-card h2 { color: var(--ink); font-size: 36px; max-width: 640px; margin: 14px auto 32px; transition: opacity 0.4s ease; }
.cta-card .eyebrow { color: var(--brass-dark); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.work-col { display: flex; flex-direction: column; gap: 1px; }
.work-tile { position: relative; display: block; text-decoration: none; color: inherit; overflow: hidden; transition: box-shadow 0.35s ease; }
.work-tile img { width: 100%; object-fit: cover; display: block; transition: transform 0.5s ease, filter 0.35s ease; }
.work-tile.h-small img { height: 280px; }
.work-tile.h-medium img { height: 420px; }
.work-tile.h-large img { height: 840px; }
.work-tile .overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28,26,23,0.75), transparent 40%); transition: background 0.35s ease; }
.work-tile .label { position: absolute; left: 16px; bottom: 14px; color: var(--cream); transition: transform 0.35s ease; }
.work-tile:hover { box-shadow: inset 0 0 0 2px var(--brass); }
.work-tile:hover img { transform: scale(1.05); }
.work-tile:hover .overlay { background: linear-gradient(0deg, rgba(28,26,23,0.6), transparent 55%); }
.work-tile:hover .label { transform: translateY(-2px); }

.proj-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.proj-thumb { position: relative; border: none; padding: 0; margin: 0; cursor: pointer; background: none; aspect-ratio: 1/1; overflow: hidden; flex: 0 0 calc(25% - 0.75px); }
.proj-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.proj-thumb::after { content: ''; position: absolute; inset: 0; background: rgba(28,26,23,0); transition: background 0.3s ease; }
.proj-thumb:hover .proj-thumb-img { transform: scale(1.06); }
.proj-thumb:hover::after { background: rgba(28,26,23,0.45); }
.thumb-hint { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; color: var(--cream); font-size: 12px; font-weight: 600; line-height: 1.35; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.proj-thumb:hover .thumb-hint { opacity: 1; }
.proj-thumb-play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; pointer-events: none; }
.proj-thumb-play-icon svg { width: 34px; height: 34px; color: var(--cream); filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6)); }

.lightbox { position: fixed; inset: 0; background: rgba(20,18,16,0.94); z-index: 100; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 88vw; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.lb-btn { position: absolute; border: none; background: rgba(244,239,228,0.1); color: var(--cream); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.lb-btn span { display: block; width: 20px; height: 20px; }
.lb-close { top: 24px; right: 24px; width: 44px; height: 44px; }
.lb-close span { width: 18px; height: 18px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-media { position: relative; display: inline-block; line-height: 0; max-width: 88vw; max-height: 82vh; }
.lb-media img, .lb-media video { max-width: 88vw; max-height: 82vh; }
.lb-bottom-stack { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.lb-counter { color: rgba(244,239,228,0.7); font-size: 13px; }
.lb-location { color: var(--brass); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(20,18,16,0.6); padding: 6px 16px; border-radius: 20px; display: none; }

.proj-hero { position: relative; height: 720px; }
.proj-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,18,16,0.88) 0%, rgba(20,18,16,0.55) 45%, rgba(20,18,16,0.15) 75%); }
.proj-hero-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding-bottom: 48px; }
.proj-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.proj-hero-text { max-width: 620px; }
.proj-hero-text h1 { color: var(--cream); font-size: 42px; margin-bottom: 6px; }
.proj-thumb-strip-wrap { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.proj-thumb-strip { display: flex; gap: 1px; overflow: hidden; width: 318px; scroll-behavior: smooth; }
.proj-thumb-strip .proj-thumb { flex: 0 0 105px; height: 105px; aspect-ratio: unset; }
.thumb-nav-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(244,239,228,0.15); color: var(--cream); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s ease; }
.work-tile .label span { display: block; font-size: 11px; color: var(--brass); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.work-tile .label strong { font-size: 16px; font-weight: 500; font-family: 'Jost', sans-serif; }

.hero-slider { position: relative; height: 790px; overflow: hidden; }
.hero-slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; overflow: hidden; }
.hero-slider .slide.active { opacity: 1; }
.hero-slider .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); }
.hero-slider::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28,26,23,0.85) 0%, rgba(28,26,23,0.45) 45%, rgba(28,26,23,0.35) 100%); z-index: 1; }
.hero-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 32px 96px; }
.hero-spacer { flex: 0 0 52%; }
.hero-content .eyebrow { transition: opacity 0.4s ease; font-size: 16px; letter-spacing: 0.15em; font-weight: 700; margin-bottom: 22px; }
.hero-content h1 { color: var(--cream); font-size: 54px; line-height: 1.12; max-width: 1000px; margin: 0 0 40px; transition: opacity 0.4s ease; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 36px; z-index: 2; display: flex; gap: 8px; justify-content: center; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(244,239,228,0.35); border: none; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--brass); width: 22px; border-radius: 4px; }

.social-pair-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 56px; }
.social-pair-divider { width: 1px; align-self: stretch; background: var(--line); }

@media (max-width: 860px) {
  /* every CTA button spans full width on mobile for a consistent, thumb-friendly tap target */
  .btn { width: 100%; justify-content: center; }
  .ig-header-row { flex-direction: column; align-items: flex-start !important; gap: 14px; }
  nav { display: none; }
  .get-quote-desktop { display: none; }
  .nav-toggle { display: flex; }
  .navbar { padding: 14px 20px; }
  .wrap { padding: 0 20px; }

  /* homepage hero: less top spacer, less bottom padding, smaller type so headline + button never collide */
  .hero-spacer { display: none; }
  .hero-content { justify-content: center; padding-bottom: 52px; }
  .hero-content .eyebrow { font-size: 12px; margin-bottom: 12px; }
  .hero-content h1 { font-size: 28px; line-height: 1.18; margin-bottom: 18px; }
  .hero-dots { bottom: 16px; }

  /* page headers (About / What We Do / Our Work index): the 60px desktop size overflows onto the nav on narrow screens */
  .page-hero { height: 320px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero-content .eyebrow { font-size: 12px; }

  /* services grid (What We Do + homepage) */
  .services-grid { grid-template-columns: 1fr; }
  .services-head { flex-wrap: wrap; }

  /* solid label band on mobile instead of the gradient-only overlay, for guaranteed legibility over any photo */
  .work-tile .overlay { background: none; }
  .work-tile .label { left: 0 !important; right: 0 !important; bottom: 0 !important; background: rgba(20,18,16,0.92); padding: 10px 16px; }
  .home-work-preview { grid-template-columns: 1fr !important; }
  .home-work-preview .work-tile { aspect-ratio: unset !important; }
  .home-work-preview .work-tile img { aspect-ratio: 4/3 !important; height: auto !important; object-fit: cover; }
  .work-grid { grid-template-columns: 1fr; }
  .work-col { display: contents; }
  .work-tile img { height: auto !important; }

  /* footer */
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }

  /* about page stats */
  .about-stats { grid-template-columns: repeat(2, 1fr) !important; row-gap: 24px; }

  /* social page: Facebook + podcast pair -> stack with a horizontal divider */
  .social-pair-grid { grid-template-columns: 1fr; gap: 40px; }
  .social-pair-divider { width: 100%; height: 1px; }

  /* contact page */
  .contact-info-row { flex-direction: column; border: none !important; margin: 32px 0 0 !important; }
  .contact-info-item {
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 16px 4px !important;
    border-bottom: 1px solid var(--line-dark);
  }
  .contact-info-item:first-child { border-top: 1px solid var(--line-dark); }
  .contact-info-icon { width: 40px !important; height: 40px !important; margin-bottom: 0 !important; flex-shrink: 0; }
  .contact-info-icon svg { width: 18px; height: 18px; }
  .contact-hero h1 { font-size: 32px !important; }
  .contact-submit-btn { align-self: stretch !important; width: 100%; justify-content: center; }

  /* CTA card */
  .cta-card { padding: 0; }
  .cta-card h2 { font-size: 26px; }

  /* project pages: the desktop layout overlays text + thumbnails on the photo, which only works when
     there's a tall hero and short copy. On narrow screens the copy needs more room than a photo can
     give while still reading as a photo, so switch to a simple stacked layout: photo, then a solid
     content block below it, instead of overlaying — this is the actual fix for the overlap, not just resizing. */
  .proj-hero { height: auto; }
  .proj-hero img { position: static; width: 100%; height: 62vw; object-fit: cover; }
  .proj-hero::after { display: none; }
  .proj-hero-content { position: static; background: var(--ink); padding: 24px 0 28px; }
  .proj-hero-row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .proj-hero-text h1 { font-size: 28px; }
  .proj-side-col { align-items: center !important; width: 100%; }
  .proj-thumb-strip-wrap { width: 100%; }
  /* stack instead of scroll on mobile: simpler and more reliable on touch than a hidden-overflow strip + tap-to-scroll arrow.
     Using grid here (not flex-basis + aspect-ratio) because that combination wasn't reliably giving the buttons a height. */
  .proj-thumb-strip { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; overflow: visible; }
  .proj-thumb-strip .proj-thumb { width: 100%; height: auto; aspect-ratio: 1/1; flex: none; }
  .thumb-nav-btn { display: none; }
  .next-project-link { justify-content: center; padding-right: 0; }
  .proj-cta-bar { justify-content: center; text-align: center; }
  .proj-cta-bar p { text-align: center; }
  .lb-prev, .lb-next { width: 40px; height: 40px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-close { top: 12px; right: 12px; }

  /* What We Do gallery strip: 4-across is cramped on a phone */
  .wwd-gallery { grid-template-columns: 1fr !important; gap: 12px; }
}
