/* ========================================
   Ethan's Central Electric — Stylesheet
   Palette: Terracotta + Sand
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --terracotta: #C0704A;
  --terracotta-dark: #A85A38;
  --terracotta-light: #D4916F;
  --sand: #F5EDE3;
  --sand-light: #FAF6F1;
  --sand-dark: #E8DDD0;
  --charcoal: #2C2C2C;
  --charcoal-light: #4A4A4A;
  --warm-gray: #6B6560;
  --off-white: #FDFBF8;
  --white: #FFFFFF;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--charcoal);
  background: var(--off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

em {
  font-style: italic;
  color: var(--terracotta);
}

/* --- Section Headers --- */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--warm-gray);
  max-width: 520px;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.btn-secondary:hover {
  background: var(--charcoal);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--terracotta);
  border-color: var(--white);
}

.btn-large {
  padding: 18px 36px;
  font-size: 0.95rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 251, 248, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand-dark);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--charcoal);
  font-weight: 400;
}

.nav-logo-icon {
  width: 22px;
  height: 22px;
  color: var(--terracotta);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-menu a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--charcoal-light);
  transition: color var(--transition);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--terracotta);
  transition: width var(--transition);
}

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

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  font-weight: 500 !important;
  color: var(--terracotta) !important;
  border: 1.5px solid var(--terracotta);
  padding: 8px 20px;
  border-radius: 4px;
  transition: var(--transition);
}

.nav-cta::after { display: none; }

.nav-cta:hover {
  background: var(--terracotta);
  color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 44, 0.4);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-overlay.active {
  opacity: 1;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background: var(--off-white);
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 20px;
}

.hero-headline {
  margin-bottom: 24px;
  line-height: 1.15;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--warm-gray);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-trust span {
  font-size: 0.8rem;
  color: var(--warm-gray);
  font-weight: 400;
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sand-dark);
  flex-shrink: 0;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  border-radius: 4px;
}

.hero-image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  border: 1px solid var(--sand-dark);
  border-radius: 4px;
  z-index: -1;
}

/* --- Services --- */
.services {
  padding: 120px 0;
  background: var(--sand-light);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-desc {
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: 4px;
  border: 1px solid var(--sand-dark);
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--terracotta-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(192, 112, 74, 0.08);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--terracotta);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
}

.service-card p {
  font-size: 0.925rem;
  color: var(--warm-gray);
  line-height: 1.7;
}

/* --- About --- */
.about {
  padding: 120px 0;
  background: var(--off-white);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: 4px;
}

.about-content .section-eyebrow {
  margin-bottom: 12px;
}

.about-content .section-title {
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1rem;
  color: var(--warm-gray);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin: 36px 0;
  padding: 32px 0;
  border-top: 1px solid var(--sand-dark);
  border-bottom: 1px solid var(--sand-dark);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--terracotta);
  font-weight: 400;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--warm-gray);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- Gallery --- */
.gallery {
  padding: 120px 0;
  background: var(--sand-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(44, 44, 44, 0.7));
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* --- Testimonials --- */
.testimonials {
  padding: 120px 0;
  background: var(--off-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--sand-light);
  padding: 40px 32px;
  border-radius: 4px;
  border: 1px solid var(--sand-dark);
  position: relative;
}

.testimonial-quote {
  width: 32px;
  height: 24px;
  color: var(--terracotta-light);
  margin-bottom: 20px;
  opacity: 0.6;
}

.testimonial-text {
  font-size: 0.975rem;
  color: var(--charcoal-light);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  font-size: 0.8rem;
  color: var(--warm-gray);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* --- CTA --- */
.cta {
  padding: 120px 0;
  background: var(--charcoal);
}

.cta-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.cta-eyebrow {
  color: var(--terracotta-light);
  margin-bottom: 16px;
}

.cta-title {
  color: var(--white);
  margin-bottom: 20px;
}

.cta-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 40px;
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Contact --- */
.contact {
  padding: 120px 0;
  background: var(--sand-light);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info .section-eyebrow {
  margin-bottom: 12px;
}

.contact-info .section-title {
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1rem;
  color: var(--warm-gray);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--terracotta);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.6;
}

.contact-link {
  color: var(--terracotta);
  transition: color var(--transition);
}

.contact-link:hover {
  color: var(--terracotta-dark);
}

/* --- Form --- */
.contact-form-wrap {
  background: var(--white);
  padding: 48px;
  border-radius: 4px;
  border: 1px solid var(--sand-dark);
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 32px;
  color: var(--charcoal);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--charcoal);
  background: var(--sand-light);
  border: 1px solid var(--sand-dark);
  border-radius: 4px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--sand-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 20px;
  background: #f0faf0;
  border: 1px solid #c3e6c3;
  border-radius: 4px;
  color: #1a7a1a;
  font-size: 0.9rem;
}

.form-success svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Map --- */
.map-section {
  background: var(--sand-dark);
}

.map-container {
  filter: saturate(0.6) contrast(1.1);
}

/* --- Footer --- */
.footer {
  padding: 80px 0 0;
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 60px;
  padding-bottom: 60px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-logo-icon {
  width: 20px;
  height: 20px;
  color: var(--terracotta-light);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--terracotta-light);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  color: var(--terracotta-light);
  flex-shrink: 0;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.footer-contact a:hover {
  color: var(--terracotta-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* --- Reveal animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 40px;
  }

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

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

  .testimonials-grid .testimonial-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--off-white);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--sand-dark);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 998;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    gap: 40px;
  }

  .hero-image img {
    height: 400px;
  }

  .hero-image-accent {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .services {
    padding: 80px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about {
    padding: 80px 0;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    height: 360px;
  }

  .about-stats {
    gap: 24px;
  }

  .gallery {
    padding: 80px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 280px;
  }

  .testimonials {
    padding: 80px 0;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid .testimonial-card:last-child {
    grid-column: span 1;
  }

  .cta {
    padding: 80px 0;
  }

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

  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .contact {
    padding: 80px 0;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-form-wrap {
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 60px 0 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

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

  .section-title {
    font-size: 1.6rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }
}
