/* Loaded after trivane.css. Motion and effects only; js/effects.js drives them.
   Reveals use the `translate` / `scale` / `rotate` properties rather than
   `transform`, so they combine with the existing hover lifts instead of
   overriding them. */

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* Lenis smooth scrolling takes over from the browser's own. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- progress + back to top */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--orange), #8fd0de, var(--green));
  box-shadow: 0 0 12px rgba(10, 140, 168, .6);
}
.fab-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--rust); color: #fff; box-shadow: 0 14px 30px -12px rgba(7, 22, 54, .6);
  opacity: 0; visibility: hidden; translate: 0 16px; scale: .8;
  transition: opacity .35s var(--ease-out), translate .35s var(--ease-out), scale .35s var(--ease-out), visibility .35s, background .2s;
}
.fab-top.show { opacity: 1; visibility: visible; translate: 0 0; scale: 1; }
.fab-top:hover { background: var(--orange); }
.fab-top svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fab-top .ring-bg { stroke: rgba(255, 255, 255, .15); stroke-width: 2.5; }
.fab-top .ring { stroke: #8fd0de; stroke-width: 2.5; transform: rotate(-90deg); transform-origin: center; }
.fab-top path { stroke: #fff; stroke-width: 2.4; }

/* ---------------------------------------------------------------- hero */
.company-hero {
  overflow: hidden; isolation: isolate; padding: 110px 0 130px;
  background: var(--rust-deep);
}
.hero-bg {
  position: absolute; inset: -15% 0; z-index: -4;
  background: url("../assets/trivane_hero.jpg") center / cover no-repeat;
  animation: ken-burns 26s ease-in-out infinite alternate;
}
.company-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background:
    linear-gradient(180deg, rgba(7, 22, 54, .55), rgba(7, 22, 54, .92)),
    linear-gradient(90deg, rgba(7, 22, 54, .7), transparent 70%);
}
/* faint moving grid */
.company-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .35;
  background-image:
    linear-gradient(rgba(143, 208, 222, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 208, 222, .12) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
          mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
  animation: grid-drift 18s linear infinite;
}
.hero-orbs { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-orbs span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: orb 16s ease-in-out infinite alternate;
}
.hero-orbs span:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -80px; background: #0a8ca8; }
.hero-orbs span:nth-child(2) { width: 340px; height: 340px; right: -60px; top: 30%; background: #1f4e8c; animation-delay: -5s; animation-duration: 20s; }
.hero-orbs span:nth-child(3) { width: 260px; height: 260px; left: 40%; bottom: -120px; background: #8fd0de; opacity: .3; animation-delay: -9s; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.company-hero-inner { position: relative; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero-tagline {
  margin: 10px 0 0; color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.8rem, 4.4vw, 3.2rem); line-height: 1.15; letter-spacing: -.3px;
}
.type-wrap { display: inline-block; white-space: nowrap; }
.type {
  background: linear-gradient(90deg, #8fd0de, #ffffff 50%, #8fd0de);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4s linear infinite;
}
.caret {
  display: inline-block; width: 3px; height: .95em; margin-left: 4px; vertical-align: -.1em;
  background: #8fd0de; border-radius: 2px; animation: blink 1s steps(1) infinite;
}
.hero-sub { margin: 0; max-width: 560px; font-size: 1.15rem; color: rgba(255, 255, 255, .85); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* entrance: waits for the splash on a first visit */
.company-hero { --hero-delay: 1.8s; }
.splash-seen .company-hero { --hero-delay: .1s; }
.hero-in { animation: hero-in 1s var(--ease-out) both; animation-delay: calc(var(--hero-delay) + var(--i, 0) * 140ms); }
.company-logo.hero-in { animation-name: hero-pop; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 16px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: scroll-dot 1.8s ease-in-out infinite;
}

/* ---------------------------------------------------------------- services marquee */
.marquee {
  overflow: hidden; padding: 18px 0; background: var(--rust);
  border-top: 1px solid rgba(255, 255, 255, .08);
  -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: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li {
  display: flex; align-items: center; gap: 10px; padding: 0 34px; white-space: nowrap;
  color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
}
.marquee li::after { content: "✦"; margin-left: 34px; color: #8fd0de; font-size: .8rem; }
.marquee .i { color: #8fd0de; }

/* ---------------------------------------------------------------- scroll reveals */
.fx {
  opacity: 0;
  transition:
    opacity .9s var(--ease-out) var(--d, 0s),
    translate 1s var(--ease-out) var(--d, 0s),
    scale 1s var(--ease-out) var(--d, 0s),
    filter 1s var(--ease-out) var(--d, 0s),
    rotate .4s var(--ease-out),
    transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.fx-up { translate: 0 46px; }
.fx-left { translate: 56px 0; }
.fx-zoom { scale: .9; filter: blur(8px); }
.fx.in { opacity: 1; translate: none; scale: none; filter: none; }

/* headings: each word slides up from behind a mask */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.words .w > span {
  display: inline-block; translate: 0 110%;
  transition: translate .9s var(--ease-out); transition-delay: calc(var(--i) * 70ms + 80ms);
}
.words.words-in .w > span { translate: none; }

/* photo: rounded window the image drifts inside */
.company-photo { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.company-photo img { scale: 1.14; box-shadow: none; border-radius: 0; }

/* ---------------------------------------------------------------- tilt + spotlight */
.point-grid, .why-grid, .leader-grid, .approach-path, .mp-steps, .mp-cards { perspective: 1100px; }
.tilt { position: relative; transform-style: preserve-3d; }
.fx-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--glow, rgba(10, 140, 168, .16)), transparent 55%);
}
.tilt:hover .fx-glow { opacity: 1; }
.why-card { --glow: rgba(143, 208, 222, .22); }
.point-grid .point { --glow: rgba(255, 255, 255, .55); }
.mamapapa { --glow: rgba(217, 89, 46, .14); }

/* buttons: magnetic pull (translate) + light sweep on hover */
.btn {
  position: relative; overflow: hidden;
  transition: transform .18s ease, background .18s ease, color .18s, border-color .18s, box-shadow .18s, translate .3s var(--ease-out);
}
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s ease; pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-link::after { display: none; }

/* icon tiles bounce slightly when their card is hovered */
.point:hover .tile, .approach-step:hover .tile, .mp-card:hover .tile, .protean-facts li:hover .tile {
  animation: tile-bounce .6s var(--ease-out);
}
.why-card:hover > .i { animation: tile-bounce .6s var(--ease-out); }

/* leader photo ring spins in on hover */
.leader-photo { position: relative; }
.leader-card:hover .leader-photo { box-shadow: 0 0 0 6px rgba(10, 140, 168, .15), var(--shadow-sm); transition: box-shadow .3s; }

/* Protean facts card: slow shimmering sheen */
.protean-facts { position: relative; overflow: hidden; }
.protean-facts::after {
  content: ""; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(143, 208, 222, .18) 80%, transparent 90%);
  animation: spin 12s linear infinite;
}
.protean-facts li { position: relative; z-index: 1; }

/* Mama & Papa logo floats */
.mp-logo img { animation: float 6s ease-in-out infinite; }

/* ---------------------------------------------------------------- keyframes */
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.12) translateX(-2%); } }
@keyframes grid-drift { to { background-position: 56px 56px, 56px 56px; } }
@keyframes orb { to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hero-in { from { opacity: 0; transform: translateY(30px); filter: blur(6px); } }
@keyframes hero-pop { from { opacity: 0; transform: translateY(20px) scale(.92); } }
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes tile-bounce { 0% { transform: none; } 35% { transform: translateY(-6px) rotate(-6deg); } 65% { transform: translateY(1px) rotate(3deg); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 600px) {
  .company-hero { padding: 80px 0 110px; }
  .hero-actions .btn { flex: 1; }
  .fab-top { right: 14px; bottom: 14px; width: 46px; height: 46px; }
  .marquee li { padding: 0 22px; font-size: .95rem; }
  .marquee li::after { margin-left: 22px; }
  .hero-orbs span { filter: blur(50px); }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fx, .words .w > span { opacity: 1; translate: none; scale: none; filter: none; }
  .hero-canvas, .scroll-cue, .fab-top .ring { display: none; }
  .company-photo img { scale: 1; }
}
