/* ============================================
   BHaFSec, LLC — Landing Page Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #1a1f2e;
  --bg-section: #222839;
  --bg-card: #2a3145;
  --accent: #4ecdc4;
  --accent-hover: #5ef5eb;
  --text-primary: #e8eaf0;
  --text-secondary: #9da3b4;
  --border: #353d54;
  --success: #4caf50;
  --error: #ef5350;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  --max-width: 1140px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

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

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

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

/* --- Accent Bar --- */
.accent-bar {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 31, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--bg-primary) !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary) !important;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 6px 0;
  transition: var(--transition);
  border-radius: 1px;
}

/* ============================================
   BACKGROUND CANVAS
   ============================================ */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Ensure all content sits above the background */
.navbar,
.hero,
.section,
.section-alt,
.contact-section,
.footer {
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 160px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 30%, rgba(78, 205, 196, 0.07) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 60%, rgba(78, 205, 196, 0.04) 0%, transparent 40%),
              radial-gradient(ellipse at 20% 80%, rgba(94, 245, 235, 0.03) 0%, transparent 45%);
  pointer-events: none;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.8; transform: scale(1) translate(0, 0); }
  50% { opacity: 1; transform: scale(1.03) translate(-1%, 1%); }
  100% { opacity: 0.85; transform: scale(1.01) translate(1%, -0.5%); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.25);
}

.hero-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(78, 205, 196, 0.35);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(78, 205, 196, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

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

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   ABOUT
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.about-text .accent-bar {
  margin: 16px 0 0;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================
   CONTACT / FORM SECTION
   ============================================ */
.contact-section {
  padding: 100px 0;
  background: var(--bg-section);
}

.contact-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

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

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #5a6178;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.12);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239da3b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

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

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: var(--error);
}

.form-error-msg {
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}

.form-group.error .form-error-msg {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.2);
}

.btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(78, 205, 196, 0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form feedback messages */
.form-feedback {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(76, 175, 80, 0.12);
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.form-feedback.error {
  display: block;
  background: rgba(239, 83, 80, 0.12);
  color: var(--error);
  border: 1px solid rgba(239, 83, 80, 0.25);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

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

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

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

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(26, 31, 46, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-toggle {
    display: block;
  }

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

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

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

  .hero {
    padding: 130px 0 80px;
  }

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

  .hero p {
    font-size: 1.05rem;
  }

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

  .form-card {
    padding: 32px 24px;
  }

  .section-title {
    font-size: 1.7rem;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

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

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

  .container {
    padding: 0 16px;
  }
}
