/**
 * Aevesa Liquid Glass
 * Reliable frosted glass: blur + specular gradients + local color substrate.
 * (SVG displacement removed from backdrop-filter — it was invalidating blur in Chrome.)
 */

/* --------------------------------------------------------------------------
   Phase 0: Substrate mesh
   -------------------------------------------------------------------------- */
.landing-section-dark {
  position: relative;
  overflow: hidden;
}

.landing-section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 12% 18%, rgba(34, 211, 238, 0.1), transparent 58%),
    radial-gradient(ellipse 65% 45% at 88% 78%, rgba(99, 102, 241, 0.08), transparent 55%);
  animation: aevesa-mesh-drift 28s ease-in-out infinite;
}

.landing-section-dark > * {
  position: relative;
  z-index: 1;
}

@keyframes aevesa-mesh-drift {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.04) translate(0.5%, -0.4%);
  }
}

@keyframes aevesa-chrome-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* --------------------------------------------------------------------------
   Glass utility — blur + frost gradient (always visible)
   -------------------------------------------------------------------------- */
.aevesa-glass {
  --glass-blur: 20px;

  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.06) 42%,
      rgba(15, 23, 42, 0.18) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 10px 36px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(190%) brightness(1.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(190%) brightness(1.08);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease,
    backdrop-filter 0.3s ease !important;
}

/* Specular highlight — the “liquid” sheen (CSS-only, always renders) */
.aevesa-glass--liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.08) 28%,
    rgba(255, 255, 255, 0) 52%,
    rgba(255, 255, 255, 0.14) 78%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.55;
}

.aevesa-glass > * {
  position: relative;
  z-index: 1;
}

.aevesa-glass--interactive:hover {
  --glass-blur: 26px;
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.1) 40%,
      rgba(15, 23, 42, 0.12) 100%
    );
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(210%) brightness(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(210%) brightness(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 0 36px rgba(255, 255, 255, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.32);
}

.aevesa-glass--interactive:hover::before {
  opacity: 0.85;
}

/* Nav — always readable; bottom edge only (no glass box border on sides/top) */
.site-nav-aevesa {
  position: sticky;
  top: 0;
  z-index: 200;
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0;
}

.site-nav-aevesa:not(.nav-on-dark) {
  background-color: #ffffff !important;
}

.site-nav-aevesa.nav-on-dark,
.site-nav-aevesa.nav-on-dark.aevesa-glass {
  background:
    linear-gradient(
      180deg,
      rgba(30, 41, 59, 0.97) 0%,
      rgba(15, 23, 42, 0.94) 100%
    ) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* Architecture shell */
.landing-arch-diagram-shell.aevesa-glass {
  background:
    linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 35%,
      rgba(15, 23, 42, 0.2) 100%
    ) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
}

.landing-arch-diagram-shell .landing-arch-feature-card {
  background-color: rgba(15, 23, 42, 0.92);
}

/* --------------------------------------------------------------------------
   Browser mockups — colorful substrate under chrome + frosted header
   -------------------------------------------------------------------------- */
.landing-proof-section .browser-container.landing-proof-browser-shell {
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease !important;
}

/* Subtle color wash behind chrome — frosted, not neon */
.landing-proof-browser-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(34, 211, 238, 0.32) 0%,
    rgba(99, 102, 241, 0.26) 50%,
    rgba(34, 211, 238, 0.28) 100%
  );
  background-size: 200% 100%;
  filter: blur(18px) saturate(130%);
  opacity: 0.55;
  animation: aevesa-chrome-shimmer 14s ease-in-out infinite;
}

.landing-proof-browser-shell .browser-header.aevesa-glass {
  position: relative;
  z-index: 2;
  min-height: 40px !important;
  height: 40px !important;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.5rem 0.5rem 0 0;
  background: rgba(15, 23, 42, 0.35) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) brightness(1.06);
  backdrop-filter: blur(20px) saturate(160%) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 16px rgba(0, 0, 0, 0.08);
}

