/* ============================================================
   MAHIR TECHNOLOGY SERVICES — Global Stylesheet
   Brand: Navy (#0A1628) + Gold (#C9A84C)
   Font: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy:       #0A1628;
  --navy-mid:   #112040;
  --navy-light: #1A2F55;
  --gold:       #C9A84C;
  --gold-light: #E2C47A;
  --gold-pale:  #F5EDD6;
  --white:      #FFFFFF;
  --off-white:  #F8F6F1;
  --text-dark:  #1C1C2E;
  --text-mid:   #4A4A6A;
  --text-light: #8A8AAA;
  --border:     rgba(201,168,76,0.2);
  --shadow:     0 4px 32px rgba(10,22,40,0.12);
  --shadow-lg:  0 12px 60px rgba(10,22,40,0.18);
  --radius:     6px;
  --radius-lg:  12px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.18;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; font-family: 'DM Sans', sans-serif; font-weight: 600; }
p  { color: var(--text-mid); font-size: 0.97rem; }

/* ---- Section Layout ---- */
.section { padding: 88px 0; }
.section-alt { background: var(--off-white); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title { margin-bottom: 14px; }
.section-sub { color: var(--text-mid); max-width: 560px; margin-bottom: 52px; font-size: 1rem; }
.section-header-center { text-align: center; }
.section-header-center .section-sub { margin-left: auto; margin-right: auto; }

/* Gold divider */
.gold-line {
  width: 52px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin-bottom: 32px;
}
.center .gold-line { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,76,0.35); }
.btn-outline {
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-white {
  background: var(--white);
  color: var(--navy);
}
.btn-white:hover { background: var(--gold-pale); }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,22,40,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  height: 68px;
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 36px; width: auto; }
.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.nav-brand-tag {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
  margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.84rem;
  font-weight: 400;
  color: rgba(255,255,255,0.78);
  padding: 7px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-cta { margin-left: 14px; }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-mobile {
  display: none;
  position: fixed; top: 68px; left: 0; right: 0; z-index: 999;
  background: var(--navy);
  padding: 20px 24px 28px;
  border-bottom: 1px solid var(--border);
  flex-direction: column; gap: 4px;
}
.nav-mobile a {
  font-size: 0.95rem; color: rgba(255,255,255,0.8);
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: block; transition: var(--transition);
}
.nav-mobile a:hover { color: var(--gold); }
.nav-mobile.open { display: flex; }

/* ---- PAGE HERO ---- */
.page-hero {
  padding: 130px 0 72px;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(201,168,76,0.08), transparent);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.page-hero h1 { color: var(--white); margin-bottom: 16px; }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 540px; font-size: 1.02rem; }

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border: 1px solid rgba(10,22,40,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
}
.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card-icon {
  width: 52px; height: 52px;
  background: var(--gold-pale);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; color: var(--gold); }

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

/* ---- FOOTER ---- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--white); margin-bottom: 10px;
}
.footer-brand-tag {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.footer-desc { font-size: 0.88rem; line-height: 1.7; max-width: 260px; }
.footer-col h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.62); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem; transition: var(--transition);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }

/* ---- FADE IN ANIMATION ---- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   ENHANCED MOBILE & TABLET RESPONSIVENESS
   ============================================================ */

/* Tablet 768–1024px */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.6rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .cta-banner { flex-direction: column; padding: 40px 32px; }
  .cta-banner-actions { flex-direction: row; }
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Mobile 480–768px */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .section { padding: 52px 0; }
  .container { padding: 0 16px; }

  /* Hero */
  .hero { padding-top: 68px; min-height: auto; padding-bottom: 52px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px; padding-top: 28px; margin-top: 40px; }
  .hero-stats > div { min-width: 40%; }
  .stat-num { font-size: 1.8rem; }
  .hero-geo { display: none; }

  /* Navbar */
  .navbar { height: 60px; }
  .nav-brand-name { font-size: 1rem; }

  /* Grids */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Cards */
  .card { padding: 24px 20px; }

  /* Page Hero */
  .page-hero { padding: 100px 0 48px; }
  .page-hero h1 { font-size: 1.8rem; }

  /* CTA Banner */
  .cta-banner { padding: 36px 24px; }
  .cta-banner h2 { font-size: 1.5rem; }
  .cta-banner-actions { flex-direction: column; width: 100%; }
  .cta-banner-actions .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer { padding: 48px 0 0; }
  .footer-brand-name { font-size: 1.1rem; }
  .footer-desc { max-width: 100%; }

  /* Buttons */
  .btn { font-size: 0.84rem; padding: 12px 22px; }

  /* Section titles */
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }

  /* Timeline */
  .timeline { padding-left: 20px; }
  .timeline-item::before { left: -26px; }

  /* OEM Grid */
  .oem-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Lead Magnet */
  .lead-magnet-grid { grid-template-columns: 1fr !important; }
}

