/*
 * Depth and motion (loaded last).
 *
 * Blocks: every card, panel and box carries a soft resting shadow and lifts a few
 * pixels with a deeper shadow on hover. The lift uses the `translate` property, so
 * it never fights the scroll-reveal animation, which uses `transform`.
 *
 * Buttons: a small resting shadow; on hover a soft lift, a stronger (brand-tinted)
 * shadow, a light sheen across filled buttons and the arrow nudging forward.
 *
 * Hover motion only runs on devices with a real pointer, and is switched off for
 * visitors who ask for reduced motion.
 */

:root {
  --fx-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --fx-dur: 0.4s;
  --fx-lift: -4px;
  --fx-sh: 0 1px 3px rgb(8 21 37 / 0.07), 0 12px 30px -14px rgb(8 21 37 / 0.34);
  --fx-sh-hover: 0 2px 6px rgb(8 21 37 / 0.06), 0 26px 46px -22px rgb(8 21 37 / 0.42);
  --fx-sh-d: 0 1px 2px rgb(0 0 0 / 0.2), 0 14px 30px -14px rgb(0 0 0 / 0.55);
  --fx-sh-d-hover: 0 2px 6px rgb(0 0 0 / 0.25), 0 30px 54px -22px rgb(0 0 0 / 0.7);
}

/* ------------------------------------------------------------------ blocks */
:is(
  .p-card, .uc, .tile, .mon__card, .mon__over, .process__step, .ind-card, .contact__card, .guide,,
  .plan, .values li, .ccards li, .tile6, .stages li, .steps-list li, .uses-list li, .trio > div, .keys__steps li,
  .ch-list li, .tech-card, .scoped, .support__box, .channels, .callbox, .formpage__form, .selector__box, .form-panel,
  .about__card, .ind-tile, .sol, .empty, .notice, .consider, .side__box, .side__res, .side__promo, .pd__box,
  .pd__panel, .pd__facts li, .facts-list, .compare__wrap, .docs a, .cart__table, .cart__sum, .checkout__aside,
  .checkout__main, .payres, .side__nav a, .sel__products a, .enquiry-done, .shop__box, .shop__bar, .shop__promo
) {
  box-shadow: var(--fx-sh);
  transition: translate var(--fx-dur) var(--fx-ease), box-shadow var(--fx-dur) var(--fx-ease),
    background-color 0.25s, border-color 0.25s, color 0.25s;
}
/* Blocks on dark or blue surfaces get a deeper shadow so it still reads. */
:is(.dark, .ftr) :is(
  .p-card, .mon__card, .process__step, .ind-card,, .notice, .tech-card, .tile, .plan
), :is(.side__res, .side__promo, .tech-card, .ind-tile, .plan--featured, .tile--photo) {
  box-shadow: var(--fx-sh-d);
}
/* Panels drawn with a cut corner keep their shape without clipping the shadow. */
.formpage__form, .selector__box { clip-path: none; border-radius: var(--r); }

@media (hover: hover) and (pointer: fine) {
  :is(
    .p-card, .uc, .tile, .mon__card, .mon__over, .process__step, .ind-card, .contact__card, .guide,,
    .plan, .values li, .ccards li, .tile6, .stages li, .steps-list li, .uses-list li, .trio > div, .keys__steps li,
    .ch-list li, .tech-card, .scoped, .support__box, .channels, .callbox, .formpage__form, .selector__box, .form-panel,
    .about__card, .ind-tile, .sol, .empty, .notice, .consider, .side__box, .side__res, .side__promo, .pd__box,
    .pd__panel, .pd__facts li, .facts-list, .compare__wrap, .docs a, .cart__table, .cart__sum, .checkout__aside,
    .checkout__main, .payres, .side__nav a, .sel__products a, .enquiry-done, .shop__box, .shop__bar, .shop__promo
  ):hover {
    translate: 0 var(--fx-lift);
    box-shadow: var(--fx-sh-hover);
  }
  :is(.dark, .ftr) :is(
    .p-card, .mon__card, .process__step, .ind-card,, .notice, .tech-card, .tile, .plan
  ):hover, :is(.side__res, .side__promo, .tech-card, .ind-tile, .plan--featured, .tile--photo):hover {
    box-shadow: var(--fx-sh-d-hover);
  }
  /* Small rows lift less, so a list doesn't jump around. */
  :is(.side__nav a, .sel__products a, .docs a, .pd__facts li):hover { translate: 0 -2px; }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: translate 0.3s var(--fx-ease), box-shadow 0.3s var(--fx-ease), filter 0.3s var(--fx-ease),
    color 0.25s, background-color 0.25s;
}
/* Filled buttons: the fill (with its chamfered corner) is drawn underneath the label. */
.btn--primary, .btn--light, .btn--dark {
  background: none;
  filter: drop-shadow(0 4px 8px rgb(8 21 37 / 0.2));
}
.btn--primary::before, .btn--light::before, .btn--dark::before,
.btn--primary::after, .btn--light::after, .btn--dark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
  pointer-events: none;
}
.btn--primary::before, .btn--light::before, .btn--dark::before {
  background-color: var(--btn-bg);
  transition: background-color 0.3s var(--fx-ease);
}
/* Sheen: a soft band of light that sweeps across once on hover. */
.btn--primary::after, .btn--light::after, .btn--dark::after {
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.28) 48%, transparent 66%) no-repeat;
  background-size: 250% 100%;
  background-position: 160% 0;
  transition: background-position 0s;
}
/* Outline buttons: border ring plus a light resting shadow. */

