/* ============================================================
   ServiceSynk — design system
   ------------------------------------------------------------
   Structure: dark cinematic hero + dark footer bookending a
   light, high-legibility body.

   ink:        #131417  near-black, matches logo
   paper:      #F5F5F2  cool off-white (not warm cream)
   raised:     #FFFFFF  card surfaces
   line:       #E4E3DE  hairline borders
   muted:      #6B6C6F  secondary text
   signal:     #2A4CFF  saturated cobalt — the one accent
   ============================================================ */

:root {
  /* light surfaces */
  --ink: #131417;
  --paper: #F5F5F2;
  --raised: #FFFFFF;
  --line: #E4E3DE;
  --muted: #6B6C6F;

  /* dark surfaces */
  --void: #0B0C0E;
  --void-2: #131417;
  --void-3: #1B1D22;
  --void-line: rgba(255, 255, 255, 0.10);
  --void-text: #EDEDEA;
  --void-muted: #9A9CA3;

  /* accent */
  --signal: #2A4CFF;
  --signal-lift: #4463FF;
  --signal-dim: #EDF0FF;

  /* radii — moved off the old 2px to give surfaces some softness */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* elevation */
  --lift-1: 0 1px 2px rgba(19, 20, 23, 0.04), 0 4px 12px rgba(19, 20, 23, 0.05);
  --lift-2: 0 2px 4px rgba(19, 20, 23, 0.05), 0 12px 32px rgba(19, 20, 23, 0.09);
  --lift-3: 0 4px 8px rgba(19, 20, 23, 0.06), 0 24px 60px rgba(19, 20, 23, 0.13);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: inherit; }
img, svg { max-width: 100%; }

/* The editorial second voice — used on a single accent word per
   heading. Delete these two rules and the <em>s to remove it. */
.serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
}
h1 .serif, h2 .serif { font-size: 1.08em; line-height: 0.9; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Grain + glow, the two depth devices ---------- */

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary,
.btn-ghost {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              box-shadow 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
  will-change: transform;
}
.btn-primary {
  background: var(--signal);
  color: #fff;
  box-shadow: 0 2px 6px rgba(42, 76, 255, 0.28), 0 12px 28px rgba(42, 76, 255, 0.22);
}
.btn-primary:hover {
  background: var(--signal-lift);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(42, 76, 255, 0.3), 0 18px 40px rgba(42, 76, 255, 0.28);
}
.btn-secondary { border-color: var(--void-line); color: var(--void-text); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.btn-primary .arrow,
.btn-secondary .arrow,
.btn-ghost .arrow { transition: transform 0.25s var(--ease); }
.btn-primary:hover .arrow,
.btn-secondary:hover .arrow,
.btn-ghost:hover .arrow { transform: translate(3px, -3px); }

/* ---------- Header ---------- */

header.site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease), padding 0.35s var(--ease);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  max-width: var(--wrap);
  margin: 0 auto;
  transition: padding 0.35s var(--ease);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 26px; display: block; transition: filter 0.35s var(--ease); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s var(--ease);
}
.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); }

