/* Costa Key Roofing — styles. Design system mirrors the live Costa Key Fence site (costakey.com):
   dark theme, #4fc96f accent, Poppins headings + Inter body. */

:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2128;
  --accent: #4fc96f;
  --accent-hover: #5fd47d;
  --accent-dark: #2d5f45;
  --text-primary: #f5f5f0;
  --text-secondary: #a8a8a0;
  --border: #2a3a40;
  --danger: #e26a5c;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 0 16px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--text-primary); margin-bottom: 0.5em; }
h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; text-transform: uppercase; letter-spacing: -1px; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin-bottom: 1em; color: var(--text-secondary); }
ul { list-style: none; }

main { max-width: 1400px; margin: 0 auto; }
.wrap { max-width: 1400px; margin: 0 auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg-primary);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 4px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 28px; border-radius: 4px; font-weight: 600; font-size: 14px; font-family: var(--font-body);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--bg-primary); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg-primary); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--bg-primary); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-lg:hover { transform: translateX(4px); }

.phone-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-primary); }
.phone-link:hover { color: var(--accent); }
.phone-link svg { width: 18px; height: 18px; fill: var(--accent); }
.phone-link-lg { font-size: 18px; }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg-primary); border-bottom: 1px solid var(--border); margin: 0 -16px; padding: 0 16px; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 12px 0; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex-shrink: 0; }
.brand-license { font-size: 13px; font-weight: 500; letter-spacing: 0.5px; color: var(--text-secondary); padding-left: 26%; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo-img { height: 92px; width: auto; display: block; }
.brand-logo-img-lg { height: 92px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 28px; flex: 1; }
.nav-link { padding: 8px 0; font-weight: 500; font-size: 14px; color: var(--text-secondary); background: none; border: none; font-family: inherit; cursor: pointer; transition: color 0.2s; }
.nav-link:hover, .nav-link.is-active { color: var(--accent); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown-panel {
  display: none; position: absolute; top: 100%; left: 0; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); padding: 10px; min-width: 240px;
  max-height: 60vh; overflow-y: auto; grid-template-columns: 1fr 1fr; gap: 2px;
}
.nav-dropdown-panel.is-open { display: grid; }
.nav-dropdown-panel-static { grid-template-columns: 1fr; min-width: 220px; }
.nav-dropdown-panel a { display: block; padding: 8px 10px; border-radius: 4px; font-size: 14px; color: var(--text-primary); }
.nav-dropdown-panel a:hover { background: var(--bg-primary); color: var(--accent); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-cta .phone-link { display: none; }
.header-cta .btn-primary { padding: 12px 28px; }
.nav-toggle { display: none; background: none; border: none; width: 40px; height: 40px; cursor: pointer; color: var(--text-primary); }
.nav-toggle svg { width: 24px; height: 24px; }

/* Hero — photo-ready: full-bleed image with dark left-to-right scrim (same treatment as costakey.com) */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden;
  margin: 24px 0 60px; padding: 48px 0; border-radius: 4px;
  background: linear-gradient(135deg, #1a2128 0%, #14201b 100%);
}
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-photo-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 45%);
  mask-image: linear-gradient(to right, transparent 0%, black 45%);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, rgba(15,20,25,0.92) 0%, rgba(15,20,25,0.62) 28%, rgba(15,20,25,0.2) 44%, rgba(15,20,25,0) 58%);
}
.hero-glow {
  position: absolute; right: 0; top: 0; width: 70%; height: 100%; z-index: 0; opacity: 0.12;
  background: linear-gradient(135deg, #4fc96f 0%, #2d5f45 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%); mask-image: linear-gradient(to right, transparent 0%, #000 45%);
}
.hero-art { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); z-index: 1; width: min(34%, 380px); }
.roof-graphic { width: 100%; height: auto; }
.hero-content { position: relative; z-index: 2; max-width: 640px; padding: 0 48px; }
.hero h1 { margin-bottom: 20px; text-shadow: 0 2px 12px rgba(0,0,0,0.55); }
.hero-tagline { font-size: 18px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.8; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7); }
.hero-tagline strong { color: var(--accent); font-family: var(--font-head); font-weight: 800; letter-spacing: 0.02em; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 16px; }
.hero-sub { font-size: 16px; max-width: 52ch; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 24px 0; }
.rating-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-primary);
  padding: 10px 20px; background: rgba(79,201,111,0.1); border: 1px solid rgba(79,201,111,0.3); border-radius: 999px;
}
.rating-badge .stars { display: inline-flex; gap: 2px; }
.rating-badge svg { width: 15px; height: 15px; fill: var(--accent); }
.rating-badge span:last-child { font-weight: 500; color: var(--text-secondary); }

