/* =============================================================
   MichTech Solutions — Main Stylesheet
   File: css/style.css

   TABLE OF CONTENTS
   ---------------------------------------------------------
   1.  FONTS & IMPORTS
   2.  COLOR & THEME VARIABLES  ← Change colors here
   3.  RESET & BASE
   4.  NAVIGATION
   5.  LOGO                     ← Change logo size here
   6.  PAGE WRAPPER
   7.  SECTIONS & TYPOGRAPHY
   8.  BUTTONS
   9.  CARDS
   10. HERO SECTION
   11. SERVICES GRID (Home page)
   12. PROCESS STEPS (Home page)
   13. ABOUT PAGE
   14. CONTACT PAGE & FORM
   15. FOOTER
   16. ANIMATIONS
   17. RESPONSIVE / MOBILE
   18. SERVICES DETAIL PAGE
   ============================================================= */


/* =============================================================
   1. FONTS & IMPORTS
   To change the font, replace the Google Fonts URL below and
   update --heading and --body in the variables section (#2).
   Current font: Plus Jakarta Sans (weights 400-800)
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');


/* =============================================================
   2. COLOR & THEME VARIABLES
   *** THIS IS YOUR MAIN CONTROL PANEL FOR COLORS ***

   Change any value here and it updates across the whole site.

   --accent   = Primary brand blue (buttons, links, highlights)
   --accent2  = Secondary teal (section labels, success states)
   --black    = Main text color
   --muted    = Subdued text (paragraphs, labels)
   --border   = Card/input borders and dividers
   --card     = Card background color
   --bg       = Page background
   --bg-alt   = Alternate section background (light gray)
   ============================================================= */
:root {
  /* Primary brand color - used for buttons, links, active states */
  --accent:  #1d4ed8;

  /* Secondary accent - used for section labels and success messages */
  --accent2: #0891b2;

  /* Text colors */
  --black:   #111827;   /* Main headings and body text */
  --muted:   #6b7280;   /* Subdued paragraphs and labels */

  /* Backgrounds */
  --bg:      #ffffff;   /* Main page background */
  --bg-alt:  #f8fafc;   /* Alternate section background */

  /* Cards and borders */
  --card:    #ffffff;   /* Card background */
  --border:  #e2e8f0;   /* Borders and dividers */

  /* Font families - change here if you switch fonts */
  --heading: 'Plus Jakarta Sans', sans-serif;
  --body:    'Plus Jakarta Sans', sans-serif;

  /* Legacy variables - kept for compatibility */
  --deep:  #f8fafc;
  --white: #111827;
}


