/* Bluecrest Partners — precision counsel, not factory chrome */
:root {
  --navy: #0A3D91;
  --navy-deep: #072A66;
  --ink: #071A36;
  --cyan: #14A0DC;
  --cyan-2: #3BB4E8;
  --paper: #F5F9FC;
  --white: #FFFFFF;
  --line: #D4E3F0;
  --muted: #4A6480;
  --text: #0E2744;
  --on-dark: #F4F8FC;
  --on-dark-muted: #D7E6F4;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
html, body { width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}
h1 em, h2 em { font-style: italic; color: var(--navy); font-weight: 500; }

p { margin: 0; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
svg { max-width: 100%; display: block; }

.wrap {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  max-width: 100%;
}
.hero-grid, .hero-copy, .hero-mech, .clockwork, .hub, .focus-grid, .contact-inner, .faq-wrap {
  min-width: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--on-dark); padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cyan);
  margin: 0 0 14px;
}
.kicker.on-dark { color: var(--cyan-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary {
  background: var(--navy); color: var(--on-dark);
  box-shadow: 0 10px 24px -12px rgba(10, 61, 145, .55);
}
.btn-ghost {
  background: transparent; color: var(--navy); border-color: var(--line);
}

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(245, 249, 252, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(7, 26, 54, .45);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
  background: var(--white); border: 1px solid var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--body); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink);
}
.brand-text em {
  font-family: var(--display); font-style: italic; font-size: 14px; color: var(--navy); font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s var(--ease); }
.nav .nav-cta {
  color: var(--on-dark); background: var(--navy); padding: 9px 18px; border-radius: 999px; font-weight: 600;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  padding: 132px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 82% 28%, rgba(20, 160, 220, .12), transparent 62%),
    radial-gradient(ellipse 50% 50% at 12% 80%, rgba(10, 61, 145, .08), transparent 60%),
    var(--paper);
}
.hero-wash {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at center, transparent 58%, var(--paper) 100%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 36px;
}
.hero-copy { max-width: min(560px, 100%); width: 100%; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600; color: var(--navy); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 600;
}
.lede {
  margin-top: 22px; font-size: 1.08rem; color: var(--muted); max-width: 100%;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-marks {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 18px;
}
.hero-marks li {
  font-size: 13px; font-weight: 500; color: var(--navy);
  padding-left: 16px; position: relative;
}
.hero-marks li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--cyan);
}

.hero-mech { display: grid; place-items: center; min-height: 280px; max-width: 100%; width: 100%; overflow: hidden; }
.mechanism {
  width: min(480px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  height: auto;
  overflow: hidden;
}

.origin-center { transform-origin: 260px 260px; transform-box: view-box; }
.origin-sat1 { transform-origin: 402px 168px; transform-box: view-box; }
.origin-sat2 { transform-origin: 128px 372px; transform-box: view-box; }
.origin-hub { transform-origin: 160px 160px; transform-box: view-box; }

.spin-slow { animation: spin 48s linear infinite; }
.spin-rev { animation: spin 32s linear infinite reverse; }
.spin-mid { animation: spin 18s linear infinite; }
.spin-fast { animation: spin 12s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 96px 0; }
.section-head { max-width: min(640px, 100%); margin: 0 0 56px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.section-head .lead { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* Clockwork process — four stations around a live hub */
.process { background: var(--white); border-block: 1px solid var(--line); }
.clockwork {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  grid-template-rows: auto 220px auto;
  gap: 18px 28px;
  align-items: stretch;
}
.clockwork-lines {
  position: absolute; inset: 8% 14%;
  width: auto; height: auto; pointer-events: none; z-index: 0;
}
.clockwork-lines .rail {
  stroke: var(--cyan); stroke-width: 0.55; stroke-dasharray: 2 2.4;
  opacity: .4;
}
.clockwork .step:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.clockwork .step:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.clockwork .hub {
  grid-column: 2; grid-row: 2;
  position: relative;
  width: 100%;
  pointer-events: none;
  z-index: 1;
}
.clockwork .step:nth-of-type(3) { grid-column: 1; grid-row: 3; }
.clockwork .step:nth-of-type(4) { grid-column: 3; grid-row: 3; }

.step {
  position: relative; z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.step-num {
  display: block;
  font-family: var(--body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.55rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .98rem; max-width: 100%; }

.hub {
  display: grid; place-items: center; position: relative; z-index: 1; padding: 8px 0;
}
.hub-gear { width: min(240px, 100%); height: auto; max-width: 100%; }
.hub-label {
  margin-top: 6px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--navy);
}

/* Focus cards */
.focus-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.focus-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  min-height: 240px;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.focus-index {
  display: block;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--cyan);
  margin-bottom: 12px; line-height: 1;
}
.focus-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.focus-card p { color: var(--muted); max-width: 100%; }

/* Quote band — near-white on deep navy */
.quote-band {
  background: var(--ink);
  color: var(--on-dark);
  padding: 92px 0;
  position: relative;
  overflow: hidden;
}
.quote-band::before {
  content: "";
  position: absolute; right: -8%; top: -30%;
  width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(20, 160, 220, .22);
  pointer-events: none;
}
.quote-band::after {
  content: "";
  position: absolute; right: 4%; top: -12%;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px dashed rgba(20, 160, 220, .28);
  pointer-events: none;
  animation: spin 64s linear infinite;
}
.quote-inner { position: relative; z-index: 1; max-width: 860px; }
.quote-inner blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.28;
  color: var(--on-dark);
}
.quote-attr {
  margin-top: 22px;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: var(--on-dark-muted);
}

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.faq-head { margin: 0; position: sticky; top: 100px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.faq-item.open { border-color: var(--cyan); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  font-family: var(--body); font-size: 1.05rem; font-weight: 600; padding: 22px 24px;
}
.faq-ico { position: relative; flex: 0 0 auto; width: 16px; height: 16px; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; background: var(--cyan); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq-ico::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-ico::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item.open .faq-ico::after { transform: scaleY(0); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 280px; }
.faq-a p { color: var(--muted); margin: 0; padding: 0 24px 24px; font-size: .98rem; }

/* Contact */
.contact { background: var(--white); border-top: 1px solid var(--line); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 16px; }
.contact-copy p { color: var(--muted); margin-bottom: 20px; }
.contact-email {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.55rem;
  font-style: italic;
  color: var(--navy);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.contact-addr { margin-top: 18px; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid; gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 12px 14px; font: inherit; font-size: 15px; width: 100%; resize: vertical;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); }

/* Footer */
.site-footer {
  background: var(--ink); color: var(--on-dark-muted);
  padding: 48px 0 28px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid rgba(212, 227, 240, .16);
}
.site-footer .brand img { border-color: rgba(212, 227, 240, .2); }
.site-footer .brand-text strong { color: var(--on-dark); }
.site-footer .brand-text em { color: var(--cyan-2); }
.footer-tag { margin-top: 12px; font-size: .95rem; color: var(--on-dark-muted); }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--on-dark-muted); font-size: 14px; font-weight: 500; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--on-dark-muted); font-size: 13px; padding-top: 20px;
}

/* Reveal — transform reset must come before hover transforms */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .spin-slow, .spin-rev, .spin-mid, .spin-fast, .quote-band::after { animation: none; }
}

