:root {
  --z-scroll-progress: 0;
  --z-scroll-shift: 54px;
  --z-scroll-tilt: 10deg;
  --z-scroll-spin: 0deg;
  --z-pointer-x: 50%;
  --z-pointer-y: 35%;
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--z-pointer-x) var(--z-pointer-y), rgba(255, 221, 150, 0.2), transparent 18rem),
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 62%);
  mix-blend-mode: soft-light;
  opacity: 0.72;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: calc(var(--z-scroll-progress) * 100%);
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, #f7d88c, #6ba6a5, #173d34);
  box-shadow: 0 0 18px rgba(247, 216, 140, 0.8);
}

header.fixed {
  margin: 14px auto 0;
  left: 50% !important;
  width: min(1180px, calc(100% - 28px));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: rgba(8, 42, 33, 0.72) !important;
  box-shadow: 0 18px 60px rgba(6, 28, 24, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(-50%);
  backdrop-filter: blur(18px) saturate(1.2);
}

header.fixed a,
header.fixed button,
header.fixed span {
  color: #fff8df !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.52);
}

header.fixed nav a {
  position: relative;
}

header.fixed nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: center;
  background: #f7d88c;
  box-shadow: 0 0 12px rgba(247, 216, 140, 0.95);
  transition: transform 240ms ease;
}

header.fixed nav a:hover::after {
  transform: scaleX(1);
}

a[href*="bit.ly"],
a[href="#contact"],
a[href="#services"],
#contact a[href^="tel:"],
#contact a[href^="mailto:"] {
  position: relative;
  isolation: isolate;
}

a[href*="bit.ly"]::before,
a[href="#contact"]::before,
a[href="#services"]::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 224, 135, 0.92), rgba(111, 166, 102, 0.5) 44%, transparent 72%);
  filter: blur(13px);
  opacity: 0.78;
  animation: zivezeButtonGlow 2.4s ease-in-out infinite alternate;
}

a[href*="bit.ly"]:hover::before,
a[href="#contact"]:hover::before,
a[href="#services"]:hover::before {
  opacity: 1;
  filter: blur(18px);
}

#home {
  isolation: isolate;
}

#home .ziveze-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.035 + (var(--z-scroll-progress) * 0.028))) translateY(var(--z-hero-drift, 0));
  filter: saturate(1.1) contrast(1.04) brightness(1.02);
  transition: filter 700ms ease, transform 120ms linear;
}

#home > .absolute.inset-0.-z-10::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(247, 242, 223, 0.1), rgba(7, 39, 49, 0.4)),
    radial-gradient(circle at 50% 30%, rgba(255, 228, 160, 0.34), transparent 30rem);
}

#home h1 {
  text-shadow: 0 16px 46px rgba(6, 38, 44, 0.24);
}

#home .shimmer-text {
  background-image: linear-gradient(105deg, #143d37, #d6a94d 35%, #fff5c7 50%, #1b615d 68%, #143d37);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: zivezeShimmer 5.5s linear infinite;
}

.ziveze-orbital-glow {
  position: fixed;
  inset: auto 8vw 10vh auto;
  z-index: 1;
  width: min(24vw, 280px);
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgba(214, 169, 77, 0.22);
  border-radius: 999px;
  opacity: 0.55;
  transform: rotate(calc(var(--z-scroll-progress) * 160deg));
}

.ziveze-motion-field {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: soft-light;
}

.ziveze-motion-ribbon {
  position: absolute;
  left: var(--ribbon-x);
  top: var(--ribbon-y);
  width: calc(190px * var(--ribbon-scale));
  height: calc(30px * var(--ribbon-scale));
  border: 1px solid rgba(255, 245, 199, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 148, 0.42), rgba(122, 183, 116, 0.32), transparent);
  box-shadow: 0 0 28px rgba(255, 217, 125, 0.25);
  opacity: 0.42;
  transform:
    translate3d(calc(var(--z-scroll-shift) * 1.8), calc(var(--z-scroll-shift) * -0.65), 0)
    rotate(calc(var(--z-scroll-spin) + var(--z-scroll-tilt)))
    scale(var(--ribbon-scale));
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ziveze-motion-ribbon.z-ribbon-1 {
  width: calc(110px * var(--ribbon-scale));
  height: calc(110px * var(--ribbon-scale));
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 143, 0.44), transparent 62%);
}

.ziveze-motion-ribbon.z-ribbon-2 {
  height: calc(3px * var(--ribbon-scale));
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), rgba(247, 216, 140, 0.72), transparent);
}

