/* ============================================================
   MSmart Electrical Ltd — Stylesheet
   Mobile-first · Carbon/Steel/Red theme
   ============================================================ */

/* --- Custom properties --- */
:root {
  --red:      #C82020;
  --red-dark: #A01818;
  --red-glow: rgba(200, 32, 32, 0.25);

  --bg:       #0D0D0D;
  --bg-alt:   #111111;
  --carbon:   #141414;
  --steel:    #1C1C1C;
  --plate:    #242424;
  --border:   rgba(255,255,255,0.07);

  --white:    #F4F4F4;
  --light:    #C0C0C0;
  --mid:      #808080;

  --font-head: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-w: 1140px;
  --gap:   clamp(1rem, 4vw, 2rem);
  --radius: 4px;
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.5rem; }

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.accent { color: var(--red); }

.hidden { display: none !important; }

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* --- Carbon fibre texture --- */
.carbon {
  background-color: var(--carbon);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.025) 0px,
      rgba(255,255,255,0.025) 1px,
      transparent 1px,
      transparent 7px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.025) 0px,
      rgba(255,255,255,0.025) 1px,
      transparent 1px,
      transparent 7px
    );
}

/* --- Section base --- */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section--dark { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  background: var(--red);
}

.section-sub {
  margin-top: 1rem;
  color: var(--mid);
  font-size: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
  background: rgba(10,10,10,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 clamp(1rem, 5vw, 2rem);
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-logo img {
  height: 42px;
  width: auto;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  z-index: 910;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Nav links - mobile */
.nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  background: rgba(10,10,10,0.98);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
  gap: 0;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.nav-links li a {
  display: block;
  padding: 0.75rem clamp(1rem, 5vw, 2rem);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--light);
  transition: color var(--transition);
}

.nav-links li a:hover { color: var(--white); }

.nav-cta {
  color: var(--red) !important;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .nav-links {
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    align-items: center;
  }

  .nav-links li a {
    padding: 0.25rem 0.75rem;
    font-size: 0.95rem;
  }

  .nav-cta {
    margin-left: 0.5rem;
    border: 1px solid var(--red) !important;
    padding: 0.4rem 1rem !important;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition) !important;
  }

  .nav-cta:hover {
    background: var(--red) !important;
    color: #fff !important;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/Screenshot%202026-03-24%20at%2010.39.20.png');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.55) saturate(0.6);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.15) 40%,
    rgba(10,10,10,0.75) 80%,
    rgba(10,10,10,0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  padding-bottom: 4rem;
  max-width: 800px;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--light);
  font-weight: 300;
  max-width: 560px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--light);
}

.badge-icon {
  width: 14px;
  height: 14px;
  color: var(--red);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 11px;
  z-index: 1;
}

.hero-scroll::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease infinite;
}

@keyframes scroll-dot {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  80%  { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: 0 4px 20px var(--red-glow);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.06);
}

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

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2rem);
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: rgba(200,32,32,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(200,32,32,0.15);
  transform: translateY(-3px);
}

.service-card--featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(200,32,32,0.3);
}

.featured-tag {
  position: absolute;
  top: -1px;
  right: 1.25rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 0 0 4px 4px;
}

.svc-icon {
  width: 44px;
  height: 44px;
  color: var(--red);
  margin-bottom: 1rem;
}

.svc-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.svc-desc {
  color: var(--mid);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.svc-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.svc-bullets li {
  padding-left: 1rem;
  position: relative;
  font-size: 0.875rem;
  color: var(--light);
}

.svc-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--plate);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(200, 32, 32, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

/* ============================================================
   ABOUT / TRUST
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 6vw, 4rem);
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.about-text p {
  color: var(--light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about-text p strong { color: var(--white); }

.section-title.left-align::after {
  left: 0;
  transform: none;
}

.trust-strip {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--light);
}

.trust-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--red-glow);
}

.about-community {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.community-card {
  background: var(--steel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.community-label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  font-weight: 600;
}

.community-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.community-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.community-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--white);
}

.community-item span {
  font-size: 0.8rem;
  color: var(--mid);
}

.community-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.5;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.about-logo-alt {
  border-radius: var(--radius);
  width: 100%;
  max-width: 320px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 6vw, 4rem);
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1.4fr; align-items: start; }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon-wrap {
  width: 40px;
  height: 40px;
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
}

.contact-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.contact-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--white);
  transition: color var(--transition);
}

a.contact-value:hover { color: var(--red); }

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--light);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.social-link:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(200,32,32,0.1);
}

/* Contact form */
.contact-form-wrap {
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2rem);
}

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

@media (min-width: 500px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--plate);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23808080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--plate);
  color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--mid);
  opacity: 0.7;
}

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

.form-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--mid);
  margin-top: 0.75rem;
}
.form-note a { color: var(--light); border-bottom: 1px solid rgba(255,255,255,0.2); }
.form-note a:hover { color: var(--red); border-color: var(--red); }

.form-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  min-height: 1.4em;
}
.form-status--ok  { color: #4ade80; }
.form-status--err { color: #f87171; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  height: 36px;
  width: auto;
  opacity: 0.85;
}

.footer-tagline {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (min-width: 768px) {
  .about-text .section-title::after {
    left: 0;
    transform: none;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .fade-in { opacity: 1; transform: none; }
  .hero-scroll { display: none; }
}