/* Hover (fine pointers only) AFTER reveal.in so lift is not overridden */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--navy); }
  .nav .nav-cta:hover { background: var(--navy-deep); color: var(--on-dark); }
  .btn-primary:hover {
    transform: translateY(-2px);
    background: var(--navy-deep);
    box-shadow: 0 16px 32px -12px rgba(10, 61, 145, .65);
  }
  .btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--cyan);
    color: var(--navy);
  }
  .js .reveal.in.step:hover,
  .js .reveal.in.focus-card:hover,
  .js .reveal.in.contact-form:hover,
  .js .reveal.in.faq-item:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 22px 40px -28px rgba(10, 61, 145, .45);
    background: var(--white);
  }
  .faq-q:hover { color: var(--navy); }
  .contact-email:hover { border-bottom-color: var(--cyan); }
  .footer-nav a:hover { color: var(--on-dark); }
}

/* Tablet */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-mech { min-height: 280px; order: -1; }
  .mechanism { width: min(340px, 78%); }
  .clockwork {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 16px;
  }
  .clockwork-lines { display: none; }
  .clockwork .step:nth-of-type(1),
  .clockwork .step:nth-of-type(2),
  .clockwork .step:nth-of-type(3),
  .clockwork .step:nth-of-type(4) { grid-column: auto; grid-row: auto; }
  .clockwork .hub {
    grid-column: 1 / -1;
    grid-row: auto;
    order: -1;
    width: 100%;
  }
  .hub-gear { width: 160px; }
  .focus-grid { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .faq-head { position: static; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* Mobile ~390px */
@media (max-width: 720px) {
  .wrap { width: min(var(--maxw), calc(100% - 32px)); }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0; align-items: stretch;
    background: rgba(245, 249, 252, .98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    transform: translateY(-130%);
    transition: transform .35s var(--ease);
    z-index: 90;
  }
  .nav.open { transform: translateY(0); }
  .nav a {
    padding: 14px 4px; font-size: 17px; color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .nav .nav-cta { text-align: center; margin-top: 12px; border: 0; }
  html, body, .wrap, .hero-grid, .hero-copy, .section-head, .step, .focus-card, .contact-form {
    max-width: 100%;
  }
  .hero { padding: 118px 0 56px; }
  .lede, .lead, .step p, .focus-card p { max-width: 100%; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; white-space: normal; word-break: break-word; }
  .hero-marks { flex-direction: column; gap: 8px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .clockwork { grid-template-columns: 1fr; gap: 14px; }
  .step { padding: 22px 20px; }
  .focus-card { min-height: 0; padding: 24px 20px; }
  .quote-band { padding: 64px 0; }
  .contact-form { padding: 22px 18px; }
  .footer-inner, .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { height: 70px; }
  .brand-text strong { font-size: 14px; }
  .hero { padding: 108px 0 48px; }
  .hero-mech { min-height: 220px; }
  .step-num, .focus-index { font-size: 1.8rem; }
}