/* Photo placeholder / real photos */
.photo-placeholder {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--accent-dark) 100%);
  border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-weight: 600; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 220px; padding: 20px;
}
.photo-placeholder span { opacity: 0.85; font-size: 14px; max-width: 24ch; }
.photo-lg { min-height: 320px; }
.photo-real { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.map-embed { border-radius: 4px; overflow: hidden; border: 1px solid var(--border); min-height: 320px; filter: invert(0.92) hue-rotate(180deg) saturate(0.6); }
.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* Sections */
section { padding: 56px 0; scroll-margin-top: 110px; }
.section-title { margin-bottom: 8px; }
.section-title.center, .section-sub.center { text-align: center; }
.section-sub { max-width: 60ch; margin: 0 auto 36px; }
.services-overview, .areas-overview, .process, .entity-summary, .related-services {
  border-top: 1px solid var(--border); margin: 0;
}
.entity-facts { border-top: 1px solid var(--border); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 32px;
  display: block; transition: border-color 0.3s, transform 0.3s; color: inherit; overflow: hidden;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); text-decoration: none; color: inherit; }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.card-link { font-weight: 600; color: var(--accent); font-size: 14px; }
.card-grid-compact .card { padding: 20px; }
.card.has-photo { padding: 0; }
.card-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card.has-photo .card-body { padding: 20px 24px 24px; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.local-note .chip-row, .service-details .chip-row { justify-content: flex-start; }
.chip {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 10px 20px;
  font-size: 14px; font-weight: 500; color: var(--text-primary); transition: color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Process */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.process-step h3 { font-size: 17px; }
.process-step p { font-size: 14px; line-height: 1.8; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--accent); color: var(--bg-primary); font-weight: 800; font-family: var(--font-head); margin-bottom: 14px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.check-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: var(--text-secondary); }
.check-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }

/* CTA band */
.cta-band { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; margin: 72px 0 0; padding: 48px 32px; }
.cta-band h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* Breadcrumbs */
.breadcrumbs { padding-top: 20px; font-size: 13px; color: var(--text-secondary); }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--text-primary); font-weight: 600; }

