/* M J Roofing — Premium Dark Navy Design System */
:root {
  --bg: #061224;
  --bg-soft: #071b32;
  --surface: rgba(9, 20, 44, 0.92);
  --surface-strong: rgba(7, 16, 34, 0.96);
  --surface-soft: rgba(14, 33, 65, 0.72);
  --text: #eef4ff;
  --text-muted: #9ab3d6;
  --accent: #f68b1e;
  --accent-soft: rgba(246, 139, 30, 0.18);
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.04);
  --radius: 24px;
  --radius-small: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.22);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(98, 163, 255, 0.09), transparent 24%), radial-gradient(circle at 95% 20%, rgba(246, 139, 30, 0.06), transparent 20%), linear-gradient(180deg, #061224 0%, #03070f 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.06), transparent 18%), radial-gradient(circle at 20% 85%, rgba(70, 122, 214, 0.07), transparent 16%);
}

::selection {
  background: rgba(246, 139, 30, 0.28);
  color: #fff;
}

button, input, textarea, a {
  font: inherit;
}

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

.container {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #02060f;
  z-index: 9999;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.preloader-logo {
  width: 90px;
  height: 90px;
  border-radius: 26px;
  background: radial-gradient(circle at top left, rgba(246, 139, 30, 0.25), rgba(9, 20, 44, 1));
  display: grid;
  place-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.preloader-logo-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 22px;
}
.preloader-bar {
  width: 180px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 32%;
  background: linear-gradient(90deg, rgba(246, 139, 30, 0.95), rgba(255, 213, 145, 0.95));
  transform: translateX(-100%);
  animation: preload 1.4s ease-in-out infinite;
}
@keyframes preload {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(15%); }
  100% { transform: translateX(110%); }
}