@media (hover: hover) and (pointer: fine) {
  .btn:hover { translate: 0 -2px; }
  .btn--primary:hover { filter: drop-shadow(0 10px 14px rgb(36 117 238 / 0.38)); }
  .btn--dark:hover { filter: drop-shadow(0 10px 14px rgb(8 21 37 / 0.38)); }
  .btn--light:hover, .dark .btn--primary:hover { filter: drop-shadow(0 10px 16px rgb(0 0 0 / 0.4)); }
  :is(.btn--primary, .btn--light, .btn--dark):hover::after { background-position: -60% 0; transition: background-position 0.8s var(--fx-ease); }
  .btn:active { translate: 0 0; transition-duration: 0.1s; }
}

/* Hero "Request a Quote" and CTA-band "Book a Demo" only: see-through with a blue
 * ring (chamfer included) and blue text, at rest and on hover. */
.btn.btn--primary.btn--blue-outline,
.btn.btn--primary.btn--blue-outline:hover { --btn-bg: var(--blue); color: var(--blue); filter: none; }
.btn--blue-outline::before {
  clip-path: polygon(evenodd,
    0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%, 0 0,
    2px 2px, calc(100% - var(--chamfer) - 0.83px) 2px, calc(100% - 2px) calc(var(--chamfer) + 0.83px),
    calc(100% - 2px) calc(100% - 2px), 2px calc(100% - 2px), 2px 2px);
}
.btn--blue-outline::after { display: none; }

/* Other buttons: tabs, carousel arrows, selector options, tile plus, filters. */
:is(.tabs__btn, .carousel__btn, .sel__opts button, .tile__plus, .filters button, .pd__tablist button, .acc__q) {
  transition: translate 0.3s var(--fx-ease), box-shadow 0.3s var(--fx-ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}
:is(.carousel__btn, .sel__opts button, .tile__plus) { box-shadow: 0 4px 12px -6px rgb(8 21 37 / 0.3); }
@media (hover: hover) and (pointer: fine) {
  :is(.tabs__btn, .carousel__btn, .sel__opts button, .tile__plus, .filters button, .pd__tablist button):hover {
    translate: 0 -2px;
    box-shadow: 0 12px 22px -12px rgb(8 21 37 / 0.45);
  }
}

/* ------------------------------------------- floating back-to-top + WhatsApp */
.floats {
  --cookie-h: 0px;
  position: fixed;
  right: 22px;
  bottom: calc(22px + var(--cookie-h));
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: bottom 0.35s var(--fx-ease);
}
.float-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: translate 0.3s var(--fx-ease), box-shadow 0.3s var(--fx-ease), opacity 0.35s var(--fx-ease), scale 0.35s var(--fx-ease), background-color 0.25s;
}
.float-btn .icon { width: 28px; height: 28px; }
.float-btn--wa { background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgb(37 211 102 / 0.6), 0 2px 6px rgb(8 21 37 / 0.18); }
/* Soft pulse ring so the chat button is noticed without being loud. */
.float-btn--wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: wa-ring 2.8s var(--fx-ease) infinite; pointer-events: none; }
@keyframes wa-ring { 0% { opacity: 0.7; scale: 1; } 70%, 100% { opacity: 0; scale: 1.45; } }
.float-btn--top { width: 48px; height: 48px; background: var(--navy); color: #fff; box-shadow: 0 10px 22px -10px rgb(8 21 37 / 0.6), inset 0 0 0 1px rgb(255 255 255 / 0.1); opacity: 0; scale: 0.6; pointer-events: none; }
.float-btn--top .icon { width: 20px; height: 20px; }
.floats.is-scrolled .float-btn--top { opacity: 1; scale: 1; pointer-events: auto; }
.float-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.float-btn__tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  translate: 6px -50%;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--fx-sh);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, translate 0.3s var(--fx-ease);
}
@media (hover: hover) and (pointer: fine) {
  .float-btn:hover { translate: 0 -3px; }
  .float-btn--wa:hover { box-shadow: 0 16px 30px -8px rgb(37 211 102 / 0.75), 0 4px 10px rgb(8 21 37 / 0.2); }
  .float-btn--wa:hover .float-btn__tip { opacity: 1; translate: 0 -50%; }
  .float-btn--top:hover { background: var(--blue); box-shadow: 0 16px 28px -10px rgb(36 117 238 / 0.7); }
}
@media (max-width: 640px) {
  .floats { right: 14px; bottom: calc(14px + var(--cookie-h)); gap: 10px; }
  .float-btn { width: 52px; height: 52px; }
  .float-btn--top { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .float-btn--wa::before { animation: none; display: none; } }

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, :is(.tabs__btn, .carousel__btn, .sel__opts button, .tile__plus, .filters button, .pd__tablist button):hover { translate: none; }
  :is(.btn--primary, .btn--light, .btn--dark)::after { display: none; }
  *:hover { translate: none !important; }
}
.support__box .channels { box-shadow: none; translate: none !important; }

