/* =====================================
   TrueLine Exteriors Styles (clean rebuild)
   Matches nav HTML used on Gallery + Index:
   .site-header > .header-inner > .header-nav > .site-nav + .nav-cta
   ===================================== */

:root{
  --intro-delay: 2.6s;
  --bg: #0d0f12;
  --bg2: #05060a;
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --orange: #ff7a18;
  --orange-2: #ff9a3d;
  --maxw: 1120px;
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*{ box-sizing:border-box; }

html, body{ margin:0; padding:0; }

body{
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg2));
  position: relative;
  overflow-x: hidden;
}

/* =====================================
   Background watermark + home splash
   ===================================== */

body::before{
  content:"";
  position: fixed;
  inset: 0;
  background-image: url("../images/trueline-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.06;
  pointer-events:none;
  z-index: -1;
}

/* Home splash overlay that fades out */
body.home::after{
  content:"";
  position: fixed;
  inset: 0;
  background-image: url("../images/trueline-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: #fff;
  z-index: 9999;
  pointer-events:none;
  animation: splashOut 2.8s ease-in-out forwards;
}

@keyframes splashOut{
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* Ensure content stays above watermark */
.site-header, main, footer, .section, .hero, .cta-inner{
  position: relative;
  z-index: 1;
}

/* =====================================
   Header / Nav (shared across all pages)
   ===================================== */

.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 12, 18, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 18px;
}

.header-nav{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Link row */
.site-nav{
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* Navbar links */
.nav-link{
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active{
  color: #fff;
  background: rgba(255,255,255,0.06);
}

/* CTA button in nav */
.nav-cta{
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  color: #111;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.25);
}

/* Mobile navbar behavior: wrap safely, never overlap */
@media (max-width: 768px){
  .header-nav{
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .site-nav{
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
  }

  .nav-cta{
    width: min(92vw, 420px);
    text-align: center;
  }
}

/* =====================================
   Hero
   ===================================== */

.hero{
  padding: 16px 18px 40px;
}

.hero-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 0;
}

.hero-kicker{
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.hero-kicker.stagger span{
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  animation: wordFloatIn 0.7s ease-out forwards;
}

.hero-kicker.stagger span:nth-child(1){ animation-delay: calc(var(--intro-delay) + 0.10s); }
.hero-kicker.stagger span:nth-child(2){ animation-delay: calc(var(--intro-delay) + 0.25s); }
.hero-kicker.stagger span:nth-child(3){ animation-delay: calc(var(--intro-delay) + 0.40s); }
.hero-kicker.stagger span:nth-child(4){ animation-delay: calc(var(--intro-delay) + 0.55s); }
.hero-kicker.stagger span:nth-child(5){ animation-delay: calc(var(--intro-delay) + 0.70s); }

@keyframes wordFloatIn{
  from{ opacity:0; transform: translateY(16px); }
  to{ opacity:1; transform: translateY(0); }
}

.hero-title{
  font-family: 'Montserrat', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  font-size: 3rem;
  line-height: 1.05;
  margin: 8px 0 10px;
}

.gradient-text{
  background: linear-gradient(90deg, var(--orange), #ffffff, var(--orange-2), #ffffff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 7s ease-in-out infinite;
}

.hero-subtitle{
  max-width: 720px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  font-weight: 500;
  margin: 0 0 14px;
}

/* Hero fade in */
.hero-title,
.hero-subtitle{
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeUp 0.7s ease-out forwards;
  animation-delay: calc(var(--intro-delay) + 0.9s);
}

@keyframes heroFadeUp{
  to{ opacity:1; transform: translateY(0); }
}

.badge{
  margin-top: 10px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 999px;
}

.badge-title{
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Facebook icon badge beside hero badge */
.badge-facebook{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  border-radius: 50%;
  background: #1877F2; /* Facebook blue */
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  box-shadow: 0 10px 22px rgba(24,119,242,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-facebook:hover{
  transform: scale(1.1);
  box-shadow: 0 14px 30px rgba(24,119,242,0.65);
}



@media (max-width: 768px){
  .hero-title{ font-size: clamp(30px, 8vw, 44px); }
  .hero{ padding: 14px 16px 34px; }
}

/* =====================================
   Sections / Cards
   ===================================== */

.section{
  padding: 60px 18px;
}

.section-inner{
  max-width: var(--maxw);
  margin: 0 auto;
}

.cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px){
  .cards{ grid-template-columns: 1fr; }
}

/* Service cards with background images */
.service-card{
  padding: 20px 20px 20px 28px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 170px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
}

.service-card::after{
  content:"";
  position:absolute;
  inset:0;
  background-size: cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity: 0.35;
  z-index: 0;
}

.service-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.65));
  z-index: 1;
}

.service-card > *{
  position: relative;
  z-index: 2;
}

.service-card h3{
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}

.service-card.service-roofing::after{ background-image: url("../images/service-roofing.jpg"); }
.service-card.service-siding::after{ background-image: url("../images/services-siding2.jpeg"); }
.service-card.service-storm::after{ background-image: url("../images/services-storm.jpg"); }


/* =====================================
   Buttons
   ===================================== */

.btn{
  display: inline-block;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.10);
}

.btn-primary{
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  color: #111;
}

/* =====================================
   CTA
   ===================================== */

.cta-inner{
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 140, 60, 0.03), rgba(10, 9, 8, 0.26));
  border: 1px solid rgba(255,255,255,0.10);
}

/* =====================================
   Footer
   ===================================== */

.site-footer{
  padding: 24px 18px;
  background: rgba(5, 6, 10, 0.85);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =====================================
   Gallery (Past Projects)
   ===================================== */

.masonry{
  column-count: 3;
  column-gap: 18px;
}

@media (max-width: 980px){ .masonry{ column-count: 2; } }
@media (max-width: 620px){ .masonry{ column-count: 1; } }

.gcard{
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  text-decoration: none;
  color: inherit;
}

.gcard figure{
  margin: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  transform: translateZ(0);
}

.gcard img{
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.02);
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: saturate(1.05) contrast(1.02);
}

.gcard figcaption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gtitle{
  display: block;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.gmeta{
  display: block;
  opacity: 0.85;
  font-size: 0.92rem;
  margin-top: 2px;
}

.gcard:hover img{
  transform: scale(1.10);
  filter: saturate(1.15) contrast(1.08);
}

.gcard:hover figcaption{
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox via :target */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}

.lightbox:target{ display: block; }

.lb-bg{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}

.lb-panel{
  position: relative;
  max-width: 980px;
  width: min(980px, calc(100% - 24px));
  margin: 60px auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10,10,10,0.55);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  animation: lbIn 0.25s ease;
}

@keyframes lbIn{
  from{ transform: translateY(10px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

.lb-panel img{
  display: block;
  width: 100%;
  height: auto;
}

.lb-caption{
  padding: 14px 16px 16px;
}

.lb-close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lb-close:hover{
  transform: scale(1.05);
  background: rgba(0,0,0,0.55);
}

/* =====================================
   Contact Page
   ===================================== */

.contact-wrap{ padding: 20px 18px 80px; }

.contact-grid{
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px){
  .contact-grid{ grid-template-columns: 1fr; }
}

.contact-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  padding: 18px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.28);
}

.contact-card.subtle{ background: rgba(0,0,0,0.12); }

.contact-title{ margin: 0 0 10px; letter-spacing: 0.3px; }
.contact-title.small{ font-size: 1.05rem; }

.contact-text{
  margin: 0 0 14px;
  opacity: 0.9;
  line-height: 1.55;
}

.contact-lines{ margin: 0; line-height: 1.65; }

.contact-form{ display: grid; gap: 12px; }

.field-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 620px){
  .field-row{ grid-template-columns: 1fr; }
}

.field label{
  display: block;
  font-size: 0.92rem;
  opacity: 0.9;
  margin: 0 0 6px;
}

.field input,
.field select,
.field textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: inherit;
  outline: none;
}

.field textarea{
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color: rgba(255,255,255,0.28);
}

/* Honeypot hidden */
.hp-wrap{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================
   Service Area (map section)
   ========================= */

.service-area .section-subtitle{
  max-width: 820px;
}

.service-area-card{
  display: block;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  box-shadow: 0 14px 36px rgba(0,0,0,0.28);
  text-decoration: none;
}

.service-area-map{
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.01);
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: saturate(1.05) contrast(1.03);
}

.service-area-card:hover .service-area-map{
  transform: scale(1.03);
  filter: saturate(1.12) contrast(1.06);
}

.service-area-actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* =====================================
   Animations
   ===================================== */

@keyframes gradientShift{
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
