/* ============================================
   MIRAK.AI -- Global Styles
   Brand: Midnight Blue #14213d | Starburst Orange #fca311 | Light Gray #e5e5e5
   Typography: Poppins (body) + system sans-serif fallback for headings
   ============================================ */

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

:root {
  --midnight: #14213d;
  --orange: #fca311;
  --gray: #e5e5e5;
  --dark-gray: #6b7280;
  --white: #ffffff;
  --black: #000000;
  --bg-light: #f0f1f3;
  --shadow: 0 4px 24px rgba(20, 33, 61, 0.08);
  --shadow-lg: 0 12px 48px rgba(20, 33, 61, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--midnight);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { font-size: 1rem; color: #4b5563; font-weight: 400; }
.text-orange { color: var(--orange); }
.text-midnight { color: var(--midnight); }
.subtitle { font-size: 1.15rem; color: var(--dark-gray); max-width: 680px; margin: 0 auto; font-weight: 400; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; border: 2px solid transparent;
  transition: var(--transition); font-family: inherit;
}
.btn-primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-primary:hover { background: #e8940f; border-color: #e8940f; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(252, 163, 17, 0.3); }
.btn-secondary { background: var(--midnight); color: var(--white); border-color: var(--midnight); }
.btn-secondary:hover { background: #1a2d52; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 33, 61, 0.3); }
.btn-outline { background: transparent; color: var(--midnight); border-color: var(--midnight); }
.btn-outline:hover { background: var(--midnight); color: var(--white); transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--midnight); }

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); will-change: transform;
  border-bottom: 1px solid rgba(229, 229, 229, 0.5);
  transition: var(--transition);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1200px; margin: 0 auto;
}
.nav-logo img { height: 36px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.9rem; font-weight: 600; color: var(--midnight); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--orange); border-radius: 2px;
}
.nav-cta .btn { padding: 10px 24px; font-size: 0.85rem; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--midnight); margin: 6px 0; transition: var(--transition); }

/* --- Hero Sections --- */
.hero {
  padding: 160px 0 100px; text-align: center;
  background: linear-gradient(135deg, #f0f2f5 0%, #fff 40%, #fef5e0 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 163, 17, 0.08) 0%, transparent 70%);
}
.hero h1 { margin-bottom: 20px; }
.hero p { margin-bottom: 36px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-page {
  padding: 140px 0 80px; text-align: center;
  background: var(--midnight); color: var(--white);
  position: relative; overflow: hidden;
}
.hero-page::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 163, 17, 0.15) 0%, transparent 70%);
}
.hero-page h1 { color: var(--white); margin-bottom: 16px; }
.hero-page p { color: rgba(255, 255, 255, 0.7); }
.hero-page .subtitle { color: rgba(255, 255, 255, 0.7); }

/* --- Sections --- */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { margin-bottom: 16px; }
.bg-light { background: var(--bg-light); }
.bg-midnight { background: var(--midnight); color: var(--white); }
.bg-midnight p { color: rgba(255, 255, 255, 0.7); }
.bg-midnight .subtitle { color: rgba(255, 255, 255, 0.7); }

/* --- Cards --- */
.card {
  background: var(--white); border-radius: var(--radius); padding: 40px 32px;
  box-shadow: var(--shadow); transition: var(--transition);
  border: 1px solid rgba(229, 229, 229, 0.5);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: rgba(252, 163, 17, 0.1); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px; font-size: 1.5rem;
}
.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.95rem; }

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* --- Logo Bar --- */
.logo-bar {
  background: var(--midnight); border-radius: 0; overflow: hidden;
  padding: 40px 48px;
  text-align: center;
  width: 100%;
}
.logo-bar-label {
  font-size: 0.8rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45); margin-bottom: 28px;
  max-width: 1400px; margin-left: auto; margin-right: auto; margin-bottom: 28px;
}
.logo-bar-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 24px 32px; flex-wrap: wrap;
  max-width: 1400px; margin: 0 auto;
}
.logo-bar-item {
  display: flex; align-items: center; gap: 8px;
  opacity: 0.65; transition: opacity 0.3s ease;
  flex-shrink: 0;
}
.logo-bar-item:hover { opacity: 1; }
.logo-bar-item svg {
  width: 22px; height: 22px; flex-shrink: 0;
}
.logo-bar-name {
  font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em; white-space: nowrap;
}

/* Keep stats-bar for backward compat */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--midnight); border-radius: var(--radius); overflow: hidden;
}
.stat { padding: 40px 24px; text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 20%; height: 60%;
  width: 1px; background: rgba(255, 255, 255, 0.1);
}
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--orange); display: block; }
.stat-label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin-top: 4px; }

