/**
 * Alt Horizon — Business landing page
 * Color palette & typography
 *
 * Color Palette:
 * - Primary: Soft sage (#9dd4c0) — trust
 * - Secondary: Graphite grey (#6b7f82) — neutrality
 * - Accent: Solar flare (#ffd447) — progress
 * - Dark: Onyx (#232528)
 * - Light accent: Sky blue (#eaf6ff)
 *
 * Typography: Rubik — sans-serif, clean geometry
 * Iconography: Microchip outlines, data arrows
 */

:root {
  --ah-primary: #9dd4c0;
  --ah-secondary: #6b7f82;
  --ah-accent: #ffd447;
  --ah-dark: #232528;
  --ah-light: #eaf6ff;
}

/* Body padding for fixed navbar */
body {
  padding-top: 76px;
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ah-secondary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky footer: push footer to bottom when content is short */
body > .footer {
  margin-top: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Rubik", sans-serif;
  color: var(--ah-dark);
}

/* Navbar — Onyx dark mode */
.navbar {
  padding: 0.75rem 0;
  background-color: var(--ah-dark) !important;
}
.navbar-brand img {
  max-height: 40px;
  width: auto;
}
.navbar-brand .logo-fallback {
  display: none;
  font-size: 1.25rem;
  color: var(--ah-primary) !important;
}
.navbar-brand .logo-fallback.d-none {
  display: none !important;
}
.navbar .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.5rem 1rem !important;
}
.navbar .nav-link:hover {
  color: var(--ah-primary) !important;
}
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero section — hero image with overlay */
#hero.hero-section {
  min-height: calc(100vh - 76px);
  height: auto;
  background: linear-gradient(135deg, var(--ah-light) 0%, #ffffff 100%);
  background-image: url("../img/hero1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-left: 0 !important;
  position: relative;
}
/* Compact hero for resources and about pages */
#hero.hero-section.hero-section-compact {
  min-height: 280px;
  padding: 3rem 0;
}
#hero.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(35, 37, 40, 0.5) 0%, rgba(35, 37, 40, 0.75) 100%);
  pointer-events: none;
}
#hero.hero-section .container {
  position: relative;
  z-index: 1;
}
/* Override base template #hero h1, #hero p (dark grey) */
#hero h1.hero-title,
#hero .hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}
#hero p.hero-lead,
#hero .hero-lead {
  font-size: 1.15rem;
  color: #fff !important;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 0, 0, 0.25);
}
#hero .tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ah-primary) !important;
  letter-spacing: 0.15em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.letter-spacing-1 {
  letter-spacing: 0.1em;
}
.hero-cta .btn-primary {
  background-color: var(--ah-accent);
  border-color: var(--ah-accent);
  color: var(--ah-dark);
}
.hero-cta .btn-primary:hover {
  background-color: #ffde6b;
  border-color: #ffde6b;
  color: var(--ah-dark);
}
.hero-cta .btn-outline-primary {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fff;
}
.hero-cta .btn-outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}
.hero-cta .btn {
  padding: 0.6rem 1.5rem;
}

/* Section background */
.section-bg {
  background-color: var(--ah-light);
}

/* Main content sections — more breathing room */
#problem, #solution, #services {
  padding-top: 4.5rem !important;
  padding-bottom: 4.5rem !important;
}

/* Section title — iconographic: microchip */
.section-title {
  position: relative;
  margin-bottom: 2rem;
}
.section-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ah-dark);
}
.section-title h2 .section-icon {
  color: var(--ah-primary);
  margin-right: 0.5rem;
}
.section-title p {
  color: var(--ah-secondary);
  margin-top: 0.5rem;
}

/* Problem cards */
.problem-icon {
  font-size: 28px;
  color: var(--ah-primary);
}
.problem-card {
  border-left: 3px solid var(--ah-primary);
}
.problem-card .card-title {
  font-weight: 600;
  color: var(--ah-dark);
}
.problem-card .card-text {
  color: var(--ah-secondary);
  font-size: 0.95rem;
}

/* Methodology badges — match methodology page flow colors */
.methodology-steps .badge {
  font-size: 0.9rem;
  color: var(--ah-dark) !important;
}
.methodology-steps .badge.flow-1 { background-color: #9dd4c0 !important; }
.methodology-steps .badge.flow-2 { background-color: #7eb8d4 !important; }
.methodology-steps .badge.flow-3 { background-color: #ffd447 !important; }
.methodology-steps .badge.flow-4 { background-color: #b8a9c9 !important; }
.methodology-steps .badge.flow-5 { background-color: #6bcf7f !important; }
.methodology-steps .text-muted {
  color: var(--ah-secondary) !important;
}

/* Differentiator icons */
.bi-graph-up, .bi-check2-square, .bi-database-gear {
  color: var(--ah-primary) !important;
}

/* Services cards — consistent with problem cards and About consultancy cards */
#services .card {
  border-left: 3px solid var(--ah-primary);
  border-radius: 12px;
}
#services .card-title {
  color: var(--ah-dark);
}
#services .card-title i {
  color: var(--ah-primary);
}
#services .card-text {
  color: var(--ah-secondary);
}

/* Footer — Onyx dark */
.footer {
  background-color: var(--ah-dark) !important;
}
.footer .logo-fallback {
  display: none;
  font-size: 1.1rem;
  color: var(--ah-primary) !important;
}
.footer .logo-img.d-none + .logo-fallback {
  display: inline !important;
}
.footer-logo {
  opacity: 0.9;
}
.footer a {
  color: var(--ah-primary);
}
.footer a:hover {
  opacity: 0.8;
  color: var(--ah-primary);
}

/* CTA section — Blue gradient */
#contact {
  background: linear-gradient(135deg, var(--ah-light) 0%, #7eb8d4 100%) !important;
  color: #fff;
}
#contact h2,
#contact .lead {
  color: #fff !important;
}
#contact .form-label.visually-hidden + .form-control,
#contact .form-label.visually-hidden + .form-control::placeholder {
  color: var(--ah-dark);
}
#contact .contact-form .form-control {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.8);
}
#contact .contact-form .form-control:focus {
  background-color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.5);
}
#contact .btn-light {
  background-color: #fff;
  border-color: #fff;
  color: var(--ah-dark);
}
#contact .btn-light:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--ah-dark);
}

/* Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
}

/* Scroll margin for fixed navbar (anchor targets) */
#problem, #solution, #services, #contact {
  scroll-margin-top: 76px;
}

/* Back to top — accent color */
.back-to-top {
  background-color: var(--ah-accent) !important;
  color: var(--ah-dark) !important;
}
.back-to-top:hover {
  background-color: var(--ah-primary) !important;
  color: var(--ah-dark) !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  body {
    padding-top: 56px;
  }
  #hero.hero-section {
    min-height: auto;
    padding: 4rem 0;
  }
  #hero.hero-section.hero-section-compact {
    padding: 2.5rem 0;
  }
  #problem, #solution, #services, #contact {
    scroll-margin-top: 56px;
  }
}
