/* Design4web — Bricks-first styling.
   Component styles live in Bricks global classes / theme styles.
   This file only carries legacy variable remapping, page chrome
   (header, menu, footer), forms and a small visual safety net. */

:root {
  color-scheme: dark;

  /* Remap the old Bricks palette so untouched pages stay dark. */
  --primary: #0092ca;
  --primary-dark: #0075a2;
  --primary-ultra-dark: #005879;
  --primary-light: #12394a;
  --primary-ultra-light: #0d2733;
  --secondary: #393e46;
  --secondary-dark: #2e3238;
  --secondary-ultra-dark: #22252a;
  --tertiary: #34d399;
  --accent: #ff6b6b;
  --base: #9aa5b1;
  --base-dark: #6d7885;
  --base-ultra-dark: #f5f7fa;
  --base-light: #46515e;
  --base-ultra-light: #232a33;
  --neutral: #0b0e13;
  --neutral-trans-10: rgba(11, 14, 19, .1);
  --neutral-trans-20: rgba(11, 14, 19, .2);
  --neutral-trans-40: rgba(11, 14, 19, .4);
  --neutral-trans-60: rgba(11, 14, 19, .6);
  --neutral-trans-70: rgba(11, 14, 19, .76);
  --neutral-trans-90: rgba(11, 14, 19, .9);
  --white: #f5f7fa;
  --black: #0b0e13;
  --text-color: var(--d4w-muted);
  --heading-color: var(--d4w-text);
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100vw; }
main, #brx-content { max-width: 100vw; }

html body,
body.brx-body,
body,
.brx-page {
  background: var(--d4w-bg) !important;
  color: var(--d4w-text) !important;
  font-family: var(--d4w-font-body) !important;
  font-size: var(--d4w-text-16);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  --text-color: var(--d4w-muted);
  --heading-color: var(--d4w-text);
  --base: var(--d4w-text);
  --base-ultra-dark: var(--d4w-text);
}

h1, h2, h3, h4, h5, h6,
.bricks-type-hero, .bricks-type-lead {
  font-family: var(--d4w-font-display) !important;
  color: var(--d4w-text) !important;
}
p { color: var(--d4w-muted); }
a { color: var(--d4w-blue-bright); text-decoration-color: rgba(56, 189, 248, .45); text-underline-offset: .2em; }
a:hover { color: var(--d4w-text); }
::selection { background: var(--d4w-blue); color: #fff; }
:focus-visible { outline: 2px solid var(--d4w-blue-bright); outline-offset: var(--d4w-space-3); }
img, svg { max-width: 100%; }
hr { border-color: var(--d4w-border); }

/* Header — no backdrop-filter: it would trap Bricks' fixed mobile menu. */
#brxe-header, header, .brxe-header {
  background: rgba(11, 14, 19, .94) !important;
  border-bottom: 1px solid var(--d4w-border);
}
#brx-header .brxe-container,
#brx-header .brxe-div { background-color: transparent !important; }
#brx-header #brxe-jdpnrw { background: rgba(18, 24, 33, .78) !important; border: 1px solid var(--d4w-border); }
#brx-header a, #brx-header .brxe-button { color: var(--d4w-text) !important; }
#brx-header a:hover { color: var(--d4w-blue-bright) !important; }

/* Compact / mobile navigation panel */
#brxe-egcqyr.brx-open .brx-nav-nested-items {
  background: var(--d4w-surface) !important;
  border-inline: 1px solid var(--d4w-border);
  box-shadow: 0 0 80px rgba(0, 0, 0, .55);
}
#brxe-egcqyr.brx-open .brx-nav-nested-items a {
  font-family: var(--d4w-font-display) !important;
  font-size: clamp(24px, 3vw, 40px) !important;
  letter-spacing: -.03em !important;
  text-transform: capitalize !important;
  color: var(--d4w-text) !important;
}
#brxe-egcqyr.brx-open .brx-nav-nested-items a:hover { color: var(--d4w-blue-bright) !important; }

