html {
  scroll-behavior: smooth;
  /* Avoid layout shift when modals set overflow:hidden (scrollbar disappears). */
  scrollbar-gutter: stable;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Popup scrollbars ── */
.docs-modal-scroll,
.country-popup-scroll {
  scrollbar-width: thin;
  scrollbar-color: #e0007a #371426;
}

.docs-modal-scroll::-webkit-scrollbar,
.country-popup-scroll::-webkit-scrollbar {
  width: 10px;
}

.docs-modal-scroll::-webkit-scrollbar-track,
.country-popup-scroll::-webkit-scrollbar-track {
  background: #371426;
  border-radius: 999px;
}

.docs-modal-scroll::-webkit-scrollbar-thumb,
.country-popup-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e0007a 0%, #91004b 100%);
  border-radius: 999px;
  border: 2px solid #371426;
}

.docs-modal-scroll::-webkit-scrollbar-corner,
.country-popup-scroll::-webkit-scrollbar-corner {
  background: #371426;
}

/* ── Header ── */
#site-header {
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

#site-header.is-scrolled {
  background-color: rgba(0, 21, 40, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Mobile menu icon morphs into an X */
#nav-toggle:checked ~ label .burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#nav-toggle:checked ~ label .burger-line:nth-child(2) {
  opacity: 0;
}

#nav-toggle:checked ~ label .burger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.burger-line {
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

/* ── Motion tokens ── */
:root {
  --motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-duration: 0.8s;
}

/* ── Scroll entrance (opt-in via data-reveal) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--motion-duration) var(--motion-ease-out),
    transform var(--motion-duration) var(--motion-ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Interactive cards / buttons ── */
.lift {
  transition:
    transform 0.35s var(--motion-ease-out),
    box-shadow 0.35s ease,
    filter 0.35s ease;
}

.lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(0, 21, 40, 0.28);
}

.btn {
  transition:
    transform 0.28s var(--motion-ease-out),
    box-shadow 0.28s ease,
    filter 0.28s ease,
    background-color 0.28s ease;
}

.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 14px 28px rgba(45, 153, 255, 0.3);
}

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

/* Platform tiles zoom their artwork on hover */
.zoom-media {
  transition: transform 0.7s var(--motion-ease-out);
}

.group:hover .zoom-media {
  transform: scale(1.06);
}

footer a {
  transition: color 0.25s ease;
}

/* ── Modal entrance ── */
#docs-partner-modal.modal-is-open > [data-close-modal],
#country-popup.modal-is-open > [data-country-popup-dismiss] {
  animation: modalBackdropIn 0.45s ease forwards;
}

#docs-partner-modal.modal-is-open .pointer-events-auto > div,
#country-popup.modal-is-open .pointer-events-auto > div {
  animation: modalPanelIn 0.65s var(--motion-ease-out) forwards;
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }

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

/* Popup list items stagger in when rendered */
.country-option,
.country-service-option,
.partner-docs-row {
  animation: listItemIn 0.55s var(--motion-ease-out) backwards;
  animation-delay: calc(var(--item-index, 0) * 55ms);
}

@keyframes listItemIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ══════════════════════════════════════════════════════════════
   VIBE Stream redesign (Figma "Digital Stream Hub" 91:*)
   Shared by index / partners / about / contact (body.vibe).
   ══════════════════════════════════════════════════════════════ */
:root {
  --vibe-bg: #020202;
  --vibe-purple: #590070;
  --vibe-accent: #a855f7;
}

body.vibe {
  background-color: var(--vibe-bg);
  color: #fff;
}

/* Page gutter: 160px on the 1920 frame, scaled down on smaller screens */
.vibe-container {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .vibe-container {
    padding-inline: 32px;
  }
}

@media (min-width: 1024px) {
  .vibe-container {
    padding-inline: clamp(40px, 8.3333vw, 160px);
  }
}

/* ── Floating pill navbar ── */
#site-header.vibe-header,
#site-header.vibe-header.is-scrolled {
  background-color: transparent;
  box-shadow: none;
  pointer-events: none;
  transition: padding-top 0.3s ease;
}

#site-header.vibe-header > nav {
  pointer-events: auto;
}

.vibe-nav {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 20px 10px 18.4px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

#site-header.is-scrolled .vibe-nav {
  background-color: rgba(28, 18, 38, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

@media (min-width: 1024px) {
  #site-header.vibe-header.is-scrolled {
    padding-top: 16px;
  }
}

.vibe-nav-link {
  position: relative;
  display: inline-block;
  font-weight: 300;
  color: #fff;
  transition: opacity 0.25s ease;
}

.vibe-nav-link:hover {
  opacity: 0.75;
}

.vibe-nav-link.is-active {
  font-weight: 600;
}

/* Active underline: white rule with a soft purple glow beneath (Figma "Group 1171274911") */
.vibe-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 6px 12px 2px rgba(204, 160, 255, 0.35);
}

.vibe-header a:focus-visible,
.vibe-header button:focus-visible,
.vibe-header label:focus-within,
body.vibe main a:focus-visible,
body.vibe main button:focus-visible,
body.vibe footer a:focus-visible {
  outline: 2px solid var(--vibe-accent);
  outline-offset: 3px;
}

/* ── Buttons / cards ── */
body.vibe .btn:hover {
  box-shadow: 0 14px 28px rgba(89, 0, 112, 0.45);
}

body.vibe .lift:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.vibe-btn-primary {
  background-color: var(--vibe-purple);
  color: #fff;
}

/* Glass cards with the blurred white ellipse glow on top edge (Figma "Ellipse 65") */
.vibe-glow-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.vibe-glow-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--glow-x, 50%);
  top: var(--glow-top, -120px);
  width: var(--glow-w, 466px);
  height: var(--glow-h, 242px);
  transform: translateX(-50%);
  background: url("./assets/vibe-card-glow.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.vibe-tilt-card {
  transition:
    transform 0.35s var(--motion-ease-out),
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}

.vibe-tilt-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.vibe-scroll-row {
  scrollbar-width: none;
}

.vibe-scroll-row::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .vibe-tilt-card:hover {
    transform: none;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .lift:hover,
  .btn:hover,
  .group:hover .zoom-media {
    transform: none;
  }

  #docs-partner-modal.modal-is-open .pointer-events-auto > div,
  #country-popup.modal-is-open .pointer-events-auto > div,
  .country-option,
  .country-service-option,
  .partner-docs-row {
    animation: none;
  }
}
