/* ABC Building Certs — custom styles layered on top of Tailwind utilities */

:root {
  --navy-900: #0F172A;
  --brand-600: #0284C7;
  --brand-700: #0369A1;
  --energy-600: #16A34A;
  --energy-700: #15803D;
}

html { scroll-behavior: smooth; }

body {
  font-family: '"Source Sans 3"', ui-sans-serif, system-ui, sans-serif;
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Lexend', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.015em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.8rem 1.4rem;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid #38BDF8;
  outline-offset: 2px;
}
/* Primary action = green (energy + go) */
.btn-accent {
  background-color: var(--energy-600);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(22,163,74,0.7);
}
.btn-accent:hover { background-color: var(--energy-700); box-shadow: 0 12px 26px -10px rgba(22,163,74,0.75); }

.btn-primary {
  background-color: var(--brand-600);
  color: #fff;
}
.btn-primary:hover { background-color: var(--brand-700); }

.btn-outline {
  background-color: transparent;
  color: #0F172A;
  border: 1.5px solid #CBD5E1;
}
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-700); }

.btn-ghost-light {
  background-color: rgba(255,255,255,0.10);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-ghost-light:hover { background-color: rgba(255,255,255,0.18); }

/* ---------- Links ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--brand-700);
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.nav-link { position: relative; font-weight: 500; color: #334155; }
.nav-link:hover { color: var(--brand-700); }
.nav-link.is-active { color: var(--navy-900); }
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--energy-600);
}

/* ---------- Hero with photo + gradient fallback ---------- */
.hero-photo {
  background-color: #0F172A; /* fallback if image fails */
  background-image:
    linear-gradient(180deg, rgba(15,23,42,0.78) 0%, rgba(15,23,42,0.86) 100%),
    url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=1920&q=70');
  background-size: cover;
  background-position: center;
}
.band-photo {
  background-color: #0369A1;
  background-image:
    linear-gradient(120deg, rgba(3,105,161,0.92) 0%, rgba(22,163,74,0.82) 100%),
    url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=70');
  background-size: cover;
  background-position: center;
}

/* ---------- EPC rating bands ---------- */
.epc-band {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: 700;
  font-family: 'Lexend', sans-serif;
  height: 2.1rem;
  padding-left: 0.85rem;
  border-radius: 3px;
  position: relative;
}
.epc-band span.letter { margin-left: auto; padding-right: 0.85rem; }
.epc-a { background:#16A34A; width:42%; }
.epc-b { background:#3FA535; width:50%; }
.epc-c { background:#8DC63F; width:58%; color:#14532d; }
.epc-d { background:#FFD200; width:66%; color:#1f2937; }
.epc-e { background:#FCAF17; width:74%; color:#1f2937; }
.epc-f { background:#F26522; width:82%; }
.epc-g { background:#ED1C24; width:90%; }

/* ---------- Cards ---------- */
.svc-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px -12px rgba(2,6,23,0.22); border-color: #BAE6FD; }

/* ---------- Star rating ---------- */
.stars { color: #F59E0B; }

/* ---------- Accordion ---------- */
.faq-item button[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .2s ease; }
.faq-answer { overflow: hidden; max-height: 0; transition: max-height .3s ease; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--energy-700);
}

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