/* Sofio Electric - JAM Stack Website Styles */

/* CSS Custom Properties for Color Theme */
:root {
  --background: #eff0f3;
  --headline: #0d0d0d;
  --paragraph: #2a2a2a;
  --button: #fc823d;
  --button-text: #0d0d0d;
  --illustration-stroke: #0d0d0d;
  --main: #eff0f3;
  --highlight: #ff5f1f;
  --secondary: #fffffe;
  --tertiary: #43918e;

  /* Lightning pattern colors and opacities */
  --lightning-color-primary: #fc823d;
  --lightning-opacity-primary: 0.06;
  --lightning-color-secondary: #fc823d;
  --lightning-opacity-secondary: 0.03;
  --lightning-color-tertiary: #d9376e;
  --lightning-opacity-tertiary: 0.02;

  /* Additional lightning color variations */
  --lightning-color-orange: #fc823d;
  --lightning-color-pink: #d9376e;
  --lightning-color-blue: #4285f4;
  --lightning-color-purple: #9c27b0;
  --lightning-color-green: #4caf50;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--paragraph);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--headline);
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.7rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.25rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.8rem;
  line-height: 1.4;
}

p {
  color: var(--paragraph);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
a {
  color: var(--highlight);
}

a.outside-link {
  cursor: alias;
}
/* Header and Navigation */
#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header {
  background-color: var(--secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  place-content: center;
  padding-top: 0.5rem;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--headline);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--headline);
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--highlight);
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--headline);
  cursor: pointer;
}

.hero-image {
  margin-bottom: 2rem;
  width: 400px;
  height: auto;
  max-height: 300px;
}

/* Lightning Bolt SVG Background Patterns */
.lightning-pattern {
  -webkit-mask: url("../images/strike.svg");
  mask: url("../images/strike.svg");
  -webkit-mask-size: 120px 120px;
  mask-size: 120px 120px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background-color: var(--lightning-color-primary);
  opacity: var(--lightning-opacity-primary);
}

.lightning-pattern-subtle {
  -webkit-mask: url("../images/strike.svg");
  mask: url("../images/strike.svg");
  -webkit-mask-size: 160px 160px;
  mask-size: 160px 160px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background-color: var(--lightning-color-secondary);
  opacity: var(--lightning-opacity-secondary);
}

.lightning-pattern-large {
  -webkit-mask: url("../images/strike.svg");
  mask: url("../images/strike.svg");
  -webkit-mask-size: 240px 240px;
  mask-size: 240px 240px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background-color: var(--lightning-color-tertiary);
  opacity: var(--lightning-opacity-tertiary);
}

/* Lightning Pattern Color Variations */
.lightning-orange::before,
.lightning-orange::after {
  background-color: var(--lightning-color-orange) !important;
}

.lightning-pink::before,
.lightning-pink::after {
  background-color: var(--lightning-color-pink) !important;
}

.lightning-blue::before,
.lightning-blue::after {
  background-color: var(--lightning-color-blue) !important;
}

.lightning-purple::before,
.lightning-purple::after {
  background-color: var(--lightning-color-purple) !important;
}

.lightning-green::before,
.lightning-green::after {
  background-color: var(--lightning-color-green) !important;
}

/* Lightning Pattern Opacity Variations */
.lightning-opacity-low::before,
.lightning-opacity-low::after {
  opacity: 0.02 !important;
}

.lightning-opacity-medium::before,
.lightning-opacity-medium::after {
  opacity: 0.05 !important;
}

.lightning-opacity-high::before,
.lightning-opacity-high::after {
  opacity: 0.08 !important;
}

.light-bulb {
  width: 50px;
  height: 70px;
  background-color: #fff;
  border-radius: 50% 50% 10px 10px;
  position: relative;
  margin: 50px auto;
}

.light-glow {
  width: 200px;
  height: 200px;
  background-color: rgba(255, 255, 200, 0.85); /* Initial color of the light */
  border-radius: 50%;
  position: absolute;
  top: 60px; /* Position below the bulb */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0; /* Initially off */
  box-shadow: 0 0 50px 20px rgba(255, 255, 200, 0); /* Initial shadow, no glow */
}
.light-bulb:hover .light-glow {
  animation: turnOnLight 1s ease-in-out forwards; /* Apply the animation */
}

