:root {
  --bg: #F6F8FB;
  --bg-surface: #FFFFFF;
  --navy-deep: #0A1235;
  --navy: #0E1841;
  --navy-soft: #1B2659;
  --ink: #0E1841;
  --ink-soft: #3A4566;
  --ink-mute: #6B7796;
  --rule: #E1E6EE;
  --rule-strong: #C9D1DD;
  --accent: #1F70AE;
  --accent-bright: #2B8FD8;
  --accent-soft: #6DB6DE;
  --accent-glow: #93CBE8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max: 1240px;
  --pad: 32px;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(14, 24, 65, 0.04), 0 4px 12px rgba(14, 24, 65, 0.04);
  --shadow-card-hover: 0 8px 16px rgba(14, 24, 65, 0.06), 0 24px 48px -12px rgba(14, 24, 65, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Scroll fade-in ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 var(--pad);
  pointer-events: none;
  transition: top 0.3s var(--ease);
}
.header-inner {
  pointer-events: auto;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 14px 10px 20px;
  border-radius: 999px;
  background: rgba(10, 18, 53, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.25);
  color: #F6F8FB;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled .header-inner {
  background: rgba(10, 18, 53, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.4);
}

.wordmark {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #93CBE8 0%, #2B8FD8 100%);
  box-shadow: 0 0 12px rgba(43, 143, 216, 0.6);
  flex-shrink: 0;
}
.wordmark-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: inherit;
}

.site-header nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
  text-decoration: none;
  color: rgba(246, 248, 251, 0.75);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-cta span { transition: transform 0.2s var(--ease); }
.nav-cta:hover { background: var(--accent-glow); }
.nav-cta:hover span { transform: translateX(3px); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 24px;
}
.eyebrow.on-light { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  padding: 180px var(--pad) 140px;
  overflow: hidden;
  isolation: isolate;
}
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 700px at 85% 10%, rgba(43, 143, 216, 0.32), transparent 60%),
    radial-gradient(ellipse 700px 500px at 15% 90%, rgba(31, 112, 174, 0.22), transparent 60%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(147, 203, 232, 0.08), transparent 60%);
}
.hero-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 9vw, 120px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 40px;
  padding-bottom: 0.08em;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  padding-right: 0.08em;
  background: linear-gradient(135deg, #93CBE8 0%, #6DB6DE 50%, #2B8FD8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 em .punct,
.contact-info h2 em .punct {
  font-style: normal;
  -webkit-text-fill-color: #fff;
  background: none;
  margin-left: -0.04em;
}
.hero-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: rgba(246, 248, 251, 0.78);
  max-width: 640px;
  margin: 0 0 48px;
}
.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 16px 28px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn span { transition: transform 0.2s var(--ease); }
.btn:hover span { transform: translateX(3px); }

.btn-primary {
  background: #fff;
  color: var(--navy);
}
.btn-primary:hover { background: var(--accent-glow); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Sections ---------- */
.what-we-do, .contact {
  padding: 140px var(--pad);
}
.what-we-do {
  background: var(--bg);
}

.section-head {
  max-width: var(--max);
  margin: 0 auto 88px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 20ch;
}
.section-head .lead {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0;
}

/* ---------- Service grid ---------- */
.services-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--rule-strong);
}
.service-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 112, 174, 0.1), rgba(109, 182, 222, 0.18));
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.service-card .icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
.service-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.service-card-cta {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  border-color: transparent;
  position: relative;
  overflow: hidden;
}
.service-card-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 400px 300px at 100% 0%, rgba(43, 143, 216, 0.4), transparent 60%);
  pointer-events: none;
}
.service-card-cta h3 { color: #fff; position: relative; }
.service-card-cta p { color: rgba(255, 255, 255, 0.75); position: relative; margin-bottom: 24px; }
.service-card-cta .card-link {
  margin-top: auto;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-glow);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  position: relative;
  transition: gap 0.2s var(--ease);
}
.service-card-cta .card-link:hover { gap: 14px; }

/* ---------- Contact ---------- */
.contact {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.contact-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 500px at 20% 0%, rgba(43, 143, 216, 0.18), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(31, 112, 174, 0.14), transparent 60%);
}
.contact-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: start;
}
.contact-info h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  padding-bottom: 0.35em;
}
.contact-info h2 em {
  font-style: italic;
  font-weight: 400;
  color: #6DB6DE;
}
.contact-lead {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(246, 248, 251, 0.75);
  margin: 0 0 56px;
  max-width: 480px;
}
.contact-direct .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
  margin: 0 0 12px;
}
.email-link {
  font-family: var(--serif);
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 4px;
  transition: border-color 0.2s var(--ease);
}
.email-link:hover { border-bottom-color: var(--accent-glow); }

/* ---------- Calendly embed ---------- */
.calendly-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4);
  min-height: 680px;
}
.calendly-inline-widget { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(246, 248, 251, 0.65);
  padding: 56px var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-wordmark {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
}
.footer-brand p { margin: 0; font-size: 14px; }
.footer-meta { text-align: right; font-size: 14px; }
.footer-meta p { margin: 0 0 4px; }
.footer-meta a { color: rgba(246, 248, 251, 0.85); text-decoration: none; }
.footer-meta a:hover { color: #fff; }
.footer-meta .copy { color: rgba(246, 248, 251, 0.4); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 720px) {
  :root { --pad: 18px; }
  .site-header { top: 12px; }
  .header-inner { padding: 8px 10px 8px 16px; gap: 12px; }
  .wordmark-text { font-size: 19px; }
  .brand-mark { width: 8px; height: 8px; }
  .nav-link { display: none; }
  .nav-cta { font-size: 13px; padding: 8px 14px; }
  .hero { padding: 140px var(--pad) 100px; }
  .hero-sub { font-size: 17px; }
  .what-we-do, .contact { padding: 96px var(--pad); }
  .section-head { margin-bottom: 56px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 28px 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
  [data-animate] { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-bright); color: #fff; }
