/* ==========================================================
   Inven360 — cinematic layer (2026 style)
   Aurora mesh background, film grain, kinetic headline, spotlight + 3D-tilt cards,
   scrolling ticker, scroll progress, custom services dropdown.
   All motion is switched off under prefers-reduced-motion.
   ========================================================== */

/* ---------- ambient aurora + grain (injected by cinematic.js) ---------- */
.cine-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cine-blob { position: absolute; width: 56vmax; height: 56vmax; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; mix-blend-mode: screen; }
.cine-blob.b1 { background: radial-gradient(circle, #8B5CF6 0%, transparent 68%); top: -22vmax; left: -14vmax; animation: drift1 18s ease-in-out infinite alternate; }
.cine-blob.b2 { background: radial-gradient(circle, #FFB800 0%, transparent 66%); bottom: -26vmax; right: -16vmax; opacity: .26; animation: drift2 22s ease-in-out infinite alternate; }
.cine-blob.b3 { background: radial-gradient(circle, #22C55E 0%, transparent 66%); top: 38%; left: 46%; width: 38vmax; height: 38vmax; opacity: .16; animation: drift3 27s ease-in-out infinite alternate; }
:root[data-theme="light"] .cine-blob { mix-blend-mode: multiply; opacity: .16; }
:root[data-theme="light"] .cine-blob.b2 { opacity: .2; } :root[data-theme="light"] .cine-blob.b3 { opacity: .1; }
@keyframes drift1 { to { transform: translate3d(22vmax, 16vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-24vmax, -14vmax, 0) scale(1.2); } }
@keyframes drift3 { to { transform: translate3d(-18vmax, 12vmax, 0) scale(.85); } }
.cine-grain { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite; }
:root[data-theme="light"] .cine-grain { opacity: .05; mix-blend-mode: multiply; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.cine-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #8B5CF6, #FFB800, #22C55E); box-shadow: 0 0 14px rgba(255, 184, 0, .6); pointer-events: none; }

/* ---------- kinetic hero headline ---------- */
.cine-h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.cine-h1 .w > span { display: inline-block; transform: translateY(115%) rotate(4deg); filter: blur(10px); opacity: 0;
  animation: wordUp .95s cubic-bezier(.16, .84, .24, 1) forwards; animation-delay: calc(.12s + var(--i) * .075s); }
@keyframes wordUp { to { transform: none; filter: blur(0); opacity: 1; } }
.hero h1 .hl .w > span { background: linear-gradient(100deg, var(--gold-text) 25%, #FFD35A 50%, var(--gold-text) 75%); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: wordUp .95s cubic-bezier(.16, .84, .24, 1) forwards, shimmer 5.5s linear 1.6s infinite; animation-delay: calc(.12s + var(--i) * .075s), calc(1.6s + var(--i) * .15s); }
:root[data-theme="light"] .hero h1 .hl .w > span { background-image: linear-gradient(100deg, #8F5200 25%, #E08A00 50%, #8F5200 75%); }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.hero .eyebrow, .hero .lead, .hero-cta, .hero-points { animation: fadeUp .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .lead { animation-delay: .9s; } .hero-cta { animation-delay: 1.05s; } .hero-points { animation-delay: 1.2s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } }
.hero-art { transition: transform .5s cubic-bezier(.2, .7, .2, 1); transform: translate3d(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 12px), 0); }

/* ---------- reveal: blur-to-sharp ---------- */
.js .reveal { filter: blur(8px); transform: translateY(30px) scale(.985); transition: opacity .9s ease, transform .9s cubic-bezier(.16, .84, .24, 1), filter .9s ease; }
.js .reveal.in-view { filter: none; transform: none; }

/* ---------- spotlight + tilt cards ---------- */
.cine-card { position: relative; }
.cine-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 184, 0, .13), rgba(139, 92, 246, .10) 40%, transparent 70%); }
.cine-card:hover::after { opacity: 1; }
.cine-card:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.js .cine-card.in-view { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, opacity .9s ease, filter .9s ease, border-color .25s ease; }

/* ---------- buttons ---------- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%); background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); animation: sheen 4.5s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(255, 184, 0, .8), 0 0 0 4px rgba(255, 184, 0, .15); }

/* ---------- services ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; flex: none; }
.ticker li { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(1.05rem, 2.4vw, 1.55rem); white-space: nowrap; display: flex; align-items: center;
  color: transparent; -webkit-text-stroke: 1px var(--text); }
.ticker li:nth-child(3n+1) { color: var(--heading); -webkit-text-stroke: 0; }
.ticker li::after { content: "✦"; -webkit-text-stroke: 0; color: var(--gold); margin-inline: clamp(20px, 3vw, 38px); font-size: .8em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- services dropdown (looks like the Industry select) ---------- */
.ms { position: relative; }
.ms-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font: inherit; font-size: 1rem; color: var(--heading);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.ms-btn:hover { border-color: var(--text); }
.ms-btn:focus-visible, .ms-btn[aria-expanded="true"] { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.ms-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-val.has-value { color: var(--heading); }
.ms-chev { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.ms-btn[aria-expanded="true"] .ms-chev { transform: rotate(180deg); }
.ms-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: 320px; overflow: auto; padding: 8px; display: grid; gap: 2px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); animation: msPop .22s cubic-bezier(.2, .7, .2, 1); }
.ms-panel[hidden] { display: none; }
@keyframes msPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.ms-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; cursor: pointer; font-size: .98rem; font-weight: 500; color: var(--text-strong); }
.ms-opt:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.ms-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ms-box { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--text); border-radius: 5px; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.ms-opt input:checked + .ms-box { background: var(--gold); border-color: var(--gold); }
.ms-opt input:checked + .ms-box::after { content: ""; width: 9px; height: 5px; border-left: 2.2px solid var(--on-gold); border-bottom: 2.2px solid var(--on-gold); transform: translateY(-1px) rotate(-45deg); }
.ms-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -2px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cine-blob, .cine-grain, .ticker-track, .btn-primary::after { animation: none !important; }
  .cine-h1 .w > span, .hero h1 .hl .w > span, .hero .eyebrow, .hero .lead, .hero-cta, .hero-points { animation: none !important; opacity: 1; transform: none; filter: none; }
  .js .reveal { filter: none; }
  .cine-progress { display: none; }
}
@media (max-width: 719px) { .cine-blob { filter: blur(60px); } .cine-grain { display: none; } }

/* ---------- header fit (brand now carries a tagline) ---------- */
.site-header .nav-link, .site-header .btn { white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1199px) {
  .site-header .nav-link { padding-inline: 10px; }
  .site-header .header-actions .btn { display: none; }   /* hero + Contact link already carry the call to action here */
}

/* ---------- footer: let columns shrink so the wider brand never forces sideways scroll ---------- */
.footer-grid > * { min-width: 0; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); } }
@media (max-width: 959px) { .site-footer .brand-sub { white-space: normal; letter-spacing: .1em; } }
.footer-grid a { overflow-wrap: anywhere; }
@media (max-width: 380px) {
  .brand { gap: 7px; }
  .brand-mark.has-img { height: 34px; } .brand-mark .brand-img { height: 34px; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { font-size: .44rem; letter-spacing: .06em; }
  .header-inner { gap: 8px; }
}
@media (max-width: 480px) {
  .site-header .btn-ghost.btn-sm { --pad-x: 10px; --pad-y: 8px; font-size: .78rem; }
  .site-header .header-actions { gap: 6px; }
}
@media (max-width: 340px) { .brand-sub { display: none; } }
@media (max-width: 480px) { .site-header .btn-ghost.btn-sm[href="index.html"] { display: none; } }  /* the logo already links home */


/* ==========================================================
   Moving background + scroll motion (added)
   ========================================================== */
.cine-layer { position: absolute; inset: -8vmax; will-change: transform; }
.cine-dots { position: absolute; inset: 0; opacity: .55; background-image: radial-gradient(rgba(148, 163, 184, .38) 1.3px, transparent 1.6px); background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(85% 75% at 50% 40%, #000, transparent 88%); mask-image: radial-gradient(85% 75% at 50% 40%, #000, transparent 88%);
  animation: dotsDrift 38s linear infinite; }
:root[data-theme="light"] .cine-dots { background-image: radial-gradient(rgba(11, 22, 48, .30) 1.3px, transparent 1.6px); opacity: .4; }
@keyframes dotsDrift { to { background-position: 340px 170px; } }
.cine-shapes { position: absolute; inset: 0; }
.cine-par { position: absolute; top: 0; display: block; will-change: transform, opacity; }
.cine-shape { display: block; width: var(--s, 60px); height: var(--s, 60px); opacity: .34; animation: shapeSpin var(--t, 26s) linear infinite; }
:root[data-theme="light"] .cine-shape { opacity: .26; }
.cine-shape.ring { border: 3px solid #8B5CF6; border-radius: 50%; }
.cine-shape.sq { border: 3px solid #FFB800; border-radius: 14px; }
.cine-shape.dot { width: calc(var(--s, 60px) * .32); height: calc(var(--s, 60px) * .32); background: #22C55E; border-radius: 50%; }
.cine-shape.plus { color: #FFB800; background: linear-gradient(currentColor, currentColor) center / 100% 3px no-repeat, linear-gradient(currentColor, currentColor) center / 3px 100% no-repeat; }
@keyframes shapeSpin { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-16px); } 100% { transform: rotate(360deg) translateY(0); } }

/* directional scroll reveals (classes added by cinematic.js; use the independent translate/scale properties) */
.js .reveal.fx-left:not(.in-view) { translate: -60px 0; }
.js .reveal.fx-right:not(.in-view) { translate: 60px 0; }
.js .reveal.fx-zoom:not(.in-view) { scale: .9; translate: 0 30px; }
.js .reveal.fx-left, .js .reveal.fx-right, .js .reveal.fx-zoom {
  transition: opacity .9s ease, filter .9s ease, translate .95s cubic-bezier(.16, .84, .24, 1), scale .95s cubic-bezier(.16, .84, .24, 1), transform .9s cubic-bezier(.16, .84, .24, 1), border-color .25s ease; }
.js .cine-card.in-view.fx-left, .js .cine-card.in-view.fx-right, .js .cine-card.in-view.fx-zoom {
  transition: opacity .9s ease, filter .9s ease, translate .95s cubic-bezier(.16, .84, .24, 1), scale .95s cubic-bezier(.16, .84, .24, 1), transform .25s ease-out, border-color .25s ease; }

/* staggered pieces inside sections */
.js .fx { opacity: 0; transform: translateY(26px) scale(.97); filter: blur(6px);
  transition: opacity .8s ease var(--d, 0s), transform .8s cubic-bezier(.16, .84, .24, 1) var(--d, 0s), filter .8s ease var(--d, 0s); }
.js .fx.fx-in { opacity: 1; transform: none; filter: none; }

/* eyebrow bar draws in, process line draws itself */
.js .reveal .eyebrow::before { width: 0; transition: width .8s cubic-bezier(.2, .7, .2, 1) .35s; }
.js .reveal.in-view .eyebrow::before { width: 22px; }
.js .step::after { transform-origin: 0 0; transform: scaleY(0); transition: transform 1s cubic-bezier(.2, .7, .2, 1) .35s; }
.js .step.in-view::after { transform: scaleY(1); }
@media (min-width: 960px) {
  .js .step::after { transform: scaleX(0); }
  .js .step.in-view::after { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cine-dots, .cine-shape { animation: none !important; }
  .cine-shapes { display: none; }
}

/* sideways-sliding reveals must never create horizontal scroll */
html, body { overflow-x: clip; }
