/* ==========================================================================
   JC Electric — design tokens (dark theme)
   ========================================================================== */
:root {
  --bg: #121214;
  --bg-alt: #19191c;
  --surface: #1e1e22;
  --copper: #d9822c;
  --copper-light: #f0a052;
  --ink: #f5f4f1;
  --ink-soft: #a3a2a8;
  --white: #ffffff;
  --line: rgba(245, 244, 241, 0.12);
  --line-strong: rgba(245, 244, 241, 0.22);

  --font-display: "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;

  --wrap: 1120px;
  --radius: 6px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--white); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; color: var(--white); }
p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Sections targeted by anchor links need room for the sticky header,
   or the browser scrolls their heading right underneath it. */
section[id] { scroll-margin-top: 108px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--copper); color: var(--bg); padding: 12px 16px; z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.98rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn-primary { background: var(--copper); color: #14140f; }
.btn-primary:hover { background: var(--copper-light); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--copper); color: var(--copper-light); }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 18, 20, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 88px;
}
.brand-mark { height: 58px; width: auto; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { border-color: var(--copper); color: var(--copper-light); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.phone-link {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 700; color: var(--white);
  white-space: nowrap;
}
.phone-link svg { color: var(--copper); flex-shrink: 0; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { background: var(--bg); padding: 72px 0 56px; overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero-kicker {
  font-weight: 600; color: var(--copper-light); margin: 0 0 12px;
  font-size: 0.95rem;
}
.hero-lede { font-size: 1.08rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-license { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }

.hero-power-col { justify-self: center; text-align: center; }
.hero-power {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  cursor: pointer;
}
.hero-power:focus-visible { outline: 2px solid var(--copper); outline-offset: 8px; }

.power-glow {
  position: absolute; inset: 10%;
  background: radial-gradient(circle, rgba(217, 130, 44, 0.4), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.power-logo {
  position: relative; z-index: 2;
  width: 100%; max-width: 300px; height: auto;
  filter: brightness(0.45) saturate(0.6);
  transition: filter 0.4s ease;
}

.hero-power.energized .power-glow { opacity: 1; }
.hero-power.energized .power-logo {
  filter: brightness(1.15) saturate(1.05) drop-shadow(0 0 22px rgba(217, 130, 44, 0.55));
}
.hero-power.flicker .power-logo {
  animation: power-flicker 0.6s steps(1) forwards;
}
@keyframes power-flicker {
  0%   { filter: brightness(0.45); }
  8%   { filter: brightness(1.2) drop-shadow(0 0 14px rgba(217, 130, 44, 0.6)); }
  16%  { filter: brightness(0.45); }
  26%  { filter: brightness(1.25) drop-shadow(0 0 16px rgba(217, 130, 44, 0.6)); }
  36%  { filter: brightness(0.55); }
  50%  { filter: brightness(1.3) drop-shadow(0 0 20px rgba(217, 130, 44, 0.65)); }
  64%  { filter: brightness(0.7); }
  80%  { filter: brightness(1.15) drop-shadow(0 0 18px rgba(217, 130, 44, 0.55)); }
  100% { filter: brightness(1.15) saturate(1.05) drop-shadow(0 0 22px rgba(217, 130, 44, 0.55)); }
}

.power-hint {
  text-align: center; font-size: 0.78rem; color: var(--ink-soft);
  margin: 4px 0 0; opacity: 0.7;
}

.hero-surge {
  position: fixed; inset: 0; pointer-events: none; z-index: 500;
  background: radial-gradient(circle at 68% 22%, rgba(217, 130, 44, 0.22), transparent 60%);
  opacity: 0;
}
.hero-surge.active { animation: surge-flash 0.5s ease; }
@keyframes surge-flash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-power.flicker .power-logo { animation: none; }
  .hero-surge.active { animation: none; }
}

/* ==========================================================================
   Trust bar
   ========================================================================== */
.trust-bar { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.trust-inner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 10px 16px; font-size: 0.9rem; font-weight: 500; text-align: center; color: var(--ink);
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--copper); }

/* ==========================================================================
   Shared section spacing
   ========================================================================== */
section { padding: 76px 0; }
.section-lede { font-size: 1.05rem; margin-bottom: 40px; max-width: 56ch; }

/* ==========================================================================
   Services
   ========================================================================== */
.service-category-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.service-category-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; display: flex; flex-direction: column;
  transition: border-color 0.2s ease;
}
.service-category-card:hover { border-color: var(--line-strong); }
.service-category-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--copper); margin-bottom: 18px;
}
.service-category-icon svg { width: 22px; height: 22px; }
.service-category-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.service-category-card > p { font-size: 0.95rem; margin-bottom: 22px; }
.service-item-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  margin: 0;
}
.service-item-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
}
.item-bolt { width: 14px; height: 14px; color: var(--copper); flex-shrink: 0; }

.services-cta {
  margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.services-cta p { margin: 0; font-size: 1rem; color: var(--ink); max-width: 40ch; }
.services-cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Our work: carousel + clients marquee
   ========================================================================== */
.work { background: var(--bg-alt); }
.work-header { text-align: center; }
.work-header .section-lede { margin-left: auto; margin-right: auto; }

.carousel {
  position: relative;
  max-width: 640px;
  margin: 0 auto 56px;
}
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 5 / 4;
}
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  font-size: 0.9rem; font-weight: 600; color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(18,18,20,0.7); border: 1px solid var(--line-strong);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background-color 0.15s ease;
}
.carousel-arrow:hover { background: var(--copper); border-color: var(--copper); }
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-dots {
  display: flex; justify-content: center; gap: 8px; margin-top: 18px;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong); border: none; padding: 0; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.carousel-dots button.active { background: var(--copper); transform: scale(1.3); }

