/* ========================================
   2MM Contractor — Styles
   ======================================== */

:root {
  --navy: #0a1628;
  --navy-light: #0f2035;
  --blue: #1e40af;
  --blue-light: #3b82f6;
  --btn-blue: linear-gradient(135deg, #1e40af, #3b82f6);
  --white: #ffffff;
  --gray-100: #f1f5f9;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --radius: 16px;
  --radius-sm: 10px;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg-light: rgba(255, 255, 255, 0.85);
  --glass-border-light: rgba(255, 255, 255, 0.5);
  --shadow-light: 0 4px 24px rgba(0, 0, 0, 0.08);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--white);
  background: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ============ LOADER ============ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s, visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--btn-blue);
  border-radius: 3px;
  animation: loaderFill 1.5s ease-out forwards;
}

@keyframes loaderFill {
  to { width: 100%; }
}

/* ============ NAVBAR ============ */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 32px;
  background: rgba(10, 22, 40, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

#navbar.scrolled {
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
  font-size: 2rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
}

.nav-logo span {
  color: var(--blue-light);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--blue-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color 0.3s;
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-light);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ HERO ============ */

#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

#heroVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.15) 0%,
    rgba(10, 22, 40, 0.25) 50%,
    rgba(10, 22, 40, 0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 90%;
  max-width: 800px;
  padding: 120px 0 80px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.hero-line {
  display: block;
  line-height: 1;
}

.hero-amp {
  line-height: 0.85;
  margin-bottom: -0.1em;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  font-weight: 400;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--btn-blue);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(30, 64, 175, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.5s;
}

.scroll-indicator.hide { opacity: 0; }

.scroll-indicator span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-dot {
  width: 3px;
  height: 8px;
  background: var(--blue-light);
  border-radius: 3px;
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* ============ SECTIONS ============ */

#plumbing {
  position: relative;
  z-index: 5;
  background: var(--navy);
  padding: 120px 0 80px;
  overflow: hidden;
}

.section-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  z-index: 0;
}

.section-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--navy) 0%, rgba(10, 22, 40, 0.35) 8%, rgba(10, 22, 40, 0.35) 92%, var(--navy) 100%);
  z-index: 1;
}

#plumbing .container { position: relative; z-index: 2; }

#handyman {
  position: relative;
  z-index: 5;
  background: var(--gray-100);
  color: var(--gray-800);
  padding: 120px 0 80px;
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

#plumbing .section-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-light);
}

#handyman .section-tag {
  background: rgba(30, 64, 175, 0.1);
  color: var(--blue);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  opacity: 0.7;
  max-width: 700px;
  margin: 0 auto;
  white-space: nowrap;
}

/* ============ CARDS ============ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

.card-light {
  background: var(--glass-bg-light);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-light);
}

.card-light:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(30, 64, 175, 0.12);
  border-color: rgba(30, 64, 175, 0.2);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card ul li {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.card-light ul li {
  color: var(--gray-800);
}

.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
}

.card-light ul li::before {
  background: var(--blue);
}

/* ============ CONTACT ============ */

#contact {
  position: relative;
  z-index: 5;
  background: var(--navy);
  padding: 120px 0 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 36px;
  align-items: stretch;
}

#contact .section-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-light);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: -8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.3s;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--gray-400);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--blue-light);
}

.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
  border-color: #ef4444;
}

/* Multi-select dropdown */
.multi-select {
  position: relative;
}

.multi-select-trigger {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s;
  display: flex;
  align-items: center;
  min-height: 48px;
  flex-wrap: wrap;
  gap: 6px;
}

.multi-select-trigger:hover,
.multi-select.open .multi-select-trigger {
  border-color: var(--blue-light);
}

.multi-select-trigger.error {
  border-color: #ef4444;
}

.multi-select-placeholder {
  color: var(--gray-400);
}

.multi-select-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-light);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.multi-select.open .multi-select-dropdown {
  display: block;
}

.dropdown-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.dropdown-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-light);
  padding: 7px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.dropdown-col-title:hover {
  background: rgba(59, 130, 246, 0.08);
}

.dropdown-col-title input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-light);
  cursor: pointer;
  flex-shrink: 0;
}

.multi-select-dropdown label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--white);
  transition: background 0.15s;
  border-radius: 6px;
}

.multi-select-dropdown label:hover {
  background: rgba(255, 255, 255, 0.06);
}

.multi-select-dropdown input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-light);
  cursor: pointer;
  flex-shrink: 0;
}

/* File upload */
.file-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.file-upload:hover {
  border-color: var(--blue-light);
  background: rgba(59, 130, 246, 0.05);
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload-text {
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* Character counter */
.textarea-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.textarea-wrap textarea {
  flex: 1;
  min-height: 100px;
  resize: vertical;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.char-counter.near-limit { color: #f59e0b; }
.char-counter.at-limit { color: #ef4444; }

/* Photo preview */
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-size {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.6rem;
  text-align: center;
  padding: 2px 0;
}

.photo-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.photo-delete:hover {
  background: #ef4444;
}

.photo-error {
  width: 100%;
  font-size: 0.8rem;
  color: #f87171;
  padding: 4px 0;
}

/* County error */
.county-select.error,
.county-other.error {
  border-color: #ef4444;
}

/* Form errors */
.form-errors {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.form-errors ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-errors li {
  font-size: 0.85rem;
  color: #f87171;
}

.form-errors li::before {
  content: '⚠ ';
}

/* Contact info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.info-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.info-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--gray-400);
}

.info-link {
  font-size: 0.88rem;
  color: var(--blue-light);
  text-decoration: none;
  transition: color 0.3s;
  display: block;
}

.info-link:hover {
  color: var(--white);
}

.info-card-map {
  flex: 1;
  padding-bottom: 16px;
}

.county-select {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.county-select:focus {
  border-color: var(--blue-light);
}

.county-select option {
  background: var(--navy);
  color: var(--white);
}

.county-other {
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.county-other::placeholder {
  color: var(--gray-400);
}

.county-other:focus {
  border-color: var(--blue-light);
}

.map-container {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

/* ============ FOOTER ============ */

footer {
  position: relative;
  z-index: 5;
  background: var(--navy-light);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--white);
}

.footer-logo span {
  color: var(--blue-light);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}

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

.footer-copy {
  font-size: 0.78rem;
  color: var(--gray-600);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 28px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

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

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

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

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

  .contact-info {
    order: -1;
  }

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

  .hero-content h1 {
    font-size: 2rem;
  }

  #navbar {
    padding: 6px 20px;
  }

  .nav-logo {
    font-size: 1.6rem;
  }

  .section-header p {
    white-space: normal;
  }

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

  .multi-select-dropdown label {
    padding: 10px 8px;
    min-height: 44px;
  }

  .btn {
    min-height: 48px;
    padding: 14px 24px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .county-select,
  .county-other {
    font-size: 16px;
  }
}

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

  .btn {
    width: 100%;
    text-align: center;
  }
}