.page-hero { padding-bottom: 20px; }
.service-hero { padding-top: 24px; }
.service-hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.page-hero .service-hero-inner .roof-graphic { max-width: 300px; margin: 0 auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 24px; margin: 120px -16px 0; padding-left: 16px; padding-right: 16px; }
.site-footer .wrap { max-width: 1400px; }
.site-footer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 14px; }
.site-footer p { color: var(--text-secondary); font-size: 14px; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }
.site-footer .btn-outline { color: var(--accent); }
.site-footer .btn-outline:hover { color: var(--bg-primary); }
.site-footer .brand { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-col ul li { margin-bottom: 8px; font-size: 14px; }
.footer-rating { display: flex; align-items: center; gap: 4px; margin: 14px 0; }
.footer-rating svg { width: 14px; height: 14px; fill: var(--accent); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 14px; color: var(--text-secondary); }
.footer-contact svg { width: 16px; height: 16px; fill: var(--accent); flex-shrink: 0; margin-top: 4px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.footer-bottom p { margin: 0; font-size: 13px; }

/* Entity facts table */
.facts-table { width: 100%; border-collapse: collapse; max-width: 780px; margin: 0 auto; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.facts-table th, .facts-table td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; color: var(--text-secondary); }
.facts-table th { width: 34%; color: var(--accent); font-weight: 600; }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: none; }
.entity-facts h2 { text-align: center; margin-bottom: 24px; }

/* Guide pages */
.guide-content { max-width: 820px; margin: 0 auto; }
.guide-content h2 { margin-top: 2.2rem; font-size: 24px; }
.guide-content h3 { margin-top: 1.6rem; }
.guide-content p, .guide-content li { font-size: 16px; line-height: 1.8; }
.guide-content strong { color: var(--text-primary); }
.guide-answer { font-size: 17px; background: var(--bg-secondary); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 20px 24px; border-radius: 4px; margin: 20px 0 28px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; background: var(--bg-secondary); border: 1px solid var(--border); }
.guide-table caption { text-align: left; font-weight: 600; color: var(--accent); padding-bottom: 8px; }
.guide-table th, .guide-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-secondary); }
.guide-table thead th { background: var(--accent-dark); color: var(--text-primary); }
.guide-table tbody th { color: var(--text-primary); font-weight: 600; width: 30%; }
.guide-note { font-size: 13px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 28px; }
.guide-content ul { padding-left: 1.2rem; list-style: disc; margin-bottom: 1em; }
.guide-content ul li { margin: 6px 0; color: var(--text-secondary); }

/* FAQ */
.faq-group { margin: 2.5rem 0; }
.faq-group h2 { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 20px; font-size: 24px; }
.faq-item { padding: 20px 28px; background: var(--bg-secondary); border-radius: 4px; border: 1px solid var(--border); margin-bottom: 12px; }
.faq-item summary {
  font-family: var(--font-head); font-size: 17px; font-weight: 600; color: var(--accent); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--text-secondary); flex-shrink: 0; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { margin-bottom: 14px; }
.faq-answer p { font-size: 14px; line-height: 1.8; margin: 0; }
.faq-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 40px; }

/* Forms */
.contact-form { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 40px; }
.form-row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-weight: 500; font-size: 14px; color: var(--text-primary); }
.form-row input, .form-row select, .form-row textarea {
  font: inherit; font-size: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-primary); color: var(--text-primary); transition: border-color 0.2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: 13px; margin-top: 14px; }
.contact-info h2 { font-size: 24px; }
.contact-info-list { margin: 18px 0; }
.contact-info .rating-badge { margin-bottom: 16px; }

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1280px) {
  .brand-logo-img, .brand-logo-img-lg { height: 72px; }
  .brand-license { font-size: 10px; }
  .main-nav { gap: 18px; }
}

@media (max-width: 1080px) {
  .main-nav, .header-cta .btn-primary { display: none; }
  .header-cta .phone-link { display: inline-flex; }
  .header-cta { margin-left: auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; position: fixed; inset: 96px 0 0 0;
    background: var(--bg-primary); padding: 16px 24px; overflow-y: auto; z-index: 90;
  }
  .main-nav.is-open .nav-dropdown-panel.is-open { position: static; box-shadow: none; grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .service-hero-inner, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { min-height: 400px; }
  .hero-bg { background: linear-gradient(to bottom, rgba(15,20,25,0.55) 0%, rgba(15,20,25,0.8) 45%, rgba(15,20,25,0.9) 100%); }
  .hero-content { padding: 0 20px; }
  .hero-art { display: none; }
  .cta-band-inner { flex-direction: column; text-align: center; }
  .contact-form { padding: 24px; }

}

@media (max-width: 600px) {
  .brand-logo-img, .brand-logo-img-lg { height: 52px; }
  .brand-license { font-size: 9px; }
}

@media (max-width: 400px) {
  .brand-logo-img { height: 44px; }
  .site-header .brand-license { font-size: 8.5px; }
  .header-cta .phone-link { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