/* --- Process Steps --- */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { text-align: center; position: relative; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%; background: var(--orange);
  color: var(--white); font-weight: 700; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.step h4 { margin-bottom: 8px; }
.step p { font-size: 0.9rem; }

/* --- Testimonials --- */
.testimonial-card {
  background: var(--white); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow); border: 1px solid rgba(229, 229, 229, 0.5);
  position: relative;
}
.testimonial-card::before {
  content: '\201C'; position: absolute; top: 16px; left: 24px;
  font-size: 4rem; color: var(--orange); opacity: 0.3; line-height: 1;
  font-family: Georgia, serif;
}
.testimonial-text { font-size: 1.05rem; font-style: italic; color: #4b5563; margin-bottom: 24px; line-height: 1.8; }
.testimonial-author { display: flex; align-items: center; gap: 16px; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--orange);
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.testimonial-name { font-weight: 600; font-size: 0.95rem; color: var(--midnight); }
.testimonial-role { font-size: 0.8rem; color: var(--dark-gray); }

/* --- Use Case Cards --- */
.usecase-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(229, 229, 229, 0.5);
  transition: var(--transition);
}
.usecase-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.usecase-header { background: var(--midnight); padding: 24px 32px; }
.usecase-header h3 { color: var(--white); font-size: 1.2rem; }
.usecase-body { padding: 32px; }
.usecase-meta { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.usecase-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); font-weight: 600; }
.usecase-value { font-size: 0.9rem; color: #4b5563; }
.usecase-result {
  background: rgba(252, 163, 17, 0.08); padding: 16px 20px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
}
.usecase-result .usecase-value { font-weight: 600; color: var(--midnight); }

/* --- Contact Form --- */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--midnight); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 18px; border: 1px solid var(--gray);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem;
  transition: var(--transition); background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* --- Footer --- */
.footer {
  background: var(--midnight); color: var(--white); padding: 80px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; margin-top: 16px; line-height: 1.8; }
.footer-brand img { height: 32px; margin-bottom: 8px; }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: rgba(255, 255, 255, 0.4);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--midnight) 0%, #1a2d52 100%);
  padding: 80px 0; text-align: center;
}
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255, 255, 255, 0.7); margin-bottom: 32px; }

/* --- Badge/Tag --- */
.badge {
  display: inline-block; padding: 6px 16px; border-radius: 50px;
  background: rgba(252, 163, 17, 0.1); color: var(--orange);
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 16px;
}
.badge-white {
  background: rgba(255, 255, 255, 0.15); color: var(--white);
}

/* --- Local Philly Callout --- */
.local-callout {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--dark-gray); margin-top: 12px;
}
.local-callout svg { width: 16px; height: 16px; }

/* --- Feature List --- */
.feature-list { list-style: none; }
.feature-list li {
  padding: 12px 0; border-bottom: 1px solid rgba(229, 229, 229, 0.5);
  display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-check { color: var(--orange); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }

/* --- Responsive --- */

/* Large tablets & small laptops / Chromebooks (1024px and below) */
@media (max-width: 1024px) {
  .grid-4, .process-steps, .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .logo-bar { padding: 32px 24px; }
  .logo-bar-logos { gap: 18px 24px; }
  .logo-bar-item svg { width: 20px; height: 20px; }
  .logo-bar-name { font-size: 0.8rem; }
}

/* Tablets portrait & small Chromebooks (768px and below) */
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 24px;
    gap: 16px; box-shadow: var(--shadow); z-index: 999;
  }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: block; }
  .nav-cta { display: none; }
  .grid-2, .grid-3, .grid-4, .process-steps { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat:not(:last-child)::after { display: none; }
  .logo-bar { padding: 24px 16px; }
  .logo-bar-logos { gap: 14px 20px; }
  .logo-bar-item svg { width: 18px; height: 18px; }
  .logo-bar-name { font-size: 0.75rem; }
  .hero { padding: 120px 0 60px; }
  .hero-page { padding: 120px 0 60px; }
  section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .logo-bar { padding: 20px 12px; }
  .logo-bar-label { font-size: 0.65rem; margin-bottom: 16px; }
  .logo-bar-logos { gap: 10px 14px; }
  .logo-bar-item svg { width: 16px; height: 16px; }
  .logo-bar-item { gap: 5px; }
  .logo-bar-name { font-size: 0.7rem; }
  h1 { font-size: 1.8rem; }
  .hero { padding: 100px 0 48px; }
  .hero-page { padding: 100px 0 48px; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  section { padding: 48px 0; }
  .card { padding: 28px 20px; }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
  .logo-bar-name { font-size: 0.65rem; }
  .logo-bar-item svg { width: 14px; height: 14px; }
  .logo-bar-logos { gap: 8px 12px; }
  h1 { font-size: 1.6rem; }
  .subtitle { font-size: 0.95rem; }
}

/* Chromebook & touch device scroll fixes */
@supports (-webkit-touch-callout: none) {
  body { -webkit-overflow-scrolling: touch; }
}

/* Ensure no horizontal overflow on any device */
.hero, .hero-page, section, .footer, .cta-section, .nav {
  max-width: 100vw;
}
.hero::before, .hero-page::before {
  pointer-events: none;
}
