/* ==========================================================================
   Optomise — app.css
   Consolidated child theme styles.
   Version: 1.0.2
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. GLOBAL RESETS
   -------------------------------------------------------------------------- */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}


/* --------------------------------------------------------------------------
   1. HEADER — fixed + slide + glass
   -------------------------------------------------------------------------- */

:root {
  --header-h: 0px;
}

body > header.elementor-location-header + .elementor {
  margin-top: calc(var(--header-h) * -1);
}

header.elementor-location-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(0);
  transition: transform 260ms ease;
  will-change: transform;

  /* Glass */
  background: rgba(0,28,41,0.75);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

header.elementor-location-header.is-hidden {
  transform: translateY(-110%);
}

/* Clear inner backgrounds so glass shows through */
header.elementor-location-header .e-con,
header.elementor-location-header .e-con-inner,
header.elementor-location-header .elementor-container {
  background: transparent !important;
}


/* --------------------------------------------------------------------------
   2. HORIZONTAL SCROLL SECTION
   -------------------------------------------------------------------------- */

.horizontal-scroll-section {
  overflow: hidden;
  position: relative;
}

.horizontal-scroll-section > .e-con,
.horizontal-scroll-section > .e-container {
  transition: none;
  height: var(--min-height, 100vh);
}

.horizontal-scroll-section.is-fixed > .e-con,
.horizontal-scroll-section.is-fixed > .e-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
}

.horizontal-scroll-section.is-bottom {
  justify-content: flex-end;
}

/* Below 1024 — normal stacking */
@media (max-width: 1023px) {
  .horizontal-scroll-section {
    height: auto !important;
    overflow: visible;
  }
  .horizontal-scroll-section > .e-con,
  .horizontal-scroll-section > .e-container {
    position: relative !important;
    transform: none !important;
    height: auto !important;
    width: 100% !important;
  }
}


/* --------------------------------------------------------------------------
   3. SCROLL PARALLAX — base + horizontal (spx) + vertical (spy) + both (sp)

   Speed presets scale exponentially for visible difference between steps:
   s1 = barely moves, s6 = aggressive
   -------------------------------------------------------------------------- */

.sp, .spx, .spy {
  --sp-px-x: 0;
  --sp-px-y: 0;
  --sp-x: 0;
  --sp-y: 0;
  --sp-dir-x: 1;
  --sp-dir-y: 1;
  transition: none;
  will-change: transform;
}

.spx {
  transform: translate3d(calc(var(--sp-px-x) * var(--sp-x) * var(--sp-dir-x) * 1px), 0, 0);
}

.spy {
  transform: translate3d(0, calc(var(--sp-px-y) * var(--sp-y) * var(--sp-dir-y) * 1px), 0);
}

.sp {
  transform: translate3d(
    calc(var(--sp-px-x) * var(--sp-x) * var(--sp-dir-x) * 1px),
    calc(var(--sp-px-y) * var(--sp-y) * var(--sp-dir-y) * 1px),
    0
  );
}

/* Directions */
.sp-right { --sp-dir-x: 1; }
.sp-left  { --sp-dir-x: -1; }
.sp-down  { --sp-dir-y: 1; }
.sp-up    { --sp-dir-y: -1; }

/* Speed presets — wider spread for visible difference */
.sp-x1 { --sp-x: 0.03; }
.sp-x2 { --sp-x: 0.08; }
.sp-x3 { --sp-x: 0.18; }
.sp-x4 { --sp-x: 0.35; }
.sp-x5 { --sp-x: 0.55; }
.sp-x6 { --sp-x: 0.80; }

.sp-y1 { --sp-y: 0.03; }
.sp-y2 { --sp-y: 0.08; }
.sp-y3 { --sp-y: 0.18; }
.sp-y4 { --sp-y: 0.35; }
.sp-y5 { --sp-y: 0.55; }
.sp-y6 { --sp-y: 0.80; }

/* Scroll fade — fades out as element scrolls above its start threshold
   --sp-fade-start: fraction of viewport where fade begins (1 = top, 0.5 = centre)
   Fully visible below the threshold, fully transparent at top edge */
.sp-fade-out {
  --sp-opacity: 1;
  --sp-fade-start: 0.50;
  opacity: var(--sp-opacity);
  will-change: opacity;
}

/* Fade presets — when the fade begins
   f1 = late (near top edge only)
   f2 = upper third
   f3 = centre (default)
   f4 = early (below centre) */
.sp-fade-1 { --sp-fade-start: 0.20; }
.sp-fade-2 { --sp-fade-start: 0.35; }
.sp-fade-3 { --sp-fade-start: 0.50; }
.sp-fade-4 { --sp-fade-start: 0.65; }

