/* ========== BASE RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offset for fixed header */
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family:
    'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', 'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* ========================================
   SEMANTIC ALIASES
   Map brand variables to semantic names used in this file.
   Brand variables are defined in /generated/brand-variables.css
   ======================================== */
:root {
  /* Semantic aliases for brand colors */
  --dark-blue: #0f2d4d;
  --primary-blue: #1a3f5c;

  /* Light mode semantic mappings */
  --bg-primary: var(--brand-bg-primary);
  --bg-secondary: var(--brand-bg-secondary);
  --text-primary: var(--brand-text-primary);
  --text-secondary: var(--brand-text-secondary);
  --border-color: var(--brand-border);
  --card-bg: var(--brand-bg-card);
  --card-border: var(--brand-border);
  --header-bg: var(--brand-header-bg);
  --footer-bg: var(--brand-footer-bg);
  --footer-text: var(--brand-footer-text);
}

[data-theme='dark'] {
  /* Dark mode semantic mappings - brand-variables.css handles the overrides */
  --link-color: var(--brand-text-link, #4da3cf);
}

/* ========== OLD HEADER STYLES REMOVED ==========
   Replaced by floating island header in /styles/header.css
   Old classes (.header-wrapper, .header-nav, .logo-section, etc.)
   are no longer used in the new Header.astro component.
   ================================================ */

/* ========== OLD BADGE STYLES REMOVED ==========
   .logo-badge was part of the old header, no longer used.
   ================================================ */

.dark-mode-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border: none;
  border-radius: 14px;
  background-color: var(--brand-border);
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 0;
  outline: none;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  overflow: hidden;
}

.dark-mode-toggle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  margin: 0;
  opacity: 0;
}

#mode-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  position: absolute;
  right: 1rem;
}

#mode-switcher:hover {
  opacity: 0.7;
  transition: all 0.3s ease-out;
}

.toggle-wrapper {
  position: relative;
}

[data-theme='dark'] .dark-mode-toggle {
  background-color: var(--brand-border);
}

.dark-mode-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--brand-bg-primary);
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

[data-theme='dark'] .dark-mode-toggle::before {
  transform: translateX(20px);
  background-color: var(--brand-text-primary);
}

.dark-mode-toggle .toggle-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    left 0.3s ease;
  z-index: 2;
}

.dark-mode-toggle .sun-icon {
  opacity: 1;
  width: 15px;
  height: 15px;
}

.dark-mode-toggle .moon-icon {
  opacity: 0;
  width: 13px;
  height: 13px;
}

[data-theme='dark'] .dark-mode-toggle .toggle-icon {
  left: 34px;
}

[data-theme='dark'] .dark-mode-toggle .sun-icon {
  opacity: 0;
}

[data-theme='dark'] .dark-mode-toggle .moon-icon {
  opacity: 1;
}

.dark-mode-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========== OLD NAV / BURGER / MOBILE MENU STYLES REMOVED ==========
   Replaced by floating island header in /styles/header.css
   Old classes (nav, .burger-menu, .mobile-menu-*, nav a) removed.
   ==================================================================== */

.contact-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal__dialog {
  width: 100%;
  max-width: 700px;
  max-height: min(787px, 95vh);
  background: #fff;
  border-radius: 16px;
  padding: 48px 48px 56px 48px;
  position: relative;
  box-shadow: 0 35px 65px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  outline: none;
}

