/* ==========================================================================
   FINANCIVA TAX — GLOBAL TAX GATEWAY
   PREMIUM INTERACTION SYSTEM

   Principles
   ----------
   - cyan / electric-blue Financiva identity
   - subtle, premium, financial-software motion
   - no permanent geometry displacement
   - no excessive glow
   - keyboard accessible
   - reduced-motion aware
   ========================================================================== */


:root {
  --fin-neon-cyan: rgba(0, 224, 255, 0.92);
  --fin-neon-blue: rgba(44, 123, 255, 0.86);
  --fin-neon-soft: rgba(0, 199, 255, 0.18);
  --fin-neon-faint: rgba(0, 199, 255, 0.08);

  --fin-hover-shadow:
    0 18px 50px rgba(29, 97, 150, 0.12),
    0 0 26px rgba(0, 210, 255, 0.10);

  --fin-neon-shadow:
    0 0 0 1px rgba(0, 213, 255, 0.34),
    0 14px 44px rgba(27, 103, 167, 0.14),
    0 0 34px rgba(0, 213, 255, 0.16);

  --fin-fast: 160ms;
  --fin-medium: 280ms;
  --fin-slow: 520ms;

  --fin-ease:
    cubic-bezier(0.22, 1, 0.36, 1);
}


/* ==========================================================================
   UNIVERSAL INTERACTIVE SURFACE BEHAVIOR
   ========================================================================== */

.glass,
.world-card,
article,
button,
a,
input,
select,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}


.glass,
.world-card,
article {
  transition:
    translate var(--fin-medium) var(--fin-ease),
    scale var(--fin-medium) var(--fin-ease),
    border-color var(--fin-medium) ease,
    box-shadow var(--fin-medium) ease,
    background-color var(--fin-medium) ease,
    filter var(--fin-medium) ease;
}


/* ==========================================================================
   GLASS CARDS
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {

  .glass:hover,
  article:hover {
    translate: 0 -3px;
    box-shadow: var(--fin-hover-shadow);
    border-color: rgba(0, 201, 255, 0.30);
  }


  .world-card.glass:hover {
    translate: 0 -4px;
    box-shadow: var(--fin-neon-shadow);
    border-color: rgba(0, 209, 255, 0.42);
    filter: saturate(1.025);
  }
}


/* ==========================================================================
   WORLD / JURISDICTION INTELLIGENCE PANEL
   ========================================================================== */

.world-card {
  position: relative;
  isolation: isolate;
}


.world-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;

  background:
    linear-gradient(
      115deg,
      transparent 15%,
      rgba(0, 225, 255, 0.00) 34%,
      rgba(0, 225, 255, 0.20) 50%,
      rgba(36, 120, 255, 0.10) 58%,
      transparent 76%
    );

  opacity: 0;
  transform: translateX(-18%);
  transition:
    opacity 240ms ease,
    transform 680ms var(--fin-ease);

  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  mask-composite: exclude;
  -webkit-mask-composite: xor;

  padding: 1px;
}


@media (hover: hover) and (pointer: fine) {

  .world-card:hover::after {
    opacity: 1;
    transform: translateX(12%);
  }
}


/* ==========================================================================
   WORLD MAP / CORE ILLUMINATION
   ========================================================================== */

.world-map,
[class*="world-map"],
[class*="network"],
[class*="globe"] {
  transition:
    filter var(--fin-slow) ease,
    opacity var(--fin-medium) ease;
}


@media (hover: hover) and (pointer: fine) {

  .world-card:hover .world-map,
  .world-card:hover [class*="world-map"],
  .world-card:hover [class*="network"],
  .world-card:hover [class*="globe"] {
    filter:
      drop-shadow(
        0 0 8px rgba(0, 218, 255, 0.20)
      )
      drop-shadow(
        0 0 22px rgba(43, 121, 255, 0.10)
      );
  }
}


/* ==========================================================================
   HERO TITLE
   ========================================================================== */

.hero-copy h1 {
  transition:
    text-shadow var(--fin-medium) ease,
    filter var(--fin-medium) ease;
}


@media (hover: hover) and (pointer: fine) {

  .hero-copy:hover h1 {
    text-shadow:
      0 0 18px rgba(0, 200, 255, 0.08);

    filter:
      contrast(1.01);
  }
}


/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */

.topbar a,
.topbar button {
  position: relative;
  transition:
    color var(--fin-fast) ease,
    background-color var(--fin-fast) ease,
    box-shadow var(--fin-medium) ease,
    translate var(--fin-fast) var(--fin-ease);
}


.topbar a::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -5px;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(0, 215, 255, 0.90),
      rgba(40, 120, 255, 0.70),
      transparent
    );

  opacity: 0;
  transform: scaleX(0.25);

  transition:
    opacity var(--fin-fast) ease,
    transform var(--fin-medium) var(--fin-ease);
}


@media (hover: hover) and (pointer: fine) {

  .topbar a:hover {
    color: rgb(0, 151, 205);
    translate: 0 -1px;
  }


  .topbar a:hover::after {
    opacity: 1;
    transform: scaleX(1);
  }
}


/* ==========================================================================
   GLOBAL INTELLIGENCE SIDEBAR
   ========================================================================== */

