/* ============================================================
   RG HANDYMAN ELECTRONICS LLC — Site #18
   Steel Blue + Orange | Isometric Diamond Grid
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ----- Section Shared ----- */
.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
  padding: 0 1rem;
}

.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.6;
}

/* ----- Header / Nav ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
  color: #2563eb;
  line-height: 1;
}

.logo-text strong {
  color: #2563eb;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ea580c;
  transition: width 0.25s ease;
}

.main-nav a:hover {
  color: #2563eb;
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO — Isometric Diamond Grid
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #fff;
  background-image:
    linear-gradient(30deg, rgba(37, 99, 235, 0.04) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.04) 87.5%, rgba(37, 99, 235, 0.04)),
    linear-gradient(150deg, rgba(37, 99, 235, 0.04) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.04) 87.5%, rgba(37, 99, 235, 0.04)),
    linear-gradient(30deg, rgba(37, 99, 235, 0.04) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.04) 87.5%, rgba(37, 99, 235, 0.04)),
    linear-gradient(150deg, rgba(37, 99, 235, 0.04) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.04) 87.5%, rgba(37, 99, 235, 0.04));
  background-size: 60px 104px;
  background-position: 0 0, 0 0, 30px 52px, 30px 52px;
  overflow: hidden;
}

/* Floating decorative diamond */
.hero-diamond-deco {
  position: absolute;
  right: 8%;
  top: 22%;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(234, 88, 12, 0.08));
  transform: rotate(45deg);
  border-radius: 8px;
  animation: floatDiamond 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatDiamond {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-18px); }
}

/* Second smaller diamond */
.hero-diamond-deco::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(37, 99, 235, 0.15);
  border-radius: 6px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 2rem;
}

.hero-heading {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  color: #2563eb;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-underline {
  display: block;
  width: 100px;
  height: 4px;
  background: #ea580c;
  margin: 1.25rem auto 0;
  border-radius: 2px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: #334155;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  background: transparent;
  color: #ea580c;
  border-color: #ea580c;
}

.btn-outline:hover {
  background: #ea580c;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(234, 88, 12, 0.25);
}

/* ============================================================
   SERVICES — Image Discovery Cards
   ============================================================ */
.services {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.services-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #93c5fd transparent;
}

.services-track::-webkit-scrollbar {
  height: 6px;
}

.services-track::-webkit-scrollbar-track {
  background: transparent;
}

.services-track::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 3px;
}

.service-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
}

.service-card-image {
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease, background 0.5s ease;
  overflow: hidden;
}

.service-card:hover .service-card-image {
  transform: scale(1.04) rotate(0.5deg);
}

.service-card-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  position: relative;
  z-index: 1;
}

.service-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.service-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.service-card-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
  flex: 1;
}

.service-card-arrow {
  align-self: flex-end;
  font-size: 1.3rem;
  color: #ea580c;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.service-card:hover .service-card-arrow {
  transform: translateX(6px);
}

/* ============================================================
   ABOUT — Company Story + Location
   ============================================================ */
.about {
  padding: 6rem 1.5rem;
  background: #fff;
}

.about-card {
  max-width: 760px;
  margin: 0 auto;
  background: #f8fafc;
  border-left: 5px solid #93c5fd;
  border-radius: 0 12px 12px 0;
  padding: 2.5rem;
}

.about-card-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: -0.01em;
}

.about-story {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-story p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.75;
}

.about-location {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
}

