/* ============================================================
   Megavolt Repair Services — shared styles
   Design direction: dark technical workshop, electric-amber accent
   ============================================================ */

:root {
  --bg:        #0d0f12;   /* near-black bench */
  --bg-soft:   #14171c;   /* raised panels */
  --bg-card:   #181c22;
  --line:      #262b33;   /* hairline dividers */
  --text:      #e8eaed;   /* primary text */
  --text-dim:  #9aa0a8;   /* secondary text */
  --amber:     #f5a623;   /* live current accent */
  --amber-soft:#ffcb6b;
  --white:     #ffffff;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --maxw: 1180px;
  --r: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--amber);
  display: inline-block;
}

.lead { color: var(--text-dim); font-size: 1.1rem; max-width: 60ch; }

/* ---------- current line signature ---------- */
.current-line {
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.current-line::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: surge 4s linear infinite;
}
@keyframes surge { to { left: 140%; } }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(13,15,18,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.brand img { height: 52px; width: auto; }
.brand span b { color: var(--amber); }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a { font-size: 0.95rem; color: var(--text-dim); transition: color .2s; position: relative; overflow: hidden; border-radius: 6px; }
/* blue flash sweep on hover */
.nav-links a::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(93,180,255,0.0) 35%, rgba(93,180,255,0.45) 50%, rgba(93,180,255,0.0) 65%, transparent 100%);
  transform: translateX(-120%); transition: transform .55s ease; pointer-events: none;
}
.nav-links a:hover::before { transform: translateX(120%); }
.nav-links a:hover { color: #bfe2ff; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  border: 1px solid var(--amber);
  color: var(--amber) !important;
  padding: 9px 18px;
  border-radius: 8px;
  transition: all .2s;
}
.nav-cta:hover { background: var(--amber); color: var(--bg) !important; }
.burger { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 22px; padding: 0; position: relative; }
.burger span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }
.burger.is-open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500;
  padding: 14px 26px; border-radius: 10px;
  transition: all .2s; cursor: pointer; border: 0; font-size: 1rem;
}
.btn-primary { background: var(--amber); color: var(--bg); }
.btn-primary:hover { background: var(--amber-soft); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 90px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { margin: 22px 0; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* hero image slot */
.hero-visual {
  position: relative; aspect-ratio: 4/5; border-radius: var(--r);
  overflow: hidden; border: 1px solid var(--line);
  background: var(--bg-soft);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: var(--text-dim); font-family: var(--font-display); font-size: .85rem;
  text-align: center; padding: 20px;
  background:
    repeating-linear-gradient(45deg, #15181d, #15181d 14px, #181c22 14px, #181c22 28px);
}
.img-placeholder svg { width: 40px; height: 40px; opacity: .5; }

/* glow behind hero */
.hero::before {
  content: ''; position: absolute; top: -120px; right: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.14), transparent 70%);
  pointer-events: none;
}

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 48px 0; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 600; color: var(--amber); }
.stat .lbl { color: var(--text-dim); font-size: 0.92rem; letter-spacing: 0.04em; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 56ch; margin-bottom: 52px; }
.section-head h2 { margin: 16px 0 14px; }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 32px 28px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: var(--amber); transform: translateY(-4px); }
.card .ic {
  width: 46px; height: 46px; border-radius: 11px;
  background: rgba(245,166,35,0.12); color: var(--amber);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.97rem; }

/* ---------- feature list ---------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-list { display: grid; gap: 26px; }
.feature {
  display: grid; grid-template-columns: 32px 1fr; gap: 18px; align-items: start;
}
.feature .dot {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(245,166,35,0.12);
  color: var(--amber); display: flex; align-items: center; justify-content: center;
}
.feature .dot svg { width: 17px; height: 17px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 4px; }
.feature p { color: var(--text-dim); font-size: 0.96rem; }
.feature-visual { aspect-ratio: 1/1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--bg-soft); }
.feature-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r);
  padding: 56px; text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- map ---------- */
.map-wrap { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); position: relative; }
#map { width: 100%; height: 440px; background: var(--bg-soft); z-index: 1; }
/* jagged electric beam chasing its tail around the map frame */
.map-beam {
  position: absolute; inset: 0; z-index: 400;
  pointer-events: none;
}