/* ------------------------------------------------------------ enquiry pop-up */
.emodal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.emodal[hidden] { display: none; }
.emodal__scrim { position: absolute; inset: 0; background: rgb(5 10 18 / 0.72); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.25s; }
.emodal__panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh / var(--z) - 48px);
  max-height: calc(100dvh / var(--z) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.7);
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.3s var(--fx-ease), translate 0.35s var(--fx-ease);
  outline: none;
}
.emodal.is-open .emodal__scrim { opacity: 1; }
.emodal.is-open .emodal__panel { opacity: 1; translate: 0 0; }
html.emodal-lock, html.emodal-lock body { overflow: hidden; }
.emodal__close { position: absolute; right: 14px; top: 14px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); transition: background 0.2s, color 0.2s, rotate 0.3s var(--fx-ease); }
.emodal__close:hover { background: var(--navy); color: #fff; rotate: 90deg; }
.emodal__grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 100%; }
.emodal__info {
  display: flex; flex-direction: column; gap: 14px; padding: 40px 32px;
  background-color: var(--navy);
  background-image: linear-gradient(to right, rgb(220 229 236 / 0.06) 1px, transparent 1px), linear-gradient(to bottom, rgb(220 229 236 / 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text-d);
  border-radius: var(--r) 0 0 var(--r);
}
.emodal__logo { width: 100%; max-width: 250px; height: auto; padding: 12px 16px; margin-bottom: 14px; background: #fff; border-radius: var(--r); box-sizing: border-box; }
.emodal__k { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.emodal__h { font-size: 1.6rem; line-height: 1.2; color: #fff; }
.emodal__intro { font-size: 0.93rem; }
.emodal__reach { display: grid; gap: 4px; margin-top: 10px; padding-top: 22px; border-top: 1px solid rgb(220 229 236 / 0.14); }
.emodal__reach a, .emodal__loc { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: #fff; font-weight: 600; word-break: break-word; }
.emodal__reach a:hover { color: var(--cyan); }
.emodal__reach .icon { width: 20px; height: 20px; color: var(--cyan); flex: none; }
.emodal__reach small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8fa2b5; }
.emodal__form { padding: 44px 40px 36px; }
.emodal__form .enquiry-done { padding-top: 60px; }
.emodal__loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 320px; font-weight: 600; color: var(--text-mute); }
.emodal__loading span { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: emodal-spin 0.8s linear infinite; }
@keyframes emodal-spin { to { rotate: 360deg; } }
@media (max-width: 860px) {
  .emodal { padding: 0; place-items: end center; }
  .emodal__panel { max-height: 94vh; max-height: 94dvh; border-radius: 14px 14px 0 0; translate: 0 40px; }
  .emodal__grid { grid-template-columns: 1fr; }
  .emodal__info { border-radius: 14px 14px 0 0; padding: 28px 20px 20px; gap: 10px; }
  .emodal__logo { max-width: 200px; margin-bottom: 6px; }
  .emodal__h { font-size: 1.35rem; padding-right: 40px; }
  .emodal__reach { padding-top: 12px; }
  .emodal__reach a, .emodal__loc { padding: 6px 0; }
  .emodal__form { padding: 24px 20px 30px; }
  .emodal__close { background: rgb(255 255 255 / 0.12); color: #fff; }
}
@media (prefers-reduced-motion: reduce) { .emodal__panel, .emodal__scrim { transition: none; } }
