/* ============================================================
   Sparked Electrical — Custom Styles
   Complements Tailwind CDN utilities
   Brand: #4A90C4 (blue), #2C2C2C (charcoal), #F5F7FA (grey)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --brand-blue: #4A90C4;
  --brand-blue-dark: #3a7ab0;
  --brand-charcoal: #2C2C2C;
  --brand-grey: #F5F7FA;
  --shadow-card: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 35px rgba(0, 0, 0, 0.15);
  --shadow-nav: 0 2px 20px rgba(0, 0, 0, 0.08);
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

p { line-height: 1.7; }

/* ---------- Logo Handling ---------- */
.logo-nav {
  width: 160px;
  height: auto;
  transition: opacity var(--transition-fast);
}
.logo-nav:hover { opacity: 0.85; }

.logo-footer {
  width: 160px;
  height: auto;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  box-shadow: var(--shadow-nav);
  transition: box-shadow var(--transition-base);
}

.site-nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color var(--transition-fast);
  padding-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-blue);
  transition: width var(--transition-base);
}

.nav-link:hover { color: var(--brand-blue); }
.nav-link:hover::after { width: 100%; }

.nav-link.active {
  color: var(--brand-blue);
}
.nav-link.active::after { width: 100%; }

/* Mobile menu links */
.mobile-nav-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--brand-grey);
  color: var(--brand-blue);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  box-shadow: 0 4px 15px rgba(74, 144, 196, 0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--brand-blue);
  border-color: #fff;
}
.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-lg {
  padding: 0.9rem 2.25rem;
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url('/assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.hero-content { position: relative; z-index: 1; }

/* Inner page hero banner */
.page-hero {
  padding: 5rem 0 2rem;
  background: linear-gradient(135deg, #1a2232 0%, var(--brand-charcoal) 60%, #1e3a5f 100%);
  background-size: cover;
  background-position: center 30%;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(74, 144, 196, 0.12) 0%, transparent 60%);
}
.page-hero-content { position: relative; z-index: 1; }

/* ---------- Section Headings ---------- */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--brand-charcoal);
  line-height: 1.15;
}

.section-title.light { color: #fff; }

.section-subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 0.875rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Service card icon container */
.service-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(74, 144, 196, 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  flex-shrink: 0;
  transition: background var(--transition-base);
}
.card:hover .service-icon {
  background: var(--brand-blue);
  color: #fff;
}

/* Project card image placeholder */
.project-img-placeholder {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  height: 210px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.project-img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%);
}

.card-project-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  margin-bottom: 0.3rem;
}

.card-project-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.card-location-icon {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.card-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.card-status-completed {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
}

.card-status-inprogress {
  background: rgba(74, 144, 196, 0.9);
  color: #fff;
}

/* Region pills */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}
.tag-sydney      { background: #dbeafe; color: #1d4ed8; }
.tag-newcastle   { background: #d1fae5; color: #065f46; }
.tag-wollongong  { background: #fef3c7; color: #92400e; }
.tag-none        { background: #f3f4f6; color: #6b7280; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}
.status-completed   { background: #d1fae5; color: #065f46; }
.status-in-progress { background: #dbeafe; color: #1d4ed8; }

/* ---------- Stats ---------- */
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.03em;
}

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.form-input,
.form-textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  background: #fff;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 196, 0.15);
}
.form-textarea { min-height: 140px; resize: vertical; }

/* ---------- Filter Bar ---------- */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  transition: all var(--transition-fast);
}
.filter-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.filter-btn.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 400ms; }

/* ---------- Value Icon ---------- */
.value-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(74, 144, 196, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  flex-shrink: 0;
}

/* ---------- Contact Info Item ---------- */
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-info-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(74, 144, 196, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  flex-shrink: 0;
}

/* ---------- Image Placeholder ---------- */
.img-placeholder {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-charcoal);
  background-image: url('/assets/images/footer-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(44, 44, 44, 0.80);
}
.site-footer > .container-site {
  position: relative;
  z-index: 1;
}
.site-footer .logo-footer {
  filter: brightness(2);
}
.footer-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}
.footer-link:hover { color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-blue); }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .card, .btn, .nav-link { transition: none; }
}

/* ---------- Utility ---------- */
.container-site {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 640px) { .container-site { padding: 0 2rem; } }
@media (min-width: 1024px) { .container-site { padding: 0 3rem; } }

.section-pad { padding: 5rem 0; }
@media (max-width: 768px) { .section-pad { padding: 3.5rem 0; } }