/* Footer */
footer, .brxe-footer, #brx-footer { background: var(--d4w-bg) !important; border-top: 1px solid var(--d4w-border); }
#brx-footer .brxe-section { background: var(--d4w-bg) !important; }
#brx-footer #brxe-fxqxpk { background: transparent !important; }
footer a { color: var(--d4w-muted); }
footer a:hover { color: var(--d4w-blue-bright); }
#brx-footer #clock { font-family: var(--d4w-font-mono) !important; color: var(--d4w-blue-bright) !important; font-size: clamp(32px, 5vw, 64px) !important; letter-spacing: -.04em; }
#brx-footer .bricks-button,
.bricks-form .bricks-button {
  background: var(--d4w-blue) !important;
  color: #07121a !important;
  border: 1px solid var(--d4w-blue) !important;
  border-radius: var(--radius-pill) !important;
  font-family: var(--d4w-font-mono) !important;
  font-size: var(--d4w-text-13) !important;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#brx-footer .bricks-button:hover,
.bricks-form .bricks-button:hover { background: var(--d4w-blue-bright) !important; }

/* Forms */
input, textarea, select {
  background: var(--d4w-surface) !important;
  color: var(--d4w-text) !important;
  border: 1px solid var(--d4w-border) !important;
  border-radius: var(--d4w-radius-10) !important;
  font-family: var(--d4w-font-body) !important;
  font-size: var(--d4w-text-16) !important;
  padding: .9rem 1rem !important;
}
input:focus, textarea:focus, select:focus { border-color: var(--d4w-blue-bright) !important; outline: none; box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus { -webkit-text-fill-color: var(--d4w-text); -webkit-box-shadow: 0 0 0 1000px var(--d4w-surface) inset; }
label { color: var(--d4w-muted); font-size: var(--d4w-text-14); }
button { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------
   Hero motion (homepage): word reveal, staggered intro, letter-roll
   buttons, drifting artwork with cursor parallax.
   ------------------------------------------------------------------ */

.hero.hero-home.brxe-section {
  background: none;
  isolation: isolate;
}

/* Artwork moves to its own layer so it can drift and follow the cursor. */
.hero.hero-home::before {
  content: "";
  position: absolute;
  inset: -2%;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--d4w-bg) 0%, rgba(11, 14, 19, .94) 38%, rgba(11, 14, 19, .35) 100%),
    url("/wp-content/uploads/rebuild/hero.svg") center right / cover no-repeat;
  transform: scale(1.02);
  translate: var(--hero-px, 0px) var(--hero-py, 0px);
  transition: translate .8s cubic-bezier(.16, .8, .3, 1);
  animation: d4w-hero-drift 30s ease-in-out infinite alternate;
  will-change: transform, translate;
}

@keyframes d4w-hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(-.8%, -.6%, 0); }
}

/* Masked word reveal */
.hero-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: .16em .03em .2em;
  margin: -.16em -.03em -.2em;
}
.hero-word > span { display: inline-block; }

.hero.hero-home.is-motion .hero-word > span {
  animation: d4w-hero-word .8s cubic-bezier(.16, .84, .28, 1) both;
  animation-delay: calc(80ms + var(--i, 0) * 55ms);
}

@keyframes d4w-hero-word {
  from { transform: translateY(112%); }
  to   { transform: translateY(0); }
}

/* Staggered intro for the rest of the hero copy */
.hero.hero-home.is-motion [data-hero-in] {
  animation: d4w-hero-rise .8s cubic-bezier(.16, .84, .28, 1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes d4w-hero-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Slow float on the watermark (composes with its translateY(-50%)). */
.hero.hero-home .watermark { animation: d4w-hero-float 14s ease-in-out infinite; }

@keyframes d4w-hero-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

/* Button letter-roll (Trionn-style hover) */
.d4w-roll { display: inline-flex; }
.d4w-ch {
  position: relative;
  display: inline-block;
  overflow: hidden;
  white-space: pre;
}
.d4w-ch > i {
  display: block;
  font-style: normal;
  transition: transform .5s cubic-bezier(.2, .75, .2, 1);
  transition-delay: calc(var(--i, 0) * 16ms);
}
.d4w-ch > i + i {
  position: absolute;
  inset: 0;
  transform: translateY(102%);
}
.hero .button:hover .d4w-ch > i,
.hero .button:focus-visible .d4w-ch > i,
.hero .button-outline:hover .d4w-ch > i,
.hero .button-outline:focus-visible .d4w-ch > i {
  transform: translateY(-102%);
}
.hero .button:hover .d4w-ch > i + i,
.hero .button:focus-visible .d4w-ch > i + i,
.hero .button-outline:hover .d4w-ch > i + i,
.hero .button-outline:focus-visible .d4w-ch > i + i {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero.hero-home::before { animation: none !important; translate: none !important; }
  .hero.hero-home .watermark { animation: none !important; }
  .hero.hero-home .hero-word > span,
  .hero.hero-home [data-hero-in] { animation: none !important; }
  .d4w-ch > i { transition: none !important; }
}