/* Over the dark hero */
body.has-dark-hero header.site:not(.is-solid) { color: var(--void-text); }
body.has-dark-hero header.site:not(.is-solid) .brand img { filter: brightness(0) invert(1); }
body.has-dark-hero header.site:not(.is-solid) .nav-cta {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
body.has-dark-hero header.site:not(.is-solid) .nav-cta:hover { background: rgba(255, 255, 255, 0.2); }

/* Scrolled, or any page without a dark hero */
header.site.is-solid,
body:not(.has-dark-hero) header.site {
  background: rgba(245, 245, 242, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
  color: var(--ink);
}
header.site.is-solid .nav-row,
body:not(.has-dark-hero) header.site .nav-row { padding-top: 14px; padding-bottom: 14px; }
header.site.is-solid .nav-cta,
body:not(.has-dark-hero) header.site .nav-cta { background: var(--ink); color: var(--paper); }
header.site.is-solid .nav-cta:hover,
body:not(.has-dark-hero) header.site .nav-cta:hover { background: var(--signal); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--void);
  color: var(--void-text);
  padding: 190px 0 110px;
  overflow: hidden;
}
/* Soft light bloom, top-centre-left — the reference's key depth cue */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(760px 520px at 22% 6%, rgba(255, 255, 255, 0.10), transparent 62%),
    radial-gradient(900px 620px at 82% 26%, rgba(42, 76, 255, 0.20), transparent 66%),
    radial-gradient(600px 400px at 50% 104%, rgba(42, 76, 255, 0.10), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--void-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--void-line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  margin-bottom: 30px;
  backdrop-filter: blur(8px);
}
.eyebrow .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(42, 76, 255, 0.65);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(42, 76, 255, 0.6); }
  70%  { box-shadow: 0 0 0 9px rgba(42, 76, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(42, 76, 255, 0); }
}