@keyframes turnOnLight {
  0% {
    opacity: 0;
    box-shadow: 0 0 50px 20px rgba(255, 255, 200, 0);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 50px 20px rgba(255, 255, 200, 0.5);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 80px 40px rgba(255, 255, 200, 0.8); /* Stronger glow */
  }
}
.subtitle {
  font-size: 1.2rem;
  color: var(--paragraph);
  margin-bottom: 2rem;
  font-weight: 300;
  max-width: 80ch;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--background) 0%,
    var(--secondary) 100%
  );
  padding: 4rem 0;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-mask: url("../images/strike.svg");
  mask: url("../images/strike.svg");
  -webkit-mask-size: 200px 200px;
  mask-size: 200px 200px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background-color: var(--lightning-color-primary);
  opacity: var(--lightning-opacity-primary);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
}
.hero-content {
  padding: 2rem;
  align-self: center;
  white-space: pre-line;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--headline);
}
.hero-title {
  margin-bottom: 0;
}
.hero-subtitle {
  font-size: 1.5rem;
  color: var(--paragraph);
  font-style: italic;
  font-weight: 300;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--button);
  color: var(--button-text);
  border: 2px solid var(--headline);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(255, 142, 60, 0.3);
  border-color: var(--highlight);
}

.btn-secondary {
  background-color: transparent;
  color: var(--headline);
  border: 2px solid var(--headline);
}

.btn-secondary:hover {
  background-color: var(--headline);
  color: var(--secondary);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(255, 142, 60, 0.3);
}

.btn-tertiary {
  background-color: var(--tertiary);
  color: var(--secondary);
}

.btn-tertiary:hover {
  background-color: #c42d5a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(217, 55, 110, 0.3);
}

/* Services Section */
.services,
.reviews {
  position: relative;
  padding: 5rem 0;
  background-color: var(--secondary);
  background-image: url("../images/sofio-construction-truck-decal-strike.svg");
  background-repeat: no-repeat;
  background-position-y: top;
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background-color: var(--background);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.27);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  color: var(--headline);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--paragraph);
  margin-bottom: 1.5rem;
}

/* About Section */
.about {
  padding: 5rem 0;
  background-color: var(--background);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content h2 {
  margin-bottom: 2rem;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-image {
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Reviews Section */
.light {
  padding: 5rem 0;
  background-color: var(--secondary);
}

.reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.review-card {
  background-color: var(--background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--secondary);
}

.review-stars {
  color: var(--highlight);
  font-size: 2rem;
}

.review-text {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--paragraph);
}

.review-author {
  font-weight: 600;
  color: var(--headline);
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background-color: var(--background);
  position: relative;
}

.contact::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-mask: url("../images/strike.svg");
  mask: url("../images/strike.svg");
  -webkit-mask-size: 240px 240px;
  mask-size: 240px 240px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background-color: var(--lightning-color-tertiary);
  opacity: var(--lightning-opacity-tertiary);
  pointer-events: none;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-item {
  background-color: var(--secondary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
  color: var(--headline);
  margin-bottom: 1rem;
}

.contact-item p {
  color: var(--paragraph);
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--paragraph);
  text-decoration: none;
  font-weight: 600;
}

.contact-item a:hover {
  text-decoration: underline;
  color: var(--highlight);
}

/* Footer */
.footer {
  background-color: var(--headline);
  color: var(--secondary);
  padding: 3rem 0 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--main);
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: var(--secondary);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: var(--highlight);
}

.footer-bottom > p {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  color: #666;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-3 {
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 996px) {
  .hero {
    padding: 1rem 0;
  }
  .hero-container {
    gap: 0;
    flex-direction: column;
  }
  .hero-content {
    padding: 0.5rem;
  }
  .hero-image {
    margin-bottom: 0;
  }
  .services,
  .reviews {
    background-repeat: repeat;
  }
}
@media (max-width: 878px) {
  .footer-content {
    grid-template-rows: auto auto;
    grid-template-columns: 1fr 1fr;
  }

  .footer-content > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }
  h2 {
    font-size: 1.82rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-title,
  h3 {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-image {
    width: 290px;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .services-grid,
  .reviews-grid,
  .contact-info,
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 142, 60, 0.3);
  border-radius: 50%;
  border-top-color: var(--highlight);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bot Protection for Contact Info */
.contact-protected {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 8px;
  margin: 4px 0;
  display: inline-block;
}

.footer-section .contact-protected a {
  margin-bottom: 0;
}
.contact-protected:hover {
  background-color: rgba(255, 142, 60, 0.1);
}

.contact-protected span {
  display: none;
}

.contact-protected.revealed {
  border: 2px solid var(--highlight);
}

.contact-protected.revealed span {
  display: inline;
}

.contact-protected a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-protected a:hover {
  color: var(--headline);
  text-decoration: underline;
}
.footer-section .contact-protected a:hover {
  color: var(--background);
}

.contact-protected::after {
  content: "👆 Click to reveal";
  color: var(--paragraph);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.footer .contact-protected::after {
  color: var(--background);
}
.contact-protected.revealed::after {
  display: none;
}

.contact-protected:hover::after {
  opacity: 1;
}
