/* ============================================================
   KARIGAR PRO — global.css
   Variables · reset · typography · nav · footer · cursor ·
   scroll progress · WhatsApp FAB · AI chatbot · utilities
   ============================================================ */

:root {
  --color-racing-red: #E8192C;
  --color-deep-blue:  #1A3AD4;
  --color-steel-blue: #4A6CC8;
  --color-cloud-grey: #C8CDD6;
  --color-pure-white: #FFFFFF;
  --color-near-black: #0D0D0D;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Inter', sans-serif;

  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-red:  0 8px 40px rgba(232, 25, 44, 0.35);
  --shadow-blue: 0 8px 40px rgba(26, 58, 212, 0.35);

  --nav-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }      /* Lenis handles smooth scroll */
body {
  font-family: var(--font-body);
  background: var(--color-near-black);
  color: var(--color-pure-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; }

/* ---------- typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.0;
}
h1 { font-size: clamp(52px, 8vw, 96px); }
h2 { font-size: clamp(36px, 5vw, 64px); }
h3 { font-size: clamp(24px, 3vw, 36px); }
p  { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.7; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: clamp(12px, 1.4vw, 15px);
  color: var(--color-racing-red);
}

/* ---------- layout helpers ---------- */
.section { padding: clamp(60px, 8vh, 120px) clamp(24px, 6vw, 96px); position: relative; }
.wrap { max-width: 1280px; margin: 0 auto; width: 100%; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: 4px; cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid transparent; background: none;
}
.btn i, .btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--color-racing-red); color: #fff; border-color: var(--color-racing-red); }
.btn-primary:hover { background: transparent; color: var(--color-racing-red); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--color-near-black); }
.btn-dark { background: var(--color-near-black); color: #fff; border-color: var(--color-near-black); }
.btn-dark:hover { background: transparent; color: var(--color-near-black); border-color: var(--color-near-black); }

/* ---------- shared inner-page hero ---------- */
.page-hero {
  position: relative;
  min-height: 56vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) clamp(24px, 6vw, 96px) clamp(50px, 7vh, 90px);
  background: var(--color-near-black); overflow: hidden;
}
.page-hero__inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-hero h1 { font-size: clamp(48px, 9vw, 110px); }
.page-hero__sub { color: var(--color-cloud-grey); margin-top: 18px; max-width: 540px; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 100%;
  background: var(--color-racing-red);
  transform-origin: left; transform: scaleX(0);
  z-index: 10000;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.custom-cursor {
  position: fixed; top: 0; left: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--color-racing-red);
  border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}
/* hide on touch / no-hover devices */
@media (hover: none), (pointer: coarse) {
  .custom-cursor { display: none !important; }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; width: 100%;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 64px);
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 9500;
  will-change: transform;
}
.nav__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--color-racing-red);
}
.nav__logo span { color: var(--color-pure-white); }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav__link {
  position: relative;
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 16px; color: #fff; padding: 4px 0;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--color-racing-red);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s ease;
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { color: var(--color-racing-red); }
.nav__link.is-active::after { transform: scaleX(1); }
.nav__cta { margin-left: 8px; }

/* hamburger */
.nav__burger {
  display: none; width: 40px; height: 40px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
  z-index: 9600;
}
.nav__burger span {
  display: block; width: 26px; height: 2px; background: #fff;
  transition: transform 0.35s ease, opacity 0.25s ease;
  margin-left: auto;
}
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* mobile overlay */
.nav__overlay {
  position: fixed; inset: 0;
  background: var(--color-near-black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 9400;
}
.nav__overlay.is-open { transform: translateY(0); }
.nav__overlay a {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; font-size: clamp(30px, 8vw, 52px);
  letter-spacing: 0.04em; color: #fff;
  opacity: 0; transform: translateY(30px);
}
.nav__overlay a.is-active { color: var(--color-racing-red); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-near-black);
  border-top: 1px solid rgba(232, 25, 44, 0.3);
  padding: clamp(48px, 7vh, 88px) clamp(24px, 6vw, 96px) 28px;
}
.footer__grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 48px;
}
.footer__logo {
  font-family: var(--font-display); font-weight: 700; font-size: 28px;
  text-transform: uppercase; color: var(--color-racing-red); margin-bottom: 14px;
}
.footer__logo span { color: #fff; }
.footer__tag { color: var(--color-cloud-grey); max-width: 320px; }
.footer__col h4 {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 18px; margin-bottom: 18px; color: #fff;
}
.footer__col a, .footer__col p { color: var(--color-cloud-grey); display: block; margin-bottom: 10px; transition: color 0.25s ease; }
.footer__col a:hover { color: var(--color-racing-red); }
.footer__bottom {
  max-width: 1280px; margin: 40px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: rgba(200, 205, 214, 0.7); font-size: 14px;
}

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.45);
  z-index: 9000; transition: transform 0.3s ease;
  animation: waPulse 2s ease-in-out infinite;
}
.whatsapp-fab:hover { transform: scale(1.15); }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(37,211,102,0.45); }
  50% { box-shadow: 0 8px 48px rgba(37,211,102,0.75), 0 0 0 12px rgba(37,211,102,0.1); }
}