.hero h1 {
  font-size: clamp(2.9rem, 6.4vw, 5.1rem);
  max-width: 13ch;
  color: #fff;
}
.hero h1 .line-2 { color: var(--void-muted); }
.hero p.lede {
  margin-top: 28px;
  max-width: 48ch;
  font-size: 1.14rem;
  color: var(--void-muted);
}
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Signature graphic — the original arcs, rebuilt with depth */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  width: 118%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(42, 76, 255, 0.3), transparent 62%);
  filter: blur(46px);
}
.signal-graphic { width: 100%; height: auto; position: relative; }
.signal-graphic .arc { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2; stroke-linecap: round; }
.signal-graphic .arc.accent { stroke: var(--signal); filter: drop-shadow(0 0 10px rgba(42, 76, 255, 0.75)); }
.signal-graphic .ring { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.signal-graphic .dot { fill: #fff; filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.85)); }

@keyframes pulse-in {
  0%   { stroke-dashoffset: 340; opacity: 0; }
  60%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
.signal-graphic .arc {
  stroke-dasharray: 340;
  animation: pulse-in 1.9s var(--ease) forwards;
}
.signal-graphic .arc:nth-of-type(2) { animation-delay: 0.16s; }
.signal-graphic .arc:nth-of-type(3) { animation-delay: 0.32s; }
.signal-graphic .arc:nth-of-type(4) { animation-delay: 0.48s; }
.signal-graphic .orbit { transform-origin: 140px 140px; animation: spin 34s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scroll cue */
.scroll-cue {
  position: relative;
  z-index: 2;
  margin: 76px auto 0;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid var(--void-line);
  border-radius: 50%;
  color: var(--void-muted);
  text-decoration: none;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.scroll-cue:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.28); }
.scroll-cue .cue-text { position: absolute; inset: 0; animation: spin 16s linear infinite; }
.scroll-cue .cue-text text { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.22em; fill: var(--void-muted); text-transform: uppercase; }
.scroll-cue .cue-arrow { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* ---------- Credential marquee ---------- */

.marquee {
  background: var(--void-2);
  color: var(--void-muted);
  border-top: 1px solid var(--void-line);
  border-bottom: 1px solid var(--void-line);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: slide 34s linear infinite;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
  white-space: nowrap;
}
.marquee-track b { color: var(--void-text); font-weight: 500; }
.marquee-track i { color: var(--signal); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Sections ---------- */

.section { padding: 116px 0; position: relative; }
.section-head { max-width: 62ch; margin-bottom: 62px; }
.section-head .mono { color: var(--signal); display: block; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.section-head p { color: var(--muted); margin-top: 20px; font-size: 1.08rem; max-width: 54ch; }

/* ---------- Service cards ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 30px 30px;
  box-shadow: var(--lift-1);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px 220px at 50% -10%, var(--signal-dim), transparent 70%);
  transition: opacity 0.4s var(--ease);
}
.pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--lift-3);
  border-color: #D3D8F5;
}
.pillar:hover::before { opacity: 1; }

.pillar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; }
.pillar .mono { color: var(--signal); }
.pillar .idx {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.5;
}
.pillar h3 { font-size: 1.42rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.pillar p { color: var(--muted); font-size: 1rem; margin: 0; }

.pillar-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--signal-dim);
  color: var(--signal);
  margin-bottom: 26px;
}

/* ---------- Process ---------- */

.process { position: relative; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}
/* Connector rail behind the step markers */
.steps::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.step { position: relative; padding-top: 0; border-top: 0; }
.step .num {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--line);
  box-shadow: var(--lift-1);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--signal);
  margin-bottom: 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.step:hover .num { transform: translateY(-3px); border-color: var(--signal); box-shadow: var(--lift-2); }
.step h3 { font-size: 1.24rem; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 1rem; margin: 0; }

/* ---------- Trust bar (light) ---------- */

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  background: var(--raised);
}
.trust-strip .wrap {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.trust-strip strong { color: var(--ink); font-weight: 500; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--void);
  color: var(--void-text);
  padding: 132px 0;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(820px 460px at 50% 118%, rgba(42, 76, 255, 0.3), transparent 66%),
    radial-gradient(600px 380px at 12% -10%, rgba(255, 255, 255, 0.08), transparent 64%);
}
.cta .wrap { position: relative; z-index: 2; text-align: center; }
.cta h2 { font-size: clamp(2.3rem, 5.4vw, 4rem); color: #fff; margin: 0 auto; max-width: 16ch; }
.cta p { color: var(--void-muted); margin: 22px auto 0; max-width: 46ch; font-size: 1.08rem; }
.cta .hero-actions { justify-content: center; margin-top: 38px; }

/* ---------- Footer ---------- */

footer.site {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--void-2);
  color: var(--void-muted);
  border-top: 1px solid var(--void-line);
  padding: 0 0 40px;
}
.footer-marquee {
  overflow: hidden;
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--void-line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.footer-marquee .marquee-track { animation-duration: 26s; }
.footer-marquee .big {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(3.2rem, 10vw, 8rem);
  letter-spacing: -0.045em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  padding-right: 44px;
}
.footer-marquee .big.filled {
  color: rgba(255, 255, 255, 0.9);
  -webkit-text-stroke: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 40px;
  font-size: 13px;
  line-height: 1.65;
}
.footer-inner .legal { max-width: 62ch; }
.footer-inner .links { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
footer.site a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 1px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
footer.site a:hover { color: #fff; border-bottom-color: #fff; }

/* ---------- Policy pages ---------- */

.policy {
  max-width: 780px;
  margin: 0 auto;
  padding: 140px 32px 110px;
}
.policy h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); margin-bottom: 10px; }
.policy .updated { color: var(--muted); font-size: 14px; margin-bottom: 46px; display: block; }
.policy h2 { font-size: 1.3rem; margin-top: 46px; margin-bottom: 16px; }
.policy p, .policy li { color: #3A3B3E; font-size: 1.02rem; }
.policy ul { padding-left: 20px; }
.policy a.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--signal);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
}
.policy a.back:hover { gap: 12px; }

/* ---------- Scroll reveal ----------
   Hidden state is gated behind html.js (set by an inline script in
   <head>). If JS is blocked or fails, nothing is ever hidden. */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.09s; }
.reveal.d2 { transition-delay: 0.18s; }
.reveal.d3 { transition-delay: 0.27s; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .pillars { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .steps::before { display: none; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .nav-row { padding: 16px 22px; }
  .nav-links { display: none; }
  .hero { padding: 150px 0 84px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; max-width: 240px; margin: 0 auto; }
  .hero h1 { max-width: 100%; }
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 44px; }
  .cta { padding: 96px 0; }
  .trust-strip .wrap { gap: 18px; }
  .scroll-cue { display: none; }
  .policy { padding: 120px 22px 90px; }
}

@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;
  }
  .signal-graphic .arc { stroke-dashoffset: 0; }
  .marquee-track, .footer-marquee .marquee-track { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
