/* ═══════════════════════════════════════════════
   SAP Corporation — Custom Styles
   ═══════════════════════════════════════════════ */

::selection { background-color: oklch(68% 0.20 295 / 0.5); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0A0E1A; }
::-webkit-scrollbar-thumb { background: #1A2030; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2A3145; }

/* Focus visible */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid oklch(68% 0.20 295);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Reveal-on-scroll ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ── Gradient text ── */
.text-gradient {
  background: linear-gradient(135deg, oklch(64% 0.22 265), oklch(68% 0.20 295), oklch(72% 0.22 320));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-pan 10s ease infinite;
}

/* ── Glass card ── */
.glass {
  background: rgba(26, 32, 48, 0.5);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(120, 140, 200, 0.12);
}

/* ── Gradient border (Behance-y) ── */
.border-gradient {
  position: relative;
  background: #131826;
  border-radius: 1.5rem;
}
.border-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, oklch(68% 0.20 295 / 0.5), oklch(72% 0.22 320 / 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ── Marquee fade edges ── */
.marquee-mask {
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

/* ── Trusted-by logo pill ── */
.logo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  width: 168px;
  padding: 14px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 140, 200, 0.12);
  flex-shrink: 0;
  transition: background-color 250ms ease, border-color 250ms ease;
}
.logo-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(160, 140, 220, 0.30);
}
.logo-img {
  height: 80px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(1.05) contrast(1.02);
  opacity: 0.9;
  transition: opacity 250ms ease, filter 250ms ease;
}
.logo-pill:hover .logo-img {
  opacity: 1;
  filter: brightness(1.1) contrast(1.05);
}

@media (max-width: 640px) {
  .logo-pill { height: 92px; width: 136px; padding: 12px 16px; }
  .logo-img  { height: 64px; }
}

/* ── Nav scrolled ── */
#navbar.is-scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: rgba(120, 140, 200, 0.08);
}

/* ── Hover glow on cards ── */
.glow-hover {
  position: relative;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), border-color 300ms;
}
.glow-hover::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), oklch(68% 0.20 295 / 0.20), transparent 40%);
  opacity: 0;
  transition: opacity 300ms;
  pointer-events: none;
  z-index: 0;
}
.glow-hover:hover { transform: translateY(-4px); border-color: rgba(120, 140, 200, 0.25); }
.glow-hover:hover::after { opacity: 1; }
.glow-hover > * { position: relative; z-index: 1; }

/* ═══ Floating LINE FAB — icon-only, prominent ═══ */

/* Wrapper: gentle vertical bob */
.line-fab-wrap {
  animation: fab-bob 3.4s ease-in-out infinite;
  will-change: transform;
}
@keyframes fab-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* Button: compact circular FAB */
.line-fab {
  background: linear-gradient(135deg, #1FD157 0%, #06C755 50%, #04A246 100%);
  background-size: 200% 200%;
  border-radius: 9999px;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 320ms ease,
              background-position 700ms ease;
  overflow: visible;
  isolation: isolate;
  filter: drop-shadow(0 6px 14px rgba(6, 199, 85, 0.4));
  /* Expand tap area for accessibility (visible button stays small) */
  outline: 8px solid transparent;
  outline-offset: -8px;
}
.line-fab:hover {
  transform: scale(1.15) rotate(-6deg);
  box-shadow:
    0 10px 26px -4px rgba(6, 199, 85, 0.55),
    0 0 0 4px rgba(6, 199, 85, 0.18),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
  background-position: 100% 100%;
}
.line-fab:active {
  transform: scale(0.92) rotate(0);
  transition-duration: 120ms;
}

/* Outer pulse ring */
.line-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.65);
  animation: line-pulse-1 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
@keyframes line-pulse-1 {
  0%   { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.65); }
  70%  { box-shadow: 0 0 0 14px rgba(6, 199, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); }
}

/* Second offset pulse ring */
.line-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.45);
  animation: line-pulse-2 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  animation-delay: 1.2s;
  pointer-events: none;
}
@keyframes line-pulse-2 {
  0%   { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.45); }
  70%  { box-shadow: 0 0 0 18px rgba(6, 199, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); }
}

/* Icon: continuous breathe + hover wiggle */
.line-fab-icon {
  animation: fab-icon-breathe 2.8s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}
@keyframes fab-icon-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.08) rotate(-2deg); }
}
.line-fab:hover .line-fab-icon {
  animation: fab-icon-wiggle 0.7s ease-in-out;
}
@keyframes fab-icon-wiggle {
  0%, 100% { transform: rotate(0)            scale(1.12); }
  20%      { transform: rotate(-14deg) scale(1.18); }
  40%      { transform: rotate(12deg)  scale(1.18); }
  60%      { transform: rotate(-10deg) scale(1.15); }
  80%      { transform: rotate(8deg)   scale(1.13); }
}

/* Tooltip — slide in from right on hover */
.line-fab-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  padding: 8px 14px;
  background: #0A0E1A;
  color: #E8EDF5;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(120, 140, 200, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}
.line-fab-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #0A0E1A;
}
.line-fab:hover .line-fab-tooltip,
.line-fab:focus-visible .line-fab-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .text-gradient { animation: none; }
  .line-fab-wrap,
  .line-fab::before,
  .line-fab::after,
  .line-fab-icon { animation: none !important; }
}
