/* =========================================================
   QUANTARA RESEARCH LABS — STYLESHEET
   Clean, minimal, professional scientific landing page
   ========================================================= */

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

:root {
  --navy:       #0f2744;
  --blue:       #1b4f8a;
  --accent:     #0096c7;
  --accent-lt:  #00b4d8;
  --teal:       #00c9b1;
  --white:      #ffffff;
  --off-white:  #f7f9fc;
  --light-gray: #eef2f7;
  --border:     #dce4ef;
  --text:       #1e293b;
  --muted:      #64748b;
  --dark-bg:    #0d1f38;
  --dark-card:  #152d4e;
  --font-head:  'Montserrat', 'Segoe UI', sans-serif;
  --font-body:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(15,39,68,.08);
  --shadow-md:  0 8px 40px rgba(15,39,68,.14);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ----- CONTAINER ----- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- TYPOGRAPHY UTILITIES ----- */
.section { padding: 96px 0; }
.section-white  { background: var(--white); }
.section-light  { background: var(--off-white); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header-light .section-title { color: var(--white); }
.section-header-light .section-sub   { color: rgba(255,255,255,.7); }

.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,150,199,.08);
  border: 1px solid rgba(0,150,199,.2);
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.tag-light {
  color: var(--teal);
  background: rgba(0,201,177,.1);
  border-color: rgba(0,201,177,.25);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-lt); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,150,199,.35); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: var(--white); }

.btn-sm { padding: 9px 20px; font-size: .875rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-nav {
  background: var(--accent);
  color: var(--white);
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
}
.btn-nav:hover { background: var(--accent-lt); transform: translateY(-1px); }

/* ----- NAVBAR ----- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border), var(--shadow);
  padding: 12px 0;
}

.navbar.scrolled .nav-links a { color: var(--navy); }
.navbar.scrolled .logo { color: var(--navy); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}
.logo-light { color: rgba(255,255,255,.85); }
.logo-q { color: var(--accent-lt); }
.logo-dot { color: var(--teal); }
.logo-img { height: 44px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  transition: color var(--transition);
}
.nav-links a:not(.btn-nav):hover { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar.scrolled .nav-toggle span { background: var(--navy); }

/* ----- HERO ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #163b6e 50%, #0a2d52 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0,150,199,.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,201,177,.12) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(27,79,138,.3) 0%, transparent 40%);
  pointer-events: none;
}

/* Animated dot grid overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 140px 24px 100px;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-title .accent { color: var(--accent-lt); }

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: rgba(255,255,255,.75);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
  letter-spacing: .04em;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.18);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll-indicator span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 99px;
  position: relative;
}
.hero-scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,.5);
  border-radius: 99px;
  animation: scrollBounce 1.8s ease infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50%       { opacity: .3; transform: translateX(-50%) translateY(10px); }
}

/* ----- ABOUT ----- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}
.about-text p strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.highlight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.highlight-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.highlight-icon { font-size: 1.75rem; margin-bottom: 12px; }
.highlight-card h3 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.highlight-card p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* ----- EXPERTISE GRID ----- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.expertise-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.expertise-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  opacity: 0;
  transition: opacity var(--transition);
}
.expertise-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  background: var(--white);
}
.expertise-card:hover::before { opacity: 1; }

.card-icon { font-size: 1.8rem; margin-bottom: 14px; }
.expertise-card h3 { font-size: .925rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.35; }
.expertise-card p { font-size: .845rem; color: var(--muted); line-height: 1.6; }

/* ----- VISION & MISSION ----- */
.section-dark { background: var(--dark-bg); }

.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.vm-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 44px 40px;
  transition: var(--transition);
}
.vm-card:hover {
  border-color: rgba(0,150,199,.4);
  box-shadow: 0 8px 40px rgba(0,150,199,.12);
}
.vm-icon { font-size: 2.5rem; margin-bottom: 20px; }
.vm-card h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.vm-card p {
  color: rgba(255,255,255,.65);
  font-size: 1rem;
  line-height: 1.75;
}

/* ----- PROGRAMS ----- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: var(--transition);
}
.program-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent); }

.program-card h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.program-card p { font-size: .935rem; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }

.program-featured {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-color: transparent;
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 48px;
}
.program-featured h3 { color: var(--white); font-size: 1.35rem; margin-bottom: 12px; min-width: 240px; }
.program-featured p { color: rgba(255,255,255,.72); margin-bottom: 0; flex: 1; }

/* ----- CONTACT ----- */
.contact-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info { padding-top: 8px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
}
.contact-icon { font-size: 1.4rem; margin-top: 2px; }
.contact-item strong { display: block; font-weight: 600; color: var(--navy); margin-bottom: 4px; font-size: .95rem; }
.contact-item p { color: var(--muted); font-size: .9rem; }
.contact-item p a { color: var(--muted); text-decoration: none; }
.contact-item p a:hover { color: var(--accent-lt); }

.contact-form {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.form-group:last-of-type { margin-bottom: 24px; }

label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: .93rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
input::placeholder, textarea::placeholder { color: #aab5c3; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,150,199,.1);
}
textarea { resize: vertical; }

.form-note {
  margin-top: 12px;
  font-size: .78rem;
  color: #9fafc0;
  text-align: center;
}

/* ----- FOOTER ----- */
.footer { background: var(--navy); padding: 72px 0 0; }

.footer-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo { display: block; margin-bottom: 14px; font-size: 1.25rem; }
.footer-brand .logo-img { height: 52px; }
.footer-brand p { font-size: .875rem; color: rgba(255,255,255,.45); line-height: 1.6; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 12px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 0;
}
.footer-bottom p {
  font-size: .8rem;
  color: rgba(255,255,255,.3);
  text-align: center;
}

/* ----- ANIMATIONS (fade-in on scroll) ----- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  /* nav mobile */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 80px 32px 32px;
    box-shadow: -8px 0 40px rgba(0,0,0,.15);
    transition: right var(--transition);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-links a { color: var(--navy); font-size: 1rem; padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .nav-links .btn-nav { margin-top: 16px; border-bottom: none; padding: 11px 22px; }

  .hero-content { padding: 120px 24px 80px; }
  .hero-actions { flex-direction: column; }

  .about-highlights { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr 1fr; }

  .vm-grid { grid-template-columns: 1fr; }
  .vm-card { padding: 32px 28px; }

  .programs-grid { grid-template-columns: 1fr; }
  .program-featured { flex-direction: column; gap: 20px; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 24px; }

  .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .expertise-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 16px; }
  .stat-divider { display: none; }
}