/* =============================================================
   3. RESET & BASE
   Zeroes out browser default margin/padding and sets the
   global font, background, and text color.
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
}


/* =============================================================
   4. NAVIGATION
   Fixed top nav bar with blur backdrop.
   Padding controls nav height - increase for more breathing room.
   ============================================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 5%;           /* Adjust vertical padding to change nav height */
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px);  /* Frosted glass effect */
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-logo {
  font-family: var(--heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

/* Animated underline on hover/active */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active          { color: var(--black); }
.nav-links a:hover::after,
.nav-links a.active::after   { width: 100%; }

/* "Get in Touch" button in the nav */
.nav-cta {
  background: var(--accent) !important;
  color: #ffffff !important;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-weight: 500 !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover  { background: #1e40af !important; transform: translateY(-1px); }

/* Mobile hamburger icon (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: all 0.3s;
}


/* =============================================================
   5. LOGO
   *** CHANGE LOGO SIZE HERE ***

   .nav-logo-img    = Logo in the top navigation bar
   .footer-logo-img = Logo in the footer

   Logo image file: logo.png (located in the root folder)
   To swap the logo: replace logo.png with your new file,
   keeping the same filename. Or update src="" in index.html.

   height controls display size. width: auto keeps proportions.
   ============================================================= */
.nav-logo-img {
  height: 70px;    /* Increase or decrease to resize the nav logo */
  width: auto;
  display: block;
}

.footer-logo-img {
  height: 52px;    /* Increase or decrease to resize the footer logo */
  width: auto;
  display: block;
}


/* =============================================================
   6. PAGE WRAPPER
   The SPA shows/hides pages using .active class.
   All pages live in index.html - only the active one is visible.
   ============================================================= */
.page        { display: none; }
.page.active { display: block; }


/* =============================================================
   7. SECTIONS & TYPOGRAPHY

   section padding = breathing room above/below each section.
   Reduce to tighten spacing, increase to loosen it.

   Font sizes use clamp(min, preferred, max) for fluid scaling.
   ============================================================= */
section { padding: 4rem 5%; }   /* Global section top/bottom padding */

/* Small uppercase label above headings (e.g. "WHAT WE DO") */
.section-label {
  font-family: var(--heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent2);   /* Uses secondary accent color */
  margin-bottom: 1rem;
}

h1, h2, h3, h4 { font-family: var(--heading); }

h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);  /* Scales between 2.8rem and 5.5rem */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { color: var(--muted); line-height: 1.75; }

/* Colored text spans used inside headings */
.highlight  { color: var(--accent); }   /* Blue */
.highlight2 { color: var(--accent2); }  /* Teal */


/* =============================================================
   8. BUTTONS
   Two styles: primary (filled blue) and outline.
   Colors inherit from --accent variable above.
   ============================================================= */

/* Filled blue button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: #1e40af;  /* Darker blue on hover */
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(29,78,216,0.25);
}

/* Outlined button (transparent with blue border) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-outline:hover {
  background: rgba(29,78,216,0.06);
  transform: translateY(-2px);
}


/* =============================================================
   9. CARDS
   Used on services grid, about page, and who-we-serve section.
   Hover lifts the card and shows a blue border.
   ============================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(29,78,216,0.1);
}


/* =============================================================
   10. HERO SECTION
   The large banner at the top of the home page.

   min-height  = How tall the hero is (92vh = 92% of screen)
   background  = The subtle blue gradient behind the hero text

   The two .hero-orb elements are blurred color blobs in the
   background. Adjust rgba() values to change the glow color.
   ============================================================= */
.hero {
  min-height: 92vh;          /* Change to 100vh for full-screen hero */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 7rem;         /* Space for the fixed nav bar + logo */
  overflow: hidden;
  background: linear-gradient(160deg, #f0f5ff 0%, #ffffff 60%);
  /* Hero background gradient:
     first color  = the blue tint top-left
     second color = fades to white */
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Blurred ambient color orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
  /* Top-right blue glow */
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(29,78,216,0.08) 0%, transparent 70%);
  top: -100px; right: -100px;
}

.hero-orb-2 {
  /* Bottom-center teal glow */
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(8,145,178,0.07) 0%, transparent 70%);
  bottom: 0; left: 20%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

/* Text content sits above the orbs */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

/* Pill badge ("Serving Metro Detroit...") */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(29,78,216,0.08);
  border: 1px solid rgba(29,78,216,0.2);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease forwards;
}

