/* Shared effects for the home page and the Bitlance case study.
   Flat colours only: no blur, no glow, no soft shadows. Everything here is optional:
   the pages read fine without it, and motion is off for people who ask for less. */
:root { --ease: cubic-bezier(.2,.8,.2,1); --peach: #fed7aa; }

/* Thin orange line at the top that fills as you scroll */
.fx-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: 0 50%; z-index: 60; pointer-events: none; }

/* Floating section menu, shown after the top of the page */
.fx-nav { position: fixed; top: 14px; left: 50%; z-index: 50; display: flex; align-items: center; gap: 2px; max-width: calc(100vw - 20px); padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; transform: translate(-50%, -90px); visibility: hidden; transition: transform .45s var(--ease), visibility 0s linear .45s; overflow-x: auto; scrollbar-width: none; }
.fx-nav::-webkit-scrollbar { display: none; }
.fx-nav.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease); }
.fx-nav a { position: relative; z-index: 1; flex: none; padding: 7px 14px; border-radius: 999px; font: 500 14px Montserrat, system-ui, sans-serif; color: var(--body); text-decoration: none; white-space: nowrap; transition: color .25s; }
.fx-nav a:hover { color: var(--ink); }
.fx-nav a.on, .fx-nav a.on:hover { color: #fff; }
.fx-nav a:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.fx-nav a.cta, .fx-nav a.cta:hover, .fx-nav a.cta.on { position: sticky; right: 0; z-index: 2; margin-left: 4px; background: var(--orange); color: #0f172a; font-weight: 600; box-shadow: 6px 0 0 #fff, -6px 0 0 #fff; }
.fx-nav .me { padding: 0; width: 34px; height: 34px; margin-right: 4px; border-radius: 50%; }
.fx-nav .me img { display: block; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.fx-nav .pill { position: absolute; left: 0; top: 5px; height: 34px; width: 0; background: var(--ink); border-radius: 999px; transition: transform .4s var(--ease), width .4s var(--ease); z-index: 0; }
[id] { scroll-margin-top: 92px; }

/* Grid squares that light up on the navy cards */
.fx-grid { position: relative; }
.fx-cells { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; border-radius: inherit; margin: 0 !important; }
.fx-cells i { position: absolute; width: 27px; height: 27px; background: rgba(247,147,26,.38); box-shadow: inset 0 0 0 1px rgba(247,147,26,.85); opacity: 0; }

/* Timeline line that fills as you scroll */
.tl.fx::before { background: var(--line); }
.tl .tl-fill { position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--orange); border-radius: 2px; transform: scaleY(0); transform-origin: 50% 0; }

/* Lagos time */
.lt { display: flex; align-items: center; gap: 8px; }
.lt[hidden] { display: none; }
.lt i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.lt b { font-weight: 600; color: #f8fafc; font-variant-numeric: tabular-nums; }

/* Strip speed is driven by scrolling */
.strip.fx .track { animation: none !important; will-change: transform; }

@keyframes fx-blink { 50% { opacity: .25; } }
@keyframes fx-letter { from { opacity: 0; transform: translateY(.5em) rotate(8deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* Things rise into place as they scroll into view */
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s var(--ease), border-color .35s; transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.in:hover { transition-delay: 0s; }
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  .lt i, .one i { animation: fx-blink 1.6s ease-in-out infinite; }
  /* The wavy underline draws itself when its title scrolls into view */
  .js .head.reveal h2::after { clip-path: inset(0 100% 0 0); transition: clip-path .9s cubic-bezier(.6,0,.2,1) .35s; }
  .js .head.reveal.in h2::after { clip-path: inset(0); }
}

/* Cards lean toward the cursor (laptops only) */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .fx-tilt:hover, .js .fx-tilt.reveal.in:hover { transform: perspective(1000px) translateY(-5px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
  .fx-tilt.tilting, .js .fx-tilt.reveal.in.tilting { transition-duration: .18s; transition-delay: 0s; }
}

@media (max-width: 600px) {
  .fx-nav { top: 10px; }
  .fx-nav a { padding: 7px 12px; font-size: 13.5px; }
}
