:root {
  --primary: #0b0f19;
  --secondary: #161b26;
  --accent: #f59e0b;
  --accent-glow: #b45309;
  --fire-crimson: #7f1d1d;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(22, 27, 38, 0.92), rgba(11, 15, 25, 0.98) 28rem),
    radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.16), transparent 28rem),
    var(--primary);
  color: var(--text-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 4%;
  border-bottom: 3px solid var(--accent);
  background: rgba(11, 15, 25, 0.98);
  box-shadow: 0 4px 22px rgba(0,0,0,0.72), 0 2px 10px rgba(180, 83, 9, 0.2);
}

header h1 {
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

header span {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.08);
  color: #fff7ed;
  cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(245, 158, 11, 0.16);
  outline: none;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: none;
  text-shadow: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span {
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -0.42rem;
}

.menu-toggle span::after {
  top: 0.42rem;
}

header.nav-open .menu-toggle span {
  transform: rotate(45deg);
}

header.nav-open .menu-toggle span::before {
  transform: translateY(0.42rem) rotate(90deg);
}

header.nav-open .menu-toggle span::after {
  opacity: 0;
}

.main-nav,
.contact-actions {
  display: flex;
  align-items: center;
}

.main-nav {
  justify-content: center;
  flex: 1 1 auto;
  gap: 0.4rem;
}

.contact-actions {
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-link,
.portfolio-dropdown summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  border-radius: 4px;
  color: #f8fafc;
  padding: 0.52rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link.nav-estimate {
  background: linear-gradient(135deg, #fb923c, #f59e0b 48%, #dc2626);
  color: #111827;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3);
}

.nav-link.nav-estimate:hover,
.nav-link.nav-estimate:focus-visible {
  background: linear-gradient(135deg, #fed7aa, #f59e0b 48%, #ef4444);
  color: #111827;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.48);
}

.nav-link:hover,
.nav-link:focus-visible,
.portfolio-dropdown summary:hover,
.portfolio-dropdown summary:focus-visible {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent);
  outline: none;
}

.portfolio-dropdown {
  position: relative;
}

.portfolio-dropdown summary {
  list-style: none;
  gap: 0.4rem;
}

.portfolio-dropdown summary::-webkit-details-marker {
  display: none;
}

.portfolio-dropdown summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.portfolio-dropdown[open] summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.portfolio-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  min-width: 17rem;
  padding: 0.55rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 6px;
  background: rgba(11, 15, 25, 0.98);
  box-shadow: 0 18px 42px rgba(0,0,0,0.55);
  transform: translateX(-50%);
}

.portfolio-menu a {
  display: block;
  border-radius: 4px;
  color: #e5e7eb;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 850;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.portfolio-menu a:hover,
.portfolio-menu a:focus-visible {
  background: rgba(245, 158, 11, 0.12);
  color: #fff;
  outline: none;
}

/* Container must have relative positioning so sparks align right to it */
.spark-target {
    position: relative;
    overflow: visible; /* Allows sparks to shoot past the button edges */
}

/* Individual spark styling */
.metal-spark {
    position: absolute;
    width: 3px;
    height: 12px;
    background: linear-gradient(to top, #ff4500, #ffa500, #ffffff);
    border-radius: 50%;
    pointer-events: none; /* Prevents interference with clicks */
    opacity: 1;
    transform-origin: center bottom;
    animation: fly-away 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Spark burst animation */
@keyframes fly-away {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
    }
    100% {
        /* X and Y travel are handled dynamically by JS, this handles the fade/shrink */
        transform: translate3d(var(--x), var(--y), 0) rotate(var(--rot)) scale(0.2);
        opacity: 0;
    }
}

.call-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border-radius: 4px;
  color: white;
  padding: 0.52rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.call-btn {
  background: linear-gradient(135deg, #ef4444, var(--accent));
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.text-btn {
  border: 1px solid rgba(245, 158, 11, 0.56);
  background: rgba(245, 158, 11, 0.08);
}

.call-btn:hover,
.text-btn:hover,
.call-btn:focus-visible,
.text-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.45);
  outline: none;
}

main {
  padding: clamp(3rem, 8vw, 6rem) 5% 5rem;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.42fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 3rem;
}

.portfolio-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.75;
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

.album-photo {
  position: relative;
  display: block;
  min-height: 170px;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: var(--secondary);
  box-shadow: 0 10px 26px rgba(0,0,0,0.38);
  cursor: pointer;
}

.album-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.album-photo:hover img,
.album-photo:focus-visible img {
  transform: scale(1.06);
  filter: contrast(1.05) saturate(1.08);
}

.album-photo:focus-visible,
.lightbox-control:focus-visible,
.lightbox-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.empty-album {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px dashed rgba(245, 158, 11, 0.42);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
}

.empty-album h3 {
  margin: 0 0 0.6rem;
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2rem);
  text-transform: uppercase;
}

.empty-album p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-muted);
}

.lightbox {
  width: min(92vw, 980px);
  padding: 0;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: #10151f;
  color: #fff;
  box-shadow: 0 25px 70px rgba(0,0,0,0.8);
}

.lightbox::backdrop {
  background: rgba(5, 7, 12, 0.86);
}

.lightbox-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(78vh, 760px);
  padding: 3.5rem 4.25rem 1.25rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

.lightbox-close,
.lightbox-control {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(11, 15, 25, 0.88);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 4px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-control {
  top: 50%;
  width: 2.75rem;
  height: 3.5rem;
  border-radius: 4px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-control:hover,
.lightbox-close:hover {
  background: var(--accent-glow);
}

footer {
  padding: 2.5rem 5%;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
  background: #070b12;
  color: var(--text-muted);
  text-align: center;
}

footer p {
  margin: 0.35rem auto;
  max-width: 980px;
}

footer span,
footer a {
  color: var(--accent);
  font-weight: 900;
}

footer a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 1100px) {
  header {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 768px) {
  header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem 0.75rem;
    align-items: center;
    padding: 0.55rem 4%;
    text-align: left;
  }

  header h1 {
    font-size: clamp(1.18rem, 6vw, 1.55rem);
    line-height: 1.05;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    order: initial;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding-top: 0.35rem;
  }

  header.nav-open .main-nav {
    display: flex;
  }

  .nav-link {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.68rem 0.85rem;
    font-size: 0.84rem;
  }

  .portfolio-dropdown {
    position: static;
    width: 100%;
  }

  .portfolio-dropdown summary {
    width: 100%;
    min-height: 2.65rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(255,255,255,0.035);
    padding: 0.68rem 0.85rem;
    font-size: 0.84rem;
  }

  .portfolio-menu {
    position: static;
    width: 100%;
    margin-top: 0.45rem;
    transform: none;
  }

  .portfolio-menu a {
    padding: 0.68rem 0.85rem;
    font-size: 0.82rem;
  }

  .contact-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    justify-content: stretch;
    width: 100%;
  }

  .trust-banner {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
  }

  .call-btn,
  .text-btn {
    width: 100%;
    min-height: 2.25rem;
    padding: 0.48rem 0.55rem;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .portfolio-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-frame {
    min-height: 66vh;
    padding: 3.5rem 1rem 1rem;
  }

  .lightbox-control {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

/* Ultimate Mobile Header Shrink */
@media (max-width: 768px) {
    /* 1. Force the main sticky header container to be thin */
    header, 
    .site-header, 
    nav[style*="position: fixed"], 
    div[style*="position: fixed"] {
        padding: 6px 12px !important;
        height: auto !important;
    }

    /* 2. Scale down the brand name so it stays on one neat line */
    .brand-name, 
    header h1, 
    .site-header h1,
    div[style*="font-size"] h1 {
        font-size: 1.25rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. Make the First Responder text very small and tight */
    header p, 
    .header-subtitle, 
    header div span {
        font-size: 0.7rem !important;
        margin: 2px 0 !important;
        display: block !important;
    }

    /* 4. Shrink the massive Call/Text action buttons */
    header button, 
    header a, 
    .call-now-btn, 
    .text-now-btn,
    header div[style*="background-color"] {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        min-height: auto !important;
        line-height: 1.2 !important;
    }

    /* Force the buttons to stay small if they are stacked */
    header .button-group, 
    header div div {
        margin-top: 4px !important;
        gap: 6px !important;
    }
    }

    /* Force the header to scroll out of the way on all mobile devices */
    @media (max-width: 768px) {
    body > div:first-of-type,
    header,
    nav,
    .navbar,
    div[style*="position: fixed"],
    div[style*="position: sticky"] {
        position: absolute !important;
        top: 0 !important;
    }

    /* Resets the main body content wrapper so there isn't a massive dead gap at the top */
    body, 
    main, 
    #wrapper,
    .content-wrapper {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    }