.work-clients-label {
  text-align: center; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 auto 32px;
  max-width: 44ch;
}

.work-instagram {
  max-width: 480px; margin: 56px auto 0;
  text-align: center;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.work-instagram svg { width: 30px; height: 30px; color: var(--copper); margin-bottom: 14px; }
.work-instagram p { color: var(--white); font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { background: var(--bg-alt); }
.process-steps { display: grid; gap: 32px; grid-template-columns: repeat(4, 1fr); }
.process-steps li { display: flex; flex-direction: column; gap: 14px; }
.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem;
  color: var(--copper);
}
.process-steps h3 { margin-bottom: 6px; font-size: 1.05rem; }
.process-steps p { margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   About + service area (merged)
   ========================================================================== */
.about { background: var(--bg); }
.about-inner {
  display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: center;
  margin-bottom: 64px;
}
.about-mark {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.about-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.about-badges span {
  font-size: 0.85rem; font-weight: 600; color: var(--copper-light);
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 6px 14px;
}

.area-inner {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start;
  padding-top: 48px; border-top: 1px solid var(--line);
}
.area-info h3 { margin-bottom: 10px; }
.area-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px;
  margin: 0;
}
.area-grid li { font-weight: 600; color: var(--ink); }
.area-map {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  max-width: 100%;
}
.area-map img { width: 100%; height: auto; display: block; }

.area-callout {
  margin-top: 36px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(217, 130, 44, 0.1);
  border: 1.5px solid var(--copper);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.area-callout svg { width: 24px; height: 24px; color: var(--copper); flex-shrink: 0; }
.area-callout p { margin: 0; color: var(--white); font-weight: 600; font-size: 1rem; }

/* ==========================================================================
   Clients marquee (part of "Our work" section)
   ========================================================================== */
.marquee {
  width: 100%;
  overflow: hidden;
  padding-bottom: 76px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  --marquee-gap: 64px;
  gap: var(--marquee-gap);
  animation: marquee-scroll 16s linear infinite;
}
.marquee-logo {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - (var(--marquee-gap) / 2))); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .marquee-logo.marquee-dup { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

@media (max-width: 720px) {
  .marquee-logo { height: 22px; max-width: 100px; }
  .marquee-track { --marquee-gap: 40px; }
}


/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--bg-alt); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-phone {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem;
  color: var(--white); text-decoration: none; margin: 12px 0 28px;
}
.contact-phone svg { color: var(--copper); }
.contact-meta { display: flex; gap: 40px; margin: 0 0 32px; }
.contact-meta dt { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 4px; }
.contact-meta dd { margin: 0; font-weight: 700; color: var(--white); }

.team-list { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.team-member { display: flex; flex-direction: column; gap: 2px; }
.team-name { margin: 0; font-weight: 700; color: var(--white); font-size: 0.98rem; }
.team-title { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.team-member a { font-size: 0.9rem; color: var(--copper-light); text-decoration: none; }
.team-member a:hover { text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.form-row input, .form-row textarea, .form-row select {
  font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--copper); outline: none; }
.form-status { font-size: 0.9rem; min-height: 1.2em; margin: 4px 0 0; }
.form-status.success { color: #7fd39a; }
.form-status.error { color: #e08080; }

/* ==========================================================================
   Careers
   ========================================================================== */
.careers-hero { background: var(--bg); padding: 64px 0 20px; }
.careers-hero .section-lede { max-width: 60ch; }

.careers-why { background: var(--bg-alt); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.why-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.why-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.why-card p { margin: 0; font-size: 0.95rem; }

.roles { background: var(--bg); }
.role-list { border-top: 1px solid var(--line); }
.role-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.role-row h3 { margin: 0 0 4px; }
.role-row p { margin: 0; font-size: 0.92rem; }
.role-tag {
  font-size: 0.8rem; font-weight: 700; color: var(--copper-light);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px;
  white-space: nowrap;
}

.apply { background: var(--bg-alt); }
.apply-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.apply-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 20px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #0c0c0e; color: var(--ink-soft); padding: 48px 0 32px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-logo { height: 38px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { text-decoration: none; font-size: 0.9rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--copper-light); }
.footer-meta { margin: 0; font-size: 0.9rem; color: var(--ink); }
.footer-meta a { text-decoration: underline; }
.footer-instagram {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  text-decoration: none;
}
.footer-instagram svg { width: 18px; height: 18px; color: var(--copper); flex-shrink: 0; }
.footer-instagram:hover { color: var(--copper-light); }
.footer-instagram:hover svg { color: var(--copper-light); }
.footer-copy { margin: 0; font-size: 0.8rem; color: rgba(163, 162, 168, 0.6); }

/* ==========================================================================
   Sticky mobile call bar
   ========================================================================== */
.mobile-call-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--copper); color: #14140f;
  align-items: center; justify-content: center; gap: 10px;
  padding: 14px 0; font-weight: 700; text-decoration: none;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.35);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-power-col { order: -1; max-width: 240px; margin: 0 auto; }
  .about-inner { grid-template-columns: 1fr; text-align: left; }
  .about-mark { width: 140px; }
  .area-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .apply-inner { grid-template-columns: 1fr; }
  .service-category-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }

  .site-header.nav-open .main-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 88px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .site-header.nav-open .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }

  section { padding: 52px 0; }
  .mobile-call-bar { display: flex; }
  body { padding-bottom: 58px; }
  .services-cta { flex-direction: column; align-items: flex-start; }
  .carousel-arrow { width: 34px; height: 34px; }
}

@media (max-width: 520px) {
  .process-steps { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .service-item-list { grid-template-columns: 1fr; }
  .role-row { flex-direction: column; align-items: flex-start; }
}
