/* ============================================================
   Rapid Tech LLC — rapid.tech
   Brand: Ink #0A0A0A · Cyan #00EBFF · Deep Teal #0091A8
   ============================================================ */

@font-face {
  font-family: 'Splekta';
  src: url('../assets/splekta.ttf') format('truetype');
  font-display: swap;
}

:root {
  --ink: #0A0A0A;
  --ink-2: #101214;
  --ink-3: #16191c;
  --cyan: #00EBFF;
  --teal: #0091A8;
  --white: #FFFFFF;
  --gray: #9AA6AD;
  --gray-dark: #5B6770;
  --line: rgba(255, 255, 255, 0.08);
  --font-display: 'Splekta', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Segoe UI', -apple-system, Arial, sans-serif;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, 92vw); margin: 0 auto; }
.section { padding: clamp(90px, 12vh, 150px) 0; position: relative; }
.text-cyan { color: var(--cyan); }

::selection { background: var(--cyan); color: var(--ink); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 1000; background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 0 12px rgba(0, 235, 255, 0.7);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 6px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s;
  cursor: pointer; position: relative; overflow: hidden;
}
.btn--lg { padding: 16px 36px; font-size: 16px; }
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--primary {
  background: var(--cyan); color: var(--ink);
  box-shadow: 0 0 0 rgba(0, 235, 255, 0);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 235, 255, 0.45);
}
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.25); color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--cyan); color: var(--cyan);
  transform: translateY(-3px);
}

/* ---------- Chevron motif ---------- */
.chevron-mark {
  display: inline-block; width: 14px; height: 14px;
  margin-right: 10px; vertical-align: -1px;
  background: var(--cyan);
  clip-path: polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%, 50% 50%);
  animation: chevPulse 2.4s ease-in-out infinite;
}
@keyframes chevPulse {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.55; transform: translateX(3px); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: min(1280px, 94vw); margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 40px;
}
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; gap: 34px; margin-left: auto; }
.nav__links a {
  font-size: 14.5px; font-weight: 500; color: var(--gray);
  position: relative; padding: 6px 0; transition: color 0.3s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--cyan);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__actions { display: flex; gap: 12px; margin-left: 8px; }
.nav__burger { display: none; }
.nav__mobile { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--nav-h) + 40px) 5vw 170px;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(0, 235, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 235, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 30%, transparent 75%);
  animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift { to { background-position: 64px 64px, 64px 64px; } }
.hero__glow {
  position: absolute; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 235, 255, 0.10) 0%, transparent 60%);
  top: 50%; left: 50%; transform: translate(-50%, -55%);
  pointer-events: none;
  animation: glowBreathe 7s ease-in-out infinite;
}
@keyframes glowBreathe {
  0%, 100% { opacity: 0.8; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -55%) scale(1.08); }
}

.hero__content { position: relative; z-index: 2; max-width: 980px; }
.hero__eyebrow {
  font-size: 13.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 28px; font-weight: 600;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.2vw, 96px);
  line-height: 1.04; letter-spacing: -0.01em;
  margin-bottom: 30px; font-weight: 400;
}
.hero__title em { font-style: normal; color: var(--cyan); }

/* line-by-line mask reveal */
.line-reveal { display: block; overflow: hidden; }
.line-reveal span {
  display: block; transform: translateY(110%);
  animation: lineUp 1s var(--ease-out) forwards;
}
.line-reveal:nth-child(1) span { animation-delay: 0.15s; }
.line-reveal:nth-child(2) span { animation-delay: 0.30s; }
.line-reveal:nth-child(3) span { animation-delay: 0.45s; }
@keyframes lineUp { to { transform: translateY(0); } }

/* subtle glitch shimmer on the cyan phrase */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
}
.glitch::before { color: #ff3b6b; animation: glitchA 6s infinite; }
.glitch::after { color: var(--cyan); animation: glitchB 6s infinite; }
@keyframes glitchA {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: 0.7; transform: translate(-3px, 2px); }
  94.5% { opacity: 0; }
  96% { opacity: 0.5; transform: translate(2px, -1px); }
  97% { opacity: 0; }
}
@keyframes glitchB {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93.5% { opacity: 0.7; transform: translate(3px, -2px); }
  95% { opacity: 0; }
  96.5% { opacity: 0.5; transform: translate(-2px, 1px); }
  97.5% { opacity: 0; }
}