.ziveze-motion-ribbon.z-ribbon-3 {
  width: calc(76px * var(--ribbon-scale));
  height: calc(180px * var(--ribbon-scale));
  background: linear-gradient(180deg, transparent, rgba(126, 178, 83, 0.4), transparent);
}

body.ziveze-is-scrolling .ziveze-motion-ribbon {
  opacity: 0.76;
}

.ziveze-orbital-glow::before,
.ziveze-orbital-glow::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(107, 166, 165, 0.24);
}

.ziveze-orbital-glow::before {
  inset: 12%;
  transform: rotate(34deg);
}

.ziveze-orbital-glow::after {
  inset: 28%;
  background: radial-gradient(circle, rgba(247, 216, 140, 0.28), transparent 58%);
}

[data-z-motion] {
  opacity: 0;
  transform: translate3d(0, 42px, 0) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 300ms ease,
    box-shadow 300ms ease;
  transition-delay: var(--z-delay, 0ms);
  will-change: opacity, transform, filter;
}

[data-z-motion].z-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

body[data-z-dir="up"] [data-z-motion]:not(.z-inview) {
  transform: translate3d(0, -32px, 0) scale(0.985);
}

#services article,
#why-us .group,
#testimonials .rounded-2xl,
#contact .rounded-3xl {
  transform-style: preserve-3d;
}

#services article:hover,
#why-us .group:hover,
#testimonials .rounded-2xl:hover,
#contact .rounded-3xl:hover {
  box-shadow: 0 30px 70px rgba(14, 65, 62, 0.12);
  transform: translateY(-8px) rotateX(2deg);
}

section {
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.36) 50%, transparent 100%);
  transform: translateX(-42%);
  transition: opacity 700ms ease, transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

section.z-section-active::before {
  opacity: 0.32;
  transform: translateX(42%);
}

@media (max-width: 1023px) {
  body {
    overflow-x: hidden;
  }

  body::before {
    opacity: 0.42;
    background:
      radial-gradient(circle at var(--z-pointer-x) var(--z-pointer-y), rgba(255, 221, 150, 0.14), transparent 13rem),
      linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.05) 45%, transparent 62%);
  }

  header.fixed {
    top: max(10px, env(safe-area-inset-top));
    width: calc(100% - 24px);
    min-height: 72px;
    margin-top: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 34px;
    background: rgba(10, 49, 40, 0.9) !important;
    box-shadow: 0 14px 42px rgba(6, 28, 24, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  header.fixed > div:first-child {
    min-height: 70px;
    padding-inline: 22px;
  }

  header.fixed nav.hidden.md\:flex,
  header.fixed .hidden.md\:block {
    display: none !important;
  }

  header.fixed button.md\:hidden {
    display: inline-flex !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 248, 223, 0.28);
    border-radius: 999px;
    background: rgba(255, 248, 223, 0.08);
  }

  header.fixed .md\:hidden.overflow-hidden {
    display: block !important;
    width: 100%;
    border-radius: 0 0 30px 30px;
  }

  header.fixed .md\:hidden.overflow-hidden nav {
    padding: 6px 22px 18px;
  }

  header.fixed .md\:hidden.overflow-hidden nav a {
    color: #fff8df !important;
    border-color: rgba(255, 248, 223, 0.16) !important;
  }

  #home {
    min-height: 100svh;
    align-items: center;
    padding-top: 118px;
    padding-bottom: 58px;
  }

  #home .ziveze-hero-image {
    object-position: 56% center;
    transform: scale(1.03) translateY(calc(var(--z-hero-drift, 0) * 0.45));
    filter: saturate(1.04) contrast(1.08) brightness(0.88);
  }

  #home > .absolute.inset-0.-z-10::after {
    background:
      linear-gradient(180deg, rgba(7, 31, 27, 0.34), rgba(247, 242, 223, 0.5) 38%, rgba(247, 242, 223, 0.7) 100%),
      radial-gradient(circle at 50% 34%, rgba(255, 245, 203, 0.44), transparent 19rem);
  }

  #home .relative.z-10 {
    width: min(100%, 680px);
    padding-inline: 24px;
  }

  #home h1 {
    max-width: 11.5ch;
    margin-inline: auto;
    font-size: clamp(2.65rem, 12vw, 4.6rem);
    line-height: 0.96;
    text-wrap: balance;
    text-shadow: 0 10px 32px rgba(247, 242, 223, 0.58), 0 1px 0 rgba(255, 255, 255, 0.32);
  }

  #home .shimmer-text {
    background-image: linear-gradient(105deg, #12362f, #a66d08 42%, #0f4b42 74%, #12362f);
  }

  #home p {
    text-wrap: pretty;
  }

  #home p:nth-of-type(2) {
    max-width: 34rem;
    color: rgba(7, 38, 34, 0.78) !important;
  }

  #home .mt-12 {
    margin-top: 2rem;
  }

  #home .mt-12 a {
    width: min(100%, 280px);
    min-height: 48px;
    justify-content: center;
    padding-inline: 22px;
    white-space: normal;
    text-align: center;
  }

  section:not(#home) {
    padding-top: clamp(4.5rem, 12vw, 7rem) !important;
    padding-bottom: clamp(4.5rem, 12vw, 7rem) !important;
  }

  section > div {
    padding-inline: clamp(1.25rem, 5vw, 2rem) !important;
  }

  section h2 {
    font-size: clamp(2.15rem, 8.2vw, 3.55rem) !important;
    line-height: 1.02 !important;
    text-wrap: balance;
  }

  section p,
  section blockquote {
    text-wrap: pretty;
  }

  .mt-20 {
    margin-top: clamp(2.75rem, 8vw, 4.5rem) !important;
  }

  .mt-16 {
    margin-top: clamp(2.25rem, 7vw, 3.5rem) !important;
  }

  #about .grid,
  #why-us .grid,
  #services .grid,
  #testimonials .grid,
  #contact .grid {
    gap: clamp(1rem, 4vw, 1.75rem) !important;
  }

  #services article,
  #why-us .group,
  #testimonials .rounded-2xl,
  #contact .rounded-3xl,
  #about .rounded-2xl {
    border-radius: 18px !important;
    padding: clamp(1.35rem, 4.8vw, 2.25rem) !important;
    background-color: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(12px);
  }

  #about blockquote {
    margin-top: 0;
  }

  .ziveze-motion-field {
    opacity: 0.48;
  }

  .ziveze-motion-ribbon {
    width: calc(120px * var(--ribbon-scale));
    height: calc(18px * var(--ribbon-scale));
    opacity: 0.28;
  }
}

