/* ============================================
   CORE QUEST RESEARCH — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --navy:    #0B1728;
  --navy-2:  #112240;
  --teal:    #00C2A8;
  --teal-dim:#00997F;
  --slate:   #8892A4;
  --light:   #CDD6E4;
  --white:   #F4F8FF;
  --bg:      #060E1C;
  --card:    #0D1F38;
  --border:  rgba(0,194,168,.18);
  --glow:    0 0 40px rgba(0,194,168,.12);

  --ff-head: 'Syne', sans-serif;
  --ff-body: 'DM Sans', sans-serif;

  --r: .75rem;
  --r-lg: 1.25rem;
  --transition: .35s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--light);
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

/* ── Grid bg pattern ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,194,168,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,194,168,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Utility ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.section { padding: 6rem 0; }
.section--tight { padding: 4rem 0; }

.tag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-head); font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); background: rgba(0,194,168,.08);
  border: 1px solid var(--border);
  padding: .35rem .9rem; border-radius: 99px;
  margin-bottom: 1.25rem;
}
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); display: block; }

h1,h2,h3,h4 { font-family: var(--ff-head); line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

.text-teal { color: var(--teal); }
.text-slate { color: var(--slate); }
.lead { font-size: 1.1rem; color: var(--slate); max-width: 600px; line-height: 1.8; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--ff-head); font-size: .9rem; font-weight: 600;
  padding: .8rem 1.8rem; border-radius: var(--r);
  transition: var(--transition); cursor: pointer; border: none;
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.08);
  opacity: 0; transition: var(--transition);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--teal); color: var(--navy);
}
.btn-primary:hover { background: #00d9bc; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,194,168,.35); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,.2);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

.btn svg { width: 18px; height: 18px; }

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0; transition: var(--transition);
}
.card:hover { border-color: rgba(0,194,168,.4); transform: translateY(-4px); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }

/* ── Section titles ── */
.section-title { margin-bottom: 3.5rem; }
.section-title h2 { margin-bottom: .75rem; }
.section-title p { color: var(--slate); max-width: 560px; }
.section-title.center { text-align: center; }
.section-title.center p { margin: 0 auto; }

/* ── Icon box ── */
.icon-box {
  width: 52px; height: 52px;
  background: rgba(0,194,168,.1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; color: var(--teal);
  transition: var(--transition);
}
.card:hover .icon-box { background: rgba(0,194,168,.2); }

/* ── Divider ── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 4rem 0; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 0;
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(6,14,28,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.logo {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--ff-head); font-weight: 800; font-size: 1.15rem; color: var(--white);
}
.logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 800; color: var(--navy);
  box-shadow: 0 4px 16px rgba(0,194,168,.3);
}
.logo span { color: var(--teal); }

.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  font-family: var(--ff-head); font-size: .875rem; font-weight: 500;
  padding: .5rem .9rem; border-radius: var(--r);
  color: var(--light); transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal); background: rgba(0,194,168,.07); }

.nav-cta { margin-left: .75rem; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--light); border-radius: 2px; transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(6,14,28,.97); backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  padding: 2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--ff-head); font-size: 1.5rem; font-weight: 700;
  color: var(--light); transition: var(--transition);
}
.mobile-nav a:hover { color: var(--teal); }
.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: var(--light); cursor: pointer; font-size: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand p { color: var(--slate); margin-top: .75rem; font-size: .9rem; line-height: 1.8; max-width: 280px; }
.footer-col h4 { font-family: var(--ff-head); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { color: var(--slate); font-size: .9rem; transition: var(--transition); }
.footer-col ul a:hover { color: var(--teal); padding-left: 4px; }
.footer-contact p { color: var(--slate); font-size: .875rem; line-height: 1.9; }
.footer-contact a { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p, .footer-bottom a { color: var(--slate); font-size: .85rem; }
.footer-bottom a:hover { color: var(--teal); }

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  padding: 9rem 0 5rem;
  position: relative; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 40%, rgba(0,194,168,.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero .lead { margin-bottom: 2rem; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.breadcrumb a, .breadcrumb span { font-size: .85rem; color: var(--slate); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { color: var(--border); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,194,168,.4); }
  50%      { box-shadow: 0 0 0 12px rgba(0,194,168,0); }
}

.animate {
  opacity: 0;
  animation: fadeUp .7s var(--transition) forwards;
}
.animate.delay-1 { animation-delay: .1s; }
.animate.delay-2 { animation-delay: .2s; }
.animate.delay-3 { animation-delay: .3s; }
.animate.delay-4 { animation-delay: .4s; }
.animate.delay-5 { animation-delay: .5s; }
.animate.delay-6 { animation-delay: .6s; }
.animate.slide  { animation-name: slideRight; }
.animate.scale  { animation-name: scaleIn; }

/* Scroll-triggered */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.visible.delay-1 { transition-delay: .1s; }
.reveal.visible.delay-2 { transition-delay: .2s; }
.reveal.visible.delay-3 { transition-delay: .3s; }
.reveal.visible.delay-4 { transition-delay: .4s; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; font-family: var(--ff-head); font-size: .8rem;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--slate); margin-bottom: .5rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(13,31,56,.8);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--white);
  font-family: var(--ff-body); font-size: .95rem;
  padding: .85rem 1.1rem;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,194,168,.12);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
}
.stat-item {
  flex: 1; min-width: 160px;
  padding: 1.75rem 2rem;
  border-right: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--ff-head); font-size: 2.2rem; font-weight: 800;
  color: var(--teal); display: block; line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--slate); margin-top: .35rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}
