/* ==========================================================
   GLOBAL.CSS — Base Styles, Typography, Buttons, Animations
   ========================================================== */

/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body { font-family: var(--sans); color: var(--black); background: var(--white); overflow-x: hidden }
a { text-decoration: none; color: inherit }
button { font-family: inherit; cursor: pointer; border: none; background: none }

/* ── Hero Nav Clearance (single source of truth for all hero sections) ── */
.page-hero,
.svc-hero {
  padding-top: 72px;
}

/* ── Skip Link (accessibility) ── */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--accent); color: var(--white);
  padding: 12px 24px; font-size: 14px; font-weight: 600;
  z-index: 10000; transition: top .2s;
}
.skip-link:focus { top: 0 }

/* ── Container ── */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 5rem }

/* ── Section Eyebrow ── */
.sec-eye {
  font-size: 11px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent2);
  display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem;
}
.sec-eye::before {
  content: ''; display: block; width: 22px; height: 2px; background: var(--accent);
}

/* ── Scroll Reveal (Premium Spring System) ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(10px);
  transition:
    opacity .7s cubic-bezier(0.16, 1, 0.3, 1),
    transform .7s cubic-bezier(0.16, 1, 0.3, 1),
    filter .6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Per-word text animation */
.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
  transition:
    opacity .6s cubic-bezier(0.16, 1, 0.3, 1),
    transform .6s cubic-bezier(0.16, 1, 0.3, 1),
    filter .5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal-word.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered child elements within a revealed section */
.reveal-child {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition:
    opacity .6s cubic-bezier(0.16, 1, 0.3, 1),
    transform .6s cubic-bezier(0.16, 1, 0.3, 1),
    filter .5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal-child.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Whitespace preservation for word splitting — natural spacing only */
.word-split .reveal-word { margin: 0; padding: 0; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-word, .reveal-child {
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ── Buttons ── */

/* Hero Main — outline with blur */
.btn-hm {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.06); backdrop-filter: blur(6px);
  color: var(--white); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 16px 38px; transition: all .25s;
}
.btn-hm:hover { background: var(--accent); border-color: var(--accent); color: var(--white) }
.btn-hm svg { transition: transform .2s }
.btn-hm:hover svg { transform: translateX(4px) }

/* Hero Ghost — text link underline */
.btn-hg {
  color: rgba(255,255,255,.5); font-size: 12px; font-weight: 500;
  letter-spacing: .06em; border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 2px; transition: color .2s, border-color .2s;
}
.btn-hg:hover { color: var(--white); border-color: var(--white) }

/* Standard — solid black */
.btn-std {
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 13px 26px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s;
}
.btn-std:hover { background: var(--accent); color: var(--white) }

/* CTA Primary — solid accent */
.btn-cp {
  background: var(--accent); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 16px 38px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all .2s;
}
.btn-cp:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 10px 35px rgba(15,82,186,.25) }

/* CTA Outline — ghost on dark */
.btn-co {
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.55); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 32px; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.btn-co:hover { border-color: var(--white); color: var(--white) }

/* Submit — contact form */
.btn-submit {
  background: var(--accent); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 16px 38px;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all .2s; font-family: var(--sans);
}
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-2px) }

/* ── CTA Section ── */
#cta { background: var(--black); padding: 9rem 0; text-align: center; position: relative; overflow: hidden }
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(15,82,186,.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-c { position: relative; z-index: 2 }
.cta-ol {
  font-size: 11px; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--accent-light); margin-bottom: 2rem;
  display: inline-flex; align-items: center; gap: 14px;
}
.cta-ol::before, .cta-ol::after {
  content: ''; display: block; width: 30px; height: 1px; background: var(--accent-light);
}
.cta-h {
  font-family: var(--serif); font-size: clamp(2.8rem,6vw,5.5rem);
  font-weight: 400; color: var(--white); line-height: 1.0;
  letter-spacing: -.025em; margin-bottom: 2rem;
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.cta-h em { font-style: italic; color: var(--accent-light) }
.cta-sub {
  font-size: 1.05rem; font-weight: 300; color: rgba(255,255,255,.42);
  margin-bottom: 3.5rem; max-width: 420px;
  margin-left: auto; margin-right: auto; line-height: 1.7;
}
.cta-btns { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap }

/* ── Metrics Grid (used on about section + service overview pages) ── */
.about-r { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border) }
.am {
  padding: 2.5rem 2rem; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .5rem;
  position: relative; overflow: hidden;
}
.am::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.am:hover::after { transform: scaleX(1) }
.am:nth-child(2) { border-right: none }
.am:nth-child(3) { border-bottom: none; border-right: 1px solid var(--border) }
.am:nth-child(4) { border-bottom: none; border-right: none }
.am-n { font-family: var(--serif); font-size: 2.8rem; font-weight: 400; color: var(--black); line-height: 1 }
.am-n span { font-size: 1.4rem; color: var(--accent) }
.am-l { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); line-height: 1.5 }