@media (max-width: 639px) {
  header.fixed {
    width: calc(100% - 20px);
    border-radius: 30px;
  }

  header.fixed > div:first-child {
    padding-inline: 20px;
  }

  header.fixed a.group span:first-child {
    font-size: 1.15rem;
  }

  header.fixed a.group span:last-child {
    font-size: 0.48rem;
    letter-spacing: 0.22em;
  }

  #home {
    justify-content: flex-start;
    padding-top: 168px;
  }

  #home .relative.z-10 {
    padding-inline: 1.25rem;
  }

  #home h1 {
    font-size: clamp(2.35rem, 11.6vw, 3.15rem);
  }

  #home p:nth-of-type(2) {
    margin-top: 1.5rem;
    font-size: 0.98rem;
    line-height: 1.72;
  }

  #home .thin-track {
    letter-spacing: 0.28em;
  }

  #home .mt-12 {
    gap: 0.75rem;
  }

  #home .mt-12 a {
    width: min(100%, 250px);
    min-height: 46px;
    font-size: 0.64rem;
    letter-spacing: 0.22em;
  }

  #about .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  #about .grid-cols-2 > div {
    min-height: 128px;
  }

  #contact a[href^="tel:"],
  #contact a[href^="mailto:"] {
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  footer nav {
    gap: 0.85rem 1.1rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  header.fixed {
    width: calc(100% - 36px);
  }

  #home {
    padding-top: 150px;
  }

  #home h1 {
    max-width: 12ch;
    font-size: clamp(4.2rem, 9.4vw, 4.9rem) !important;
  }

  #home p:nth-of-type(2) {
    font-size: 1.1rem;
  }

  #services .grid,
  #testimonials .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #contact .grid {
    grid-template-columns: 1fr !important;
  }

  #contact .rounded-3xl {
    max-width: 560px;
  }
}

@keyframes zivezeButtonGlow {
  0% {
    transform: scale(0.98);
    opacity: 0.52;
  }
  100% {
    transform: scale(1.08);
    opacity: 0.96;
  }
}

@keyframes zivezeShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 240% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before,
  body::after,
  .ziveze-orbital-glow,
  .ziveze-motion-field {
    display: none;
  }

  #home .ziveze-hero-image,
  [data-z-motion],
  section::before,
  #home .shimmer-text {
    animation: none;
    transition: none;
    transform: none;
    filter: none;
  }

  [data-z-motion] {
    opacity: 1;
  }
}