/* custom amber location pin */
.mv-pin { position: relative; }
.mv-pin-dot {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  background: var(--amber); border: 2px solid #fff3; border-radius: 50%;
  transform: translate(-50%,-50%); box-shadow: 0 0 10px rgba(245,166,35,0.9); z-index: 2;
}
.mv-pin-pulse {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  background: rgba(245,166,35,0.5); border-radius: 50%;
  transform: translate(-50%,-50%); animation: pinpulse 2s ease-out infinite;
}
@keyframes pinpulse {
  0%   { width: 14px; height: 14px; opacity: 0.7; }
  100% { width: 46px; height: 46px; opacity: 0; }
}

/* theme Leaflet popup + controls to match the dark site */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { font-family: var(--font-body); font-size: .92rem; line-height: 1.5; }
.leaflet-popup-content strong { font-family: var(--font-display); color: var(--amber); }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-dim); }
.leaflet-bar a {
  background: var(--bg-card); color: var(--text); border-bottom-color: var(--line);
}
.leaflet-bar a:hover { background: var(--bg-soft); }
.leaflet-control-attribution {
  background: rgba(13,15,18,0.45) !important;
  color: rgba(154,160,168,0.55) !important;
  font-size: 8px !important;
  line-height: 1.3 !important;
  padding: 1px 5px !important;
  border-radius: 5px 0 0 0;
}
.leaflet-control-attribution a { color: rgba(154,160,168,0.65) !important; text-decoration: none; }
.leaflet-control-attribution a:hover { color: var(--amber) !important; }

