@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --color-bg: #FFFFFF;
  --color-surface: #F5F7FA;
  --color-primary: #1E3A8A;
  --color-accent: #2E5BFF;
  --color-highlight: #FF6B35;
  --color-highlight-2: #E63946;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.08);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1200px;
  --container-narrow: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0);
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition), padding var(--transition);
}
.site-header.scrolled {
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border);
}
.site-header .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 60px; width: auto; transition: opacity var(--transition); }
.brand .logo-light-img { display: none; }
.nav-list { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--color-text);
  position: relative; padding: 6px 0; transition: color var(--transition);
}
.nav-link:hover { color: var(--color-accent); }
.nav-link.active { color: var(--color-accent); }
.btn-quote {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  background: var(--color-text); color: #fff; font-weight: 500; font-size: 14px;
  transition: background var(--transition), transform var(--transition);
}
.btn-quote:hover { background: var(--color-primary); transform: translateY(-1px); }

/* When the header is over a dark hero (homepage), invert until scrolled */
body.hero-page .site-header:not(.scrolled) .nav-link,
body.hero-page .site-header:not(.scrolled) .brand-text { color: #fff; }
body.hero-page .site-header:not(.scrolled) .brand .logo-dark-img { display: none; }
body.hero-page .site-header:not(.scrolled) .brand .logo-light-img { display: block; }
body.hero-page .site-header:not(.scrolled) .btn-quote {
  background: rgba(255, 255, 255, 0.15); color: #fff;
  backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.25);
}
body.hero-page .site-header:not(.scrolled) .btn-quote:hover { background: rgba(255, 255, 255, 0.25); }
body.hero-page .site-header:not(.scrolled) .hamburger span { background: #fff; }

.hamburger { display: none; width: 28px; height: 22px; position: relative; }
.hamburger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition), top var(--transition), background var(--transition); }
.hamburger span:nth-child(1) { top: 2px; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.active span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-video-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: -2;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.55) 0%, rgba(15,23,42,0.78) 100%);
  z-index: -1;
}
.hero-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 60%, #2E5BFF 100%);
  z-index: -3;
}
.hero-inner { padding: 140px 24px 120px; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: #fff;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-highlight);
  box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,107,53,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}
.hero h1 {
  font-size: clamp(44px, 10vw, 140px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin: 28px 0 24px;
  max-width: 14ch;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--color-highlight-2), var(--color-highlight));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  max-width: 56ch;
  margin: 0 0 40px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: var(--radius-pill);
  font-weight: 500; font-size: 16px;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-highlight-2), var(--color-highlight));
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,107,53,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,53,0.4); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-dark { background: var(--color-text); color: #fff; }
.btn-dark:hover { background: var(--color-primary); transform: translateY(-1px); }

.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll-hint::after {
  content: ''; width: 1px; height: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0));
  animation: scrollHint 2.2s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.6); transform-origin: top; }
  50% { transform: scaleY(1); }
}

/* ---------- Sections ---------- */
section { padding: 120px 0; }
.section-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(34px, 4.8vw, 64px);
  max-width: 22ch;
  margin-bottom: 20px;
}
.section-lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.55;
}

/* ---------- Trusted strip ---------- */
.trusted {
  padding: 64px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.trusted-label {
  text-align: center;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%); }
.marquee-track {
  display: flex; gap: 80px; align-items: center;
  width: max-content;
  animation: marquee 38s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee img {
  height: 36px; width: auto;
  filter: grayscale(1) contrast(0.7);
  opacity: 0.55;
  transition: opacity var(--transition), filter var(--transition);
}
.marquee img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- Services ---------- */
.services-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 64px;
}
.service-card {
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(46,91,255,0.3); }
.service-num {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 26px; margin-bottom: 14px; }
.service-card p { color: var(--color-text-muted); margin-bottom: 24px; flex-grow: 1; }
.service-link {
  font-weight: 500; font-size: 15px;
  color: var(--color-text);
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap var(--transition), color var(--transition);
}
.service-link:hover { gap: 14px; color: var(--color-accent); }

/* ---------- Why us ---------- */
.why { background: var(--color-surface); }
.why-grid {
  display: grid; gap: 32px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 64px;
}
.why-card {
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
}
.why-num {
  font-family: var(--font-display);
  font-size: 14px; color: var(--color-highlight);
  letter-spacing: 0.04em; font-weight: 600;
  margin-bottom: 14px;
}
.why-card h3 { font-size: 24px; margin-bottom: 12px; }
.why-card p { color: var(--color-text-muted); margin: 0; }

