/* ==========================================================================
   WillCo Electric Inc. — Premium design system
   Tailwind is loaded via CDN; this file adds custom variables, tokens,
   animations and utilities that Tailwind alone doesn't cover.
   ========================================================================== */

:root {
  --wc-blue: #0066ff;
  --wc-blue-600: #0052cc;
  --wc-blue-700: #003d99;
  --wc-navy: #0a1929;
  --wc-navy-soft: #10243c;
  --wc-spark: #ffc043;
  --wc-ink: #0b1220;
  --wc-mute: #4a5b73;
  --wc-line: #e6ecf2;
  --wc-cloud: #f5f8fc;
  --wc-white: #ffffff;
  --wc-shadow-sm: 0 2px 8px rgba(10, 25, 41, 0.06);
  --wc-shadow-md: 0 12px 32px rgba(10, 25, 41, 0.10);
  --wc-shadow-lg: 0 24px 60px rgba(10, 25, 41, 0.14);
  --wc-radius: 20px;
  --wc-radius-lg: 28px;
}

/* Base typography */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wc-ink);
  background: var(--wc-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--wc-navy);
}

/* Gradient hero backdrop */
.wc-hero-gradient {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 102, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 192, 67, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}
.wc-dark-gradient {
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(0, 102, 255, 0.35), transparent 55%),
    radial-gradient(700px 400px at 90% 100%, rgba(255, 192, 67, 0.10), transparent 60%),
    linear-gradient(160deg, #0a1929 0%, #10243c 100%);
}

/* Buttons */
.wc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  will-change: transform;
}
.wc-btn-primary {
  background: linear-gradient(135deg, var(--wc-blue) 0%, var(--wc-blue-600) 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(0, 102, 255, 0.35);
}
.wc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 102, 255, 0.42); }
.wc-btn-ghost {
  background: rgba(255,255,255,.9); color: var(--wc-navy); border: 1px solid var(--wc-line);
}
.wc-btn-ghost:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--wc-shadow-md); }
.wc-btn-dark {
  background: var(--wc-navy); color: #fff;
}
.wc-btn-dark:hover { background: var(--wc-navy-soft); transform: translateY(-2px); }

/* Cards */
.wc-card {
  background: #fff; border: 1px solid var(--wc-line); border-radius: var(--wc-radius);
  box-shadow: var(--wc-shadow-sm); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.wc-card:hover { transform: translateY(-4px); box-shadow: var(--wc-shadow-md); border-color: transparent; }

/* Section titles */
.wc-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--wc-blue-600); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.wc-eyebrow::before {
  content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px;
}

/* Trust chips */
.wc-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.95rem; border-radius: 999px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
  border: 1px solid var(--wc-line); font-weight: 600; color: var(--wc-navy);
  box-shadow: var(--wc-shadow-sm);
}

/* Nav */
.wc-nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(230, 236, 242, 0.6);
}
.wc-nav-link {
  padding: 0.6rem 0.9rem; border-radius: 12px;
  color: var(--wc-navy); font-weight: 500; transition: background-color .2s ease, color .2s ease;
}
.wc-nav-link:hover, .wc-nav-link[aria-current="page"] {
  background: rgba(0, 102, 255, 0.08); color: var(--wc-blue-600);
}

/* Sticky mobile call button */
.wc-call-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  padding: 0.95rem 1.25rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--wc-blue) 0%, var(--wc-blue-600) 100%);
  color: #fff; font-weight: 700; box-shadow: 0 18px 36px rgba(0, 102, 255, 0.35);
  display: inline-flex; align-items: center; gap: .55rem;
  animation: wcPulse 2.6s ease-out infinite;
}
@keyframes wcPulse {
  0%, 100% { box-shadow: 0 18px 36px rgba(0, 102, 255, 0.35); }
  50%     { box-shadow: 0 20px 44px rgba(0, 102, 255, 0.55), 0 0 0 8px rgba(0, 102, 255, 0.10); }
}
@media (min-width: 1024px) { .wc-call-fab { display: none; } }

/* Reveal on scroll */
.wc-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.wc-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Image placeholder used where a real photo will be dropped in */
.wc-img-slot {
  position: relative; overflow: hidden; border-radius: var(--wc-radius);
  background:
    linear-gradient(135deg, #eaf1ff 0%, #f6faff 100%);
  border: 1px dashed #cddcf5;
  aspect-ratio: 4 / 3;
}
.wc-img-slot::after {
  content: attr(data-label);
  position: absolute; inset: auto 0 0 0; padding: 0.6rem 0.9rem;
  font-size: 0.72rem; color: #567; background: rgba(255,255,255,0.85);
  border-top: 1px dashed #cddcf5;
  font-weight: 600; letter-spacing: 0.02em;
}
.wc-img-slot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wc-img-slot img + ::after { display: none; }

/* Masonry gallery */
.wc-masonry {
  column-count: 1; column-gap: 1.25rem;
}
@media (min-width: 640px) { .wc-masonry { column-count: 2; } }
@media (min-width: 1024px) { .wc-masonry { column-count: 3; } }
.wc-masonry > * { break-inside: avoid; margin-bottom: 1.25rem; display: block; }

/* Lightbox */
.wc-lightbox {
  position: fixed; inset: 0; background: rgba(10, 25, 41, 0.92);
  display: none; align-items: center; justify-content: center; z-index: 60;
  padding: 2rem;
}
.wc-lightbox.is-open { display: flex; }
.wc-lightbox img { max-width: min(96vw, 1200px); max-height: 90vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.wc-lightbox button { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 999px; font-size: 1.4rem; cursor: pointer; }

/* Accordion */
details.wc-faq { border-bottom: 1px solid var(--wc-line); padding: 1.25rem 0; }
details.wc-faq[open] summary::after { transform: rotate(45deg); }
details.wc-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 600; color: var(--wc-navy); font-size: 1.05rem;
}
details.wc-faq summary::-webkit-details-marker { display: none; }
details.wc-faq summary::after {
  content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wc-blue-600);
  transition: transform .25s ease;
}
details.wc-faq p { margin-top: 0.75rem; color: var(--wc-mute); line-height: 1.65; }

/* Form */
.wc-input, .wc-textarea, .wc-select {
  width: 100%; padding: 0.85rem 1rem; border-radius: 14px;
  border: 1px solid var(--wc-line); background: #fff; color: var(--wc-ink);
  transition: border-color .2s ease, box-shadow .2s ease;
  font: inherit;
}
.wc-input:focus, .wc-textarea:focus, .wc-select:focus {
  outline: none; border-color: var(--wc-blue); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.14);
}
.wc-label { font-weight: 600; color: var(--wc-navy); font-size: .9rem; display: block; margin-bottom: .35rem; }

/* Utility */
.wc-container { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .wc-container { padding-inline: 2rem; } }

/* Accessibility: focus rings */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, details summary:focus-visible {
  outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; border-radius: 8px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
