/* NOVA Facade — motion layer: service icons that come alive and a page that comes alive on scroll (see js/live.js) */

/* ---------- service icons: on hover the icon turns into a small animated scene inside its own tile
   (scenes are drawn by js/live.js; on touch screens they play when the card appears and on tap).
   A gold light runs around the tile and a glint passes over it; the card tilts towards the pointer. ---------- */
@property --nf-aura { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.service-icon { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease; }
.service-icon > i { display: inline-block; transition: opacity .2s ease, transform .35s ease; }
:is(.service:hover, .service.icon-live) .service-icon { transform: translateY(-3px) scale(1.07); box-shadow: 0 12px 28px rgba(200, 164, 106, .35), 0 0 0 1px rgba(200, 164, 106, .25); }
:is(.service:hover, .service.icon-live) .service-icon.has-scene > i { opacity: 0; transform: scale(.4) rotate(-25deg); }
:is(.service:hover, .service.icon-live) .service-icon:not(.has-scene) > i { animation: icon-pop .6s ease; }
.service-icon::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--nf-aura), transparent 0 60%, rgba(200, 164, 106, .25) 70%, #f7e2ad 82%, var(--gold) 88%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
:is(.service:hover, .service.icon-live) .service-icon::before { opacity: 1; animation: nf-aura 2.2s linear infinite; }
.service-icon::after { content: ""; position: absolute; inset: -30%; z-index: 4; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .38) 50%, transparent 58%); transform: translateX(-130%); pointer-events: none; }
:is(.service:hover, .service.icon-live) .service-icon::after { animation: nf-glint 1s ease .05s; }