/* Small Mobile < 480px */
@media (max-width: 480px) {
  html { font-size: 14px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .hero-stats > div { min-width: 100%; text-align: center; }
  .stat-num { font-size: 2rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .oem-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-mobile a { font-size: 1rem; padding: 14px 0; }
  .page-hero h1 { font-size: 1.5rem; }
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  .nav-mobile a { min-height: 44px; display: flex; align-items: center; }
  .btn { min-height: 44px; }
  .footer-col ul li a { min-height: 36px; display: flex; align-items: center; }
  input, select, textarea { font-size: 16px !important; } /* Prevent iOS zoom */
}

/* OEM Logo Styles */
.oem-logo-card {
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: var(--white);
  transition: var(--transition);
  min-height: 100px;
}
.oem-logo-card:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.oem-logo-icon { font-size: 1.8rem; }
.oem-logo-name { font-size: 0.82rem; font-weight: 600; color: var(--navy); }
.oem-logo-type { font-size: 0.7rem; color: var(--text-light); letter-spacing: 0.08em; }

/* Lead Magnet Card */
.lead-magnet-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.lead-magnet-card::before {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(201,168,76,0.15), transparent 70%);
}
.lead-magnet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lead-magnet-icon { font-size: 2.2rem; margin-bottom: 14px; }
.lead-magnet-card h4 { color: var(--white); margin-bottom: 8px; font-size: 1rem; }
.lead-magnet-card p { color: rgba(255,255,255,0.6); font-size: 0.84rem; margin-bottom: 20px; }
.lead-magnet-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 3px 10px; border-radius: 100px;
  display: inline-block; margin-bottom: 14px;
}

/* Sticky CTA Bar (mobile) */
.sticky-cta-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
  background: var(--navy);
  border-top: 1px solid rgba(201,168,76,0.25);
  padding: 12px 16px;
  gap: 10px;
}
@media (max-width: 768px) {
  .sticky-cta-bar { display: flex; }
  .sticky-cta-bar .btn { flex: 1; justify-content: center; font-size: 0.8rem; padding: 11px 10px; }
  body { padding-bottom: 72px; }
}

/* Pulse animation for WhatsApp */
@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-pulse { animation: pulse-wa 2s infinite; }


/* ============================================================
   FULL MOBILE RESPONSIVE — ENHANCED
   ============================================================ */

@media (max-width: 1024px) {
  .hero h1 { font-size: 2.6rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .cta-banner { flex-direction: column; padding: 40px 32px; }
  .cta-banner-actions { flex-direction: row; flex-wrap: wrap; }
  .story-grid { grid-template-columns: 1fr !important; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .hero { padding-top: 68px; min-height: auto; padding-bottom: 48px; }
  .hero h1 { font-size: 1.85rem !important; }
  .hero-sub { font-size: 0.94rem; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; padding-top: 24px; margin-top: 32px; flex-wrap: wrap; }
  .hero-stats > div { min-width: 42%; }
  .stat-num { font-size: 1.75rem; }
  .hero-geo { display: none; }
  .navbar { height: 60px; }
  .nav-brand-name { font-size: 0.95rem; }
  .page-hero { padding: 96px 0 44px; }
  .page-hero h1 { font-size: 1.65rem !important; }
  .page-hero p { font-size: 0.92rem; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.15rem !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .card { padding: 20px 16px; }
  .cta-banner { padding: 28px 20px; flex-direction: column; }
  .cta-banner h2 { font-size: 1.35rem !important; }
  .cta-banner-actions { flex-direction: column; width: 100%; }
  .cta-banner-actions .btn { width: 100%; justify-content: center; }
  .story-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .timeline { padding-left: 18px; }
  .timeline-item::before { left: -25px; }
  .footer { padding: 36px 0 0; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 22px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .btn { font-size: 0.83rem; padding: 11px 18px; }
  .contact-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .contact-form-wrap { padding: 22px 16px !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .client-logo-grid { grid-template-columns: repeat(2,1fr) !important; }
  .solution-hero-card { padding: 24px 18px; }
  .usecase-grid { grid-template-columns: 1fr 1fr !important; }
  .spec-table { font-size: 0.78rem; }
  .spec-table th, .spec-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .container { padding: 0 14px; }
  .hero h1 { font-size: 1.6rem !important; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .hero-stats > div { min-width: 100%; text-align: center; }
  .grid-4 { grid-template-columns: 1fr !important; }
  .client-logo-grid { grid-template-columns: 1fr 1fr !important; }
  .nav-brand-name { font-size: 0.88rem; }
  .page-hero h1 { font-size: 1.4rem !important; }
  .footer-social a { width: 30px; height: 30px; }
  .usecase-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .nav-mobile a { min-height: 46px; display: flex; align-items: center; }
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px !important; }
  .footer-col ul li a { min-height: 36px; display: flex; align-items: center; }
}

/* Sticky Mobile CTA Bar */
.sticky-cta-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
  background: var(--navy);
  border-top: 1px solid rgba(201,168,76,0.25);
  padding: 10px 14px; gap: 8px;
}
@media (max-width: 768px) {
  .sticky-cta-bar { display: flex; }
  .sticky-cta-bar .btn { flex: 1; justify-content: center; font-size: 0.78rem; padding: 10px 6px; min-height: 42px; }
  body { padding-bottom: 68px; }
}

/* WhatsApp pulse */
@keyframes pulse-wa {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-pulse { animation: pulse-wa 2.5s infinite; }