/* ---------- Stats ---------- */
.stats { background: var(--color-text); color: #fff; }
.stats-grid {
  display: grid; gap: 32px;
  grid-template-columns: repeat(4, 1fr);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 600;
  letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(135deg, var(--color-highlight-2), var(--color-highlight));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.stat-label { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.4; }
.stats-note {
  margin-top: 56px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 14px; color: rgba(255,255,255,0.6);
  max-width: 60ch;
}

/* ---------- Case studies ---------- */
.cases-grid {
  display: grid; gap: 32px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 64px;
}
.case-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-img {
  aspect-ratio: 16/9;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.case-img img { width: 100%; height: 100%; object-fit: cover; }
.case-body { padding: 28px; flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.case-meta {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-text-muted);
}
.case-card h3 { font-size: 20px; margin: 0; line-height: 1.3; }
.case-result {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 14px; color: var(--color-text-muted);
}
.case-result strong { color: var(--color-text); font-weight: 600; }
.cases-cta { text-align: center; margin-top: 48px; }
.link-arrow {
  font-weight: 500; color: var(--color-accent);
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap var(--transition);
}
.link-arrow:hover { gap: 14px; }

/* ---------- Final CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  color: #fff; text-align: center;
}
.cta-section h2 {
  font-size: clamp(40px, 6vw, 84px);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.cta-section h2 .accent {
  background: linear-gradient(135deg, var(--color-highlight-2), var(--color-highlight));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-section .section-lead { color: rgba(255,255,255,0.8); margin: 0 auto 40px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 80px 0 40px;
  background: var(--color-text); color: rgba(255,255,255,0.7);
}
.footer-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  margin-bottom: 56px;
}
.footer-brand img { height: 60px; width: auto; margin-bottom: 18px; }
.footer-tagline { font-size: 14px; max-width: 30ch; line-height: 1.55; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #fff; margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px; color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: 13px;
}
.footer-bottom .address { color: rgba(255,255,255,0.6); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 24px; left: 24px; right: 24px; z-index: 200;
  max-width: 520px; margin-left: auto;
  padding: 20px 24px;
  background: var(--color-text); color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  font-size: 14px;
}
.cookie-banner.is-visible { display: block; animation: slideUp 0.4s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cookie-banner p { margin: 0 0 14px; line-height: 1.5; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn { padding: 8px 18px; font-size: 13px; }
.cookie-banner a { color: var(--color-highlight); text-decoration: underline; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 180px 0 80px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 { font-size: clamp(42px, 6vw, 80px); margin-bottom: 20px; max-width: 18ch; }
.page-hero .lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--color-text-muted); max-width: 60ch; line-height: 1.55; }

/* ---------- Forms (contact) ---------- */
.contact-form { display: grid; gap: 18px; max-width: 560px; margin-top: 40px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.contact-form input,
.contact-form textarea {
  padding: 14px 16px; font: inherit; color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(46,91,255,0.12); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--color-text-muted); margin-top: 8px; }

/* ---------- Two-column layout for service/about subpages ---------- */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: start; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }

.bullet-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.bullet-list li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.55; }
.bullet-list li::before {
  content: ''; flex-shrink: 0;
  width: 20px; height: 20px; margin-top: 2px;
  background: linear-gradient(135deg, var(--color-highlight-2), var(--color-highlight));
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  section { padding: 80px 0; }
  .nav-list { display: none; }
  .nav-list.is-open {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; top: 0; right: 0;
    width: min(80vw, 320px); height: 100vh;
    padding: 96px 28px 32px;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15,23,42,0.1);
    align-items: stretch;
    z-index: 99;
  }
  .nav-list.is-open .nav-link { padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
  .nav-list.is-open .btn-quote { margin-top: 20px; justify-content: center; background: var(--color-text); color: #fff; }
  .hamburger { display: block; z-index: 101; }
  .brand img { height: 48px; }

  .hero-inner { padding: 110px 24px 80px; }
  .services-grid, .why-grid, .cases-grid { grid-template-columns: 1fr; gap: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > .footer-brand { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; gap: 40px; }

  .cookie-banner { left: 16px; right: 16px; bottom: 16px; }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 44px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@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; }
  .marquee-track { animation: none; }
}