.hero h1 { animation: fadeUp 0.6s 0.1s ease both; color: #0f172a; }

.hero p {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 1.25rem 0 2rem;
  animation: fadeUp 0.6s 0.2s ease both;
  color: #4b5563;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* Stats bar ("100% | 4 | Fast") at bottom of hero */
.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.6s 0.4s ease both;
}

.stat-num {
  font-family: var(--heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}


/* =============================================================
   11. SERVICES GRID (Home page)
   The 2x2 grid of service cards on the home page.
   ============================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Emoji icon box inside each service card */
.service-icon {
  width: 52px; height: 52px;
  background: rgba(79,110,247,0.12);
  border: 1px solid rgba(79,110,247,0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: background 0.25s, border-color 0.25s;
}
.card:hover .service-icon {
  background: rgba(29,78,216,0.12);
  border-color: var(--accent);
}

.card h3 { margin-bottom: 0.75rem; color: #0f172a; }
.card p  { font-size: 0.9rem; }


/* =============================================================
   12. PROCESS STEPS (Home page)
   The "01 > 02 > 03 > 04" steps section.
   The horizontal line is drawn with ::before pseudo-element.
   ============================================================= */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin-top: 3rem;
  position: relative;
}

/* Horizontal connecting line between step circles */
.process-steps::before {
  content: '';
  position: absolute;
  top: 28px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.step {
  padding: 0 1.5rem;
  position: relative;
  text-align: center;
}

/* Numbered circle */
.step-num {
  width: 56px; height: 56px;
  background: var(--bg-alt);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;  /* Sits above the connecting line */
}

.step h4 { font-family: var(--heading); font-size: 1rem; margin-bottom: 0.5rem; color: #0f172a; }
.step p  { font-size: 0.85rem; }


/* =============================================================
   13. ABOUT PAGE
   Two-column layout: text left, stacked cards right.
   Card stack is hidden on mobile.
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual { position: relative; }

.about-card-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.about-card-stack .card              { position: absolute; width: 80%; }
.about-card-stack .card:nth-child(1) { top: 0; left: 0; transform: rotate(-3deg); z-index: 1; }
.about-card-stack .card:nth-child(2) { bottom: 0; right: 0; transform: rotate(2deg); z-index: 2; }
.about-card-stack .card:hover        { transform: rotate(0deg) scale(1.02); z-index: 3; }

/* Bullet-point value items */
.value-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}

.value-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.value-item h4 { font-size: 1rem; color: #0f172a; margin-bottom: 0.25rem; }
.value-item p  { font-size: 0.875rem; }


/* =============================================================
   14. CONTACT PAGE & FORM
   Two-column layout: contact info left, form right.

   *** TO CONNECT THE FORM TO YOUR EMAIL ***
   Find "YOUR_FORM_ID" in index.html and replace with your
   Formspree form ID (e.g. "xpwzgkqr").
   Get one free at https://formspree.io
   ============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p  { margin-bottom: 2rem; font-size: 0.95rem; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.contact-detail-icon {
  width: 40px; height: 40px;
  background: rgba(29,78,216,0.08);
  border: 1px solid rgba(29,78,216,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail a       { color: #0f172a; text-decoration: none; transition: color 0.2s; }
.contact-detail a:hover { color: var(--accent); }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #0f172a;
  font-family: var(--body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Blue ring when input is focused */
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}

input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.6; }
textarea    { resize: vertical; min-height: 130px; }
select option { background: #ffffff; color: #0f172a; }

/* Side-by-side name + email row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
  justify-content: center;
  font-size: 1rem;
  padding: 1rem;
}

/* Confirmation message shown after successful form submit */
.success-msg {
  display: none;
  text-align: center;
  padding: 1.5rem;
  color: var(--accent2);
  font-weight: 500;
}


/* =============================================================
   15. FOOTER
   Simple three-item footer: logo | copyright | email.
   ============================================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo      { color: #0f172a; }
.footer-logo span { color: var(--accent); }
footer p          { font-size: 0.8rem; color: var(--muted); }


/* =============================================================
   16. ANIMATIONS

   fadeUp = Elements slide up and fade in (hero uses this)
   float  = Gentle up-down float on background orbs
   fade-up class = Scroll-triggered version, activated by JS
   ============================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* JS adds .visible when element scrolls into view */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================================
   17. RESPONSIVE / MOBILE
   Breakpoint: 768px and below

   Changes at mobile:
   - Nav collapses to hamburger menu
   - About grid goes single column (card stack hidden)
   - Contact grid goes single column
   - Process steps lose the connecting line
   - Form name/email row stacks vertically
   - Logo sizes reduce slightly
   ============================================================= */
@media (max-width: 768px) {

  /* Collapse nav to hamburger */
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Mobile dropdown menu (opens when hamburger clicked) */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 5%;
    gap: 1.25rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  }

  .about-grid            { grid-template-columns: 1fr; }
  .about-visual          { display: none; }   /* Hide decorative card stack */
  .contact-grid          { grid-template-columns: 1fr; }
  .hero-stats            { flex-wrap: wrap; gap: 1.5rem; }
  .process-steps::before { display: none; }   /* Remove connecting line */
  .process-steps         { gap: 2rem; }
  .form-row              { grid-template-columns: 1fr; }

  /* Slightly smaller logo on mobile */
  .nav-logo-img    { height: 52px; }
  .footer-logo-img { height: 40px; }
}


/* =============================================================
   18. SERVICES DETAIL PAGE
   Full alternating layout on the Services tab.
   Each service has text on one side and a visual on the other.
   .reverse flips column order for alternating rows.
   ============================================================= */

/* Hero banner at top of Services page */
.services-hero {
  padding-top: 7rem;
  text-align: center;
}
.services-hero p {
  max-width: 560px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}

/* Individual service row */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 5%;
  border-bottom: 1px solid var(--border);
}
.service-detail:last-child  { border-bottom: none; }

/* Flips layout for alternating text/image order */
.service-detail.reverse     { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }

/* Large emoji above the service heading */
.service-detail-icon { font-size: 4rem; margin-bottom: 1.5rem; }

.service-detail h3 { font-size: 1.75rem; margin-bottom: 1rem; color: #0f172a; }

/* Feature bullet ("-> Custom design...") */
.service-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.service-feature::before {
  content: '->'; /* Arrow prefix on each feature */
  color: var(--accent);
  font-family: var(--heading);
}

/* Decorative visual square on the right of each service row */
.service-visual {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.service-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(79,110,247,0.08) 0%, transparent 70%);
}
.service-visual-inner {
  font-size: 5rem;
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

/* Stack service rows on mobile */
@media (max-width: 768px) {
  .service-detail         { grid-template-columns: 1fr; gap: 2rem; }
  .service-detail.reverse { direction: ltr; }
}
