/* ===================================================================
   App Brainiac — styles.css
   Bold & playful, brand blue/navy. Mobile-first + animations.
=================================================================== */

:root {
  --blue:      #1d4ed8;
  --blue-700:  #1e40af;
  --blue-600:  #2563eb;
  --blue-500:  #3b82f6;
  --blue-400:  #60a5fa;
  --navy:      #0a1b3d;
  --navy-2:    #0d2452;
  --gold:      #f5b400;
  --ink:       #0b1220;
  --slate:     #4b5a73;
  --paper:     #f5f8ff;
  --white:     #ffffff;

  --grad-brand: linear-gradient(120deg, #2563eb 0%, #1d4ed8 45%, #4f46e5 100%);
  --grad-text:  linear-gradient(100deg, #60a5fa 0%, #2563eb 40%, #4f46e5 75%, #60a5fa 100%);

  --radius:   22px;
  --radius-sm:14px;
  --shadow:   0 24px 60px -22px rgba(13, 36, 82, 0.45);
  --shadow-sm:0 12px 30px -14px rgba(13, 36, 82, 0.35);
  --maxw:     1180px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--grad-brand);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.5em;
  border-radius: 100px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.25s;
  will-change: transform;
}
.btn-primary {
  background: var(--grad-brand);
  color: var(--white);
  box-shadow: 0 14px 30px -10px rgba(37, 99, 235, 0.65);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -12px rgba(37, 99, 235, 0.75); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--navy);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--blue); background: rgba(37, 99, 235, 0.08); }
.btn-nav {
  background: var(--grad-brand);
  color: #fff;
  padding: 0.6em 1.2em;
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.6);
}
.btn-nav:hover { transform: translateY(-2px); }
.btn-lg { font-size: 1.08rem; padding: 1em 1.8em; }

/* ===================================================================
   Header
=================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 14px 0;
  transition: padding 0.4s var(--ease);
}
/* The scrolled blur/background lives on a pseudo-element, NOT the header itself.
   An element with backdrop-filter becomes the containing block for its
   position:fixed descendants — putting it on .site-header would collapse the
   fixed mobile menu to header height once scrolled. Keeping it on ::before
   avoids that while looking identical. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 30px -18px rgba(13, 36, 82, 0.4);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.site-header.scrolled::before { opacity: 1; }
.site-header.scrolled { padding: 8px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo { width: 120px; transition: transform 0.4s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.05); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav-links > a:not(.btn) {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--navy);
  position: relative;
  padding: 4px 0;
}
.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links > a:not(.btn):hover::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2.5px;
  margin: 0 auto;
  background: var(--navy);
  border-radius: 3px;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===================================================================
   Hero
=================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, #eaf1ff 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  will-change: transform;
}
.blob-1 { width: 460px; height: 460px; top: -120px; right: -80px;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #2563eb);
  animation: float-a 13s ease-in-out infinite; }
.blob-2 { width: 360px; height: 360px; bottom: -100px; left: -60px;
  background: radial-gradient(circle at 40% 40%, #818cf8, #4f46e5);
  animation: float-b 16s ease-in-out infinite; }
.blob-3 { width: 280px; height: 280px; top: 38%; left: 42%;
  background: radial-gradient(circle at 50% 50%, #93c5fd, #3b82f6);
  opacity: 0.4;
  animation: float-a 19s ease-in-out infinite reverse; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
}

.eyebrow {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-700);
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 22px;
}
.gradient-text {
  background: var(--grad-text);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}
.hero-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--slate);
  max-width: 38ch;
  margin: 0 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual img { width: min(100%, 520px); filter: drop-shadow(0 30px 50px rgba(13, 36, 82, 0.25)); }
.visual-glow {
  position: absolute;
  width: 75%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.45), transparent 65%);
  filter: blur(30px);
  z-index: -1;
}
.float { animation: bob 6s ease-in-out infinite; }

.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(37, 99, 235, 0.45);
  border-radius: 100px;
  display: grid;
  justify-items: center;
  padding-top: 8px;
  z-index: 1;
}
.scroll-cue span {
  width: 5px; height: 9px;
  border-radius: 4px;
  background: var(--blue);
  animation: cue 1.7s ease-in-out infinite;
}

/* ===================================================================
   Generic section
=================================================================== */
.section { position: relative; padding: clamp(70px, 11vw, 130px) 0; }
.section-head { margin-bottom: 30px; }
.kicker {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  color: var(--navy);
}
.lead-para { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--navy); font-weight: 500; }
p { color: var(--slate); }