.about-pin {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.about-address-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.about-address-block strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.about-address-block span {
  font-size: 0.9rem;
  color: #64748b;
}

.about-footer {
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.about-est {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ea580c;
  letter-spacing: 0.04em;
}

/* ============================================================
   INDUSTRIES — Stagger Scroll Grid
   ============================================================ */
.industries {
  padding: 6rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.industry-card {
  padding: 2rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  transition: border-color 0.3s ease;
}

.industry-card:hover {
  border-color: #93c5fd;
}

.industry-icon {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 0.85rem;
}

.industry-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.industry-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
}

/* ============================================================
   APPROACH — Pyramid Diagram
   ============================================================ */
.approach {
  padding: 6rem 1.5rem;
  background: #fff;
}

.pyramid {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pyramid-level {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.pyramid-level:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
}

.pyramid-inner {
  position: relative;
  z-index: 1;
}

.pyramid-inner span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Pyramid widths — widest at bottom, narrowest at top */
.pyramid-level-1 { width: 100%; }

.pyramid-level-2 { width: 82%; }

.pyramid-level-3 { width: 64%; }

.pyramid-level-4 { width: 46%; }

.pyramid-level-5 { width: 28%; }

/* Clip-path trapezoid shapes */
.pyramid-level-1 {
  background: #2563eb;
  clip-path: polygon(4% 0%, 96% 0%, 100% 100%, 0% 100%);
}

.pyramid-level-2 {
  background: #3b82f6;
  clip-path: polygon(4% 0%, 96% 0%, 100% 100%, 0% 100%);
}

.pyramid-level-3 {
  background: #60a5fa;
  clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
}

.pyramid-level-4 {
  background: #93c5fd;
  clip-path: polygon(6% 0%, 94% 0%, 100% 100%, 0% 100%);
}

.pyramid-level-5 {
  background: #ea580c;
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
}

/* ============================================================
   CONTACT — Location Detail Card
   ============================================================ */
.contact {
  padding: 6rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: #fff;
  border: 1.5px solid #93c5fd;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(37, 99, 235, 0.06);
}

.contact-card-top {
  padding: 2.5rem;
}

.contact-office-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 70px;
}

.contact-value {
  font-size: 0.95rem;
  color: #334155;
}

.contact-link {
  color: #2563eb;
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #ea580c;
}

.contact-card-bottom {
  border-top: 1px solid #e2e8f0;
  padding: 0;
  position: relative;
}

.contact-map-placeholder {
  position: relative;
  height: 220px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* CSS grid pattern simulating map streets */
.contact-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(234, 88, 12, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 88, 12, 0.04) 1px, transparent 1px),
    linear-gradient(45deg, rgba(147, 197, 253, 0.06) 1px, transparent 1px);
  background-size:
    60px 60px,
    60px 60px,
    120px 120px,
    120px 120px,
    80px 80px;
  background-position:
    0 0,
    0 0,
    15px 15px,
    15px 15px,
    0 0;
}

.contact-map-pin {
  position: relative;
  z-index: 2;
  animation: pinBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.contact-map-label {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 2;
}

/* ============================================================
   CTA — Capability Stats Showcase
   ============================================================ */
.cta-stats {
  padding: 6rem 1.5rem;
  background: #fff;
}

.stats-row {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-brand .logo-icon {
  font-size: 1.25rem;
  color: #93c5fd;
  margin-bottom: 0.25rem;
}

.footer-company {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #93c5fd;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ============================================================
   SCROLL ANIMATIONS — Stagger Fade
   ============================================================ */
.fade-stagger {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   PRIVACY / TERMS Pages
   ============================================================ */
.legal-page {
  padding: 7rem 1.5rem 4rem;
  max-width: 760px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.legal-page .legal-meta {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-page h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page li {
  font-size: 1rem;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.legal-page a {
  color: #2563eb;
  font-weight: 500;
}

.legal-page a:hover {
  color: #ea580c;
}

.legal-page address {
  font-style: normal;
  color: #334155;
  line-height: 1.7;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.legal-back:hover {
  color: #ea580c;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 5rem 2rem 2rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }

  .main-nav a {
    font-size: 1.1rem;
  }

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

  .hero-diamond-deco {
    width: 50px;
    height: 50px;
    right: 5%;
    top: 15%;
  }

  .hero-diamond-deco::after {
    width: 32px;
    height: 32px;
    top: 9px;
    left: 9px;
  }

  .services {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .services-track {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .about-card {
    padding: 1.75rem;
  }

  .contact-card-top {
    padding: 1.75rem;
  }

  .contact-line {
    flex-direction: column;
    gap: 0.2rem;
  }

  .contact-label {
    min-width: auto;
  }

  .stats-row {
    justify-content: center;
  }

  .stat-item {
    flex: 0 0 calc(50% - 1rem);
    min-width: 140px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

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

  .pyramid {
    max-width: 100%;
  }

  .pyramid-level {
    height: 46px;
  }

  .pyramid-inner span {
    font-size: 0.8rem;
  }

  .stats-row {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .stat-item {
    flex: 1;
  }

  .service-card {
    flex: 0 0 240px;
  }

  .about-card {
    border-left-width: 4px;
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
  }

  .contact-card {
    border-radius: 12px;
  }

  .contact-card-top {
    padding: 1.25rem;
  }

  .contact-map-placeholder {
    height: 170px;
  }
}