@media (max-width: 900px) { #map { height: 340px; } }
@media (prefers-reduced-motion: reduce) { .mv-pin-pulse { animation: none; } }

/* ---------- contact grid ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.info-row { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { color: var(--amber); flex-shrink: 0; }
.info-row .ic svg { width: 22px; height: 22px; }
.info-row .k { font-family: var(--font-display); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.info-row .v { font-size: 1.05rem; }
.info-row a:hover { color: var(--amber); }

/* ---------- about prose ---------- */
.prose { max-width: 70ch; }
.prose p { color: var(--text-dim); margin-bottom: 20px; }
.prose p strong { color: var(--text); font-weight: 600; }

/* ---------- footer ---------- */
footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1.1fr 1.1fr 1fr; gap: 40px; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.foot-brand img { height: 38px; }
footer p { color: var(--text-dim); font-size: 0.95rem; max-width: 38ch; }
footer h4 { font-family: var(--font-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
footer ul { list-style: none; display: grid; gap: 10px; }
footer ul a { color: var(--text-dim); font-size: .96rem; }
footer ul a:hover { color: var(--amber); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: .88rem; flex-wrap: wrap; gap: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .features, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 16/11; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 36px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: 76px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 0 18px; gap: 0; z-index: 200;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a {
    font-size: 1.08rem; color: var(--text); padding: 16px 28px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active { color: var(--amber); }
  /* the Book a Repair CTA stays distinct inside the menu */
  .nav-links .nav-cta {
    margin: 14px 28px 0; border: 1px solid var(--amber); border-radius: 8px;
    text-align: center; color: var(--amber) !important; padding: 14px 0;
  }
  .nav-links .nav-cta:hover { background: var(--amber); color: var(--bg) !important; }
  .burger { display: block; position: relative; z-index: 201; }
  .cta-band { padding: 40px 26px; }
}

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

/* keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px;
}

/* ============================================================
   Team section
   ============================================================ */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; transition: border-color .25s, transform .25s;
}
.team-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.team-card .photo { aspect-ratio: 6/7; overflow: hidden; background: var(--bg-soft); }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card .body { padding: 22px 24px; }
.team-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.team-card .role { color: var(--amber); font-family: var(--font-display); font-size: .9rem; letter-spacing: .03em; }

.team-techs { margin-top: 40px; }
.team-techs .label { color: var(--text-dim); font-family: var(--font-display); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 22px; }
.tech-row { display: flex; gap: 30px; flex-wrap: wrap; }
.tech { display: flex; align-items: center; gap: 14px; }
.tech img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.tech .t-name { font-family: var(--font-display); font-weight: 500; font-size: .98rem; }
.tech .t-role { color: var(--text-dim); font-size: .85rem; }

/* ============================================================
   Before / After slider
   ============================================================ */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ba {
  position: relative; width: 100%; aspect-ratio: 4/3;
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  user-select: none; touch-action: none; cursor: ew-resize; background: #000;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba .after  { z-index: 1; }
.ba .before { z-index: 2; clip-path: inset(0 50% 0 0); }
.ba .handle {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 3;
  width: 3px; background: var(--amber); transform: translateX(-1.5px);
}
.ba .handle::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber); transform: translate(-50%,-50%);
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.ba .handle::before {
  content: '‹ ›'; position: absolute; top: 50%; left: 50%; z-index: 1;
  transform: translate(-50%,-50%); color: var(--bg); font-size: 20px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 2px;
}
.ba .tag {
  position: absolute; bottom: 14px; z-index: 4; padding: 6px 12px;
  font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; border-radius: 6px; backdrop-filter: blur(4px);
}
.ba .tag-before { left: 14px; background: rgba(13,15,18,.7); color: var(--amber); }
.ba .tag-after  { right: 14px; background: rgba(245,166,35,.9); color: var(--bg); }
.ba-caption { margin-top: 14px; color: var(--text-dim); font-size: .95rem; text-align: center; }

@media (max-width: 900px) {
  .team-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .ba { aspect-ratio: 4/3; }
}

/* ============================================================
   Repair request form
   ============================================================ */
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field label {
  display: block; font-family: var(--font-display); font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 9px;
}
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 13px 15px; color: var(--text);
  font-family: var(--font-body); font-size: 1rem; transition: border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #5a626d; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f5a623' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 42px;
}
.form-note { color: var(--text-dim); font-size: .9rem; text-align: center; margin-top: 18px; }
.form-note a { color: var(--amber); }

.form-success {
  text-align: center; padding: 60px 30px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
}
.form-success .ic {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 22px;
  background: rgba(245,166,35,0.12); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
}
.form-success .ic svg { width: 32px; height: 32px; }
.form-success h2 { margin-bottom: 12px; }
.form-success p { color: var(--text-dim); max-width: 44ch; margin: 0 auto 26px; }
.form-success a.btn { color: var(--amber); }

@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ============================================================
   Ambient background canvas
   ============================================================ */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;       /* never blocks clicks */
  opacity: 0.9;
}
/* keep all real content above the canvas */
section, footer, .wrap { position: relative; z-index: 1; }
/* the hero glow blob should sit above canvas too */
.hero::before { z-index: 0; }

/* ============================================================
   Homepage generated SVG artwork
   ============================================================ */
.hero-art, .feature-art {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.hero-art svg, .feature-art svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ============================================================
   Legal / Terms page
   ============================================================ */
.legal h2 { font-size: 1.25rem; margin: 34px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--text-dim); margin-bottom: 14px; }
.legal a { color: var(--amber); }
.legal-note {
  margin-top: 40px; padding: 20px 22px; border-radius: var(--r);
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text-dim); font-size: .9rem; font-style: italic;
}

/* ============================================================
   Nav click particle burst
   ============================================================ */
.spark-dot {
  position: fixed; z-index: 9999; border-radius: 50%;
  pointer-events: none; transform: translate(0,0) scale(1); opacity: 1;
  box-shadow: 0 0 6px rgba(93,180,255,0.9);
  transition: transform .6s cubic-bezier(.15,.7,.3,1), opacity .6s ease;
}
@media (prefers-reduced-motion: reduce) { .spark-dot { display: none; } }

/* ============================================================
   Contact page — operating hours list
   ============================================================ */
.hours-list {
  display: grid; grid-template-columns: auto auto; gap: 4px 24px;
  justify-content: start; margin-top: 2px;
}
.hours-list span:nth-child(odd) { color: var(--text-dim); }
.hours-list span:nth-child(even) { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