/* Off below 1024 + reduced motion */
@media (max-width: 1023px) {
  .sp, .spx, .spy { transform: none !important; }
  .sp-fade-out { opacity: 1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sp, .spx, .spy { transform: none !important; }
  .sp-fade-out { opacity: 1 !important; }
}


/* --------------------------------------------------------------------------
   4. LINK UNDERLINE
   -------------------------------------------------------------------------- */

.u-link-underline {
  --ul-height: 0.25em;
  --ul-height-hover: 0.6em;
  --ul-lift: 0.06em;
  --ul-colour: #375EFB;
  --ul-radius: 0;
  --ul-opacity: 1;
  --ul-dur: 220ms;
  --ul-ease: cubic-bezier(0, .33, .07, 1.03);

  position: relative;
  display: inline-block;
  text-decoration: none;
  z-index: 0;
  padding-bottom: 0;
}

.u-link-underline::after {
  content: "";
  position: absolute;
  left: 6px;
  right: -6px;
  bottom: 0;
  height: var(--ul-height);
  transform: translateY(calc(var(--ul-lift) * -1));
  transform-origin: center bottom;
  background: var(--ul-colour);
  border-radius: var(--ul-radius);
  opacity: var(--ul-opacity);
  z-index: -1;
  transition:
    height var(--ul-dur) var(--ul-ease),
    opacity var(--ul-dur) var(--ul-ease);
}

.u-link-underline:hover::after {
  height: var(--ul-height-hover);
  opacity: calc(var(--ul-opacity) - 0.2);
}

/* Colour variants */
.u-link-underline--primary { --ul-colour: #003750; }
.u-link-underline--second  { --ul-colour: #001C29; }
.u-link-underline--dark    { --ul-colour: #000E14; }


/* --------------------------------------------------------------------------
   5. BACKGROUND FX — image + overlay blend
   -------------------------------------------------------------------------- */

.fx-bg-overlay {
  --fx-bg: none;
  --fx-overlay: rgba(0,0,0,0.35);
  --fx-bg-opacity: 1;
  --fx-bg-blend: overlay;
  --fx-blur: 0px;
  --fx-brightness: 1;
  --fx-contrast: 1;
  --fx-saturate: 1;

  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Image layer */
.fx-bg-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--fx-bg);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  opacity: var(--fx-bg-opacity);
  filter:
    blur(var(--fx-blur))
    brightness(var(--fx-brightness))
    contrast(var(--fx-contrast))
    saturate(var(--fx-saturate));
  z-index: 0;
}

/* Overlay blend */
.fx-bg-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fx-overlay);
  mix-blend-mode: var(--fx-bg-blend);
  pointer-events: none;
  z-index: 1;
}

/* Content above */
.fx-bg-overlay > * {
  position: relative;
  z-index: 2;
}


/* --------------------------------------------------------------------------
   6. FX — multiply blend on container
   -------------------------------------------------------------------------- */

.fx-multiply {
  --fx-overlay: rgba(0,0,0,0.35);
  position: relative;
  isolation: isolate;
}

.fx-multiply::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fx-overlay);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.fx-multiply > * {
  position: relative;
  z-index: 1;
}


/* --------------------------------------------------------------------------
   7. BORDER TRACE — animated highlight around container
   -------------------------------------------------------------------------- */

.border-trace {
  --bt-radius: 24;
  --bt-border: 1;
  --bt-base: rgba(255,255,255,0.18);
  --bt-highlight: rgba(255,255,255,0.95);
  --bt-speed: 2.2;
  --bt-seg: 12;

  position: relative;
  border-radius: calc(var(--bt-radius) * 1px);
}

.border-trace__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.border-trace__base,
.border-trace__run {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.border-trace__base {
  stroke: var(--bt-base);
  stroke-width: calc(var(--bt-border) * 1px);
}

.border-trace__run {
  stroke: var(--bt-highlight);
  stroke-width: calc(var(--bt-border) * 1px);
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  .border-trace__run { animation: none; }
}


/* --------------------------------------------------------------------------
   8. ICON ROTATION
   -------------------------------------------------------------------------- */

.icon-rotate {
  transform-box: fill-box;
  transform-origin: center;
  animation: iconSpin 3s linear infinite;
}

.icon-rotate--slow    { animation-duration: 2.4s; }
.icon-rotate--fast    { animation-duration: .7s; }
.icon-rotate--reverse { animation-direction: reverse; }

@keyframes iconSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .icon-rotate { animation: none; }
}


/* --------------------------------------------------------------------------
   9. RESPONSIVE UTILITIES — show/hide per breakpoint
   -------------------------------------------------------------------------- */

/* Hide on mobile only (visible tablet + desktop) */
.hide-mobile {}

/* Hide on mobile + tablet (visible desktop only) */
.hide-touch {}

/* Hide on desktop only (visible mobile + tablet) */
.hide-desktop {}

/* Mobile: 0–767 */
@media (max-width: 767px) {
  .hide-mobile  { display: none !important; }
  .hide-touch   { display: none !important; }
}

/* Tablet: 768–1024 */
@media (min-width: 768px) and (max-width: 1024px) {
  .hide-touch   { display: none !important; }
}

/* Desktop: 1025+ */
@media (min-width: 1025px) {
  .hide-desktop { display: none !important; }
}



/* ==========================================================================
   PAGE STYLES
   ========================================================================== */


/* --------------------------------------------------------------------------
   HOME PAGE
   -------------------------------------------------------------------------- */

.hero h1 {
  font-weight: 800;
  font-size: 92px;
}

@media (max-width: 767px) {
  .hero h1 {
    font-size: 46px;
  }  
}

body.e-off-canvas__no-scroll,
body.e-off-canvas__no-scroll html,
html:has(body.e-off-canvas__no-scroll) {
  overflow: hidden !important;
  height: 100% !important;
}