/* Critical CSS — loads synchronously. Contains base, typography, buttons and nav.
   style.css loads async and covers all other components. */

:root {
  --primary: #0097b2;
  --primary-dark: #007a92;
  --primary-light: #00b8d9;
  --purple: #97357d;
  --orange: #ee4c4b;
  --black: #111111;
  --dark: #1a1a2e;
  --gray: #555;
  --light-gray: #f5f7f9;
  --white: #ffffff;
  --font: 'Inter', 'Segoe UI', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,151,178,0.12);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

img { max-width: 100%; height: auto; display: block; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

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

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p { font-size: 1.05rem; color: var(--gray); line-height: 1.75; }
a { text-decoration: none; color: inherit; }

.highlight { color: var(--primary); }
.highlight-purple { color: var(--purple); }
.highlight-orange { color: var(--orange); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 20px rgba(0,151,178,0.4); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,151,178,0.5); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); transform: translateY(-2px); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #333; transform: translateY(-2px); }
.btn-purple { background: var(--purple); color: var(--white); box-shadow: 0 4px 20px rgba(151,53,125,0.35); }
.btn-purple:hover { background: #7a2965; transform: translateY(-2px); }
.btn-white { background: var(--white); color: var(--primary); font-weight: 700; }
.btn-white:hover { background: #f0f0f0; transform: translateY(-2px); }

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  overflow: visible !important;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 42px; width: auto; display: block; border-radius: 6px; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-name { font-size: 1.15rem; font-weight: 900; color: var(--white); letter-spacing: -0.02em; transition: color var(--transition); }
.nav-logo-sub { font-size: 0.65rem; font-weight: 700; color: var(--primary-light); letter-spacing: 0.06em; text-transform: uppercase; transition: color var(--transition); }
.nav.scrolled .nav-logo-name { color: var(--black); }
.nav.scrolled .nav-logo-sub { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a { padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; color: var(--white); transition: var(--transition); }
.nav.scrolled .nav-links a { color: var(--black); }
.nav-links a:hover { color: var(--primary); background: rgba(0,151,178,0.08); }
.nav-links a.active { color: var(--primary); }
.nav-cta { margin-left: 16px; }
.nav-links a { display: inline-flex; align-items: center; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  font-size: 0.65rem; font-weight: 800; margin-left: 6px; line-height: 1;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,151,178,0.45);
}
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px; position: relative; z-index: 1001;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); border-radius: 2px; }
.nav.scrolled .nav-hamburger span { background: var(--black); }

/* ---- NAV DROPDOWN ---- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer; padding: 8px 16px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; color: var(--white); font-family: inherit;
  display: inline-flex; align-items: center; transition: var(--transition);
}
.nav-dropdown-toggle:hover { color: var(--primary); background: rgba(0,151,178,0.08); }
.nav.scrolled .nav-dropdown-toggle { color: var(--black); }
.nav-dropdown-arrow { font-size: 0.62rem; margin-left: 4px; opacity: 0.75; }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  min-width: 215px; list-style: none; padding: 8px; z-index: 1100;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-dropdown-menu li { list-style: none; }
.nav-dropdown-menu a {
  display: flex !important; align-items: center; gap: 10px;
  padding: 10px 14px !important; border-radius: 8px; color: var(--black) !important;
  font-size: 0.9rem !important; font-weight: 600; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: rgba(0,151,178,0.08) !important; color: var(--primary) !important; }

/* ---- GRADIENT BG (nav uses this) ---- */
.bg-gradient {
  background: linear-gradient(135deg, var(--dark) 0%, #0a2a3a 50%, #0d1b2a 100%);
  position: relative;
  overflow: hidden;
}
.bg-gradient::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,151,178,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.bg-gradient::after {
  content: ''; position: absolute; bottom: -150px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(151,53,125,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- NAV OVERLAY (mobile) ---- */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 997; -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.nav-overlay.visible { display: block; }

/* ---- RESPONSIVE: NAV MOBILE ---- */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 36px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .nav-mobile-open { background: rgba(255,255,255,0.97) !important; box-shadow: 0 2px 20px rgba(0,0,0,0.08) !important; }
  .nav-mobile-open .nav-logo-name { color: var(--black) !important; }
  .nav-mobile-open .nav-logo-sub { color: var(--primary) !important; }

  .nav-mobile-open .nav-links {
    display: flex; flex-direction: column; position: fixed;
    top: var(--nav-height, 80px); left: 0; right: 0; bottom: 0;
    background: var(--white); padding: 16px 24px 96px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-top: 1px solid #eee;
    z-index: 999; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .nav-mobile-open .nav-links a { color: var(--black); padding: 14px 16px; font-size: 1.05rem; border-bottom: 1px solid #f0f0f0; }
  .nav-mobile-open .nav-links li:last-child a { border-bottom: none; }
  .nav-mobile-open .nav-dropdown-toggle { color: var(--black); padding: 14px 16px; font-size: 1.05rem; width: 100%; justify-content: flex-start; border-bottom: 1px solid #f0f0f0; }
  .nav-mobile-open .nav-cta {
    display: flex; padding: 12px 24px; padding-bottom: max(12px, env(safe-area-inset-bottom));
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--white); border-top: 1px solid #eee; z-index: 1000; touch-action: manipulation;
  }
  .nav-mobile-open .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-mobile-open .nav-dropdown-menu { display: none; position: static; box-shadow: none; background: rgba(0,151,178,0.05); border-radius: 8px; padding: 4px 0 4px 12px; margin: 4px 0 8px 16px; }
  .nav-mobile-open .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-mobile-open .nav-dropdown-menu a { padding: 10px 16px !important; font-size: 0.95rem !important; color: var(--black) !important; border-bottom: none !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.65rem; }
  .btn { padding: 13px 22px; font-size: 0.95rem; white-space: normal; text-align: center; }
}