/* ── How It Works / Process Steps ── */
.how-title {
  font-family: var(--serif); font-size: clamp(2rem,3vw,2.8rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -.02em;
  max-width: 520px; margin-bottom: 1rem;
}
.how-sub { font-size: 1rem; font-weight: 300; color: #555; line-height: 1.7; max-width: 520px }
.how-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin-top: 4rem }
.hs {
  padding: 3rem 2.5rem 3rem 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1rem; background: transparent;
}
.hs:last-child { border-right: none; padding-right: 0 }
.hs:not(:first-child) { padding-left: 2.5rem }
.hs-n { font-family: var(--serif); font-size: 3.2rem; color: #C2D4E4; line-height: 1; font-weight: 400 }
.hs-rule { width: 28px; height: 2px; background: var(--accent) }
.hs-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--black); line-height: 1.3 }
.hs-desc { font-size: .875rem; font-weight: 300; line-height: 1.65; color: #555 }

/* ── Service Accordion ── */
.si { border-bottom: 1px solid var(--border) }
.si:first-child { border-top: 1px solid var(--border) }
.si-hd {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 2rem;
  align-items: center; padding: 1.75rem 2.5rem; cursor: pointer;
  transition: background .15s;
}
.si-hd:hover { background: var(--off) }
.si-num { font-family: var(--serif); font-size: .8rem; color: var(--grey); letter-spacing: .05em }
.si-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--black) }
.si-tog {
  width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey); font-size: 1.1rem; flex-shrink: 0;
  transition: background .2s, color .2s, border-color .2s; line-height: 1;
}
.si.open .si-tog { background: var(--accent); color: var(--white); border-color: var(--accent) }
.si-body {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0 2.5rem 0 calc(64px + 2.5rem + 2rem);
}
.si.open .si-body { max-height: 700px; padding-bottom: 2.5rem }
.si-desc { font-size: .875rem; font-weight: 300; line-height: 1.75; color: #555; margin-bottom: 2rem }
.si-feats {
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .5rem;
  list-style: none;
}
.si-feats li {
  font-size: .78rem; font-weight: 500; letter-spacing: .03em;
  color: #3a3a3a; line-height: 1.5;
  display: flex; align-items: flex-start; gap: .5rem;
}
.si-feats li::before { content: '—'; color: var(--accent); flex-shrink: 0; font-weight: 300 }

/* ── FAQ Accordion ── */
.fq { border-bottom: 1px solid var(--border) }
.fq:first-child { border-top: 1px solid var(--border) }
.fq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 0; cursor: pointer;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 400;
  color: var(--black); transition: color .2s;
}
.fq-t {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #888;
  transition: background .2s, color .2s, border-color .2s;
  line-height: 1; font-weight: 300;
}
.fq.open .fq-t { background: var(--accent); color: var(--white); border-color: var(--accent) }
.fq-a {
  font-size: .875rem; line-height: 1.7; font-weight: 300; color: #555;
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .25s;
}
.fq.open .fq-a { max-height: 280px; padding-bottom: 1.5rem }

/* ── Integrations Grid ── */
.int-grid { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 3rem }
.ii {
  padding: 1.5rem 2.25rem; border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--grey);
  transition: color .2s, background .2s;
}
.ii:hover { color: var(--black); background: var(--off) }

/* ── Stats Section ── */
.stats { background: var(--navy); padding: 5.5rem 0 }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0 }
.st {
  display: flex; flex-direction: column; gap: .75rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.07);
  padding: 0 2rem;
}
.st:last-child { border-right: none }
.st-n {
  font-family: var(--serif); font-size: 3.5rem; font-weight: 400;
  color: var(--white); line-height: 1; letter-spacing: -.025em;
}
.st-n sup { font-size: 1.4rem; color: var(--accent-light) }
.st-l {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.38); line-height: 1.5;
}

/* ── @keyframes ── */
@keyframes gshift {
  from { background-position: 0 0 }
  to { background-position: 64px 64px }
}
@keyframes gpulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1) }
  50% { transform: translate(-50%,-50%) scale(1.12) }
}
@keyframes hnfloat {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-18px) }
}
@keyframes spulse {
  0%, 100% { opacity: .3 }
  50% { opacity: 1 }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .wrap { padding: 0 2.5rem }
  .how-steps { grid-template-columns: 1fr 1fr }
  .hs { padding: 2.5rem 2rem }
  .si-feats { grid-template-columns: 1fr }
  .stats-grid { grid-template-columns: 1fr 1fr }
  .int-grid { gap: 0 }
}
@media (max-width: 700px) {
  .how-steps { grid-template-columns: 1fr }
  .si-feats { grid-template-columns: 1fr }
  .stats-grid { grid-template-columns: 1fr }
}