/* Navigation */
.nav-wrap {
  position: sticky;
  top: 16px;
  z-index: 50;
  padding: 0 0 0 0;
}
.nav-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(8, 18, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.nav {
  margin-left: auto;
}
.nav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.24s ease, color 0.24s ease;
}
.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
}
.call-now {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f68b1e, #ffb662);
  color: #071021;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 20px 52px rgba(246, 139, 30, 0.18);
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 48px 0;
  overflow: hidden;
  border-radius: 32px;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('../../hero.JPG');
  background-size: cover;
  background-position: center center;
  filter: brightness(0.48) saturate(1.05);
  transform: scale(1.08);
  animation: heroFlow 24s ease-in-out infinite;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 16, 34, 0.85), rgba(7, 16, 34, 0.92));
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 14% 22%, rgba(255, 248, 224, 0.08), transparent 16%), radial-gradient(circle at 82% 24%, rgba(83, 176, 255, 0.08), transparent 14%), radial-gradient(circle at 43% 80%, rgba(255, 255, 255, 0.04), transparent 18%);
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes heroFlow {
  0% { transform: translateY(0) scale(1.08); }
  50% { transform: translateY(-16px) scale(1.1); }
  100% { transform: translateY(0) scale(1.08); }
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.hero-content {
  padding: 34px;
  border-radius: 32px;
  background: rgba(9, 20, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}
.kicker {
  margin: 0 0 18px;
  color: #a4b6e1;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #f7fbff;
  text-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}
.lead {
  margin: 0 0 28px;
  max-width: 700px;
  color: #d7e0ff;
  font-size: 1.05rem;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.feature.glass {
  display: inline-flex;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e3ecff;
  font-weight: 700;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  padding: 14px 24px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}
.btn.primary {
  color: #071021;
  background: linear-gradient(135deg, var(--accent), #ffb864);
  box-shadow: 0 22px 60px rgba(246, 139, 30, 0.24);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 72px rgba(246, 139, 30, 0.32);
}
.btn.transparent {
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn.transparent:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

/* Sections */
.section {
  padding: 72px 0;
  position: relative;
}
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(255, 255, 255, 0.05), transparent 32%);
  pointer-events: none;
}
.section-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f7fbff;
}
.section-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.8;
}

/* Cards */
.cards {
  display: grid;
  gap: 20px;
}
.card {
  background: rgba(9, 20, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 28px;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.28);
  border-color: rgba(246, 139, 30, 0.26);
}
.card h3 {
  margin: 0 0 14px;
  color: #f7fbff;
}
.card p {
  margin: 0;
  color: #c5d1f0;
  line-height: 1.85;
}

/* Emergency panel */
.emergency-card {
  margin-top: 26px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(9, 19, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}
.emergency-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.emergency-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #f7fbff;
}
.emergency-card .muted {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.about-media {
  min-height: 360px;
  background-image: url('https://images.unsplash.com/photo-1495433324511-bf8e92934d90?auto=format&fit=crop&w=1200&q=60');
  background-size: cover;
  background-position: center center;
  border-radius: 28px;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.33);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.about-content {
  background: rgba(9, 20, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 34px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}
.about-content h2,
.about-content p {
  color: #f7fbff;
}
.about-list {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.9;
}
.about-list li {
  margin-bottom: 14px;
}

/* Stats */
.stats-grid {
  display: grid;
  gap: 18px;
}
.stat {
  background: rgba(9, 20, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 28px;
  border-radius: 26px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.num {
  margin: 0;
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #f7fbff;
}
.label {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Before / After */
.ba-grid {
  display: grid;
  gap: 18px;
}
.ba-item {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.3);
}
.ba-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.ba-item:hover img {
  transform: scale(1.05);
}
.ba-item figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(9, 20, 44, 0.88);
  padding: 10px 14px;
  border-radius: 14px;
  color: #f7fbff;
  font-weight: 700;
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
}
.slide {
  min-height: 150px;
  padding: 32px;
  border-radius: 28px;
  background: rgba(9, 20, 44, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide.active {
  opacity: 1;
  transform: none;
}
.slide p {
  margin: 0 0 16px;
  color: #d7e0ff;
  line-height: 1.85;
  font-size: 1rem;
}
.slide cite {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Accordion */
.accordion {
  display: grid;
  gap: 14px;
}
.acc-item {
  background: rgba(9, 20, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.acc-btn {
  width: 100%;
  text-align: left;
  padding: 20px;
  border: 0;
  background: transparent;
  color: #f7fbff;
  font-weight: 700;
  cursor: pointer;
}
.acc-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.acc-panel {
  padding: 0 20px 18px 20px;
  color: var(--text-muted);
  display: none;
  line-height: 1.9;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 24px;
}
.form {
  background: rgba(9, 20, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 34px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
}
.form label {
  color: #f7fbff;
  font-weight: 700;
}
.form input,
.form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eef4ff;
  padding: 16px;
  border-radius: 18px;
  outline: none;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}
.form input::placeholder,
.form textarea::placeholder {
  color: rgba(238, 244, 255, 0.5);
}
.form input:focus,
.form textarea:focus {
  border-color: rgba(246, 139, 30, 0.55);
  box-shadow: 0 0 0 5px rgba(246, 139, 30, 0.12);
}
.contact-info {
  background: rgba(9, 20, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 30px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}
.contact-info h3 {
  margin-top: 0;
  color: #f7fbff;
}
.contact-info p,
.contact-info a {
  color: var(--text-muted);
}
.contact-info a:hover {
  color: #fff;
}
.muted {
  color: var(--text-muted);
}

/* Back to top */
.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, rgba(15, 86, 140, 0.98), rgba(9, 18, 39, 0.98));
  color: #fff;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.back-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

/* Footer */
.site-footer {
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  height: 40px;
  object-fit: contain;
}
.footer-right p {
  color: var(--text-muted);
  margin: 0;
}

/* Floating action button */
.fab-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.fab-help {
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.fab-btn {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(9, 24, 46, 0.96), rgba(5, 12, 31, 0.98));
  box-shadow: 0 20px 56px rgba(4, 16, 39, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 24px 70px rgba(4, 16, 39, 0.4), 0 0 22px rgba(79, 156, 255, 0.18);
}
.fab-btn:active .fab-icon {
  transform: rotate(90deg);
}
.fab-icon {
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.fab-dot {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #3fb4ff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(63, 180, 255, 0.28);
}
.fab-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 rgba(79, 156, 255, 0.12);
  animation: fabPulse 3.8s infinite;
}
@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 156, 255, 0.18); }
  70% { box-shadow: 0 0 0 24px rgba(79, 156, 255, 0.02); }
  100% { box-shadow: 0 0 0 0 rgba(79, 156, 255, 0); }
}
.fab-panel {
  position: fixed;
  right: 20px;
  bottom: 96px;
  min-width: 280px;
  max-width: 92vw;
  border-radius: 28px;
  padding: 18px;
  background: rgba(7, 16, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  transform: translateY(22px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.34s ease;
}
.fab-panel.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.fab-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(12, 28, 55, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}
.fab-item.show {
  transform: none;
  opacity: 1;
}
.fab-item:hover {
  background: rgba(21, 36, 72, 0.95);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}
.fab-item-icon {
  font-size: 20px;
  line-height: 1;
}
.fab-item-title {
  font-weight: 800;
  color: #f7fbff;
}
.fab-item-sub {
  font-size: 0.94rem;
  color: #9fb4da;
}
.fab-call {
  background: linear-gradient(135deg, #ff6a6a, #ff9564);
  color: #fff;
}
.fab-call:hover {
  box-shadow: 0 20px 48px rgba(255, 106, 106, 0.28);
}
.fab-item .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.18);
  animation: rippleFab 0.6s linear;
  pointer-events: none;
}
@keyframes rippleFab {
  to { transform: scale(4); opacity: 0; }
}

/* Reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1.15fr 0.85fr; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 420px; }
}

@media (max-width: 940px) {
  .nav ul { gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 86px; right: 20px; left: 20px; background: rgba(8, 18, 38, 0.98); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px; padding: 18px; transform: translateY(-20px); opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; box-shadow: var(--shadow-soft); }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav ul { flex-direction: column; gap: 12px; }
  .call-now { display: none; }
}

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .ba-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .nav-container { padding: 14px 16px; }
  .hero { border-radius: 24px; }
  .hero-content { padding: 24px; }
  .btn { width: 100%; justify-content: center; }
  .fab-wrap { right: 12px; bottom: 12px; }
  .fab-panel { right: 12px; left: 12px; bottom: 88px; min-width: unset; }
  .fab-help { display: none; }
}