.sc { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sc-svg > * { opacity: 0; }

/* consulting: a message arrives: the bubble buzzes, a red badge pops with a ripple, "typing…" turns into text */
.m-bubble { transform-box: fill-box; transform-origin: 30% 85%; }
.m-bubble path { fill: rgba(200, 164, 106, .14); stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.m-dots circle { fill: var(--gold); transform-box: fill-box; transform-origin: center; }
.m-l1, .m-l2 { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); }
.m-l1 { fill: #fff; }
.m-l2 { fill: var(--gold); }
.m-badge { transform-box: fill-box; transform-origin: center; }
.m-badge circle { fill: #e5484d; }
.m-badge text { fill: #fff; font: 700 8px/1 system-ui, sans-serif; text-anchor: middle; }
.m-ring { fill: none; stroke: #e5484d; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; }
:is(.service:hover, .service.icon-live) .m-bubble { animation: sc-pop .4s cubic-bezier(.34, 1.56, .64, 1) forwards, m-buzz .45s linear .4s; }
:is(.service:hover, .service.icon-live) .m-badge { animation: sc-pop .35s cubic-bezier(.34, 1.56, .64, 1) .5s forwards; }
:is(.service:hover, .service.icon-live) .m-ring { animation: sc-ring .8s ease-out .5s; }
:is(.service:hover, .service.icon-live) .m-dots { animation: sc-window .85s linear .65s both; }
:is(.service:hover, .service.icon-live) .m-dots circle { animation: m-dot .32s ease-in-out infinite alternate; }
.m-dots circle:nth-child(2) { animation-delay: .1s !important; }
.m-dots circle:nth-child(3) { animation-delay: .2s !important; }
:is(.service:hover, .service.icon-live) .m-l1 { opacity: 1; animation: sc-grow .35s ease 1.5s forwards; }
:is(.service:hover, .service.icon-live) .m-l2 { opacity: 1; animation: sc-grow .3s ease 1.78s forwards; }

/* technical support: the helmet drops on, its headlamp lights up and shines on a gear (the "settings"),
   the gear lights up gold and starts turning, then the check turns green */
.h-hat { transform-box: fill-box; transform-origin: 50% 100%; }
.h-beam { fill: url(#nf-beam); transform-box: view-box; transform-origin: 24.5px 31px; }
.h-dome, .h-brim { fill: var(--gold); }
.h-ridge { fill: #ecd5a3; }
.h-lamp { fill: #6b5a3a; }
.h-gear { fill: #5c5446; }
.h-cog { transform-box: fill-box; transform-origin: center; }
.h-flash { fill: none; stroke: #fff2c4; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; }
.h-ok { transform-box: fill-box; transform-origin: center; }
.h-ok circle { fill: #3fb27f; }
.h-ok path { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
:is(.service:hover, .service.icon-live) .h-hat { animation: h-drop .55s cubic-bezier(.34, 1.56, .64, 1) forwards, h-nod 1.6s ease-in-out .95s infinite alternate; }
:is(.service:hover, .service.icon-live) .h-lamp { animation: h-lamp .25s ease .55s forwards; }
:is(.service:hover, .service.icon-live) .h-flash { animation: sc-ring .6s ease-out .55s; }
:is(.service:hover, .service.icon-live) .h-beam { animation: sc-fade-in .3s ease .6s forwards, h-sweep 1.4s ease-in-out .9s infinite alternate; }
:is(.service:hover, .service.icon-live) .h-gear { animation: h-gear-dim .3s ease .1s forwards, h-gear-lit .35s ease .75s forwards; }
:is(.service:hover, .service.icon-live) .h-cog { animation: sc-spin 2.6s linear .75s infinite; }
:is(.service:hover, .service.icon-live) .h-ok { animation: sc-pop .35s cubic-bezier(.34, 1.56, .64, 1) 1.5s forwards; }
@keyframes h-nod { from { opacity: 1; transform: rotate(-3deg); } to { opacity: 1; transform: rotate(3deg); } }
@keyframes h-sweep { from { opacity: 1; transform: rotate(-5deg); } to { opacity: 1; transform: rotate(5deg); } }
@keyframes h-gear-dim { to { opacity: .5; } }
@keyframes h-gear-lit { to { opacity: 1; fill: var(--gold); filter: drop-shadow(0 0 2px rgba(255, 228, 150, .9)); } }

/* preliminary calculation: keys light up one by one, digits fly off them, the display goes 1 → 12 → 12×8 → 96 */
.c-body { transform-box: fill-box; transform-origin: center; }
.c-case { fill: #1f252c; stroke: var(--gold); stroke-width: 1.4; }
.c-screen { fill: #0b0e12; stroke: rgba(200, 164, 106, .5); stroke-width: .8; }
.c-k { fill: rgba(200, 164, 106, .4); transform-box: fill-box; transform-origin: center; }
.c-op { fill: var(--gold); }
.c-t { fill: #fff; font: 700 6.2px/1 ui-monospace, Consolas, monospace; text-anchor: end; opacity: 0; transform-box: fill-box; transform-origin: 100% 50%; }
.c-t4 { fill: var(--gold); font-size: 7.6px; }
.c-fly { fill: #fff; font: 700 7px/1 ui-monospace, Consolas, monospace; text-anchor: middle; }
.c-flies text { opacity: 0; }
.c-burst { fill: none; stroke: var(--gold); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; }
:is(.service:hover, .service.icon-live) .c-body { animation: sc-pop .35s cubic-bezier(.34, 1.56, .64, 1) forwards; }
:is(.service:hover, .service.icon-live) .c-flies { opacity: 1; }
:is(.service:hover, .service.icon-live) .c-k1 { animation: c-press .22s ease .3s; }
:is(.service:hover, .service.icon-live) .c-k2 { animation: c-press .22s ease .55s; }
:is(.service:hover, .service.icon-live) .c-kx { animation: c-press .22s ease .8s; }
:is(.service:hover, .service.icon-live) .c-k8 { animation: c-press .22s ease 1.05s; }
:is(.service:hover, .service.icon-live) .c-keq { animation: c-press .22s ease 1.3s; }
:is(.service:hover, .service.icon-live) .c-f1 { animation: c-fly .7s ease-out .3s forwards; }
:is(.service:hover, .service.icon-live) .c-f2 { animation: c-fly .7s ease-out .55s forwards; }
:is(.service:hover, .service.icon-live) .c-fx { animation: c-fly .7s ease-out .8s forwards; }
:is(.service:hover, .service.icon-live) .c-f8 { animation: c-fly .7s ease-out 1.05s forwards; }
:is(.service:hover, .service.icon-live) .c-t0 { animation: sc-window .25s linear .32s both; }
:is(.service:hover, .service.icon-live) .c-t1 { animation: sc-window .25s linear .57s both; }
:is(.service:hover, .service.icon-live) .c-t2 { animation: sc-window .25s linear .82s both; }
:is(.service:hover, .service.icon-live) .c-t3 { animation: sc-window .25s linear 1.07s both; }
:is(.service:hover, .service.icon-live) .c-t4 { animation: c-result .4s cubic-bezier(.34, 1.56, .64, 1) 1.32s forwards; }
:is(.service:hover, .service.icon-live) .c-burst { animation: sc-ring .6s ease-out 1.32s; }

/* design: the compass needle goes in, the pencil leg draws a full circle, the radius R appears and the circle glows */
.k-circle { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 100; stroke-dashoffset: 100; }
.k-glow { fill: var(--gold); transform-box: fill-box; transform-origin: center; }
.k-radius { stroke: #fff; stroke-width: 1; stroke-dasharray: 1.6 1.4; transform-box: fill-box; transform-origin: 0 50%; }
.k-r { fill: #fff; font: 700 6px/1 system-ui, sans-serif; text-anchor: middle; }
.k-center { fill: #fff; }
.k-compass { stroke: #fff; stroke-width: 1.3; stroke-linecap: round; transform-box: view-box; transform-origin: 26px 29px; }
.k-compass circle { fill: var(--gold); stroke: none; }
:is(.service:hover, .service.icon-live) .k-circle { opacity: 1; animation: sc-draw 1.2s linear .25s forwards; }
:is(.service:hover, .service.icon-live) .k-compass { animation: sc-fade-in .15s ease .1s forwards, sc-turn 1.2s linear .25s forwards, sc-fade-out .25s ease 1.5s forwards; }
:is(.service:hover, .service.icon-live) .k-center { animation: sc-fade-in .2s ease .15s forwards; }
:is(.service:hover, .service.icon-live) .k-radius { animation: k-radius .3s ease 1.55s forwards; }
:is(.service:hover, .service.icon-live) .k-r { animation: sc-fade-in .3s ease 1.75s forwards; }
:is(.service:hover, .service.icon-live) .k-glow { animation: k-glow 1.2s ease-out 1.45s forwards; }

/* documentation: the sheet stays still, only the pen moves: it writes three lines and a signature, then the stamp comes down */
.d-paper { fill: #f4f1ea; }
.d-l { fill: #8f969e; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); }
.d-sign { fill: none; stroke: #23408f; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.d-stamp { transform-box: fill-box; transform-origin: center; }
.d-stamp circle { fill: rgba(20, 24, 29, .6); stroke: var(--gold); stroke-width: 1.4; }
.d-stamp path { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.d-pen { position: absolute; left: 0; top: 0; z-index: 2; width: 16px; height: 16px; opacity: 0; }
.d-pen svg { display: block; overflow: visible; }
.d-pen path { fill: var(--gold); }
.d-pen .d-tip { fill: #1d2230; }
:is(.service:hover, .service.icon-live) .d-paper { animation: sc-fade-in .25s ease forwards; }
:is(.service:hover, .service.icon-live) .d-l1 { opacity: 1; animation: sc-grow .4s linear .3s forwards; }
:is(.service:hover, .service.icon-live) .d-l2 { opacity: 1; animation: sc-grow .3s linear .8s forwards; }
:is(.service:hover, .service.icon-live) .d-l3 { opacity: 1; animation: sc-grow .3s linear 1.2s forwards; }
:is(.service:hover, .service.icon-live) .d-sign { opacity: 1; animation: sc-draw .54s linear 1.62s forwards; }
:is(.service:hover, .service.icon-live) .d-stamp { animation: d-stamp .3s ease-in 2.2s forwards; }
:is(.service:hover, .service.icon-live) .d-pen { animation: d-pen 2.3s linear forwards; }

/* supplies: the truck drives in and keeps driving: the city and the road run past, wheels turn, speed lines and puffs fly back */
.t-city rect { fill: rgba(255, 255, 255, .08); }
.t-road { stroke: rgba(255, 255, 255, .55); stroke-width: 1.2; stroke-dasharray: 5 4; }
.t-ground { fill: rgba(255, 255, 255, .1); }
.t-speed line { stroke: rgba(255, 255, 255, .65); stroke-width: 1; stroke-linecap: round; opacity: 0; }
.t-puffs circle { fill: rgba(255, 255, 255, .4); opacity: 0; transform-box: fill-box; transform-origin: center; }
.t-bob { transform-box: fill-box; transform-origin: 50% 100%; }
.t-box { fill: var(--gold); }
.t-cab { fill: #e2c48c; }
.t-win { fill: #14181d; }
.t-wheel { transform-box: fill-box; transform-origin: center; }
.t-wheel circle { fill: #0b0e12; stroke: var(--gold); stroke-width: 1.2; }
.t-wheel line { stroke: var(--gold); stroke-width: 1; }
:is(.service:hover, .service.icon-live) .t-city { animation: sc-fade-in .4s ease forwards, t-city 6s linear infinite; }
:is(.service:hover, .service.icon-live) .t-road { animation: sc-fade-in .3s ease forwards, t-road .32s linear infinite; }
:is(.service:hover, .service.icon-live) .t-ground, :is(.service:hover, .service.icon-live) .t-speed, :is(.service:hover, .service.icon-live) .t-puffs { opacity: 1; }
:is(.service:hover, .service.icon-live) .t-speed line { animation: t-speed .6s linear .6s infinite; }
:is(.service:hover, .service.icon-live) .t-speed line:nth-child(2) { animation-delay: .8s; }
:is(.service:hover, .service.icon-live) .t-speed line:nth-child(3) { animation-delay: 1s; }
:is(.service:hover, .service.icon-live) .t-puffs circle { animation: t-puff .9s ease-out .7s infinite; }
:is(.service:hover, .service.icon-live) .t-puffs circle:nth-child(2) { animation-delay: 1.15s; }
:is(.service:hover, .service.icon-live) .t-truck { opacity: 1; animation: t-in .8s cubic-bezier(.22, 1, .36, 1) forwards; }
:is(.service:hover, .service.icon-live) .t-bob { animation: t-bob .5s ease-in-out .8s infinite alternate; }
:is(.service:hover, .service.icon-live) .t-wheel { animation: sc-spin .5s linear infinite; }

/* the card tilts towards the pointer and a soft gold light follows it (pointer devices only, set by js/live.js) */
.services { perspective: 1100px; }
.service { position: relative; transition: rotate .3s ease-out; }
.service::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(200, 164, 106, .16), transparent 60%); opacity: 0; transition: opacity .3s ease; }
.service:hover::after { opacity: 1; }

@keyframes nf-aura { to { --nf-aura: 360deg; } }
@keyframes nf-glint { to { transform: translateX(130%); } }
@keyframes icon-pop { 0%, 100% { transform: none; } 50% { transform: scale(1.18) rotate(-6deg); } }
@keyframes sc-pop { 0% { opacity: 1; transform: scale(.2); } 100% { opacity: 1; transform: none; } }
@keyframes sc-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes sc-window { 0%, 100% { opacity: 0; } 4%, 96% { opacity: 1; } }
@keyframes sc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sc-fade-in { to { opacity: 1; } }
@keyframes sc-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
@keyframes sc-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@keyframes m-buzz { 0%, 100% { transform: none; } 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
@keyframes m-dot { from { transform: translateY(0); } to { transform: translateY(-2.4px); } }
@keyframes h-drop { 0% { opacity: 1; transform: translateY(-24px); } 100% { opacity: 1; transform: none; } }
@keyframes h-look { from { opacity: 1; transform: rotate(-7deg); } to { opacity: 1; transform: rotate(9deg); } }
@keyframes h-lamp { to { fill: #fff6d6; } }
@keyframes c-press { 50% { fill: #fff3cf; transform: scale(.8); } }
@keyframes c-fly { 0% { opacity: 0; transform: translateY(0) scale(.6); } 30% { opacity: 1; transform: translateY(-1.5px) scale(1); } 100% { opacity: 0; transform: translateY(-5px) scale(.7); } }
@keyframes c-result { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: none; } }
@keyframes k-radius { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes k-glow { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: .35; transform: none; } 100% { opacity: .12; transform: none; } }
@keyframes d-stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-30deg); } 100% { opacity: 1; transform: rotate(-12deg); } }
@keyframes d-pen {
  0% { opacity: 0; transform: translate(37px, -11px); }
  13% { opacity: 1; transform: translate(15.5px, -2px); }
  30.4% { transform: translate(31.5px, -2px); }
  34.8% { transform: translate(15.5px, 2.5px); }
  47.8% { transform: translate(28.5px, 2.5px); }
  52.2% { transform: translate(15.5px, 7px); }
  65.2% { transform: translate(30.5px, 7px); }
  70.4% { transform: translate(15.5px, 18px); }
  73.9% { transform: translate(17.6px, 15.3px); }
  78.3% { transform: translate(21px, 17.5px); }
  81.7% { transform: translate(23.2px, 14.8px); }
  85.2% { transform: translate(25px, 18.1px); }
  88.7% { transform: translate(28px, 16.6px); }
  91.3% { transform: translate(30.5px, 15.6px); }
  93.9% { opacity: 1; transform: translate(32.7px, 17.4px); }
  100% { opacity: 0; transform: translate(41px, -5px); }
}
@keyframes t-city { from { transform: translateX(0); } to { transform: translateX(-52px); } }
@keyframes t-road { to { stroke-dashoffset: -9; } }
@keyframes t-speed { 0% { opacity: 0; transform: translateX(4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-12px); } }
@keyframes t-puff { 0% { opacity: .9; transform: translate(0, 0) scale(.5); } 100% { opacity: 0; transform: translate(-10px, -4px) scale(1.8); } }
@keyframes t-in { from { transform: translateX(-44px); } to { transform: none; } }
@keyframes t-bob { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-.8px) rotate(-.6deg); } }

/* ---------- header: compact while scrolling, with a gold progress line ---------- */
.header { transition: height .35s ease, background-color .35s ease, box-shadow .35s ease; }
.header.is-scrolled { height: calc(var(--header) - 12px); background-color: rgba(14, 17, 21, .9); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.header .brand-logo { transition: transform .35s ease; transform-origin: 0 50%; }
.header.is-scrolled .brand-logo { transform: scale(.88); }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold), #f1d9a3); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* ---------- menu: a gold line slides under the section that is on screen ---------- */
.nav { position: relative; }
.nav a { transition: color .3s ease, background-color .3s ease; }
.nav a.is-current { color: #fff; }
.nav-marker { position: absolute; left: 0; bottom: 1px; width: 0; height: 2px; border-radius: 2px; background: var(--gold); opacity: 0; pointer-events: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1), width .5s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }

/* ---------- blocks and cards float in as they reach the screen ---------- */
.reveal-on [data-reveal] { opacity: 0; transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1), clip-path 1s cubic-bezier(.2, .8, .2, 1), rotate .3s ease-out; transition-delay: var(--d, 0s), var(--d, 0s), var(--d, 0s), 0s; }
.reveal-on [data-reveal="up"] { transform: translateY(28px); }
.reveal-on [data-reveal="card"] { transform: translateY(40px) scale(.96); }
.reveal-on [data-reveal="photo"] { transform: scale(.94); clip-path: inset(10% 10% 10% 10% round 18px); }
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 0); }

@media (max-width: 1140px) {
  .header.is-scrolled .nav { top: calc(var(--header) - 12px); }
  .nav-marker { display: none; }
  .nav a.is-current { color: var(--gold); }
}
@media (prefers-reduced-motion: reduce) {
  .service-icon > i, .sc, .sc *, .service-icon::before, .service-icon::after { animation: none !important; }
  .sc { display: none; }
  :is(.service:hover, .service.icon-live) .service-icon.has-scene > i { opacity: 1; transform: none; }
  .reveal-on [data-reveal] { opacity: 1; transform: none; clip-path: none; }
}
@media print {
  .reveal-on [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