.hero__sub {
  max-width: 640px; margin: 0 auto 42px; color: var(--gray); font-size: 19px;
}
.hero__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.hero__scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 2; opacity: 0.7; transition: opacity 0.3s;
}
.hero__scroll-cue:hover { opacity: 1; }
.hero__scroll-line {
  width: 1px; height: 48px; background: rgba(255, 255, 255, 0.25);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ''; position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%; background: var(--cyan);
  animation: scrollDrop 1.8s ease-in-out infinite;
}
@keyframes scrollDrop { to { top: 110%; } }
.hero__scroll-label {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gray);
}

/* ============================================================
   SCROLL REVEAL SYSTEM
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(38px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   STATS
   ============================================================ */
.stats {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  padding: 64px 0;
}
.stats__row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
}
.stat { text-align: center; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 58px); color: var(--cyan);
  line-height: 1; margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(0, 235, 255, 0.35);
}
.stat__unit { font-size: 0.55em; margin-left: 2px; }
.stat__label { color: var(--gray); font-size: 14.5px; max-width: 220px; margin: 0 auto; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section__head { max-width: 760px; margin-bottom: 70px; }
.section__eyebrow {
  font-size: 13px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gray); font-weight: 600; margin-bottom: 18px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.1;
  font-weight: 400; margin-bottom: 22px;
}
.section__sub { color: var(--gray); font-size: 18px; max-width: 620px; }

/* ============================================================
   SERVICES
   ============================================================ */
.services__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  background: linear-gradient(160deg, var(--ink-3) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 38px 32px; position: relative; overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.4s, box-shadow 0.45s;
  will-change: transform;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(0, 235, 255, 0.10), transparent 45%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 235, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 235, 255, 0.07);
}
.card--featured { border-color: rgba(0, 235, 255, 0.28); }
.card--featured::after {
  content: 'CORE'; position: absolute; top: 18px; right: 18px;
  font-size: 10px; letter-spacing: 0.22em; font-weight: 700;
  color: var(--cyan); border: 1px solid rgba(0, 235, 255, 0.4);
  padding: 4px 9px; border-radius: 100px;
}
.card__icon {
  width: 54px; height: 54px; margin-bottom: 26px; color: var(--white);
}
.card__icon svg { width: 100%; height: 100%; }
.card h3 {
  font-family: var(--font-display); font-size: 23px; font-weight: 400;
  margin-bottom: 12px;
}
.card p { color: var(--gray); font-size: 15.5px; margin-bottom: 22px; }
.card__link {
  font-size: 14px; font-weight: 600; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 6px;
}
.card__link span { transition: transform 0.3s var(--ease-out); }
.card:hover .card__link span { transform: translateX(5px); }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px 0; background: var(--ink-2);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 48px; width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display); font-size: 20px; color: var(--gray);
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.14em;
}
.marquee__dot {
  width: 8px; height: 8px; flex: 0 0 8px; background: var(--cyan);
  clip-path: polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%, 50% 50%);
}
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* ============================================================
   PROCESS (sticky)
   ============================================================ */
.process__layout {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start;
}
.process__sticky { position: sticky; top: calc(var(--nav-h) + 60px); }
.process__meter {
  margin-top: 42px; width: 200px; height: 3px;
  background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden;
}
.process__meter span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.4s var(--ease-out);
}
.process__steps { display: flex; flex-direction: column; gap: 28px; }
.step {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 40px 38px; background: var(--ink-2);
  opacity: 0.35; transform: translateX(40px) scale(0.98);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out),
              border-color 0.5s, box-shadow 0.5s;
}
.step.is-active {
  opacity: 1; transform: translateX(0) scale(1);
  border-color: rgba(0, 235, 255, 0.3);
  box-shadow: 0 0 50px rgba(0, 235, 255, 0.06);
}
.step__num {
  font-family: var(--font-display); font-size: 15px; color: var(--cyan);
  letter-spacing: 0.2em; margin-bottom: 14px;
}
.step h3 {
  font-family: var(--font-display); font-size: 27px; font-weight: 400; margin-bottom: 12px;
}
.step p { color: var(--gray); font-size: 15.5px; }

/* ============================================================
   SECURITY
   ============================================================ */
.security { background: var(--ink-2); overflow: hidden; }
.security__bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 235, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 235, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 70% at 25% 50%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 25% 50%, black, transparent 70%);
}
.security__layout {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 80px; align-items: center;
  position: relative;
}
.security__list { list-style: none; margin: 34px 0 40px; }
.security__list li {
  padding: 15px 0; border-bottom: 1px solid var(--line);
  color: var(--gray); font-size: 16px;
}
.security__list li strong { color: var(--white); font-weight: 600; }