/* ---------- Who We Are ---------- */
.who { background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%); overflow: hidden; }
.who .accent-shape {
  position: absolute;
  top: -80px; right: -120px;
  width: 380px; height: 380px;
  background: var(--grad-brand);
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
  opacity: 0.08;
  animation: morph 14s ease-in-out infinite;
}
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  position: relative;
}

/* ---------- Our Team ---------- */
.team { background: var(--paper); }
.team-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: clamp(30px, 5vw, 64px);
}
.team-media { position: relative; }
.team-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  transition: transform 0.5s var(--ease);
}
.team-media:hover img { transform: rotate(0deg) scale(1.01); }
.media-frame {
  position: absolute;
  inset: -16px -16px 16px 16px;
  border-radius: var(--radius);
  background: var(--grad-brand);
  opacity: 0.16;
  z-index: -1;
  transform: rotate(3deg);
}

/* ---------- Contact / CTA ---------- */
.contact {
  position: relative;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 55%, #14306b 100%);
  color: #eaf1ff;
  overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob-c1 { width: 420px; height: 420px; top: -120px; left: -80px;
  background: radial-gradient(circle, #2563eb, transparent 70%); opacity: 0.5;
  animation: float-b 17s ease-in-out infinite; }
.blob-c2 { width: 360px; height: 360px; bottom: -130px; right: -70px;
  background: radial-gradient(circle, #4f46e5, transparent 70%); opacity: 0.45;
  animation: float-a 20s ease-in-out infinite; }
.cta-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
}
.contact .section-title { color: #fff; }
.cta-lead { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: #b9ccf2; max-width: 46ch; margin: 18px 0 30px; }
.cta-visual img { width: min(100%, 460px); margin-inline: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.4)); }

/* ===================================================================
   Footer
=================================================================== */
.site-footer { background: #06122b; color: #9fb3d8; padding: 46px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-logo { width: 120px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-mail { color: var(--blue-400); font-weight: 600; }
.footer-mail:hover { color: #fff; }
.footer-copy { font-size: 0.88rem; margin: 0; color: #6f87b3; }

/* ===================================================================
   Scroll-reveal
=================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ===================================================================
   Keyframes
=================================================================== */
@keyframes shine { to { background-position: 220% center; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes float-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(26px, -22px) scale(1.06); } }
@keyframes float-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-24px, 20px) scale(1.08); } }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%; }
  50%      { border-radius: 60% 40% 44% 56% / 42% 58% 42% 58%; }
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ===================================================================
   Responsive
=================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual img { width: min(78%, 420px); }
  .who-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .team-media { order: 2; max-width: 520px; margin-inline: auto; }
  .cta-grid { grid-template-columns: 1fr; text-align: center; }
  .cta-lead { margin-inline: auto; }
  .cta-visual { order: -1; }
  .cta-visual img { width: min(70%, 360px); }
}

@media (max-width: 860px) {
  /* Tighter header on mobile — less dead space around the logo/hamburger */
  .site-header { padding: 6px 0; }
  .site-header.scrolled { padding: 4px 0; }
  .brand-logo { width: 104px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 26px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: -20px 0 60px -20px rgba(13, 36, 82, 0.4);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > a:not(.btn) { font-size: 1.2rem; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .hero { padding-top: 104px; }
  .btn { width: auto; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ===================================================================
   Reduced motion
=================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .blob, .float, .gradient-text { animation: none; }
}
