/* ============================================================
   style.css — Grand North Business Consulting Website
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary:      #0f0f1a;      /* deep navy — navbar, hero base */
  --accent:       #4fc3f7;      /* light blue — highlights, buttons, accents */
  --accent-hover: #81d4fa;      /* lighter blue for hover states */
  --text:         #1a1a2e;      /* main body text */
  --text-muted:   #5a6a7a;      /* secondary / caption text */
  --bg-light:     #f8f9fb;      /* about section background */
  --bg-services:  #eef4f9;      /* services section background */
  --card-bg:      #ffffff;      /* card backgrounds */
  --border:       #e2e8f0;      /* card borders */
}

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

/* Fix Apple/Safari overscroll rubber-band — prevents white flash at top/bottom */
html {
  background-color: #07070f;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background-color: #07070f; /* dark base prevents white void on iOS top overscroll */
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background-color: #070710;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 70px;
}

/* Brand */
.nav-brand a {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  display: block;
  transition: color 0.3s ease;
}

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

.nav-tagline {
  font-size: 0.7rem;
  color: #a0aec0;
  letter-spacing: 0.5px;
  display: block;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: #cbd5e0;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

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

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

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile — hamburger visible, links hidden by default */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #0f0f1a;
    padding: 1rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a::after {
    display: none;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a2a4a 50%, #0d3b5e 100%);
  padding: 120px 5% 80px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  animation: fadeUp 0.9s ease both;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #a0c4e8;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
              transform 0.2s ease, box-shadow 0.3s ease;
}

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

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 195, 247, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background-color: rgba(79, 195, 247, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 195, 247, 0.2);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  padding: 100px 5%;
  background-color: var(--bg-light);
}

/* Section Header (shared across sections) */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

/* Two-column grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.about-text p {
  color: #3a4a5a;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Stat cards grid */
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  line-height: 1.3;
}

/* Scroll-triggered fade-in (used across all sections) */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stack about columns on mobile */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

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

/* ============================================================
   SERVICES SECTION
   ============================================================ */
#services {
  padding: 100px 5%;
  background-color: var(--bg-services);
}

.services-grid {
  display: grid;
  /*place-items: center;*/
  justify-content: center; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

.service-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  border-left: 4px solid var(--accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.service-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(79, 195, 247, 0.1);
  border-radius: 50%;
  margin-bottom: 0.25rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

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

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-card ul li {
  font-size: 0.88rem;
  color: #4a5568;
  padding-left: 1.1rem;
  position: relative;
}

.service-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Staggered fade-in delays for service cards */
.services-grid .service-card:nth-child(1) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.4s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.5s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.6s; }
.services-grid .service-card:nth-child(7) { transition-delay: 0.7s; }

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact {
  padding: 100px 5%;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a2a4a 100%);
}

#contact .section-header h2 {
  color: #ffffff;
}

#contact .section-header h2::after {
  background-color: var(--accent);
}

#contact .section-header p {
  color: #a0c4e8;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

/* Contact Info */
.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: #a0c4e8;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.contact-details {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #cbd5e0;
  font-size: 0.95rem;
}

.contact-icon {
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(79, 195, 247, 0.12);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #a0c4e8;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

/* Inline error messages */
.error-msg {
  font-size: 0.8rem;
  color: #fc8181;
  margin-top: 0.25rem;
}

/* Form success message */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  padding: 3rem 2rem;
  background-color: rgba(79, 195, 247, 0.08);
  border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: 10px;
  min-height: 260px;
}

.success-icon {
  font-size: 2.5rem;
}

.form-success h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.form-success p {
  color: #a0c4e8;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Mobile: stack contact columns */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background-color: #07070f;
  padding: 2.5rem 5% 1.5rem;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.footer-legal {
  font-size: 0.78rem;
  color: #718096;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: #a0aec0;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.25rem;
}

.footer-bottom p {
  color: #4a5568;
  font-size: 0.82rem;
}

/* ============================================================
   ACTIVE NAV LINK
   ============================================================ */
.nav-links a.active {
  color: #ffffff;
}

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

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 14px rgba(79, 195, 247, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

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

/* ============================================================
   RESPONSIVE — 1024px (tablet)
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid {
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .contact-grid {
    gap: 2rem;
  }
}

/* ============================================================
   RESPONSIVE — 480px (small phones)
   ============================================================ */
@media (max-width: 480px) {
  /* Nav */
  .nav-brand a {
    font-size: 1.05rem;
  }

  /* Hero */
  #hero {
    padding: 100px 6% 60px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  /* About */
  #about,
  #services,
  #contact {
    padding: 70px 6%;
  }

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

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

  /* Footer */
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .footer-nav {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  /* Back to top — keep from overlapping content */
  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Fade-up animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   PRINT / PDF EXPORT
   ============================================================ */
@media print {
  /* Force all background colours and gradients to print */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide elements that don't make sense on paper */
  #navbar,
  #back-to-top,
  .hamburger,
  .hero-buttons {
    display: none;
  }

  /* Remove fixed positioning — navbar won't overlap content */
  header {
    position: static;
  }

  /* Hero: remove full-viewport height for paper */
  #hero {
    min-height: unset;
    padding: 60px 5%;
  }

  /* Make all fade-in elements fully visible (JS doesn't run in print) */
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Prevent cards and sections breaking awkwardly across pages */
  .service-card,
  .stat-card,
  .about-grid,
  .contact-grid {
    break-inside: avoid;
  }

  /* Ensure sections have breathing room between pages */
  section {
    page-break-before: auto;
    padding: 40px 5%;
  }
}
