/* ============================================================
   JHF Contracting Limited - Professional Website Styles
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --primary-dark: #0a1628;
  --primary: #0f2b4a;
  --secondary: #1e4a7a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-subtle: #dbeafe;
  --gold: #c9a03d;
  --gold-light: #f0d78a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #f1f5f9;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  position: relative;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(10, 22, 40, 0.97);
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-light);
  transition: var(--transition);
}

.nav-links a:hover {
  color: #fff;
}

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

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

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--primary-dark);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(37, 99, 235, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(201, 160, 61, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(59, 130, 246, 0.06), transparent);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 120px 0 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-light), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat-item h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-item p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}

/* --- Section Base --- */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--primary-dark);
  color: var(--text-light);
}

.section-dark .section-title {
  color: #fff;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

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

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content .about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.about-detail-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.about-detail-item .detail-icon {
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-detail-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.about-detail-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.about-visual {
  position: relative;
}

.about-card {
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent);
  pointer-events: none;
}

.about-card h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 16px;
  position: relative;
}

.about-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.8;
  position: relative;
}

.about-card .company-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.about-card .company-address {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--accent);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--accent);
  color: #fff;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* --- Why Us Section --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.why-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  transition: var(--transition);
}

.why-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-3px);
}

.why-icon {
  width: 48px;
  height: 48px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-light);
  flex-shrink: 0;
}

.why-card h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 6px;
}

.why-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin: 0;
}

/* --- Stats / Counter Section --- */
.stats-section {
  background: var(--primary-dark);
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-item .stat-suffix {
  font-size: 1.5rem;
  color: var(--gold);
}

.stat-item p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin: 0;
}

.stat-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 12px;
  border-radius: 2px;
}

/* --- Contact Section --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-item p, .contact-item a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-card {
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
}

.contact-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 24px;
}

.contact-card-detail {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-card-detail:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-card-detail .ccd-icon {
  font-size: 1rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-card-detail .ccd-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.contact-card-detail .ccd-value {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Footer --- */
.footer {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  max-width: 340px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  padding: 6px 0;
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

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

.footer-bottom-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-links a:hover {
  color: var(--accent-light);
}

/* --- Legal Pages (Privacy, Terms) --- */
.legal-hero {
  background: var(--primary-dark);
  padding: 140px 0 60px;
  position: relative;
}

.legal-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 12px;
}

.legal-hero p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
}

.legal-content {
  padding: 60px 0 80px;
}

.legal-content .container {
  max-width: 840px;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-subtle);
}

.legal-section h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  margin-top: 24px;
  color: var(--text-primary);
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 14px;
}

.legal-section ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 14px;
}

.legal-section ul li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 6px;
}

.legal-section strong {
  color: var(--text-primary);
}

.legal-date {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 32px;
}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}

/* --- Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.animated {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.98);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

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

  .nav-toggle {
    display: flex;
    z-index: 1000;
  }

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

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

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

  .section {
    padding: 64px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

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

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-item h3 {
    font-size: 1.4rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .legal-hero {
    padding: 120px 0 40px;
  }

  .legal-content {
    padding: 40px 0 60px;
  }

  .contact-card {
    padding: 28px;
  }

  .about-card {
    padding: 28px;
  }
}

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

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

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

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