.landing-proof-browser-shell .browser-header .browser-address {
  color: rgba(241, 245, 249, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.landing-proof-section .browser-container.landing-proof-browser-shell:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.landing-proof-browser-shell:hover::before {
  opacity: 0.65;
}

.landing-proof-browser-shell:hover .browser-header.aevesa-glass {
  border-bottom-color: rgba(255, 255, 255, 0.36);
  background: rgba(15, 23, 42, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 16px rgba(255, 255, 255, 0.04);
}

.landing-sovereign-visibility .landing-sovereign-gallery .browser-container.landing-proof-browser-shell:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* Screenshot stays opaque below chrome */
.landing-proof-browser-shell > img,
.landing-proof-browser-shell > figure {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Bento — expose a glass ring (plate was covering all blur)
   -------------------------------------------------------------------------- */
.landing-proof-bento-card.aevesa-glass {
  padding: 4px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.06) 45%,
      rgba(15, 23, 42, 0.15) 100%
    ) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
}

.landing-proof-bento-plate {
  background: rgba(15, 23, 42, 0.88);
  padding: calc(2.5rem - 4px);
  border-radius: calc(0.75rem - 5px);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* --------------------------------------------------------------------------
   Sovereign audit callout
   -------------------------------------------------------------------------- */
.landing-sovereign-audit-card.aevesa-glass {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 40%,
      rgba(15, 23, 42, 0.18) 100%
    ) !important;
  border-top-color: rgba(255, 255, 255, 0.24);
  border-right-color: rgba(255, 255, 255, 0.24);
  border-bottom-color: rgba(255, 255, 255, 0.24);
  border-left-color: rgb(6 182 212);
}

/* --------------------------------------------------------------------------
   Hero badge (light section)
   -------------------------------------------------------------------------- */
.landing-hero-band {
  position: relative;
  overflow: hidden;
}

.landing-hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.16), transparent 58%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(6, 182, 212, 0.14), transparent 52%);
}

.landing-hero-band > * {
  position: relative;
  z-index: 1;
}

.hero-announcement-wrapper {
  display: flex;
  justify-content: center;
}

.hero-badge {
  display: inline-block;
  margin: 0;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  color: rgb(8 145 178);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-badge.aevesa-glass {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.82) 0%,
      rgba(255, 255, 255, 0.55) 100%
    ) !important;
  border-color: rgba(6, 182, 212, 0.4);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}

.hero-badge.aevesa-glass--interactive:hover {
  color: rgb(6 182 212);
  border-color: rgba(6, 182, 212, 0.55);
}

/* --------------------------------------------------------------------------
   Section kickers (Human-in-the-Loop, Architecture, etc.)
   -------------------------------------------------------------------------- */
.landing-section-kicker {
  display: inline-block;
}

.landing-section-kicker--blue {
  color: rgb(96 165 250);
}

.landing-section-kicker--cyan {
  color: rgb(34 211 238);
}

.landing-section-kicker--indigo {
  color: rgb(199 210 254);
}

.landing-section-kicker--emerald {
  color: rgb(52 211 153);
}

.landing-section-kicker.aevesa-glass {
  background: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Hover shimmers
   -------------------------------------------------------------------------- */
.landing-proof-bento-card.aevesa-glass:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 32px rgba(255, 255, 255, 0.06),
    0 16px 44px rgba(0, 0, 0, 0.36);
}

.landing-sovereign-audit-card.aevesa-glass--interactive:hover {
  border-left-color: rgb(34 211 238);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 32px rgba(6, 182, 212, 0.18),
    0 16px 44px rgba(0, 0, 0, 0.32);
}

.landing-arch-diagram-shell.aevesa-glass--interactive:hover {
  border-color: rgba(34, 211, 238, 0.4) !important;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .landing-section-dark::before,
  .landing-hero-band::before,
  .landing-proof-browser-shell::before {
    animation: none;
  }

  .aevesa-glass,
  .aevesa-glass.aevesa-glass--liquid,
  .aevesa-glass--interactive {
    transition: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(51, 65, 85, 0.85);
    transform: none !important;
  }

  .aevesa-glass::before {
    opacity: 0 !important;
  }

  .aevesa-glass:hover,
  .aevesa-glass--interactive:hover,
  .landing-proof-bento-card.aevesa-glass:hover,
  .landing-sovereign-audit-card.aevesa-glass--interactive:hover,
  .landing-arch-diagram-shell.aevesa-glass--interactive:hover,
  .landing-proof-section .browser-container.landing-proof-browser-shell:hover {
    transform: none !important;
    box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45) !important;
  }

  .hero-badge.aevesa-glass,
  .hero-badge.aevesa-glass:hover {
    background: rgba(248, 250, 252, 0.98) !important;
    color: rgb(8 145 178) !important;
  }

  .landing-proof-browser-shell::before {
    opacity: 0.35;
  }

  .landing-proof-browser-shell .browser-header.aevesa-glass {
    background: rgba(30, 41, 59, 0.92) !important;
  }
}