.global-intelligence-rail a,
.global-intelligence-rail button,
.global-intelligence-rail [role="button"] {
  transition:
    translate var(--fin-fast) var(--fin-ease),
    scale var(--fin-fast) var(--fin-ease),
    color var(--fin-fast) ease,
    background-color var(--fin-fast) ease,
    box-shadow var(--fin-medium) ease,
    border-color var(--fin-medium) ease;
}


@media (hover: hover) and (pointer: fine) {

  .global-intelligence-rail a:hover,
  .global-intelligence-rail button:hover,
  .global-intelligence-rail [role="button"]:hover {
    translate: 2px 0;
    scale: 1.045;

    background:
      rgba(235, 251, 255, 0.80);

    box-shadow:
      0 0 0 1px rgba(0, 205, 255, 0.20),
      0 0 18px rgba(0, 205, 255, 0.13);
  }
}


/* ==========================================================================
   BUTTONS / CTA
   ========================================================================== */

button,
.button,
.btn,
[role="button"] {
  position: relative;
  overflow: hidden;

  transition:
    translate var(--fin-fast) var(--fin-ease),
    scale var(--fin-fast) var(--fin-ease),
    box-shadow var(--fin-medium) ease,
    border-color var(--fin-medium) ease,
    filter var(--fin-medium) ease;
}


button::after,
.button::after,
.btn::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      110deg,
      transparent 20%,
      rgba(255, 255, 255, 0.08) 38%,
      rgba(199, 247, 255, 0.52) 49%,
      rgba(255, 255, 255, 0.08) 58%,
      transparent 76%
    );

  transform:
    translateX(-145%);

  transition:
    transform 580ms var(--fin-ease);
}


@media (hover: hover) and (pointer: fine) {

  button:hover,
  .button:hover,
  .btn:hover,
  [role="button"]:hover {
    translate: 0 -2px;
    scale: 1.012;

    box-shadow:
      0 10px 28px rgba(19, 92, 145, 0.14),
      0 0 22px rgba(0, 212, 255, 0.12);
  }


  button:hover::after,
  .button:hover::after,
  .btn:hover::after {
    transform:
      translateX(145%);
  }
}


/* ==========================================================================
   SEARCH / INPUT / SELECT
   ========================================================================== */

input,
select,
textarea,
[role="combobox"] {
  transition:
    border-color var(--fin-fast) ease,
    box-shadow var(--fin-medium) ease,
    background-color var(--fin-medium) ease,
    translate var(--fin-fast) var(--fin-ease);
}


input:hover,
select:hover,
textarea:hover,
[role="combobox"]:hover {
  border-color:
    rgba(0, 188, 230, 0.30);
}


input:focus,
select:focus,
textarea:focus,
[role="combobox"]:focus {
  outline: none;

  border-color:
    rgba(0, 192, 235, 0.64);

  box-shadow:
    0 0 0 3px rgba(0, 202, 255, 0.08),
    0 0 20px rgba(0, 199, 255, 0.10);
}


/* ==========================================================================
   SMALL STATUS / METRIC CARDS
   ========================================================================== */

.world-stats article,
[class*="status"] article,
[class*="metric"],
[class*="stat-card"],
[class*="summary-card"] {
  transition:
    translate var(--fin-fast) var(--fin-ease),
    scale var(--fin-fast) var(--fin-ease),
    box-shadow var(--fin-medium) ease,
    border-color var(--fin-medium) ease;
}


@media (hover: hover) and (pointer: fine) {

  .world-stats article:hover,
  [class*="status"] article:hover,
  [class*="metric"]:hover,
  [class*="stat-card"]:hover,
  [class*="summary-card"]:hover {
    translate: 0 -2px;
    scale: 1.015;

    box-shadow:
      0 8px 26px rgba(30, 106, 154, 0.09),
      0 0 18px rgba(0, 205, 255, 0.08);
  }
}


/* ==========================================================================
   KEYBOARD ACCESSIBILITY
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[role="combobox"]:focus-visible {
  outline:
    2px solid rgba(0, 190, 235, 0.78);

  outline-offset:
    3px;

  box-shadow:
    0 0 0 5px rgba(0, 207, 255, 0.08),
    0 0 20px rgba(0, 202, 255, 0.14);
}


/* ==========================================================================
   ENTRANCE MOTION

   Ends at normal opacity/position, so after the entrance completes the
   canonical static state is preserved.
   ========================================================================== */

@keyframes fin-gateway-enter {
  0% {
    opacity: 0;
    translate: 0 7px;
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}


@media (prefers-reduced-motion: no-preference) {

  .topbar {
    animation:
      fin-gateway-enter
      420ms
      var(--fin-ease)
      both;
  }


  .hero-copy {
    animation:
      fin-gateway-enter
      520ms
      70ms
      var(--fin-ease)
      both;
  }


  .hero-visual {
    animation:
      fin-gateway-enter
      560ms
      130ms
      var(--fin-ease)
      both;
  }


  .global-intelligence-rail {
    animation:
      fin-gateway-enter
      470ms
      40ms
      var(--fin-ease)
      both;
  }
}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}