/* Radar */
.radar {
  width: min(420px, 80vw); aspect-ratio: 1; position: relative; margin: 0 auto;
}
.radar__ring {
  position: absolute; border: 1px solid rgba(0, 235, 255, 0.22); border-radius: 50%;
}
.radar__ring.r1 { inset: 0; }
.radar__ring.r2 { inset: 17%; border-color: rgba(0, 235, 255, 0.16); }
.radar__ring.r3 { inset: 34%; border-color: rgba(0, 235, 255, 0.12); }
.radar__sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 235, 255, 0.35), transparent 70deg, transparent 360deg);
  animation: radarSweep 4s linear infinite;
  mask-image: radial-gradient(circle, black 99%, transparent 100%);
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
.radar__core {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan); top: 50%; left: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(0, 235, 255, 0.9);
}
.radar__blip {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); opacity: 0;
}
.radar__blip.b1 { top: 26%; left: 64%; animation: blip 4s 0.6s infinite; }
.radar__blip.b2 { top: 62%; left: 24%; animation: blip 4s 2.1s infinite; }
.radar__blip.b3 { top: 72%; left: 70%; animation: blip 4s 3.2s infinite; }
@keyframes blip {
  0% { opacity: 0; transform: scale(0.4); }
  6% { opacity: 1; transform: scale(1.4); box-shadow: 0 0 18px rgba(0, 235, 255, 0.8); }
  35% { opacity: 0.35; transform: scale(1); }
  70%, 100% { opacity: 0; }
}

/* ============================================================
   WHY
   ============================================================ */
.why__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.why__item {
  padding: 48px 44px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 0.4s;
  position: relative;
}
.why__item::before {
  content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: var(--cyan); transition: width 0.5s var(--ease-out);
}
.why__item:hover { background: rgba(0, 235, 255, 0.025); }
.why__item:hover::before { width: 100%; }
.why__item h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 400; margin-bottom: 12px;
}
.why__item p { color: var(--gray); font-size: 15.5px; }

/* ============================================================
   CTA
   ============================================================ */
.cta { text-align: center; overflow: hidden; }
.cta__glow {
  position: absolute; width: 1100px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 235, 255, 0.12) 0%, transparent 60%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.cta__inner { position: relative; }
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 72px); line-height: 1.08; font-weight: 400;
  margin-bottom: 24px;
}
.cta__sub { color: var(--gray); max-width: 560px; margin: 0 auto 44px; font-size: 18px; }
.cta__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cta__actions[hidden] { display: none; }

/* HubSpot booking embed */
.booking { max-width: 860px; margin: 0 auto 10px; }
.booking[hidden] { display: none; }
.booking__frame {
  background: var(--white); border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(0, 235, 255, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 235, 255, 0.08);
  min-height: 660px;
}
.booking__frame iframe {
  width: 100%; height: 660px; border: 0; display: block;
}

/* External nav links get a small ↗ marker */
.nav__ext::before {
  content: '↗'; color: var(--cyan); font-size: 11px;
  margin-right: 5px; vertical-align: 1px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line); padding: 64px 0 44px; background: var(--ink-2);
}
.footer__inner { text-align: center; }
.footer__logo { height: 36px; width: auto; margin: 0 auto 22px; }
.footer__tag { color: var(--gray); font-size: 14.5px; margin-bottom: 26px; }
.footer__links { display: flex; gap: 30px; justify-content: center; margin-bottom: 30px; }
.footer__links a { color: var(--gray); font-size: 14px; transition: color 0.3s; }
.footer__links a:hover { color: var(--cyan); }
.footer__copy { color: var(--gray-dark); font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .process__layout { grid-template-columns: 1fr; gap: 50px; }
  .process__sticky { position: static; }
  .security__layout { grid-template-columns: 1fr; gap: 50px; }
  .why__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .services__grid { grid-template-columns: 1fr; }
  .nav__links, .nav__actions { display: none; }
  .nav__burger {
    display: flex; flex-direction: column; gap: 5px; margin-left: auto;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav__burger span {
    width: 24px; height: 2px; background: var(--white); transition: transform 0.3s, opacity 0.3s;
  }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__mobile {
    display: none; flex-direction: column; gap: 8px;
    padding: 18px 5vw 26px;
    background: rgba(10, 10, 10, 0.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav__mobile.is-open { display: flex; }
  .nav__mobile a { padding: 12px 0; font-size: 16px; color: var(--gray); }
  .nav__mobile a.btn { color: var(--ink); text-align: center; margin-top: 10px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .step { opacity: 1; transform: none; }
  .line-reveal span { transform: none; animation: none; }
}
