/* Mud Brothers Scoped Theme */

:root {
  --mb-red: #ef4444;
  --mb-rust: #b45309;
  --mb-steel: #1f2937;
  --mb-dark: #0f0f0f;
  --mb-glass: rgba(255, 255, 255, 0.03);
  --mb-font-head: 'Oswald', sans-serif;
  --mb-font-body: 'Inter', sans-serif;
  --mb-section-padding: clamp(2rem, 4vw, 3rem);
}

.mudbrothers-page {
  font-family: var(--mb-font-body);
  cursor: none !important;
}

/* Texture Overlays */
.blueprint-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.concrete-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
}

#mb-cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  border: 2px solid var(--mb-red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out, opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

/* --- BRANDING REFINEMENT (Hierarchy & Alignment) --- */

/* Navigation Logo */
.brand-stack-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1px;
}

.brand-stack-nav .main-label {
    font-family: var(--mb-font-head);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: #fff;
    display: block;
    white-space: nowrap;
}

.brand-subline-nav {
    display: block;
    font-family: var(--mb-font-head);
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.05em;
    text-align: center;
    white-space: nowrap;
}

/* Hero Branding */
.brand-title-hero-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-title-main {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures subline is centered under primary */
    width: fit-content;
    text-align: center;
}

.brand-title-main .main-name {
    font-family: var(--mb-font-head);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #fff;
    display: block;
}

.brand-subline-hero {
    display: block;
    width: 100%;
    font-family: var(--mb-font-head);
    font-weight: 900;
    font-size: clamp(1.4rem, 3.8vw, 2.7rem);
    line-height: 1.1;
    margin-top: 0.2rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.02em;
}

/* --- END BRANDING REFINEMENT --- */

/* Navigation */
#mb-nav.scrolled {
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-box {
  background: var(--mb-red);
  color: white;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mb-font-head);
  font-weight: bold;
  font-size: 1.5rem;
  border-radius: 4px;
}

.nav-link {
  font-family: var(--mb-font-head);
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--mb-red);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #0f0f0f;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-link {
    font-family: var(--mb-font-head);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--mb-red);
}

/* Buttons */
.mb-btn-sm {
  background: var(--mb-red);
  color: white;
  padding: 0.6rem 1.25rem;
  font-family: var(--mb-font-head);
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.mb-btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.mb-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--mb-red);
  color: white;
  padding: 1.25rem 2.5rem;
  font-family: var(--mb-font-head);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(0 0, 92% 0, 100% 25%, 100% 100%, 8% 100%, 0 75%);
}

.mb-btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.mb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 1.25rem 2.5rem;
  font-family: var(--mb-font-head);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
  border-radius: 4px;
  transition: all 0.4s ease;
  clip-path: polygon(0 0, 92% 0, 100% 25%, 100% 100%, 8% 100%, 0 75%);
}

.mb-btn-outline:hover {
  border-color: var(--mb-red);
  color: var(--mb-red);
  background: rgba(239, 68, 68, 0.05);
}

/* Sections Gap Management */
.mb-section {
    padding: var(--mb-section-padding) 0;
}

/* Badges & Features */
.mb-badge {
  background: rgba(239, 68, 68, 0.1);
  color: var(--mb-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.mb-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mb-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: #d1d5db;
}

.mb-feature-list li i {
  color: var(--mb-red);
  width: 20px;
  height: 20px;
}

/* Service Cards */
.mb-service-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 16px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.mb-service-card:hover {
  background: #222;
  border-color: var(--mb-red);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.mb-service-card h3 {
  font-family: var(--mb-font-head);
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card-bullets {
  list-style: none;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-bullets li {
  font-size: 0.75rem;
  color: #9ca3af;
  position: relative;
  padding-left: 1rem;
}

.card-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--mb-red);
}

.card-footer {
  margin-top: auto;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--mb-red);
  letter-spacing: 0.1em;
}

/* Gallery */
.mb-gallery-grid {
    transition: all 0.5s ease;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #222;
  opacity: 0;
  transform: scale(0.95);
  animation: itemFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes itemFadeIn {
    to { opacity: 1; transform: scale(1); }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  filter: contrast(1.1) brightness(0.8);
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: contrast(1) brightness(1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.gallery-overlay span {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--mb-red);
  letter-spacing: 0.05em;
}

.filter-chip {
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: var(--mb-font-head);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.filter-chip.active, .filter-chip:hover {
  background: var(--mb-red);
  color: white;
  border-color: var(--mb-red);
}

/* Stats */
.mb-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card {
  background: var(--mb-dark);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-val {
  font-family: var(--mb-font-head);
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--mb-red);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.2em;
}

/* Testimonials */
.mb-testimonial {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 20px;
}

.stars {
  display: flex;
  gap: 4px;
  color: var(--mb-red);
  margin-bottom: 1.25rem;
}

.stars i, 
.stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: currentColor;
}

.mb-testimonial p {
  font-size: 0.95rem;
  font-style: italic;
  color: #d1d5db;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.t-footer {
  display: flex;
  flex-direction: column;
}

.t-name {
  font-weight: bold;
  color: white;
  font-size: 0.9rem;
}

.t-meta {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 800;
}

/* Form Styles */
.glass-form-panel {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
}

.form-group label {
  display: block;
  font-family: var(--mb-font-head);
  text-transform: uppercase;
  font-weight: bold;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: #9ca3af;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem;
  border-radius: 8px;
  color: white;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--mb-red);
  background: rgba(255, 255, 255, 0.08);
}

/* Safety Strips */
.safety-strip-vertical {
  position: absolute;
  top: 0; right: 40px; width: 40px; height: 100%;
  background: repeating-linear-gradient(45deg, var(--mb-red), var(--mb-red) 10px, black 10px, black 20px);
  opacity: 0.1;
}

.safety-strip-horizontal {
  position: absolute;
  width: 100%; height: 8px;
  background: repeating-linear-gradient(90deg, var(--mb-red), var(--mb-red) 20px, black 20px, black 40px);
  z-index: 10;
}

/* Reveal Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #9ca3af;
}

.social-icon:hover {
    color: var(--mb-red);
    border-color: var(--mb-red);
    background: rgba(239, 68, 68, 0.05);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1024px) {
  .mb-hero { padding-bottom: 3rem; }
}

@media (max-width: 640px) {
  .mb-stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 2rem; }
  .stat-val { font-size: 3rem; }
  .gallery-item { aspect-ratio: 1/1; }
  .brand-title-main { align-items: center; }
  .mb-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}