/* ============================================================
   AI CHATBOT
   ============================================================ */
.chatbot-fab {
  position: fixed; bottom: 100px; right: 28px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--color-deep-blue), var(--color-racing-red));
  border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(26, 58, 212, 0.5);
  z-index: 9000;
  animation: chatPulse 3s ease-in-out infinite;
}
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(26,58,212,0.5); }
  50% { box-shadow: 0 8px 48px rgba(26,58,212,0.7), 0 0 0 10px rgba(26,58,212,0.08); }
}
.chatbot-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--color-racing-red); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 5px; border-radius: 8px;
}
.chatbot-window {
  position: fixed; bottom: 175px; right: 28px;
  width: 340px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 200px);
  background: var(--color-near-black);
  border: 1px solid rgba(26, 58, 212, 0.4);
  border-radius: 20px; display: flex; flex-direction: column;
  z-index: 8999; opacity: 0; pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); overflow: hidden;
}
.chatbot-window.active { opacity: 1; pointer-events: all; transform: none; }
.chatbot-header {
  background: linear-gradient(90deg, var(--color-deep-blue), var(--color-steel-blue));
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.chatbot-avatar {
  width: 38px; height: 38px; background: var(--color-racing-red);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 14px; flex-shrink: 0;
}
.chatbot-name { font-weight: 600; font-size: 14px; color: #fff; }
.chatbot-status { font-size: 11px; color: rgba(255, 255, 255, 0.8); }
.chatbot-status::first-letter { color: #38e06a; }
.chatbot-close {
  margin-left: auto; background: none; border: none; color: #fff;
  font-size: 16px; cursor: pointer; opacity: 0.85; padding: 4px;
}
.chatbot-messages {
  flex: 1; padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.bot-msg {
  background: rgba(26, 58, 212, 0.2); border-left: 3px solid var(--color-deep-blue);
  color: #fff; padding: 10px 14px; border-radius: 0 12px 12px 12px;
  font-size: 13px; line-height: 1.5; max-width: 85%; white-space: pre-line;
}
.user-msg {
  background: var(--color-racing-red); color: #fff;
  padding: 10px 14px; border-radius: 12px 12px 0 12px;
  font-size: 13px; align-self: flex-end; max-width: 85%; line-height: 1.5;
}
.chatbot-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chatbot-input-row input {
  flex: 1; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px;
  padding: 10px 14px; color: #fff; font-size: 13px; outline: none;
}
.chatbot-input-row input:focus { border-color: var(--color-racing-red); }
.chatbot-input-row button {
  background: var(--color-racing-red); border: none; border-radius: 12px;
  width: 42px; color: #fff; font-size: 16px; cursor: pointer; flex-shrink: 0;
}

/* ============================================================
   SHARED ANIMATION HELPERS
   ============================================================ */
.word { display: inline-block; }
.marquee {
  display: flex; gap: 56px; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-mask { overflow: hidden; width: 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__overlay a { font-size: clamp(28px, 9vw, 44px); }
  .whatsapp-fab { bottom: 16px; right: 16px; width: 54px; height: 54px; }
  .chatbot-fab { bottom: 82px; right: 16px; width: 54px; height: 54px; }
  .chatbot-window { bottom: 148px; right: 16px; height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .whatsapp-fab, .chatbot-fab, .marquee { animation: none !important; }
}