.contact-modal__body {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

.contact-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: white;
  color: var(--brand-bg-primary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.contact-modal__close:hover {
  background: rgba(226, 232, 240, 1);
}

.contact-modal h2 {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 40px;
  letter-spacing: -0.021em;
  color: var(--sky-100, #001b32);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: var(--text-color, #243746);
}

.contact-form select {
  width: 100%;
  max-width: 604px;
  height: 38.5px;
  border-radius: 6px;
  border: 1px solid var(--inputtext-border-color, #e4e6e9);
  background: var(--inputtext-background, #ffffff);
  box-shadow: 0px 1px 2px 0px rgba(18, 18, 23, 0.05);
  font-size: 0.95rem;
  transition:
    border 0.2s ease,
    box-shadow 0.2s ease;
  appearance: none;
  cursor: pointer;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg width='13' height='8' viewBox='0 0 13 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6.5 6.5L12 1.5' stroke='%23A5AEB4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12.9375px 7.3125px;
  background-position: right 12.25px center;
}

.contact-form input {
  width: 100%;
  max-width: 604px;
  height: 38.5px;
  border-radius: 6px;
  border: 1px solid var(--inputtext-border-color, #e4e6e9);
  background: var(--inputtext-background, #ffffff);
  box-shadow: 0px 1px 2px 0px rgba(18, 18, 23, 0.05);
  padding: 8.75px 12.25px;
  font-size: 0.95rem;
  transition:
    border 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 12%, transparent);
  outline: none;
}

.contact-form__row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-form__phone-row {
  align-items: flex-start;
}

.contact-form__country {
  flex: 0 0 auto;
  width: 120px;
}

.contact-form__phone {
  flex: 1 1 auto;
  max-width: none;
}

.contact-form__country-input {
  width: 120px;
  height: 38.5px;
  border-radius: 6px;
  border: 1px solid var(--inputtext-border-color, #e4e6e9);
  background: var(--inputtext-background, #ffffff);
  box-shadow: 0px 1px 2px rgba(18, 18, 23, 0.05);
  display: flex;
  align-items: center;
  padding: 0 28px 0 12px;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.contact-form__country select {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  appearance: none;
  color: var(--brand-bg-secondary);
  cursor: pointer;
  z-index: 1;
  padding-right: 4px;
}

.contact-form__country select:focus {
  outline: none;
}

.contact-form__country-arrow {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
  z-index: 2;
  pointer-events: none;
}

.contact-form__country-arrow svg {
  width: 13px;
  height: 8px;
  stroke: var(--iconfield-icon-color, #a5aeb4);
  stroke-width: 1.5px;
  fill: none;
}

.contact-form__country-input:focus-within .contact-form__country-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.contact-form__phone input {
  max-width: none;
  width: 100%;
}

.contact-form__interests {
  border: none;
  padding: 0;
  margin: 0;
}

.contact-form__interests legend {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: var(--text-color, #243746);
  margin-bottom: 12px;
}

.contact-form__checkboxes {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
}

.contact-form__checkbox {
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 10px;
  font-size: 0.95rem;
  color: #111827;
  white-space: nowrap;
  padding: 0;
}

.contact-form__checkbox input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  box-sizing: border-box;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--checkbox-border-color, #e4e6e9);
  background: var(--checkbox-background, #ffffff);
  box-shadow: 0px 1px 2px rgba(18, 18, 23, 0.05);
  cursor: pointer;
  position: relative;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.contact-form__checkbox input::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}

.contact-form__checkbox input:checked {
  background: var(--rose-600, #e11d48);
  border-color: var(--rose-600, #e11d48);
}

.contact-form__checkbox input:checked::after {
  border-color: var(--brand-bg-primary);
  opacity: 1;
}

.contact-form__actions {
  position: sticky;
  bottom: 0;
  padding-top: 16px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--brand-bg-primary) 45%);
  z-index: 5;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  background: var(--rose-600, #e11d48);
  border: 1px solid var(--rose-600, #e11d48);
  color: var(--button-primary-color, #ffffff);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 16px 32px;
  border-radius: 28px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.contact-modal__dialog--success {
  align-items: flex-start;
  text-align: left;
  padding: 48px 48px 56px 48px;
  gap: 24px;
  padding-bottom: 56px;
}

.contact-success-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.contact-success-icon {
  width: 56px;
  height: 56px;
}

.contact-success-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-modal__dialog--success h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.contact-modal__dialog--success p {
  margin: 0;
  color: #51606f;
  line-height: 32px;
}

.contact-form__submit--success {
  width: 100%;
  max-width: none;
}

.pt-20 {
  flex: 1 0 auto;
  padding-top: 0; /* Floating header overlays content — hero extends behind it */
}

/* ============================================
   HERO SECTION - Clean Simple Gradient
   ============================================ */
.hero {
  background: linear-gradient(180deg, var(--brand-bg-hero) 0%, var(--brand-bg-primary) 100%);
  padding-top: 8rem;
  padding-bottom: 7.77rem;
  padding-left: 0;
  padding-right: 0;
  position: relative;
  overflow: visible;
  margin: 0;
  border-top: 1px solid color-mix(in srgb, var(--brand-primary) 8%, transparent);
  z-index: 3;
}

/* Primary animated gradient layer - runs continuously */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      ellipse 50% 40% at 15% 25%,
      color-mix(in srgb, var(--brand-secondary) 28%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 45% 50% at 85% 15%,
      color-mix(in srgb, var(--brand-primary-light) 24%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 40% 45% at 75% 75%,
      color-mix(in srgb, var(--brand-primary) 20%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 35% 30% at 5% 80%,
      color-mix(in srgb, var(--brand-tertiary-dark) 12%, transparent) 0%,
      transparent 55%
    );
  animation: heroGradientFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0);
}

/* Secondary gradient layer - focused behind the portal (right side) */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 70%;
  height: 120%;
  background:
    radial-gradient(
      ellipse 60% 50% at 60% 50%,
      color-mix(in srgb, var(--brand-secondary) 22%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 50% 60% at 40% 30%,
      color-mix(in srgb, var(--brand-primary-light) 18%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 45% 45% at 70% 70%,
      color-mix(in srgb, var(--brand-primary) 15%, transparent) 0%,
      transparent 50%
    );
  animation: heroGradientFloat 26s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0);
}

/* Gradient float animation - smooth flowing movement */
@keyframes heroGradientFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(3%, 4%) rotate(2deg) scale(1.02);
  }
  50% {
    transform: translate(-2%, 3%) rotate(-1deg) scale(0.98);
  }
  75% {
    transform: translate(4%, -2%) rotate(1deg) scale(1.01);
  }
}

/* Dark mode hero */
[data-theme='dark'] .hero {
  background: linear-gradient(180deg, var(--brand-bg-hero) 0%, var(--brand-bg-primary) 100%);
  border-top: 1px solid color-mix(in srgb, var(--brand-secondary) 15%, transparent);
}

[data-theme='dark'] .hero::before {
  background:
    radial-gradient(
      ellipse 50% 40% at 15% 25%,
      color-mix(in srgb, var(--brand-secondary) 38%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 45% 50% at 85% 15%,
      color-mix(in srgb, var(--brand-primary-light) 32%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 40% 45% at 75% 75%,
      color-mix(in srgb, var(--brand-primary) 28%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 35% 30% at 5% 80%,
      color-mix(in srgb, var(--brand-tertiary-dark) 18%, transparent) 0%,
      transparent 55%
    );
}

[data-theme='dark'] .hero::after {
  background:
    radial-gradient(
      ellipse 60% 50% at 60% 50%,
      color-mix(in srgb, var(--brand-secondary) 30%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 50% 60% at 40% 30%,
      color-mix(in srgb, var(--brand-primary-light) 25%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 45% 45% at 70% 70%,
      color-mix(in srgb, var(--brand-primary) 22%, transparent) 0%,
      transparent 50%
    );
}

.hero-content {
  max-width: 90rem;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero-left {
  flex: 1.3;
  min-width: 0;
  max-width: 650px;
  overflow: visible; /* Allow typing text to be fully visible */
}

.hero-right {
  flex: 0 0 auto;
  width: 540px;
  max-width: 540px;
  position: relative;
}

/* ========== PORTAL BACKGROUND ELEMENT ========== */
.portal-bg-element {
  --portal-bg-primary: var(--brand-primary);
  --portal-bg-teal: var(--brand-secondary);
  position: absolute;
  width: 630px;
  height: 630px;
  top: 71%;
  left: 33%;
  transform: translate(-50%, -50%) translateZ(0);
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
  overflow: visible;
  contain: layout style;
  backface-visibility: hidden;
}

/* Hero-right container allows visual overflow */
.hero-right {
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* ========== PORTAL ICON STYLING ========== */

/* Enable pointer events on icon wrappers for click interactions */
/* Parent .portal-hero-svg has pointer-events: none, so we need to re-enable on icons */
.portal-bg-icons .portal-icon-wrapper {
  pointer-events: auto;
  cursor: pointer;
}

.portal-bg-icons .icon-bg-fill {
  opacity: 0.95;
  transition:
    fill 0.4s ease,
    opacity 0.4s ease;
}

.portal-bg-icons .icon-bg-ring {
  opacity: 0.9;
  transition:
    opacity 0.4s ease,
    stroke-width 0.4s ease;
}

.portal-bg-icons .portal-icon-scale {
  transform: scale(1.06) translateZ(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced shadow for orbital icons - prominent glow during orbit */
.portal-bg-icons .portal-icon {
  transition: filter 0.4s ease;
  filter: url(#iconShadow) drop-shadow(0 0 22px rgba(0, 210, 200, 0.65))
    drop-shadow(0 0 40px rgba(0, 180, 180, 0.3));
}

/* Boost icon brightness during orbit */
.portal-bg-icons .icon-fill {
  opacity: 1;
  filter: brightness(1.4) saturate(1.4);
  transition:
    opacity 0.4s ease,
    filter 0.4s ease;
}

.portal-bg-icons .icon-stroke {
  opacity: 1;
  filter: brightness(1.45) saturate(1.45);
  transition:
    opacity 0.4s ease,
    filter 0.4s ease;
}

/* Active icon state - optimized with fewer drop-shadows */
.portal-bg-icons .portal-icon-wrapper.active .portal-icon-scale {
  transform: scale(1.7) translateZ(0);
}

.portal-bg-icons .portal-icon-wrapper.active .portal-icon {
  animation: iconGlowPulse 5s ease-out forwards;
}

/* Icon glow animation - starts big, fades down (optimized with 2 drop-shadows) */
@keyframes iconGlowPulse {
  0% {
    filter: drop-shadow(0 0 30px rgba(0, 255, 220, 1)) drop-shadow(0 0 65px rgba(0, 190, 205, 0.6));
  }
  20% {
    filter: drop-shadow(0 0 25px rgba(0, 255, 220, 0.9))
      drop-shadow(0 0 55px rgba(0, 190, 205, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(0, 255, 220, 0.8))
      drop-shadow(0 0 45px rgba(0, 190, 205, 0.4));
  }
  80% {
    filter: drop-shadow(0 0 18px rgba(0, 255, 220, 0.65))
      drop-shadow(0 0 38px rgba(0, 190, 205, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 15px rgba(0, 255, 220, 0.5))
      drop-shadow(0 0 32px rgba(0, 190, 205, 0.25));
  }
}

.portal-bg-icons .portal-icon-wrapper.active .icon-bg-ring {
  opacity: 1;
  stroke-width: 3px;
}

.portal-bg-icons .portal-icon-wrapper.active .icon-bg-fill {
  fill: rgba(255, 255, 255, 0.35);
}

/* Dark mode icons - enhanced visibility */
[data-theme='dark'] .portal-bg-icons .icon-fill {
  opacity: 1;
  filter: brightness(1.45) saturate(1.35);
}

[data-theme='dark'] .portal-bg-icons .icon-stroke {
  opacity: 1;
  filter: brightness(1.5) saturate(1.4);
}

[data-theme='dark'] .portal-bg-icons .portal-icon {
  filter: url(#iconShadow) drop-shadow(0 0 20px rgba(0, 255, 230, 0.6))
    drop-shadow(0 0 38px rgba(0, 200, 210, 0.3));
}

[data-theme='dark'] .portal-bg-icons .icon-bg-fill {
  opacity: 0.9;
  fill: rgba(255, 255, 255, 0.18);
}

[data-theme='dark'] .portal-bg-icons .icon-bg-ring {
  opacity: 0.95;
}

[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper.active .portal-icon {
  animation: iconGlowPulseDark 5s ease-out forwards;
}

/* Dark mode icon glow animation - starts big, fades down (optimized with 2 drop-shadows) */
@keyframes iconGlowPulseDark {
  0% {
    filter: drop-shadow(0 0 28px rgba(0, 255, 240, 1)) drop-shadow(0 0 50px rgba(50, 210, 220, 0.6));
  }
  20% {
    filter: drop-shadow(0 0 22px rgba(0, 255, 240, 0.9))
      drop-shadow(0 0 42px rgba(50, 210, 220, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(0, 255, 240, 0.8))
      drop-shadow(0 0 35px rgba(50, 210, 220, 0.4));
  }
  80% {
    filter: drop-shadow(0 0 14px rgba(0, 255, 240, 0.65))
      drop-shadow(0 0 28px rgba(50, 210, 220, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(0, 255, 240, 0.5))
      drop-shadow(0 0 22px rgba(50, 210, 220, 0.25));
  }
}

[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper.active .icon-bg-fill {
  fill: rgba(255, 255, 255, 0.28);
}

[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper.active .icon-bg-ring {
  opacity: 1;
  stroke-width: 3.2px;
}

/* ============================================
   3D FLOATING LIFT HOVER EFFECT
   ============================================ */

/* Hovered icon - subtle scale with smooth gradient glow */
.portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon-scale {
  transform: scale(1.25) translateY(-2px) translateZ(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon {
  animation: hoverGradientGlow 1.5s ease-in-out infinite;
}

.portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-fill,
.portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-stroke {
  filter: brightness(1.35) saturate(1.25);
  transition: filter 0.4s ease;
}

.portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-bg-fill {
  fill: rgba(255, 255, 255, 0.32);
  transition: fill 0.4s ease;
}

.portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-bg-ring {
  stroke-width: 2px;
  opacity: 1;
  transition: all 0.4s ease;
}

/* Smooth gradient glow animation on hover */
@keyframes hoverGradientGlow {
  0%,
  100% {
    filter: url(#iconShadow) drop-shadow(0 0 12px rgba(0, 220, 200, 0.6))
      drop-shadow(0 0 24px rgba(0, 180, 220, 0.3));
  }
  50% {
    filter: url(#iconShadow) drop-shadow(0 0 18px rgba(0, 255, 220, 0.75))
      drop-shadow(0 0 32px rgba(0, 200, 240, 0.45));
  }
}

/* Dark mode hover adjustments - smooth gradient glow */
[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon {
  animation: hoverGradientGlowDark 1.5s ease-in-out infinite;
}

[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-bg-fill {
  fill: rgba(255, 255, 255, 0.28);
}

[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-fill,
[data-theme='dark'] .portal-bg-icons .portal-icon-wrapper:not(.active):hover .icon-stroke {
  filter: brightness(1.45) saturate(1.35);
}

/* Dark mode smooth gradient glow on hover */
@keyframes hoverGradientGlowDark {
  0%,
  100% {
    filter: url(#iconShadow) drop-shadow(0 0 14px rgba(0, 255, 240, 0.65))
      drop-shadow(0 0 28px rgba(0, 200, 230, 0.35));
  }
  50% {
    filter: url(#iconShadow) drop-shadow(0 0 22px rgba(0, 255, 250, 0.8))
      drop-shadow(0 0 38px rgba(0, 220, 250, 0.5));
  }
}

/* Portal container hover */
.hero-right:hover .portal-bg-element {
  opacity: 0.65;
}

[data-theme='dark'] .portal-bg-element {
  --portal-bg-primary: var(--brand-accent-light);
  --portal-bg-teal: var(--brand-secondary-light);
  opacity: 0.6;
}

[data-theme='dark'] .hero-right:hover .portal-bg-element {
  opacity: 0.55;
}

/* ========== ACCESSIBILITY - Reduced Motion for Portal Icons ========== */
@media (prefers-reduced-motion: reduce) {
  /* Disable CSS animations on circles */
  .circle-group.circle-1,
  .circle-group.circle-2 {
    animation: none;
  }

  /* Disable CSS animations on icons */
  .circle-1-icons .portal-icon.circle-1-icon {
    animation: none;
  }

  /* Disable transitions */
  .portal-bg-icons .icon-fill,
  .portal-bg-icons .icon-stroke {
    transition: none;
  }

  /* Hide SMIL animateTransform elements - makes orbiting static */
  .portal-bg-icons animateTransform,
  .circle-group animateTransform {
    display: none;
  }

  /* Disable GPU acceleration hints when not animating */
  .portal-bg-icons,
  .portal-icon-orbit {
    will-change: auto;
  }

  /* Disable 3D floating hover effect - simple scale only */
  .portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon-scale {
    transform: scale(1.25) translateZ(0);
    transition: none;
    animation: none;
  }

  .portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon {
    animation: none;
    filter: url(#iconShadow) drop-shadow(0 0 18px rgba(0, 255, 220, 0.7));
  }
}

.hero-text {
  padding-right: 0;
  overflow: visible;
}

.hero-text h1 {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 800ms cubic-bezier(0.4, 0, 0.2, 1) 200ms forwards;
  will-change: opacity, transform;
  transition: color 0.3s ease;
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  box-sizing: border-box;
}

.hero-text h1 .highlight {
  background: linear-gradient(to right, var(--brand-secondary), var(--brand-primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Typing animation wrapper - fixed height prevents layout shifts */
.typing-wrapper {
  display: block;
  height: 10.5rem;
  min-height: 10.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.typing-line-one,
.typing-line-two {
  display: block;
  height: 4.5rem;
  min-height: 4.5rem;
  line-height: 1.35;
  min-width: 100%;
  white-space: nowrap;
  overflow: visible;
  padding-bottom: 0.25rem;
}

.typing-line-one {
  margin-bottom: 0.15rem;
}

.static-text {
  display: inline;
  color: var(--brand-text-primary);
  white-space: nowrap;
}

[data-theme='dark'] .static-text {
  color: var(--brand-text-primary);
}

.typing-dynamic {
  display: inline;
  background: linear-gradient(
    150deg,
    #00d4b8 0%,
    var(--brand-secondary) 15%,
    #1dbfcc 35%,
    #3ab0d6 55%,
    var(--brand-primary-light) 75%,
    #5a9bd4 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: linear-gradient(to bottom, #00d4b8, #1dbfcc, #3ab0d6, var(--brand-primary-light));
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  border-radius: 2px;
}

.typing-cursor.typing {
  animation: none;
  opacity: 1;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

[data-theme='dark'] .typing-dynamic {
  background: linear-gradient(
    150deg,
    #00f5e0 0%,
    var(--brand-secondary-light) 15%,
    #2ed4e5 35%,
    #4dc4eb 55%,
    var(--brand-accent-light) 75%,
    #6eb0ea 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme='dark'] .typing-cursor {
  background: linear-gradient(to bottom, #00f5e0, #2ed4e5, #4dc4eb, var(--brand-accent-light));
}

/* ===== TYPING SLIDE-OUT TRANSITIONS ===== */
.typing-dynamic {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0);
  will-change: transform, opacity, filter;
}

.typing-dynamic.slide-out {
  animation: modernDissolve 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes modernDissolve {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
  }
  40% {
    transform: scale(0.98) translateY(-0.15em);
    opacity: 0.7;
    filter: blur(1px);
  }
  100% {
    transform: scale(0.94) translateY(-0.4em);
    opacity: 0;
    filter: blur(3px);
  }
}

/* ===== CURSOR DISSOLVE ===== */
.typing-cursor {
  transform-origin: center center;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Dissolve out: 0.28s */
.typing-cursor.dissolving {
  animation: cursorDissolve 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes cursorDissolve {
  0% {
    transform: scale(1) translateY(0) rotate(0deg);
    opacity: 1;
    filter: blur(0) brightness(1);
    text-shadow: 0 0 0 transparent;
  }
  15% {
    transform: scale(1.15) translateY(0) rotate(0deg);
    opacity: 1;
    filter: blur(0) brightness(1.3);
    text-shadow: 0 0 8px rgba(0, 245, 224, 0.6);
  }
  40% {
    transform: scale(0.9) translateY(-3px) rotate(8deg);
    opacity: 0.7;
    filter: blur(1.5px) brightness(1.2);
    text-shadow: 0 0 12px rgba(0, 245, 224, 0.4);
  }
  70% {
    transform: scale(0.4) translateY(-8px) rotate(-5deg);
    opacity: 0.3;
    filter: blur(3px) brightness(1.1);
    text-shadow: 0 0 6px rgba(0, 245, 224, 0.2);
  }
  100% {
    transform: scale(0.1) translateY(-14px) rotate(15deg);
    opacity: 0;
    filter: blur(6px) brightness(1);
    text-shadow: 0 0 0 transparent;
  }
}

/* Materialize in: 0.36s with spring easing */
.typing-cursor.materializing {
  animation: cursorMaterialize 0.36s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes cursorMaterialize {
  0% {
    transform: scale(0.1) translateY(-10px) rotate(-10deg);
    opacity: 0;
    filter: blur(6px) brightness(1.5);
    text-shadow: 0 0 15px rgba(0, 245, 224, 0.8);
  }
  20% {
    transform: scale(0.3) translateY(-6px) rotate(-5deg);
    opacity: 0.2;
    filter: blur(4px) brightness(1.4);
    text-shadow: 0 0 12px rgba(0, 245, 224, 0.6);
  }
  45% {
    transform: scale(0.7) translateY(-2px) rotate(3deg);
    opacity: 0.6;
    filter: blur(2px) brightness(1.2);
    text-shadow: 0 0 8px rgba(0, 245, 224, 0.4);
  }
  70% {
    transform: scale(1.08) translateY(1px) rotate(-1deg);
    opacity: 0.9;
    filter: blur(0.5px) brightness(1.1);
    text-shadow: 0 0 4px rgba(0, 245, 224, 0.3);
  }
  85% {
    transform: scale(0.98) translateY(-0.5px) rotate(0.5deg);
    opacity: 0.95;
    filter: blur(0) brightness(1.05);
    text-shadow: 0 0 2px rgba(0, 245, 224, 0.2);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
    opacity: 1;
    filter: blur(0) brightness(1);
    text-shadow: 0 0 0 transparent;
  }
}

/* Click feedback animation for icons */
.portal-icon-wrapper.clicked .portal-icon-scale {
  animation: iconClickPulse 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes iconClickPulse {
  0% {
    transform: scale(1.7) translateZ(0);
  }
  50% {
    transform: scale(2) translateZ(0);
  }
  100% {
    transform: scale(1.7) translateZ(0);
  }
}

/* ===== PAUSED STATE STYLES ===== */
.portal-icon-wrapper.paused {
  animation: pausedPulse 2s ease-in-out infinite;
}

.portal-icon-wrapper.paused.active {
  animation: pausedActivePulse 1.5s ease-in-out infinite;
}

@keyframes pausedPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(0, 245, 224, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(0, 245, 224, 0.5));
  }
}

@keyframes pausedActivePulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 245, 224, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(0, 245, 224, 0.9));
  }
}

.typing-cursor.paused {
  animation: none;
  opacity: 1;
}

/* ===== TERMINAL EASTER EGG MODE ===== */

/* Terminal container - fixed position overlay matching mac-window */
.terminal-container {
  /* Position set dynamically by JS */
  background: #0d1117;
  font-family: 'Fira Code', 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #e6edf3;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scroll-behavior: smooth; /* Smoother mouse wheel transitions */
  overscroll-behavior: contain; /* Prevent scroll chaining to parent */
  scrollbar-gutter: stable; /* Prevent layout shift when scrollbar appears */
  z-index: 9999; /* Above exit overlay (9998) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: default;
  box-sizing: border-box;
}

.terminal-container.active {
  opacity: 1;
  pointer-events: auto;
  cursor: text; /* Text cursor inside terminal */
}

/* Remove any focus outlines or borders during terminal mode */
.terminal-container,
.terminal-container * {
  outline: none;
  border: none;
}

.mac-window.terminal-active {
  position: relative; /* Keep relative but create strong stacking context */
  z-index: 10000; /* Above exit overlay (9998) so terminal is truly on top */
  overflow: visible; /* Allow terminal to scroll (override overflow: hidden) */
  outline: none;
  isolation: isolate; /* Create new stacking context */
}

.mac-window.terminal-active .mac-window-header {
  outline: none;
}

/* Terminal prompt styling */
.terminal-prompt {
  color: #7ee787;
}

.terminal-prompt-user {
  color: #79c0ff;
}

.terminal-prompt-path {
  color: #a5d6ff;
}

.terminal-prompt-symbol {
  color: #7ee787;
}

.terminal-command {
  color: #e6edf3;
}

.terminal-output {
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Terminal cursor */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #58a6ff;
  animation: terminalBlink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes terminalBlink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* JSON syntax highlighting */
.json-key {
  color: #79c0ff;
}
.json-string {
  color: #a5d6ff;
}
.json-number {
  color: #ffa657;
}
.json-boolean {
  color: #ff7b72;
}
.json-null {
  color: #ff7b72;
}
.json-bracket {
  color: var(--brand-text-muted);
}
.json-colon {
  color: var(--brand-text-muted);
}
.json-comma {
  color: var(--brand-text-muted);
}

/* Portal fade out animation */
.portal-window.terminal-activating {
  animation: portalFadeOut 0.6s ease-out forwards;
}

@keyframes portalFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.98);
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(4px);
  }
}

/* Terminal glitch effect on activation */
.terminal-container.glitch {
  animation: terminalGlitch 0.5s ease-out;
}

@keyframes terminalGlitch {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  20% {
    opacity: 0.8;
    transform: translateX(3px);
  }
  40% {
    transform: translateX(-2px);
  }
  60% {
    transform: translateX(1px);
  }
  80% {
    opacity: 1;
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

/* Badge suspense animations */
.logo-badge.suspense-1 {
  animation: badgeSuspense1 0.3s ease-out;
}

.logo-badge.suspense-2 {
  animation: badgeSuspense2 0.4s ease-out;
}

.logo-badge.suspense-3 {
  animation: badgeSuspense3 0.5s ease-out;
}

@keyframes badgeSuspense1 {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.05);
    box-shadow: 0 0 8px rgba(0, 245, 224, 0.4);
  }
}

@keyframes badgeSuspense2 {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.08);
    box-shadow: 0 0 12px rgba(0, 245, 224, 0.6);
  }
}

@keyframes badgeSuspense3 {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.12);
    box-shadow: 0 0 16px rgba(0, 245, 224, 0.8);
  }
}

/* Terminal window title change */
.mac-window-title.terminal-title {
  font-family: 'Fira Code', 'SF Mono', monospace;
  color: #7ee787;
  font-size: 11px;
}

/* Hide elements when terminal is active */
.terminal-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease;
}

/* Terminal exit hint */
.terminal-hint {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 11px;
  color: #484f58;
  opacity: 0;
  animation: hintFadeIn 0.5s ease 2s forwards;
  pointer-events: none; /* Don't block scrolling */
}

@keyframes hintFadeIn {
  to {
    opacity: 1;
  }
}

/* Terminal exit overlay */
.terminal-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  cursor: pointer;
}

/* ============================================
   LIGHT MODE TERMINAL STYLES
   A clean, professional terminal aesthetic for light mode
   ============================================ */

/* Light mode terminal container - clean white terminal look */
:root .terminal-container,
[data-theme='light'] .terminal-container {
  background: linear-gradient(180deg, var(--brand-bg-secondary) 0%, var(--brand-primary-dark) 100%);
  color: var(--brand-text-primary);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Light mode terminal prompt colors */
:root .terminal-prompt-user,
[data-theme='light'] .terminal-prompt-user {
  color: #0369a1;
  font-weight: 600;
}

:root .terminal-prompt-path,
[data-theme='light'] .terminal-prompt-path {
  color: var(--brand-secondary-hover);
}

:root .terminal-prompt-symbol,
[data-theme='light'] .terminal-prompt-symbol {
  color: var(--brand-success);
  font-weight: 600;
}

:root .terminal-command,
[data-theme='light'] .terminal-command {
  color: var(--brand-border);
}

/* Light mode terminal cursor */
:root .terminal-cursor,
[data-theme='light'] .terminal-cursor {
  background: #0284c7;
}

/* Light mode JSON syntax highlighting - professional code editor colors */
:root .json-key,
[data-theme='light'] .json-key {
  color: #0369a1;
}

:root .json-string,
[data-theme='light'] .json-string {
  color: var(--brand-success);
}

:root .json-number,
[data-theme='light'] .json-number {
  color: #d97706;
}

:root .json-boolean,
[data-theme='light'] .json-boolean {
  color: #dc2626;
}

:root .json-null,
[data-theme='light'] .json-null {
  color: #dc2626;
}

:root .json-bracket,
[data-theme='light'] .json-bracket {
  color: var(--brand-text-secondary);
}

:root .json-colon,
[data-theme='light'] .json-colon {
  color: var(--brand-text-secondary);
}

:root .json-comma,
[data-theme='light'] .json-comma {
  color: var(--brand-text-secondary);
}

/* Light mode terminal hint */
:root .terminal-hint,
[data-theme='light'] .terminal-hint {
  color: var(--brand-text-muted);
}

/* Light mode window title when in terminal mode */
:root .mac-window-title.terminal-title,
[data-theme='light'] .mac-window-title.terminal-title {
  color: var(--brand-border);
  font-family: 'Fira Code', 'SF Mono', monospace;
}

/* ============================================
   DARK MODE TERMINAL STYLES
   Keep the existing dark mode look
   ============================================ */
[data-theme='dark'] .terminal-container {
  background: #0d1117;
  color: #e6edf3;
  border-top: none;
  box-shadow: none;
}

[data-theme='dark'] .terminal-prompt-user {
  color: #79c0ff;
  font-weight: normal;
}

[data-theme='dark'] .terminal-prompt-path {
  color: #a5d6ff;
}

[data-theme='dark'] .terminal-prompt-symbol {
  color: #7ee787;
  font-weight: normal;
}

[data-theme='dark'] .terminal-command {
  color: #e6edf3;
}

[data-theme='dark'] .terminal-cursor {
  background: #58a6ff;
}

[data-theme='dark'] .json-key {
  color: #79c0ff;
}

[data-theme='dark'] .json-string {
  color: #a5d6ff;
}

[data-theme='dark'] .json-number {
  color: #ffa657;
}

[data-theme='dark'] .json-boolean {
  color: #ff7b72;
}

[data-theme='dark'] .json-null {
  color: #ff7b72;
}

[data-theme='dark'] .json-bracket {
  color: var(--brand-text-muted);
}

[data-theme='dark'] .json-colon {
  color: var(--brand-text-muted);
}

[data-theme='dark'] .json-comma {
  color: var(--brand-text-muted);
}

[data-theme='dark'] .terminal-hint {
  color: #484f58;
}

[data-theme='dark'] .mac-window-title.terminal-title {
  color: #a8a8a8;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .typing-dynamic {
    transition: none;
  }

  .typing-dynamic.slide-out {
    transform: none;
    opacity: 1;
    filter: none;
    animation: none;
  }

  .typing-cursor.dissolving,
  .typing-cursor.materializing {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
    text-shadow: none;
  }

  .portal-icon-wrapper.clicked .portal-icon-scale {
    animation: none;
  }

  .portal-icon-wrapper.paused,
  .portal-icon-wrapper.paused.active {
    animation: none;
    filter: drop-shadow(0 0 6px rgba(0, 245, 224, 0.5));
  }

  /* Disable hover gradient glow animation */
  .portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon,
  [data-theme='dark'] .portal-bg-icons .portal-icon-wrapper:not(.active):hover .portal-icon {
    animation: none;
  }
}

.hero-text p {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 550px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 800ms cubic-bezier(0.4, 0, 0.2, 1) 400ms forwards;
  will-change: opacity, transform;
  transition: color 0.3s ease;
}

.hero-cta {
  background: linear-gradient(135deg, #00c7b1 0%, #4da3cf 100%);
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 800ms cubic-bezier(0.4, 0, 0.2, 1) 600ms forwards;
  will-change: opacity, transform;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 4px 16px rgba(0, 199, 177, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 199, 177, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
}

/* Mac Window styles - Compact size for side-by-side layout */
.mac-window {
  width: 100%;
  max-width: 520px;
  background: #f6f6f6;
  border-radius: 12px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.1);
  border: none;
  outline: none;
  overflow: hidden;
  position: relative;
  z-index: 5;
  opacity: 0;
  margin-left: 25px;
  margin-top: 18px;
  transform: translateX(-20px) scale(0.95);
  animation:
    fadeInRight 750ms cubic-bezier(0.4, 0, 0.2, 1) 800ms forwards,
    floatPortal 6s ease-in-out 1.6s infinite;
  will-change: opacity, transform;
}

[data-theme='dark'] .mac-window {
  background: #2d2d2d;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Subtle floating animation */
@keyframes floatPortal {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.mac-window-header {
  height: 28px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  position: relative;
}

[data-theme='dark'] .mac-window-header {
  background: #3c3c3c;
}

.mac-window-controls {
  display: flex;
  gap: 6px;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.mac-control {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.mac-control.close {
  background: #ff5f56;
}

.mac-control.minimize {
  background: #ffbd2e;
}

.mac-control.maximize {
  background: #27c93f;
}

.mac-control:hover {
  filter: brightness(0.9);
}

.mac-window-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 500;
  color: #4a4a4a;
}

[data-theme='dark'] .mac-window-title {
  color: #a8a8a8;
}

/* Browser Address Bar */
.browser-address-bar {
  height: 28px;
  background: var(--brand-bg-primary);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid #e5e5e5;
}

[data-theme='dark'] .browser-address-bar {
  background: #1e1e1e;
  border-bottom: 1px solid #3a3a3a;
}

.address-bar-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.address-icon {
  width: 12px;
  height: 12px;
  color: var(--brand-success); /* Green lock for secure connection */
}

[data-theme='dark'] .address-icon {
  color: #4ade80;
}

.address-bar-url {
  flex: 1;
  background: #f5f5f5;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

[data-theme='dark'] .address-bar-url {
  background: #2a2a2a;
}

.url-protocol {
  color: var(--brand-success);
  font-weight: 500;
}

[data-theme='dark'] .url-protocol {
  color: #4ade80;
}

.url-domain {
  color: #374151;
  font-weight: 500;
}

[data-theme='dark'] .url-domain {
  color: #d1d5db;
}

.mac-window-content {
  height: 310px; /* Adjusted for address bar */
  overflow: hidden;
}

/* Portal mockup styles - Sidebar Layout */
.portal-mockup {
  width: 100%;
  height: 100%;
  background: var(--brand-bg-primary);
  overflow: hidden;
  position: relative;
  display: flex;
  /* Full size - no scaling, fill the window */
  transform: scale(1);
  transform-origin: top left;
  border: none; /* Remove any borders */
}

[data-theme='dark'] .portal-mockup {
  background: var(--brand-bg-primary);
  border: none;
}

/* Left Sidebar Navigation */
.portal-sidebar {
  width: 48px;
  background: var(--brand-text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  flex-shrink: 0;
  border: none; /* Remove any borders */
}

[data-theme='dark'] .portal-sidebar {
  background: #0c1219;
  border: none; /* Remove border */
}

.sidebar-nav-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: #8896a4;
}

.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-bg-primary);
  transform: scale(1.1);
}

.sidebar-nav-item:active {
  transform: scale(0.95);
}

.sidebar-nav-item.active {
  background: color-mix(in srgb, var(--brand-secondary) 15%, transparent);
  color: var(--brand-secondary);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--brand-secondary);
  border-radius: 0 2px 2px 0;
}

.sidebar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: var(--brand-tertiary);
  color: white;
  font-size: 8px;
  font-weight: 600;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Content Area */
.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Header Bar */
.portal-header-bar {
  height: 42px;
  background: var(--brand-bg-primary);
  border-bottom: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
}

[data-theme='dark'] .portal-header-bar {
  background: var(--brand-text-primary);
  border-bottom-color: var(--brand-border);
}

.portal-logo {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 16px;
  width: auto;
}

[data-theme='dark'] .brand-logo {
  filter: brightness(0) invert(1);
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-notification {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.portal-notification:hover {
  background: #f3f4f6;
}

[data-theme='dark'] .portal-notification:hover {
  background: var(--brand-border);
}

.portal-notification svg {
  width: 16px;
  height: 16px;
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .portal-notification svg {
  color: var(--brand-text-secondary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: var(--brand-tertiary);
  color: white;
  font-size: 8px;
  font-weight: 600;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #278bcb 100%);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: -0.5px;
}

/* Portal Content Area */
.portal-content {
  padding: 12px;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--brand-bg-secondary);
}

[data-theme='dark'] .portal-content {
  background: var(--brand-bg-primary);
}

/* Portal Views Container - for auto-cycling animation */
.portal-views-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.portal-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.portal-view.active {
  opacity: 1;
  visibility: visible;
}

.portal-view .portal-content {
  height: 100%;
}

/* ============================================
   HOME VIEW - Greeting + Horizontal Cards
   ============================================ */
.home-content {
  gap: 6px;
}

/* Home Greeting Section - Subtle inline */
.home-greeting {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  padding: 2px 4px;
  margin-bottom: 2px;
}

.greeting-text {
  font-size: 9px;
  font-weight: 400;
  color: var(--brand-text-muted);
  letter-spacing: 0.1px;
}

[data-theme='dark'] .greeting-text {
  color: var(--brand-text-secondary);
}

.greeting-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-text-secondary);
  letter-spacing: 0;
}

[data-theme='dark'] .greeting-name {
  color: var(--brand-text-muted);
}

/* Home Cards Row - Horizontal layout */
.home-cards-row {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.home-card {
  flex: 1;
  min-width: 0;
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-text-primary);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme='dark'] .home-card {
  background: var(--brand-text-primary);
  border-color: var(--brand-border);
}

.home-card-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.home-card-icon {
  width: 12px;
  height: 12px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

[data-theme='dark'] .home-card-icon {
  color: var(--brand-text-link, var(--brand-primary-light));
}

.home-card-title {
  font-size: 9px;
  font-weight: 600;
  color: var(--brand-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme='dark'] .home-card-title {
  color: var(--brand-text-primary);
}

.home-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.home-card-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 8px;
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.home-card-link:hover {
  text-decoration: underline;
}

[data-theme='dark'] .home-card-link {
  color: var(--brand-text-link, var(--brand-primary-light));
}

/* Account Rows in Home Card */
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.account-name {
  font-size: 8px;
  color: var(--brand-text-secondary);
  font-weight: 500;
}

[data-theme='dark'] .account-name {
  color: var(--brand-text-muted);
}

.account-balance {
  font-size: 8px;
  font-weight: 600;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .account-balance {
  color: var(--brand-text-primary);
}

/* Summary Stats in Home Card */
.summary-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.summary-label {
  font-size: 8px;
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .summary-label {
  color: var(--brand-text-muted);
}

.summary-value {
  font-size: 8px;
  font-weight: 600;
  color: var(--brand-text-primary);
}

.summary-value.positive {
  color: var(--brand-success);
}

[data-theme='dark'] .summary-value {
  color: var(--brand-text-primary);
}

[data-theme='dark'] .summary-value.positive {
  color: var(--brand-success);
}

.summary-progress {
  height: 3px;
  background: var(--brand-text-primary);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

[data-theme='dark'] .summary-progress {
  background: var(--brand-border);
}

.summary-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), #278bcb);
  border-radius: 2px;
}

/* Quick Actions in Home Card */
.actions-content {
  flex-direction: column;
  gap: 3px;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  font-size: 8px;
  font-weight: 500;
  color: var(--brand-text-primary);
  background: var(--brand-text-primary);
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.action-link:hover {
  background: var(--brand-text-primary);
}

.action-link svg {
  width: 8px;
  height: 8px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

[data-theme='dark'] .action-link {
  background: var(--brand-border);
  color: var(--brand-text-primary);
}

[data-theme='dark'] .action-link:hover {
  background: var(--brand-text-secondary);
}

[data-theme='dark'] .action-link svg {
  color: var(--brand-text-link, var(--brand-primary-light));
}

/* Card Footer Sections - Shared styles */
.card-footer {
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--brand-text-primary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme='dark'] .card-footer {
  border-top-color: var(--brand-border);
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-footer-row.total-row {
  padding: 2px 0;
}

.footer-label {
  font-size: 8px;
  font-weight: 500;
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .footer-label {
  color: var(--brand-text-muted);
}

.footer-value {
  font-size: 9px;
  font-weight: 700;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .footer-value {
  color: var(--brand-text-primary);
}

.footer-value.highlight {
  color: var(--brand-success);
}

[data-theme='dark'] .footer-value.highlight {
  color: var(--brand-success);
}

/* Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-text-muted);
}

.status-badge.on-track .status-dot {
  background: var(--brand-success);
}

.status-badge.warning .status-dot {
  background: var(--brand-warning);
}

.status-badge.over-budget .status-dot {
  background: var(--brand-error);
}

.status-text {
  font-size: 7px;
  font-weight: 500;
  color: var(--brand-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

[data-theme='dark'] .status-text {
  color: var(--brand-text-muted);
}

/* Recent Activity in Actions Card */
.recent-activity {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.activity-amount {
  font-size: 9px;
  font-weight: 600;
  color: #dc2626;
}

[data-theme='dark'] .activity-amount {
  color: var(--brand-error);
}

.activity-details {
  font-size: 7px;
  color: var(--brand-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme='dark'] .activity-details {
  color: var(--brand-text-muted);
}

/* ============================================
   ACCOUNTS VIEW - Balance Cards + Table
   ============================================ */
.accounts-content {
  gap: 10px;
}

/* Balance Cards Row - 2x2 Grid */
.balance-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.balance-card-small {
  border-radius: 8px;
  padding: 10px;
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.balance-card-small::after {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.balance-card-small.blue-gradient {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #278bcb 100%);
}

.balance-card-small.green-gradient {
  background: linear-gradient(135deg, var(--brand-success) 0%, var(--brand-success) 100%);
}

.balance-card-small.purple-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, var(--brand-info) 100%);
}

.balance-card-small.teal-gradient {
  background: linear-gradient(135deg, var(--brand-secondary-hover) 0%, #22d3ee 100%);
}

.balance-card-label {
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.9;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.balance-card-amount {
  font-size: 14px;
  font-weight: 700;
}

/* Transactions Table */
.transactions-table {
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-text-primary);
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
}

[data-theme='dark'] .transactions-table {
  background: var(--brand-text-primary);
  border-color: var(--brand-border);
}

.table-header {
  display: flex;
  padding: 8px 10px;
  background: var(--brand-text-primary);
  border-bottom: 1px solid var(--brand-text-primary);
}

[data-theme='dark'] .table-header {
  background: var(--brand-border);
  border-bottom-color: var(--brand-text-secondary);
}

.table-header span {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brand-text-secondary);
  letter-spacing: 0.3px;
}

[data-theme='dark'] .table-header span {
  color: var(--brand-text-muted);
}

.table-row {
  display: flex;
  padding: 7px 10px;
  border-bottom: 1px solid var(--brand-text-primary);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:nth-child(even) {
  background: var(--brand-bg-secondary);
}

[data-theme='dark'] .table-row {
  border-bottom-color: var(--brand-border);
}

[data-theme='dark'] .table-row:nth-child(even) {
  background: #1a2432;
}

.table-row span {
  font-size: 9px;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .table-row span {
  color: var(--brand-text-primary);
}

.col-date {
  width: 50px;
  flex-shrink: 0;
}

.col-desc {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-amount {
  width: 60px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 600;
}

.col-amount.positive {
  color: var(--brand-success) !important;
}

.col-amount.negative {
  color: var(--brand-text-primary);
}

[data-theme='dark'] .col-amount.positive {
  color: var(--brand-success) !important;
}

[data-theme='dark'] .col-amount.negative {
  color: var(--brand-text-primary);
}

/* ============================================
   CLAIMS VIEW - Claims List with Status
   ============================================ */
.claims-content {
  gap: 8px;
}

.claims-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--brand-text-primary);
}

[data-theme='dark'] .claims-header {
  border-bottom-color: var(--brand-border);
}

.claims-icon {
  width: 14px;
  height: 14px;
  color: var(--brand-primary);
}

[data-theme='dark'] .claims-icon {
  color: var(--brand-text-link, var(--brand-primary-light));
}

.claims-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .claims-title {
  color: var(--brand-text-primary);
}

.claims-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.claim-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-text-primary);
  border-radius: 6px;
}

[data-theme='dark'] .claim-item {
  background: var(--brand-text-primary);
  border-color: var(--brand-border);
}

.claim-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.claim-desc {
  font-size: 10px;
  font-weight: 500;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .claim-desc {
  color: var(--brand-text-primary);
}

.claim-amount {
  font-size: 9px;
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .claim-amount {
  color: var(--brand-text-muted);
}

.claim-status {
  font-size: 8px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.claim-status.approved {
  background: #dcfce7;
  color: var(--brand-success);
}

[data-theme='dark'] .claim-status.approved {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.claim-status.pending,
.claim-status.processing {
  background: #fef3c7;
  color: #d97706;
}

[data-theme='dark'] .claim-status.pending,
[data-theme='dark'] .claim-status.processing {
  background: rgba(251, 191, 36, 0.15);
  color: var(--brand-warning);
}

/* ============================================
   TOOLS VIEW - Interactive Buttons with Detail Panel
   ============================================ */
.tools-content {
  gap: 8px;
  display: flex;
  flex-direction: column;
}

/* Tool Buttons Row */
.tools-buttons-row {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--brand-text-primary);
  border-radius: 10px;
}

[data-theme='dark'] .tools-buttons-row {
  background: var(--brand-text-primary);
}

.tool-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

[data-theme='dark'] .tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tool-btn.active {
  background: var(--brand-bg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .tool-btn.active {
  background: var(--brand-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tool-btn span {
  font-size: 8px;
  font-weight: 600;
  color: var(--brand-text-secondary);
  transition: color 0.2s ease;
}

.tool-btn.active span {
  color: var(--brand-bg-primary);
}

[data-theme='dark'] .tool-btn span {
  color: var(--brand-text-muted);
}

[data-theme='dark'] .tool-btn.active span {
  color: var(--brand-text-primary);
}

/* Tool Button Icons */
.tool-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.tool-btn-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.tool-btn:hover .tool-btn-icon {
  transform: scale(1.08);
}

.tool-btn.active .tool-btn-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Button icon colors */
.tool-btn-icon.tool-provider {
  background: linear-gradient(135deg, #0ea5e9, var(--brand-secondary));
}
.tool-btn-icon.tool-card-order {
  background: linear-gradient(135deg, var(--brand-info), #a855f7);
}
.tool-btn-icon.tool-tax {
  background: linear-gradient(135deg, var(--brand-success), var(--brand-success));
}
.tool-btn-icon.tool-help {
  background: linear-gradient(135deg, var(--brand-warning), #f97316);
}

/* Tool Details Panel */
.tool-details-panel {
  flex: 1;
  position: relative;
  background: var(--brand-bg-primary);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

[data-theme='dark'] .tool-details-panel {
  background: var(--brand-text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tool-detail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-detail.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tool-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--brand-text-primary);
}

[data-theme='dark'] .tool-detail-header {
  border-bottom-color: var(--brand-border);
}

.detail-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-bg-primary);
}

[data-theme='dark'] .detail-title {
  color: var(--brand-text-primary);
}

.detail-badge {
  font-size: 8px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0ea5e9, var(--brand-secondary));
  color: white;
}

.detail-badge.success {
  background: linear-gradient(135deg, var(--brand-success), var(--brand-success));
}

/* Detail List */
.tool-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--brand-bg-secondary);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.detail-row:hover {
  background: var(--brand-text-primary);
  transform: translateX(2px);
}

[data-theme='dark'] .detail-row {
  background: var(--brand-border);
}

[data-theme='dark'] .detail-row:hover {
  background: var(--brand-text-secondary);
}

.detail-icon {
  font-size: 12px;
  width: 20px;
  text-align: center;
}

.detail-text {
  flex: 1;
  font-size: 9px;
  font-weight: 500;
  color: var(--brand-border);
}

[data-theme='dark'] .detail-text {
  color: var(--brand-text-primary);
}

.detail-count {
  font-size: 9px;
  font-weight: 700;
  color: #0ea5e9;
}

.detail-arrow {
  font-size: 10px;
  color: var(--brand-text-muted);
  transition: transform 0.2s ease;
}

.detail-row:hover .detail-arrow {
  transform: translateX(2px);
  color: #0ea5e9;
}

.detail-value {
  font-size: 9px;
  font-weight: 600;
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .detail-value {
  color: var(--brand-text-muted);
}

.detail-status {
  font-size: 8px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
}

.detail-status.ready {
  background: color-mix(in srgb, var(--brand-success) 15%, transparent);
  color: var(--brand-success);
}

.detail-status.pending {
  background: color-mix(in srgb, var(--brand-warning) 15%, transparent);
  color: #d97706;
}

[data-theme='dark'] .detail-status.ready {
  background: color-mix(in srgb, var(--brand-success) 25%, transparent);
  color: var(--brand-success);
}

[data-theme='dark'] .detail-status.pending {
  background: color-mix(in srgb, var(--brand-warning) 25%, transparent);
  color: var(--brand-warning);
}

/* ============================================
   MESSAGES VIEW - Message List
   ============================================ */
.messages-content {
  gap: 8px;
}

.messages-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--brand-text-primary);
}

[data-theme='dark'] .messages-header {
  border-bottom-color: var(--brand-border);
}

.messages-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-text-primary);
}

[data-theme='dark'] .messages-title {
  color: var(--brand-text-primary);
}

.messages-badge {
  font-size: 9px;
  font-weight: 600;
  background: #dc2626;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-text-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.message-item:hover {
  background: var(--brand-bg-secondary);
}

[data-theme='dark'] .message-item {
  background: var(--brand-text-primary);
  border-color: var(--brand-border);
}

[data-theme='dark'] .message-item:hover {
  background: var(--brand-border);
}

.message-item.unread {
  border-left: 3px solid var(--brand-primary);
}

[data-theme='dark'] .message-item.unread {
  border-left-color: var(--brand-text-link, var(--brand-primary-light));
}

.message-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.message-body {
  flex: 1;
  min-width: 0;
}

.message-subject {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-text-primary);
  margin-bottom: 2px;
}

.message-item.unread .message-subject {
  color: var(--brand-primary);
}

[data-theme='dark'] .message-subject {
  color: var(--brand-text-primary);
}

[data-theme='dark'] .message-item.unread .message-subject {
  color: var(--brand-text-link, var(--brand-primary-light));
}

.message-preview {
  font-size: 9px;
  color: var(--brand-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme='dark'] .message-preview {
  color: var(--brand-text-muted);
}

.message-date {
  font-size: 8px;
  color: var(--brand-text-muted);
  flex-shrink: 0;
}

[data-theme='dark'] .message-date {
  color: var(--brand-text-secondary);
}

.scale-section {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #00284a 50%, #003d66 100%);
  background-size: 200% 200%;
  animation: scaleGradientShift 15s ease-in-out infinite;
  color: white;
  padding: 4rem 2rem;
  padding-top: 7rem;
  padding-bottom: 4rem;
  text-align: center;
  position: relative;
  overflow: visible;
  z-index: 1;
}

/* Diagonal curved wave divider SVG container */
.scale-section-divider {
  position: absolute;
  top: -119px;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 3;
  pointer-events: none;
}

.scale-section-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Light theme divider fill */
.scale-section-divider .divider-fill {
  fill: url(#dividerGradientLight);
}

/* Dark theme divider fill */
[data-theme='dark'] .scale-section-divider .divider-fill {
  fill: url(#dividerGradientDark);
}

@keyframes scaleGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ========== SCALE SECTION WAVE LINES SVG ========== */
/* Performance-optimized wave animations */
.scale-wave-lines {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 300px;
  z-index: 0;
  pointer-events: none;
  transform-origin: center bottom;
  /* GPU acceleration */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Disabled undulation animation for performance - path morphing provides movement */
/* SVG wave morphing via SMIL is GPU-accelerated and more performant */

/* ===== WAVE LINE BASE STYLES ===== */
.scale-wave-lines .wave-line {
  will-change: stroke-dashoffset, opacity;
}

/* ===== PRIMARY SOLID LINE - Flow animation only ===== */
.scale-wave-lines .wave-line-solid {
  stroke-dasharray: 40, 60;
  opacity: 0.85;
  animation: waveFlowSolid 8s linear infinite;
}

@keyframes waveFlowSolid {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -200;
  }
}

/* ===== DOTTED TEAL LINE - Flow animation only ===== */
.scale-wave-lines .wave-line-dotted {
  stroke-dasharray: 12, 20;
  opacity: 0.8;
  animation: waveFlowDotted 10s linear infinite;
}

@keyframes waveFlowDotted {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 128;
  }
}

/* ===== SECONDARY SOLID LINE - Slow flow ===== */
.scale-wave-lines .wave-line-solid-secondary {
  stroke-dasharray: 30, 50;
  opacity: 0.5;
  animation: waveFlowSecondary 14s linear infinite;
}

@keyframes waveFlowSecondary {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -160;
  }
}

/* Dark theme adjustments for wave lines */
[data-theme='dark'] .scale-wave-lines .wave-line-solid {
  stroke: rgba(255, 255, 255, 0.12);
}

[data-theme='dark'] .scale-wave-lines .wave-line-dotted {
  stroke: rgba(0, 229, 204, 0.25);
}

[data-theme='dark'] .scale-wave-lines .wave-line-solid-secondary {
  stroke: rgba(255, 255, 255, 0.08);
}

.scale-content {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.scale-content h2 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: white;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.scale-content h2.visible {
  opacity: 1;
  transform: translateY(0px);
}

.scale-content h2.gradient-text {
  background: linear-gradient(
    90deg,
    #f1fafe 0%,
    #bee7fa 20%,
    #7dd3fc 50%,
    #bee7fa 80%,
    #f1fafe 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientTextShimmer 3s ease-in-out infinite;
}

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

.scale-content p {
  font-size: 1.05rem;
  color: #d1d6d8;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.4, 0, 0.2, 1) 200ms,
    transform 800ms cubic-bezier(0.4, 0, 0.2, 1) 200ms;
  will-change: opacity, transform;
}

.scale-content p.visible {
  opacity: 1;
  transform: translateY(0px);
}

.scale-btn {
  background: linear-gradient(135deg, #00c7b1 0%, #4da3cf 100%);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.4, 0, 0.2, 1) 400ms,
    transform 800ms cubic-bezier(0.4, 0, 0.2, 1) 400ms,
    box-shadow 0.3s ease;
  will-change: opacity, transform;
  text-decoration: none;
  box-shadow:
    0 4px 16px rgba(0, 199, 177, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.scale-btn.visible {
  opacity: 1;
  transform: translateY(0px);
}

.scale-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 199, 177, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.integration-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.integration-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 200px;
  min-width: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
  will-change: opacity, transform;
  box-sizing: border-box;
  overflow: visible;
}

/* Icon badge - appears on hover */
.integration-card::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-secondary) 40%, transparent);
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.integration-card:hover::before {
  opacity: 1;
  transform: scale(1);
}

[data-theme='dark'] .integration-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .integration-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .integration-card::before {
  background: linear-gradient(
    135deg,
    var(--brand-secondary-light) 0%,
    var(--brand-primary-light) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 229, 204, 0.5);
}

.integration-card.visible {
  opacity: 1;
  transform: translateY(0px);
}

.integration-card:nth-child(1).visible {
  transition-delay: 200ms;
}

.integration-card:nth-child(2).visible {
  transition-delay: 400ms;
}

.integration-card:nth-child(3).visible {
  transition-delay: 600ms;
}

.integration-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s ease 0ms !important,
    box-shadow 0.3s ease 0ms !important;
  transition-delay: 0ms !important;
}

.integration-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    -webkit-text-fill-color 0.3s ease;
}

.integration-card:hover h3 {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme='dark'] .integration-card:hover h3 {
  background: linear-gradient(135deg, var(--brand-secondary-light), var(--brand-accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.integration-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  margin-bottom: auto;
  flex-grow: 1;
  font-weight: 500 !important;
  opacity: 0;
  transform: translateY(0);
  transition:
    opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease;
}

.integration-card.visible p {
  opacity: 1;
}

.integration-card:nth-child(1).visible p {
  transition-delay: 400ms;
}

.integration-card:nth-child(2).visible p {
  transition-delay: 600ms;
}

.integration-card:nth-child(3).visible p {
  transition-delay: 800ms;
}

.integration-card-link {
  position: relative;
  color: var(--brand-tertiary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 1rem;
  opacity: 0;
  transition:
    opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease;
  overflow: hidden;
}

/* Animated underline on hover */
.integration-card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-tertiary), #ff6b7a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.integration-card:hover .integration-card-link::after {
  transform: scaleX(1);
}

[data-theme='dark'] .integration-card-link {
  color: var(--link-color, #4da3cf);
}

[data-theme='dark'] .integration-card-link::after {
  background: linear-gradient(90deg, var(--brand-primary-light), var(--brand-secondary-light));
}

.integration-card.visible .integration-card-link {
  opacity: 1;
}

.integration-card:nth-child(1).visible .integration-card-link {
  transition-delay: 800ms;
}

.integration-card:nth-child(2).visible .integration-card-link {
  transition-delay: 1000ms;
}

.integration-card:nth-child(3).visible .integration-card-link {
  transition-delay: 1200ms;
}

.integration-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ===== INTEGRATION CARD ENHANCED HIGHLIGHTS ===== */

/* Base state - prepare for hover */
.integration-card {
  position: relative;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
  will-change: transform, box-shadow;
}

/* Glow border effect on hover */
.integration-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand-secondary) 40%, transparent),
    color-mix(in srgb, var(--brand-primary-light) 40%, transparent),
    color-mix(in srgb, var(--brand-secondary) 40%, transparent)
  );
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}

/* Highlight state on hover */
.integration-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.3),
    0 0 30px -5px color-mix(in srgb, var(--brand-secondary) 25%, transparent);
  border-color: color-mix(in srgb, var(--brand-secondary) 50%, transparent);
  background-color: rgba(255, 255, 255, 0.08);
}

.integration-card:hover::before {
  opacity: 1;
  animation: borderGlowPulse 2s ease-in-out infinite;
}

@keyframes borderGlowPulse {
  0%,
  100% {
    background-position: 0% 50%;
    filter: blur(8px);
  }
  50% {
    background-position: 100% 50%;
    filter: blur(12px);
  }
}

/* Elevate card above siblings on hover */
.integration-card:hover {
  z-index: 10;
}

/* Dim other cards when one is hovered */
.integration-cards:hover .integration-card:not(:hover) {
  opacity: 0.7;
  transform: scale(0.98);
}

/* Highlight animation for card content */
.integration-card:hover h3 {
  color: #00d4aa;
  transition: color 0.3s ease;
}

.integration-card:hover .integration-card-link {
  color: #00d4aa;
}

/* Dark theme adjustments */
[data-theme='dark'] .integration-card:hover {
  background-color: color-mix(in srgb, var(--brand-secondary) 8%, transparent);
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.5),
    0 0 40px -5px color-mix(in srgb, var(--brand-secondary) 30%, transparent);
}

/* ===== END INTEGRATION CARD ENHANCED HIGHLIGHTS ===== */

.features-section {
  background: radial-gradient(97.3% 97.3% at 50% 2.7%, var(--brand-bg-primary) 0%, #f1fafe 100%);
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

/* Subtle sun-like radiance overlay - off-center toward bottom-left */
.features-section::before {
  content: '';
  position: absolute;
  left: -10%;
  bottom: -20%;
  width: 70%;
  height: 80%;
  background: radial-gradient(
    ellipse 80% 70% at 20% 90%,
    rgba(0, 200, 180, 0.08) 0%,
    rgba(0, 180, 200, 0.04) 30%,
    rgba(0, 160, 200, 0.02) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: sunRadiance 8s ease-in-out infinite;
}

@keyframes sunRadiance {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

[data-theme='dark'] .features-section {
  background: radial-gradient(
    97.3% 97.3% at 50% 2.7%,
    var(--brand-bg-primary) 0%,
    var(--brand-primary-dark) 100%
  );
}

[data-theme='dark'] .features-section::before {
  background: radial-gradient(
    ellipse 80% 70% at 20% 90%,
    rgba(0, 220, 200, 0.06) 0%,
    rgba(0, 180, 200, 0.03) 30%,
    rgba(0, 160, 200, 0.015) 50%,
    transparent 70%
  );
}

/* Features section decorative arc - enhanced inline SVG */
.features-arc-decoration {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 350px;
  height: 350px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  will-change: transform;
}

.features-arc-decoration svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Staggered ray pulse animations - 2x faster for more dynamic effect */
.arc-ray {
  transform-origin: 0 350px;
}

/* Faster animations (halved durations) with gradient-enhanced pulses */
.arc-ray-1 {
  animation:
    rayPulseGlow1 3s ease-in-out infinite,
    rayShimmer 4s ease-in-out infinite;
}
.arc-ray-2 {
  animation:
    rayPulseGlow2 3.5s ease-in-out infinite,
    rayShimmer 5s ease-in-out infinite;
  animation-delay: 0.25s, 0.5s;
}
.arc-ray-3 {
  animation:
    rayPulseGlow1 2.75s ease-in-out infinite,
    rayShimmer 3.5s ease-in-out infinite;
  animation-delay: 0.5s, 0.2s;
}
.arc-ray-4 {
  animation:
    rayPulseGlow3 4s ease-in-out infinite,
    rayShimmer 4.5s ease-in-out infinite;
  animation-delay: 0.15s, 0.8s;
}
.arc-ray-5 {
  animation:
    rayPulseGlow2 3.25s ease-in-out infinite,
    rayShimmer 3.8s ease-in-out infinite;
  animation-delay: 0.6s, 0.3s;
}
.arc-ray-6 {
  animation:
    rayPulseGlow1 3.75s ease-in-out infinite,
    rayShimmer 5.2s ease-in-out infinite;
  animation-delay: 0.4s, 0.6s;
}
.arc-ray-7 {
  animation:
    rayPulseGlow3 2.5s ease-in-out infinite,
    rayShimmer 3.2s ease-in-out infinite;
  animation-delay: 0.75s, 0.1s;
}
.arc-ray-8 {
  animation:
    rayPulseGlow2 3s ease-in-out infinite,
    rayShimmer 4.2s ease-in-out infinite;
  animation-delay: 0.1s, 0.4s;
}

/* Enhanced pulse keyframes with opacity AND stroke-width variation */
@keyframes rayPulseGlow1 {
  0%,
  100% {
    opacity: 0.25;
    stroke-width: 1.5px;
    filter: none;
  }
  35% {
    opacity: 0.45;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 3px rgba(0, 200, 180, 0.4));
  }
  65% {
    opacity: 0.32;
    stroke-width: 1.8px;
    filter: drop-shadow(0 0 2px rgba(0, 200, 180, 0.2));
  }
}

@keyframes rayPulseGlow2 {
  0%,
  100% {
    opacity: 0.28;
    stroke-width: 2px;
    filter: none;
  }
  40% {
    opacity: 0.2;
    stroke-width: 1.5px;
    filter: none;
  }
  70% {
    opacity: 0.48;
    stroke-width: 2.8px;
    filter: drop-shadow(0 0 4px rgba(0, 180, 200, 0.5));
  }
}

@keyframes rayPulseGlow3 {
  0%,
  100% {
    opacity: 0.3;
    stroke-width: 1.8px;
    filter: none;
  }
  30% {
    opacity: 0.5;
    stroke-width: 2.6px;
    filter: drop-shadow(0 0 5px rgba(0, 220, 200, 0.45));
  }
  60% {
    opacity: 0.22;
    stroke-width: 1.4px;
    filter: none;
  }
}

/* Subtle shimmer effect - slight gradient position shift */
@keyframes rayShimmer {
  0%,
  100% {
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dashoffset: -15px;
  }
}

/* Animated edge stroke glow effect */
.arc-edge-stroke {
  animation: edgeGlow 10s ease-in-out infinite;
}

@keyframes edgeGlow {
  0%,
  100% {
    stroke-width: 3.5px;
    opacity: 0.9;
  }
  25% {
    stroke-width: 4px;
    opacity: 1;
  }
  50% {
    stroke-width: 3px;
    opacity: 0.85;
  }
  75% {
    stroke-width: 4.5px;
    opacity: 0.95;
  }
}

/* Responsive sizing */
@media (max-width: 1024px) {
  .features-arc-decoration {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 768px) {
  .features-arc-decoration {
    width: 200px;
    height: 200px;
    opacity: 0.75;
  }
}

@media (max-width: 480px) {
  .features-arc-decoration {
    width: 150px;
    height: 150px;
    opacity: 0.6;
  }
}

/* Extended rays from arc toward feature cards */
.arc-extended-rays {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.arc-extended-rays svg {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
}

/* Staggered pulsing for extended rays - 2x faster */
.extended-ray {
  /* Animations handled by GPU automatically */
}

.ext-ray-1 {
  animation: extRayPulseGlow1 3.5s ease-in-out infinite;
}
.ext-ray-2 {
  animation: extRayPulseGlow2 4s ease-in-out infinite;
  animation-delay: 0.5s;
}
.ext-ray-3 {
  animation: extRayPulseGlow1 3s ease-in-out infinite;
  animation-delay: 0.25s;
}
.ext-ray-4 {
  animation: extRayPulseGlow2 4.5s ease-in-out infinite;
  animation-delay: 1s;
}
.ext-ray-5 {
  animation: extRayPulseGlow2 5s ease-in-out infinite;
  animation-delay: 0.75s;
}
.ext-ray-6 {
  animation: extRayPulseGlow1 2.5s ease-in-out infinite;
  animation-delay: 0.4s;
}

@keyframes extRayPulseGlow1 {
  0%,
  100% {
    opacity: 0.28;
    stroke-width: 2px;
    filter: none;
  }
  50% {
    opacity: 0.5;
    stroke-width: 3px;
    filter: drop-shadow(0 0 4px rgba(0, 200, 180, 0.35));
  }
}

@keyframes extRayPulseGlow2 {
  0%,
  100% {
    opacity: 0.2;
    stroke-width: 1.5px;
    filter: none;
  }
  50% {
    opacity: 0.38;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 3px rgba(0, 180, 200, 0.3));
  }
}

/* Hide extended rays on smaller screens */
@media (max-width: 1024px) {
  .arc-extended-rays {
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  .arc-extended-rays {
    display: none;
  }
}

/* Accessibility - Reduced Motion for Arc Ray Animations */
@media (prefers-reduced-motion: reduce) {
  .features-section::before {
    animation: none;
    opacity: 0.8;
  }

  .arc-ray,
  .arc-ray-1,
  .arc-ray-2,
  .arc-ray-3,
  .arc-ray-4,
  .arc-ray-5,
  .arc-ray-6,
  .arc-ray-7,
  .arc-ray-8 {
    animation: none;
  }

  .extended-ray,
  .ext-ray-1,
  .ext-ray-2,
  .ext-ray-3,
  .ext-ray-4,
  .ext-ray-5,
  .ext-ray-6 {
    animation: none;
  }

  .arc-edge-stroke {
    animation: none;
  }
}

.features-content {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.features-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.features-header h2 .highlight {
  background: linear-gradient(
    89.53deg,
    var(--brand-secondary) -0.44%,
    var(--brand-primary-light) 108.97%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.features-header {
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  /* Prevent beam overflow from causing horizontal scroll */
  overflow: visible;
}

.features-header.visible {
  opacity: 1;
  transform: translateY(0px);
}

.features-header p {
  font-size: 1rem;
  color: var(--brand-text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: color 0.3s ease;
}

[data-theme='dark'] .features-header p {
  color: var(--brand-text-primary);
}

/* ============================================
   X-RAY REVEAL ANIMATION
   ============================================ */

/* Individual word styling for X-ray effect */
.xray-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  filter: blur(4px);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Revealed state for regular words */
.xray-word.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Keyword emphasis - flexibility & trust */
.xray-keyword {
  position: relative;
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keyword revealed - dramatic entrance */
.xray-keyword.revealed {
  opacity: 1;
  transform: translateY(0) scale(1.05);
  filter: blur(0);
  animation: keywordPulse 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Glow effect behind keywords */
.xray-keyword::before {
  content: '';
  position: absolute;
  inset: -4px -8px;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--brand-secondary) 30%, transparent) 0%,
    color-mix(in srgb, var(--brand-primary-light) 20%, transparent) 40%,
    transparent 70%
  );
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.xray-keyword.revealed::before {
  opacity: 1;
  transform: scale(1);
  animation: glowPulse 2s ease-in-out infinite;
}

[data-theme='dark'] .xray-keyword::before {
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--brand-secondary) 40%, transparent) 0%,
    color-mix(in srgb, var(--brand-primary-light) 30%, transparent) 40%,
    transparent 70%
  );
}

/* Keyword pulse animation */
@keyframes keywordPulse {
  0% {
    transform: translateY(0) scale(1.05);
  }
  30% {
    transform: translateY(-2px) scale(1.08);
  }
  60% {
    transform: translateY(0) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* Glow pulse animation */
@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Paragraph X-ray effect */
.xray-paragraph {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.xray-paragraph.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion - disable animations */
@media (prefers-reduced-motion: reduce) {
  .xray-word,
  .xray-keyword,
  .xray-paragraph {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .xray-keyword::before {
    display: none;
  }

  .xray-keyword.revealed {
    animation: none;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ===== MODERN FEATURE CARD DESIGN ===== */
.feature-card {
  min-width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;

  /* Modern shadow with depth */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.05);

  /* Smooth transitions */
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;

  /* Scroll animation initial state */
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}

/* Glassmorphism subtle effect */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Hover state - elevated with glow */
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 16px 48px color-mix(in srgb, var(--brand-secondary) 8%, transparent);
  border-color: color-mix(in srgb, var(--brand-secondary) 30%, transparent);
}

.feature-card:hover::before {
  opacity: 1;
}

/* Visible state for scroll animation */
.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(1).visible {
  transition-delay: 100ms;
}
.feature-card:nth-child(2).visible {
  transition-delay: 200ms;
}
.feature-card:nth-child(3).visible {
  transition-delay: 300ms;
}
.feature-card:nth-child(4).visible {
  transition-delay: 400ms;
}

/* Dark theme adjustments */
[data-theme='dark'] .feature-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme='dark'] .feature-card:hover {
  border-color: color-mix(in srgb, var(--brand-secondary) 40%, transparent);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 40px color-mix(in srgb, var(--brand-secondary) 10%, transparent);
}

[data-theme='dark'] .feature-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
}

/* ===== FEATURE CARD HEADER ROW ===== */
.feature-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  width: 100%;
}

/* ===== FEATURE CARD ICON ===== */
.feature-card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;

  /* Icon container background */
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand-secondary) 8%, transparent) 0%,
    color-mix(in srgb, var(--brand-primary-light) 8%, transparent) 100%
  );
  border-radius: 12px;

  transition:
    transform 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.feature-card:hover .feature-card-icon {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand-secondary) 15%, transparent) 0%,
    color-mix(in srgb, var(--brand-primary-light) 12%, transparent) 100%
  );
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand-secondary) 20%, transparent);
}

/* SVG icon styling */
.feature-icon-svg {
  width: 36px;
  height: 36px;
  overflow: visible;
}

/* ===== FEATURE CARD TYPOGRAPHY ===== */
.feature-card-title {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.3s ease;
  flex: 1;
}

.feature-card:hover .feature-card-title {
  color: var(--brand-secondary);
}

[data-theme='dark'] .feature-card-title {
  color: var(--brand-text-primary);
}

[data-theme='dark'] .feature-card:hover .feature-card-title {
  color: #00d4b8;
}

.feature-card-desc {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  padding-left: 68px; /* Align with title (52px icon + 16px gap) */
  transition: color 0.3s ease;
}

[data-theme='dark'] .feature-card-desc {
  color: var(--brand-text-muted);
}

/* Mobile: stack icon and title vertically */
@media (max-width: 480px) {
  .feature-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .feature-card-desc {
    padding-left: 0;
  }
}

/* ===== FEATURE CARD ICON HOVER ANIMATIONS ===== */

/* Stats card: Coin drop animation */
.dropping-coin {
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.1s ease,
    opacity 0.1s ease;
}

.feature-card[data-card='hsa']:hover .dropping-coin {
  animation: coinDrop 1.2s ease-in-out infinite;
}

@keyframes coinDrop {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  20% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(11px);
    opacity: 1;
  }
  55% {
    transform: translateY(11px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Stats card: Subtle wiggle on hover */
.feature-card[data-card='hsa']:hover .feature-icon-svg ellipse:first-of-type {
  animation: piggyWiggle 0.6s ease-in-out;
}

@keyframes piggyWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-1deg) translateX(-0.5px);
  }
  75% {
    transform: rotate(1deg) translateX(0.5px);
  }
}

/* Claims: Checkmark draw effect with green color */
.checkmark {
  stroke-dasharray: 25;
  stroke-dashoffset: 25;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .checkmark {
  stroke-dashoffset: 0;
}

.feature-card:hover .check-1 {
  transition-delay: 0.15s;
}

.feature-card:hover .check-2 {
  transition-delay: 0.35s;
}

/* Claims: Document subtle lift */
.feature-card[data-card='claims']:hover .feature-icon-svg rect:first-of-type {
  filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--brand-primary-light) 30%, transparent));
}

/* Eligibility: Gold lightning glow */
.lightning-bolt {
  transition:
    filter 0.3s ease,
    transform 0.3s ease;
  transform-origin: center center;
}

.feature-card[data-card='eligibility']:hover .lightning-bolt {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.4));
  animation: lightningPulse 0.8s ease-in-out infinite;
}

@keyframes lightningPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.6));
  }
}

/* Eligibility: Verification ring spin */
.verification-ring {
  transition: stroke-dasharray 0.3s ease;
  transform-origin: 24px 24px;
}

.feature-card[data-card='eligibility']:hover .verification-ring {
  stroke-dasharray: 10 5;
  animation: ringRotate 6s linear infinite;
}

@keyframes ringRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Secure: Shield glow on hover */
.shield-shape {
  transition: filter 0.3s ease;
}

.feature-card[data-card='secure']:hover .shield-shape {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand-primary-light) 50%, transparent));
}

/* Secure: Lock shackle subtle animation */
.lock-shackle {
  transition: transform 0.3s ease;
  transform-origin: center bottom;
}

.feature-card[data-card='secure']:hover .lock-shackle {
  animation: lockSecure 1.5s ease-in-out infinite;
}

@keyframes lockSecure {
  0%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-1px);
  }
  60% {
    transform: translateY(0);
  }
}

.trust-section {
  background: radial-gradient(
    73.36% 122.18% at 91.36% 146.23%,
    var(--brand-primary) 0%,
    #00284a 100%
  );
  color: white;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Neural Network Background Container */
.neural-network-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  overflow: hidden;
  cursor: crosshair;
}

.neural-network-svg {
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: all;
}

/* Ensure all SVG child elements don't block clicks */
.neural-network-svg * {
  pointer-events: none;
}

/* But allow the SVG itself to receive clicks */
.neural-network-svg .neural-dots,
.neural-network-svg .neural-connections {
  pointer-events: none;
}

/* Neural Network Dots */
.neural-dot {
  fill: rgba(0, 220, 200, 0.9);
  filter: url(#dotGlow);
  transition:
    fill 0.3s ease,
    r 0.3s ease;
}

.neural-dot-ring {
  fill: none;
  stroke: rgba(0, 200, 220, 0.6);
  stroke-width: 1.5px;
  transition:
    stroke 0.3s ease,
    stroke-width 0.3s ease;
}

/* Neural dot group - base state */
.neural-dot-group {
  /* GPU-accelerated container */
}

/* Neural pulse animation - subtle glow only, no scaling */
.neural-dot-pulse {
  /* No transform - dots stay stationary */
}

/* Dot ring subtle glow during wave - no size change */
.neural-dot-pulse .neural-dot-ring {
  animation: ringGlow 0.6s ease-out forwards;
}

@keyframes ringGlow {
  0% {
    stroke: rgba(0, 200, 220, 0.5);
    filter: none;
  }
  40% {
    stroke: rgba(0, 255, 230, 0.8);
    filter: drop-shadow(0 0 3px rgba(0, 255, 230, 0.6));
  }
  100% {
    stroke: rgba(0, 200, 220, 0.5);
    filter: none;
  }
}

/* Dot subtle brightness increase during pulse */
.neural-dot-pulse .neural-dot {
  animation: dotGlow 0.6s ease-out forwards;
}

@keyframes dotGlow {
  0% {
    fill: rgba(0, 220, 200, 0.9);
    filter: none;
  }
  40% {
    fill: rgba(0, 255, 240, 1);
    filter: drop-shadow(0 0 4px rgba(0, 255, 230, 0.7));
  }
  100% {
    fill: rgba(0, 220, 200, 0.9);
    filter: none;
  }
}

/* Connection lines - ensure full rendering */
.neural-connection {
  stroke: rgba(0, 200, 220, 0.35);
  stroke-width: 1px;
  fill: none;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

/* Connection flow animation - traveling gradient effect using dash */
.neural-connection-flow {
  stroke: rgba(0, 255, 240, 0.95);
  stroke-width: 2px;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: var(--flow-segment, 20px) var(--total-travel, 150px);
  stroke-dashoffset: var(--flow-segment, 20px);
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(0, 255, 240, 0.6));
  animation: connectionFlow var(--flow-duration, 0.6s) linear forwards;
}

@keyframes connectionFlow {
  0% {
    /* Segment starts just before line (hidden) */
    stroke-dashoffset: var(--flow-segment, 20px);
    opacity: 0.9;
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 0.85;
  }
  100% {
    /* Segment travels past the end of line: -(lineLength) positions it beyond endpoint */
    stroke-dashoffset: calc(var(--line-length, 100px) * -1);
    opacity: 0;
  }
}

/* Base line glow when flow passes - more visible */
.neural-connection-active {
  stroke: rgba(0, 230, 220, 0.6);
  filter: drop-shadow(0 0 4px rgba(0, 255, 230, 0.5));
  transition:
    stroke 0.2s ease,
    filter 0.2s ease;
}

/* New dot fade-in animation - no scaling, just opacity */
.neural-dot-new {
  animation: dotFadeIn 0.4s ease-out forwards;
}

@keyframes dotFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* New connection line animation - draw from center outward */
.neural-connection-new {
  stroke-dasharray: var(--line-length, 100);
  stroke-dashoffset: var(--line-length, 100);
  animation: connectionDraw 0.5s ease-out forwards;
}

@keyframes connectionDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Dot fade out animation */
.neural-dot-fadeout {
  animation: dotFadeOut 0.5s ease-out forwards;
}

@keyframes dotFadeOut {
  to {
    transform: scale(0.5);
    opacity: 0;
  }
}

/* Connection fade out */
.neural-connection-fadeout {
  animation: connectionFadeOut 0.4s ease-out forwards;
}

@keyframes connectionFadeOut {
  to {
    opacity: 0;
    stroke-width: 0;
  }
}

/* Dot hover effect - subtle */
.neural-dot-group:hover .neural-dot {
  fill: rgba(0, 255, 220, 1);
}

.neural-dot-group:hover .neural-dot-ring {
  stroke: rgba(0, 255, 220, 0.8);
  stroke-width: 2px;
}

.trust-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.trust-text {
  text-align: center;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.trust-text.visible {
  opacity: 1;
  transform: translateY(0px);
}

.trust-text h2 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: white;
}

.trust-text h2 .gradient-text {
  background: linear-gradient(
    90deg,
    #f1fafe 0%,
    #bee7fa 25%,
    #7dd3fc 50%,
    #bee7fa 75%,
    #f1fafe 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientTextShimmer 4s ease-in-out infinite;
  animation-delay: 1.5s;
}

.trust-text p {
  font-family: Inter, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0%;
  text-align: center;
  color: #d1d6d8;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.trust-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin: 3rem auto;
  max-width: 1000px;
}

.stat {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.stat.visible {
  opacity: 1;
  transform: translateY(0px);
}

.stat:nth-child(1).visible {
  transition-delay: 200ms;
}

.stat:nth-child(2).visible {
  transition-delay: 400ms;
}

.stat:nth-child(3).visible {
  transition-delay: 600ms;
}

.stat:nth-child(4).visible {
  transition-delay: 800ms;
}

.stat-number {
  font-family: Inter, system-ui, sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0%;
  text-align: center;
  color: #a0dcf8;
  margin-bottom: 0.5rem;
  /* Prevent jitter during counter animation */
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  min-width: 140px;
  display: inline-block;
}

.stat-label {
  font-size: 0.95rem;
  color: #d1d6d8;
  font-weight: 600;
}

.trust-cta {
  background-color: var(--brand-tertiary-dark);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
  margin-top: 1rem;
}

.trust-cta:hover {
  background-color: var(--brand-tertiary-hover);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1024px) {
  .contact-form__checkboxes {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  /* Adjusted gradient for tablets - enhanced */
  .hero::before {
    background:
      radial-gradient(
        ellipse 55% 45% at 25% 30%,
        color-mix(in srgb, var(--brand-secondary) 25%, transparent) 0%,
        transparent 55%
      ),
      radial-gradient(
        ellipse 50% 55% at 75% 70%,
        color-mix(in srgb, var(--brand-primary-light) 20%, transparent) 0%,
        transparent 55%
      );
  }

  .hero::after {
    right: -20%;
    width: 80%;
  }

  [data-theme='dark'] .hero::before {
    background:
      radial-gradient(
        ellipse 55% 45% at 25% 30%,
        color-mix(in srgb, var(--brand-secondary) 35%, transparent) 0%,
        transparent 55%
      ),
      radial-gradient(
        ellipse 50% 55% at 75% 70%,
        color-mix(in srgb, var(--brand-primary-light) 28%, transparent) 0%,
        transparent 55%
      );
  }

  .hero-content {
    flex-direction: column;
    gap: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-left {
    width: 100%;
  }

  .hero-right {
    width: 100%;
    max-width: 100%;
  }

  /* Tablet: enhanced icon visibility (balanced for performance) */
  .portal-bg-icons .portal-icon-scale {
    transform: scale(0.98) translateZ(0);
  }

  .portal-bg-icons .portal-icon-wrapper.active .portal-icon-scale {
    transform: scale(1.45) translateZ(0);
  }

  .portal-bg-icons .portal-icon {
    filter: url(#iconShadow) drop-shadow(0 0 14px rgba(0, 200, 190, 0.55));
  }

  .portal-bg-icons .portal-icon-wrapper.active .portal-icon {
    filter: drop-shadow(0 0 16px rgba(0, 220, 200, 0.8));
  }

  .hero-text h1 {
    padding-top: 2.5rem;
    font-size: 2.5rem;
    min-height: 7rem; /* Tablet: stable height for two lines */
  }

  .typing-wrapper {
    height: 9rem;
    min-height: 9rem;
    overflow: visible;
  }

  .typing-line-one,
  .typing-line-two {
    height: 3.5rem;
    min-height: 3.5rem;
    line-height: 1.35;
    overflow: visible;
    padding-bottom: 0.2rem;
  }

  .hero-image {
    padding-left: 0;
  }

  .hero-image img {
    width: 100%;
  }

  .mac-window {
    max-width: 480px;
    margin-left: 15px; /* Reduced offset on tablet */
    margin-top: 12px;
  }

  .mac-window-content {
    height: 260px; /* Adjusted for address bar */
  }

  .browser-address-bar {
    height: 24px;
    padding: 0 8px;
  }

  .address-bar-url {
    font-size: 10px;
    padding: 3px 8px;
  }

  .portal-mockup {
    height: 260px;
    max-width: 100%;
    transform: scale(1);
    transform-origin: top left;
  }

  /* Sidebar responsive adjustments */
  .portal-sidebar {
    width: 40px;
    padding: 8px 0;
  }

  .sidebar-nav-item {
    width: 30px;
    height: 30px;
  }

  .sidebar-nav-item svg {
    width: 14px;
    height: 14px;
  }

  .portal-content {
    padding: 12px;
    gap: 10px;
  }

  .portal-greeting {
    font-size: 14px;
  }

  .portal-balance-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .portal-balance-card {
    min-height: 60px;
    padding: 10px;
  }

  .portal-balance-label {
    font-size: 8px;
  }

  .portal-balance-amount {
    font-size: 14px;
  }

  .portal-header-bar {
    height: 36px;
    padding: 0 10px;
  }

  .brand-logo {
    height: 12px;
  }

  .portal-avatar {
    width: 22px;
    height: 22px;
    font-size: 8px;
  }

  .quick-action-buttons {
    gap: 4px;
  }

  .quick-action-btn {
    padding: 6px 4px;
    font-size: 8px;
  }

  .quick-action-btn svg {
    width: 10px;
    height: 10px;
  }

  /* Account cards responsive */
  .portal-account-card-large {
    padding: 12px;
  }

  .portal-account-card-balance {
    font-size: 18px;
  }

  .portal-account-card-title {
    font-size: 9px;
  }

  .portal-account-card-label {
    font-size: 8px;
  }

  .integration-cards {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    gap: 1.5rem;
    max-width: 100%;
  }

  .integration-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 200px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .feature-card {
    min-width: auto;
  }

  .neural-network-container {
    width: 50%;
  }

  .neural-network-svg {
    opacity: 0.12;
  }

  .trust-stats {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .stat {
    flex: 0 0 calc(50% - 1rem);
  }

  nav {
    gap: 1.5rem;
  }
}

@media (max-width: 930px) {
  .mobile-menu-close {
    display: flex;
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: 1px solid var(--brand-tertiary);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 101;
    padding: 0;
  }

  nav .mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 102;
  }

  .burger-menu {
    display: none !important;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--brand-bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    justify-content: flex-start;
  }

  nav.active {
    transform: translateY(0);
  }

  nav .mobile-menu-logo {
    display: flex;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--brand-border);
    position: relative;
    order: -1;
  }

  nav .mobile-menu-logo img {
    width: 85px;
    height: 25px;
    object-fit: contain;
  }

  nav .mobile-menu-logo .logo-dark {
    display: none;
    width: 72.7px;
    height: 21.4px;
    object-fit: contain;
  }

  [data-theme='dark'] nav .mobile-menu-logo .logo-light {
    display: none;
  }

  [data-theme='dark'] nav .mobile-menu-logo .logo-dark {
    display: block;
    width: 72.7px;
    height: 21.4px;
    object-fit: contain;
  }

  nav .mobile-menu-logo a {
    text-decoration: none;
    padding: 0;
    border-bottom: none;
    width: auto;
    text-align: left;
    display: block;
  }

  nav a {
    padding: 1rem 1.5rem;
    border-radius: 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--brand-bg-secondary);
    font-weight: 500;
    transition: background-color 0.2s ease;
  }

  nav a:hover {
    background-color: #f9f9f9;
  }

  nav a::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%23243746' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
  }

  nav a.active {
    background-color: #edeff0;
    color: var(--brand-bg-secondary);
  }

  .mobile-menu-overlay {
    display: block;
  }
}

@media (max-width: 900px) {
  .integration-cards {
    grid-template-columns: 1fr;
    padding: 0 1.5rem;
    gap: 1.5rem;
  }

  .integration-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .contact-modal__dialog {
    padding: 48px 24px 56px;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 12px;
  }

  .contact-form__checkboxes {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .contact-form__country-input {
    width: 100%;
    justify-content: space-between;
  }

  /* Header maintains consistent height - only adjust horizontal padding */
  .header-wrapper {
    padding: 0.5rem 1rem;
  }

  .hero-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-text h1 {
    font-size: 2rem;
    line-height: 1.2;
    padding-top: 2.5rem;
    min-height: 6rem; /* Mobile: stable height for two lines */
  }

  .typing-wrapper {
    height: 7rem;
    min-height: 7rem;
    margin-bottom: 1.25rem;
    overflow: visible;
  }

  .typing-line-one,
  .typing-line-two {
    height: 3rem;
    min-height: 3rem;
    line-height: 1.35;
    overflow: visible;
    padding-bottom: 0.15rem;
  }

  footer {
    height: auto;
    min-height: 72px;
    padding: 1.5rem 0;
  }

  .footer-wrapper {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .hero-image {
    padding-left: 0;
  }

  .hero-image img {
    width: 100%;
  }

  .integration-cards {
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .integration-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 200px;
  }

  .scale-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .scale-content h2 {
    font-size: 1.75rem;
  }

  .features-header h2 {
    font-size: 1.75rem;
  }

  .trust-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .trust-content h2 {
    font-size: 1.75rem;
  }

  .trust-stats {
    flex-direction: column;
  }

  .stat {
    flex: 0 0 100%;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  /* Header maintains consistent height - only adjust horizontal padding */
  .header-wrapper {
    padding: 0.5rem 1rem;
  }

  /* Simplified gradient on mobile - enhanced */
  .hero::before {
    background:
      radial-gradient(
        ellipse 70% 60% at 50% 25%,
        color-mix(in srgb, var(--brand-secondary) 22%, transparent) 0%,
        transparent 55%
      ),
      radial-gradient(
        ellipse 60% 50% at 50% 80%,
        color-mix(in srgb, var(--brand-primary-light) 18%, transparent) 0%,
        transparent 55%
      );
    animation-duration: 26s;
  }

  .hero::after {
    top: auto;
    bottom: -20%;
    right: -30%;
    width: 100%;
    height: 80%;
  }

  [data-theme='dark'] .hero::before {
    background:
      radial-gradient(
        ellipse 70% 60% at 50% 25%,
        color-mix(in srgb, var(--brand-secondary) 32%, transparent) 0%,
        transparent 55%
      ),
      radial-gradient(
        ellipse 60% 50% at 50% 80%,
        color-mix(in srgb, var(--brand-primary-light) 26%, transparent) 0%,
        transparent 55%
      );
  }

  .hero {
    padding: 4.35rem 1rem;
  }

  .hero-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-text h1 {
    font-size: 1.75rem;
    padding-top: 2.5rem;
    line-height: 1.25;
    min-height: 5.5rem; /* Small mobile: stable height for two lines */
  }

  .typing-wrapper {
    height: 6.5rem;
    min-height: 6.5rem;
    margin-bottom: 1.25rem;
    overflow: visible;
  }

  .typing-line-one,
  .typing-line-two {
    height: 2.75rem;
    min-height: 2.75rem;
    line-height: 1.4;
    font-size: 1.5rem; /* Slightly smaller font on mobile to prevent excessive wrapping */
    overflow: visible;
    padding-bottom: 0.1rem;
  }

  .static-text {
    white-space: nowrap; /* Keep static text on one line */
  }

  .hero-image {
    padding-left: 0;
  }

  .hero-image img {
    width: 100%;
  }

  /* Compact mac window on mobile */
  .mac-window {
    max-width: 100%;
    margin-left: 0; /* Center on mobile */
    margin-top: 0;
  }

  .mac-window-content {
    height: 220px; /* Adjusted for address bar */
  }

  .browser-address-bar {
    height: 22px;
    padding: 0 6px;
  }

  .address-bar-url {
    font-size: 9px;
    padding: 2px 6px;
  }

  .address-icon {
    width: 10px;
    height: 10px;
  }

  /* Full size on mobile */
  .portal-mockup {
    height: 220px;
    transform: scale(1);
    transform-origin: top left;
  }

  .portal-bg-icons .portal-icon {
    filter: url(#iconShadow) drop-shadow(0 0 4px rgba(0, 180, 180, 0.35));
  }

  .portal-bg-icons .portal-icon-wrapper.active .portal-icon {
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand-secondary) 60%, transparent));
  }

  .hero-text p {
    font-size: 1.125rem;
  }

  .hero-cta {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .scale-section {
    padding: 3rem 1rem;
  }

  .features-section {
    padding: 3rem 1rem;
  }

  .trust-section {
    padding: 3rem 1rem;
  }

  .neural-network-container {
    display: none;
  }

  footer {
    padding: 1.25rem 0;
  }

  .footer-wrapper {
    padding: 0 1rem;
    gap: 0.875rem;
  }

  .footer-links {
    gap: 0.625rem;
  }
}

/* Portal Tools Grid */
.portal-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.portal-tool-card {
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-secondary);
}

.portal-tool-card svg {
  width: 48px;
  height: 48px;
  color: var(--brand-secondary);
  margin-bottom: 16px;
}

.portal-tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-text-primary);
  margin-bottom: 8px;
}

.portal-tool-card p {
  font-size: 13px;
  color: var(--brand-text-secondary);
  line-height: 1.5;
}

/* Portal Accounts List */
.portal-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.portal-account-item {
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.portal-account-item:hover {
  border-color: var(--brand-secondary);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-secondary) 10%, transparent);
}

.portal-account-icon {
  width: 48px;
  height: 48px;
  background: color-mix(in srgb, var(--brand-secondary) 10%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-account-icon.fsa {
  background: color-mix(in srgb, var(--brand-primary-light) 10%, transparent);
}

.portal-account-icon svg {
  width: 24px;
  height: 24px;
  color: var(--brand-secondary);
}

.portal-account-icon.fsa svg {
  color: var(--brand-primary-light);
}

.portal-account-details {
  flex: 1;
}

.portal-account-details h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-text-primary);
  margin-bottom: 4px;
}

.portal-account-details p {
  font-size: 14px;
  color: var(--brand-text-secondary);
}

.portal-btn-text {
  background: none;
  border: none;
  color: var(--brand-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.portal-btn-text:hover {
  background: color-mix(in srgb, var(--brand-secondary) 8%, transparent);
}

/* Portal Messages */
.portal-messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.portal-message-item {
  background: var(--brand-bg-primary);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.portal-message-item.unread {
  border-left: 4px solid var(--brand-secondary);
}

.portal-message-item:hover {
  background: var(--brand-bg-secondary);
}

.portal-message-icon {
  width: 40px;
  height: 40px;
  background: var(--brand-bg-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-message-icon svg {
  width: 20px;
  height: 20px;
  color: var(--brand-text-secondary);
}

.portal-message-item.unread .portal-message-icon {
  background: color-mix(in srgb, var(--brand-secondary) 10%, transparent);
}

.portal-message-item.unread .portal-message-icon svg {
  color: var(--brand-secondary);
}

.portal-message-content {
  flex: 1;
}

.portal-message-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-text-primary);
  margin-bottom: 4px;
}

.portal-message-content p {
  font-size: 13px;
  color: var(--brand-text-secondary);
  margin-bottom: 4px;
}

.portal-message-time {
  font-size: 12px;
  color: var(--brand-text-muted);
}

/* Dark mode styles for new components */
[data-theme='dark'] .portal-tool-card,
[data-theme='dark'] .portal-account-item,
[data-theme='dark'] .portal-message-item {
  background: var(--brand-text-primary);
  border-color: var(--brand-border);
}

[data-theme='dark'] .portal-tool-card:hover,
[data-theme='dark'] .portal-account-item:hover {
  border-color: var(--brand-secondary-light);
}

[data-theme='dark'] .portal-tool-card h3,
[data-theme='dark'] .portal-account-details h3,
[data-theme='dark'] .portal-message-content h4 {
  color: var(--brand-text-primary);
}

[data-theme='dark'] .portal-tool-card p,
[data-theme='dark'] .portal-account-details p,
[data-theme='dark'] .portal-message-content p {
  color: var(--brand-text-secondary);
}

[data-theme='dark'] .portal-message-item:hover {
  background: var(--brand-border);
}

[data-theme='dark'] .portal-message-icon {
  background: var(--brand-border);
}

[data-theme='dark'] .portal-btn-text {
  color: var(--brand-secondary-light);
}

[data-theme='dark'] .portal-btn-text:hover {
  background: rgba(0, 229, 204, 0.08);
}

/* ============================================
   ENHANCED BUTTON ANIMATION SYSTEM
   Performance-optimized, accessible, modern
   ============================================ */

/* ===== Design Tokens for Buttons ===== */
:root {
  /* Button Easing Functions */
  --btn-ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --btn-ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --btn-ease-apple: cubic-bezier(0.4, 0, 0.2, 1);
  --btn-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --btn-ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

  /* Button Durations - SLOWED DOWN for more impact */
  --btn-duration-instant: 100ms;
  --btn-duration-fast: 200ms;
  --btn-duration-normal: 350ms;
  --btn-duration-slow: 500ms;
  --btn-duration-dramatic: 700ms;

  /* Button Colors - Light Mode */
  --btn-primary-bg: var(--brand-tertiary-dark, #c8102e);
  --btn-primary-hover: var(--brand-tertiary-hover);
  --btn-primary-active: #a80d26;
  --btn-primary-glow: color-mix(in srgb, var(--brand-tertiary-dark) 40%, transparent);

  /* Enhanced glow layers for depth */
  --btn-glow-inner: rgba(255, 100, 120, 0.6);
  --btn-glow-mid: color-mix(in srgb, var(--brand-tertiary-dark) 40%, transparent);
  --btn-glow-outer: color-mix(in srgb, var(--brand-tertiary-dark) 20%, transparent);
  --btn-glow-ambient: color-mix(in srgb, var(--brand-tertiary-dark) 8%, transparent);

  --btn-secondary-bg: transparent;
  --btn-secondary-border: var(--brand-secondary);
  --btn-secondary-hover-bg: color-mix(in srgb, var(--brand-secondary) 10%, transparent);
  --btn-secondary-glow: color-mix(in srgb, var(--brand-secondary) 30%, transparent);

  --btn-focus-ring: color-mix(in srgb, var(--brand-secondary) 50%, transparent);
  --btn-ripple-color: rgba(255, 255, 255, 0.5);

  /* Spotlight/Magnetic effect */
  --btn-spotlight-color: rgba(255, 255, 255, 0.25);
  --btn-spotlight-size: 100px;
}

[data-theme='dark'] {
  --btn-primary-glow: rgba(255, 100, 120, 0.5);
  --btn-glow-inner: rgba(255, 140, 160, 0.7);
  --btn-glow-mid: rgba(230, 57, 80, 0.5);
  --btn-glow-outer: color-mix(in srgb, var(--brand-tertiary-dark) 30%, transparent);
  --btn-glow-ambient: rgba(255, 100, 120, 0.12);

  --btn-secondary-hover-bg: rgba(0, 229, 204, 0.15);
  --btn-secondary-glow: rgba(0, 229, 204, 0.4);
  --btn-focus-ring: rgba(0, 229, 204, 0.6);
  --btn-ripple-color: rgba(255, 255, 255, 0.5);

  --btn-spotlight-color: rgba(255, 255, 255, 0.3);
}

/* ===== Base Button Enhancement ===== */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  isolation: isolate;

  /* GPU acceleration */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;

  /* Smooth transitions - SLOWED for impact */
  transition:
    transform var(--btn-duration-normal) var(--btn-ease-out-back),
    box-shadow var(--btn-duration-slow) var(--btn-ease-out-expo),
    background-color var(--btn-duration-normal) var(--btn-ease-apple),
    border-color var(--btn-duration-normal) var(--btn-ease-apple);

  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== Primary Button (CTA) - MAGNETIC SPOTLIGHT ===== */
.btn-primary,
.hero-cta,
.scale-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  /* CSS custom properties for cursor tracking (set by JS) */
  --mouse-x: 50%;
  --mouse-y: 50%;

  /* Slower, more dramatic transitions */
  transition:
    transform var(--btn-duration-normal) var(--btn-ease-out-back),
    box-shadow var(--btn-duration-slow) var(--btn-ease-out-expo),
    background-color var(--btn-duration-normal) var(--btn-ease-apple);
}

/* Contact form submit - base styles only (neon added separately) */
.contact-form__submit {
  position: relative;
  overflow: visible; /* Allow neon glow to extend */
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  transition:
    transform var(--btn-duration-normal) var(--btn-ease-out-back),
    box-shadow var(--btn-duration-slow) var(--btn-ease-out-expo),
    background-color var(--btn-duration-normal) var(--btn-ease-apple);
}

/* Spotlight overlay - ONLY for hero-cta (magnetic spotlight) */
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 100px at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--btn-duration-normal) var(--btn-ease-apple);
  pointer-events: none;
  z-index: 1;
}

/* Hero CTA Shine sweep effect */
.hero-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: ctaShine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

/* Hero CTA Pulse glow animation */
.hero-cta {
  animation:
    fadeInUp 800ms cubic-bezier(0.4, 0, 0.2, 1) 600ms forwards,
    ctaPulse 3s ease-in-out 1.4s infinite;
}

@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(210, 63, 87, 0.3);
  }
  50% {
    box-shadow:
      0 4px 25px rgba(210, 63, 87, 0.5),
      0 6px 30px rgba(210, 63, 87, 0.3);
  }
}

@keyframes ctaShine {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 150%;
  }
}

/* ===== HOVER STATE - Multi-layer glow ===== */
.btn-primary:hover,
.hero-cta:hover,
.scale-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background-color: var(--btn-primary-hover);

  /* Multi-layer glow for depth */
  box-shadow:
    0 0 15px -3px var(--btn-glow-inner),
    0 8px 25px -8px var(--btn-glow-mid),
    0 15px 40px -15px var(--btn-glow-outer),
    0 8px 16px -8px rgba(0, 0, 0, 0.15);
}

/* Show spotlight on hover - hero only */
.hero-cta:hover::before {
  opacity: 1;
}

/* ===== ACTIVE/CLICK STATE ===== */
.btn-primary:active,
.hero-cta:active,
.scale-btn:active {
  transform: translateY(1px) scale(0.98);
  background-color: var(--btn-primary-active);
  transition-duration: var(--btn-duration-instant);

  box-shadow:
    0 0 20px -5px var(--btn-glow-inner),
    0 2px 12px -4px var(--btn-glow-mid),
    inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Click pop animation class (added by JS) */
.hero-cta.btn-pop,
.scale-btn.btn-pop,
.btn-primary.btn-pop {
  animation: btnPopEffect 0.35s var(--btn-ease-elastic);
}

@keyframes btnPopEffect {
  0% {
    transform: translateY(-3px) scale(1.02);
  }
  25% {
    transform: translateY(2px) scale(0.95);
    box-shadow:
      0 0 25px -2px var(--btn-glow-inner),
      0 0 50px -10px var(--btn-glow-mid);
  }
  50% {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
      0 0 35px -5px var(--btn-glow-inner),
      0 12px 50px -12px var(--btn-glow-mid);
  }
  75% {
    transform: translateY(-1px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: none;
  }
}

/* Focus state for accessibility */
.btn-primary:focus-visible,
.hero-cta:focus-visible,
.scale-btn:focus-visible,
.contact-form__submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--brand-bg-primary),
    0 0 0 5px var(--btn-focus-ring),
    0 0 20px -5px var(--btn-glow-mid);
}

/* ===== Secondary/Outline Button ===== */
.btn-secondary,
.btn-outline {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--btn-secondary-bg);
  border: 2px solid var(--btn-secondary-border);
  transform: translateZ(0);

  transition:
    transform var(--btn-duration-fast) var(--btn-ease-out-back),
    box-shadow var(--btn-duration-normal) var(--btn-ease-out-expo),
    background-color var(--btn-duration-fast) var(--btn-ease-apple),
    border-color var(--btn-duration-fast) var(--btn-ease-apple);
}

.btn-secondary:hover,
.btn-outline:hover {
  transform: translateY(-2px);
  background: var(--btn-secondary-hover-bg);
  box-shadow:
    0 6px 20px -6px var(--btn-secondary-glow),
    0 3px 10px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active,
.btn-outline:active {
  transform: translateY(0) scale(0.98);
  transition-duration: var(--btn-duration-instant);
}

.btn-secondary:focus-visible,
.btn-outline:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--brand-bg-primary),
    0 0 0 5px var(--btn-focus-ring);
}

/* ===== Ripple Effect ===== */
.btn-ripple {
  position: relative;
  overflow: hidden;
  --ripple-x: 50%;
  --ripple-y: 50%;
}

/* Main ripple - uses ::after to avoid conflict with spotlight ::before */
.btn-ripple::after {
  content: '';
  position: absolute;
  top: var(--ripple-y, 50%);
  left: var(--ripple-x, 50%);
  width: 10px;
  height: 10px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.btn-ripple.ripple-active::after {
  animation: btnRipple 0.5s var(--btn-ease-out-expo) forwards;
}

@keyframes btnRipple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(50);
    opacity: 0;
  }
}

/* ===== NEON PULSE Style (Contact Form Submit) ===== */
.btn-neon {
  position: relative;
  overflow: visible !important; /* Allow glow to extend */
}

/* Neon hover - breathing glow */
.btn-neon:hover {
  transform: translateY(-2px) scale(1.02);
  animation: neonPulse 1.5s var(--btn-ease-apple) infinite;
}

@keyframes neonPulse {
  0%,
  100% {
    box-shadow:
      0 0 8px var(--btn-glow-inner),
      0 0 20px var(--btn-glow-mid),
      0 0 35px var(--btn-glow-outer);
  }
  50% {
    box-shadow:
      0 0 12px var(--btn-glow-inner),
      0 0 28px var(--btn-glow-mid),
      0 0 50px var(--btn-glow-outer);
  }
}

/* Neon active/click - flash effect */
.btn-neon:active {
  transform: translateY(1px) scale(0.98);
  animation: neonFlash 0.25s var(--btn-ease-out-expo) forwards;
}

@keyframes neonFlash {
  0% {
    box-shadow:
      0 0 15px var(--btn-glow-inner),
      0 0 35px var(--btn-glow-mid),
      0 0 60px var(--btn-glow-outer);
    filter: brightness(1.2);
  }
  40% {
    box-shadow:
      0 0 30px var(--btn-glow-inner),
      0 0 60px var(--btn-glow-mid),
      0 0 90px var(--btn-glow-outer);
    filter: brightness(1.4);
  }
  100% {
    box-shadow:
      0 0 5px var(--btn-glow-inner),
      0 0 15px var(--btn-glow-mid);
    filter: brightness(1);
  }
}

/* Contact form submit specific hover override */
.contact-form__submit:hover {
  background-color: var(--btn-primary-hover);
}

/* ===== Shimmer/Shine Effect - ENHANCED ===== */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

/* Primary shimmer streak */
.btn-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
}

.btn-shimmer:hover::before {
  animation: btnShimmerEnhanced 1s var(--btn-ease-out-expo) forwards;
}

@keyframes btnShimmerEnhanced {
  0% {
    left: -100%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

/* ===== Loading State ===== */
.btn-loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}

.btn-loading > * {
  opacity: 0;
}

/* Spinner */
.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--brand-bg-primary);
  border-radius: 50%;
  animation: btnSpinner 0.8s linear infinite;
}

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

/* Pulse loading variant */
.btn-loading-pulse::after {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border: none;
  background: var(--brand-bg-primary);
  animation: btnPulse 1s var(--btn-ease-apple) infinite;
}

@keyframes btnPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.8);
    opacity: 0.5;
  }
}

/* Dots loading variant */
.btn-loading-dots::after {
  content: '•••';
  width: auto;
  height: auto;
  margin: 0;
  border: none;
  background: none;
  font-size: 1.5em;
  letter-spacing: 4px;
  color: var(--brand-bg-primary);
  animation: btnDots 1.4s steps(4) infinite;
  transform: translate(-50%, -50%);
}

@keyframes btnDots {
  0% {
    content: '';
  }
  25% {
    content: '•';
  }
  50% {
    content: '••';
  }
  75%,
  100% {
    content: '•••';
  }
}

/* ===== Entrance Animations ===== */
.btn-entrance {
  opacity: 0;
  transform: translateY(20px);
}

.btn-entrance.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--btn-duration-slow) var(--btn-ease-out-expo),
    transform var(--btn-duration-slow) var(--btn-ease-out-expo);
}

/* Entrance with scale */
.btn-entrance-scale {
  opacity: 0;
  transform: scale(0.9);
}

.btn-entrance-scale.is-visible {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity var(--btn-duration-slow) var(--btn-ease-out-expo),
    transform var(--btn-duration-slow) var(--btn-ease-out-back);
}

/* Entrance with bounce */
.btn-entrance-bounce {
  opacity: 0;
  transform: translateY(30px);
}

.btn-entrance-bounce.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: btnEntranceBounce var(--btn-duration-slow) var(--btn-ease-bounce) forwards;
}

@keyframes btnEntranceBounce {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ===== Icon Animation on Buttons ===== */
.btn-icon-animate svg,
.btn-icon-animate .btn-icon {
  transition: transform var(--btn-duration-fast) var(--btn-ease-out-back);
}

.btn-icon-animate:hover svg,
.btn-icon-animate:hover .btn-icon {
  transform: translateX(3px);
}

/* Arrow slide animation */
.btn-arrow-slide svg,
.btn-arrow-slide .btn-icon {
  transition: transform var(--btn-duration-fast) var(--btn-ease-apple);
}

.btn-arrow-slide:hover svg,
.btn-arrow-slide:hover .btn-icon {
  transform: translateX(5px);
}

/* Icon rotate on hover */
.btn-icon-rotate:hover svg,
.btn-icon-rotate:hover .btn-icon {
  transform: rotate(90deg);
  transition: transform var(--btn-duration-normal) var(--btn-ease-out-back);
}

/* ===== Magnetic Effect (subtle) ===== */
.btn-magnetic {
  transition: transform var(--btn-duration-fast) var(--btn-ease-apple);
}

/* JS will handle the magnetic movement based on cursor position */

/* ===== Glow Pulse Animation ===== */
.btn-glow-pulse {
  animation: btnGlowPulse 2s var(--btn-ease-apple) infinite;
}

@keyframes btnGlowPulse {
  0%,
  100% {
    box-shadow: 0 4px 15px -5px var(--btn-primary-glow);
  }
  50% {
    box-shadow: 0 4px 25px -5px var(--btn-primary-glow);
  }
}

/* ===== Success/Error State Animations ===== */
.btn-success {
  background-color: var(--brand-success) !important;
  animation: btnSuccessPop 0.4s var(--btn-ease-out-back);
}

@keyframes btnSuccessPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-error {
  animation: btnErrorShake 0.4s var(--btn-ease-apple);
}

@keyframes btnErrorShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* ===== Accessibility - Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .btn-enhanced,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-ripple,
  .btn-shimmer,
  .btn-neon,
  .hero-cta,
  .scale-btn,
  .contact-form__submit {
    transition: none !important;
    animation: none !important;
  }

  /* Disable orbital icon glow pulse animation */
  .portal-bg-icons .portal-icon-wrapper.active .portal-icon {
    animation: none !important;
    filter: drop-shadow(0 0 12px rgba(0, 255, 220, 0.8)) !important;
  }

  [data-theme='dark'] .portal-bg-icons .portal-icon-wrapper.active .portal-icon {
    filter: drop-shadow(0 0 15px rgba(0, 255, 240, 0.85)) !important;
  }

  /* Disable spotlight, ripple, and shine pseudo-elements */
  .btn-ripple::after,
  .btn-shimmer::before,
  .hero-cta::before,
  .hero-cta::after,
  .feature-card::before {
    display: none !important;
  }

  /* Disable feature card icon bounce */
  .feature-card:hover .feature-card-icon img {
    animation: none !important;
  }

  /* Disable gradient text shimmer */
  .scale-content h2.gradient-text,
  .trust-text h2 .gradient-text {
    animation: none !important;
  }

  /* Disable features arc animations */
  .arc-ray,
  .arc-ray-1,
  .arc-ray-2,
  .arc-ray-3,
  .arc-ray-4,
  .arc-ray-5,
  .arc-ray-6,
  .arc-ray-7,
  .arc-ray-8,
  .arc-edge-stroke {
    animation: none !important;
  }

  /* Disable SMIL animations in features arc SVG */
  .features-arc-decoration svg animate {
    animation: none !important;
  }

  /* Disable extended arc rays */
  .extended-ray,
  .ext-ray-1,
  .ext-ray-2,
  .ext-ray-3,
  .ext-ray-4,
  .ext-ray-5,
  .ext-ray-6 {
    animation: none !important;
  }

  /* Feature card icon hover animations */
  .dropping-coin,
  .floating-coin,
  .lightning-bolt,
  .verification-ring,
  .checkmark,
  .lock-shackle,
  .shield-shape,
  .feature-icon-svg {
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }

  /* Feature card hover transforms */
  .feature-card:hover .feature-card-icon,
  .feature-card:hover .feature-icon-svg,
  .feature-card:hover .dropping-coin,
  .feature-card:hover .lightning-bolt,
  .feature-card:hover .verification-ring,
  .feature-card:hover .lock-shackle {
    transform: none !important;
    animation: none !important;
  }

  /* Integration card animations */
  .integration-card::before {
    animation: none !important;
  }

  /* Disable neural network animations */
  .neural-dot-group,
  .neural-dot-new,
  .neural-dot-pulse,
  .neural-dot-pulse .neural-dot,
  .neural-dot-pulse .neural-dot-ring,
  .neural-connection-new,
  .neural-connection-flow,
  .neural-connection-active,
  .neural-dot-fadeout,
  .neural-connection-fadeout {
    animation: none !important;
    filter: none !important;
  }

  /* Disable pop animation */
  .btn-pop {
    animation: none !important;
  }

  /* Disable neon effects */
  .btn-neon:hover {
    animation: none !important;
  }

  .btn-loading::after {
    animation: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
  }

  .btn-entrance,
  .btn-entrance-scale,
  .btn-entrance-bounce {
    opacity: 1;
    transform: none;
  }

  /* Keep simple hover states without animation */
  .btn-primary:hover,
  .hero-cta:hover,
  .scale-btn:hover,
  .contact-form__submit:hover {
    transform: none;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.2);
  }

  /* Scale section - disable gradient animation */
  .scale-section {
    animation: none !important;
    background-position: 0% 50% !important;
  }

  /* Wave lines SVG - disable all animations and GPU hints */
  .scale-wave-lines {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
  }

  .scale-wave-lines .wave-line,
  .scale-wave-lines .wave-line-solid,
  .scale-wave-lines .wave-line-dotted,
  .scale-wave-lines .wave-line-solid-secondary {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 0.7 !important;
    will-change: auto !important;
  }

  /* Disable SVG SMIL path morphing animations */
  .scale-wave-lines .wave-line animate {
    display: none;
  }

  /* Disable animated gradient stops */
  .scale-wave-lines #waveGradientSolid stop,
  .scale-wave-lines #waveGradientDotted stop {
    animation: none !important;
  }

  /* Integration cards - disable badge animation */
  .integration-card::before {
    display: none !important;
  }

  .integration-card:hover h3 {
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
  }

  .integration-card-link::after {
    display: none !important;
  }
}

/* ===== Dark Mode Enhancements ===== */
[data-theme='dark'] .btn-primary:hover,
[data-theme='dark'] .hero-cta:hover,
[data-theme='dark'] .scale-btn:hover,
[data-theme='dark'] .contact-form__submit:hover {
  box-shadow:
    0 8px 30px -8px var(--btn-primary-glow),
    0 4px 15px -4px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .btn-secondary:hover,
[data-theme='dark'] .btn-outline:hover {
  box-shadow:
    0 6px 25px -6px var(--btn-secondary-glow),
    0 3px 12px -3px rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .btn-shimmer::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
}

[data-theme='dark'] .btn-glow-pulse {
  animation: btnGlowPulseDark 2s var(--btn-ease-apple) infinite;
}

@keyframes btnGlowPulseDark {
  0%,
  100% {
    box-shadow: 0 4px 20px -5px var(--btn-primary-glow);
  }
  50% {
    box-shadow: 0 4px 35px -5px var(--btn-primary-glow);
  }
}

/* ============================================
   FOOTER - Multi-column Professional Layout
   ============================================ */
footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.footer-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Brand Column */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: inline-block;
  width: fit-content;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-logo:hover .footer-logo-img {
  opacity: 1;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--brand-secondary);
  color: white;
  transform: translateY(-2px);
}

/* Footer Columns */
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-list li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.footer-list li a:hover {
  color: var(--brand-secondary);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Dark mode adjustments */
[data-theme='dark'] .footer-logo-img {
  filter: brightness(0) invert(1);
}

[data-theme='dark'] .social-link {
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
  }

  .footer-tagline {
    flex: 1;
    min-width: 200px;
  }

  .footer-social {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 2rem 1.5rem 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-column {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .footer-column:last-child {
    border-bottom: none;
  }
}
