/**
 * Viable website — custom styles
 *
 * Use this file for:
 * - Rules that are awkward in Tailwind alone (complex selectors, keyframes)
 * - Small overrides next to Tailwind CDN (this loads after Tailwind in the page)
 * - prefers-reduced-motion and other accessibility tweaks
 * - Future: @font-face, print styles, focus-visible polish
 *
 * Most layout/colors should stay as Tailwind classes in HTML unless you add a build step.
 */

@media (prefers-reduced-motion: reduce) {
  #product-tour .product-tour-slide {
    transition-duration: 0ms !important;
  }
}

/* Journey: stacked slides with crossfade (large screens / desktop block) */
#product-tour .product-tour-track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Journey: desktop screen matches screenshot assets (1615×899) */
.product-tour-viewport {
  aspect-ratio: 1615 / 899;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#product-tour .product-tour-track > .product-tour-slide {
  position: absolute;
  inset: 0;
  display: flex;
  min-width: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.32, 1);
}

#product-tour .product-tour-track > .product-tour-slide.product-tour-slide--active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

/* Journey: app switcher — overlapping thumbnails */
.product-tour-switcher-scroller {
  scrollbar-width: thin;
  scrollbar-color: rgb(148 163 184 / 0.7) transparent;
}

.product-tour-switcher-scroller::-webkit-scrollbar {
  height: 6px;
}

.product-tour-switcher-scroller::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background-color: rgb(148 163 184 / 0.7);
}

.product-tour-switcher-inner .product-tour-switcher-card {
  position: relative;
}

.product-tour-switcher-inner .product-tour-switcher-card-face {
  transform-origin: center bottom;
}

.product-tour-switcher-inner .product-tour-switcher-card--active .product-tour-switcher-card-face {
  box-shadow:
    0 14px 28px rgb(15 23 42 / 0.14),
    0 0 0 2px rgb(15 23 42);
}

.product-tour-switcher-inner .product-tour-switcher-card:not(.product-tour-switcher-card--active) .product-tour-switcher-card-face {
  opacity: 0.88;
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .product-tour-switcher-inner .product-tour-switcher-card:not(.product-tour-switcher-card--active) .product-tour-switcher-card-face {
    transform: none;
  }
}

/* Journey: stage holding the centre browser frame and the prev/next "peek" slides */
#product-tour .product-tour-stage {
  position: relative;
}

/* Confine peek overflow to the desktop tour container so it can never trigger
   page-level horizontal scroll. overflow-x: clip preserves position: sticky
   on the descendant ".product-tour-visual" (overflow: hidden would not). */
#product-tour > div.lg\:block {
  overflow-x: clip;
}

#product-tour .product-tour-peek {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  filter: saturate(0.85);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.32, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.32, 1),
    filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

#product-tour .product-tour-peek--prev {
  transform: translateX(-28%) scale(0.86);
  transform-origin: right center;
}

#product-tour .product-tour-peek--next {
  transform: translateX(28%) scale(0.86);
  transform-origin: left center;
}

#product-tour .product-tour-peek--visible {
  opacity: 0.55;
  pointer-events: auto;
}

#product-tour .product-tour-peek--visible:hover,
#product-tour .product-tour-peek--visible:focus-visible {
  opacity: 0.92;
  filter: saturate(1);
}

#product-tour .product-tour-peek--visible:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 4px;
}

#product-tour .product-tour-peek-viewport {
  aspect-ratio: 1615 / 899;
  overflow: hidden;
}

/* Journey: progress bar fill grows as the user advances through the tour */
#product-tour .product-tour-progress-fill {
  transition: width 0.45s cubic-bezier(0.22, 1, 0.32, 1);
}

/* Journey: "Keep scrolling" cue with a gently bouncing chevron, hidden after first advance */
@keyframes product-tour-scroll-cue-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

#product-tour .product-tour-scroll-cue {
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#product-tour .product-tour-scroll-cue-chevron {
  display: inline-block;
  animation: product-tour-scroll-cue-bounce 1.4s ease-in-out infinite;
}

#product-tour .product-tour-scroll-cue.product-tour-scroll-cue--hidden {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  #product-tour .product-tour-peek {
    transition: opacity 0ms !important;
  }
  #product-tour .product-tour-progress-fill {
    transition: none !important;
  }
  #product-tour .product-tour-scroll-cue-chevron {
    animation: none !important;
  }
}

/* Hero: infinite logo marquee (right-to-left) */
@keyframes hero-logos-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero-logos {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.hero-logos-marquee {
  animation: hero-logos-scroll 55s linear infinite;
  will-change: transform;
}

/* Intentional: this marquee is not turned off for prefers-reduced-motion (decorative,
   low-contrast, edge-faded). Other site motion (e.g. product tour) still respects
   reduce elsewhere in this file. */

/* About nav: hide default details marker */
.nav-about-summary::-webkit-details-marker {
  display: none;
}
.nav-about-summary {
  list-style: none;
}

/* AASB compliance reference (scoped) */
#aasb-container {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  line-height: 1.6;
  color: #334155;
}

#aasb-container .aasb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#aasb-container .aasb-table th,
#aasb-container .aasb-table td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

#aasb-container .aasb-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  text-align: center;
}

#aasb-container .aasb-scroll-box {
  height: 600px;
  overflow-y: auto;
  padding: 1.75rem;
  background: #f8fafc;
  border-top: 2px solid #0f172a;
  font-family: Georgia, "Times New Roman", serif;
}

#aasb-container .section-header {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15em;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #334155;
  color: #0f172a;
}

#aasb-container .section-header:first-child {
  margin-top: 0;
}

#aasb-container .para-num {
  font-weight: 700;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #0f172a;
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

#aasb-container .sub-letter {
  display: block;
  margin-left: 1.25rem;
  margin-top: 0.35rem;
}

#aasb-container .sub-roman {
  display: block;
  margin-left: 2.5rem;
  margin-top: 0.25rem;
  font-size: 0.95em;
}

#aasb-container .aasb-scroll-box::-webkit-scrollbar {
  width: 10px;
}
#aasb-container .aasb-scroll-box::-webkit-scrollbar-track {
  background: #f1f5f9;
}
#aasb-container .aasb-scroll-box::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 5px;
}

/* Cookie consent banner (layout.njk) */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.92);
  color: #f1f5f9;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.12);
}

.cookie-consent-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .cookie-consent-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.cookie-consent-banner__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.cookie-consent-banner__title {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
  .cookie-consent-banner__title {
    display: inline;
    margin-bottom: 0;
    margin-right: 0.35rem;
  }
}

.cookie-consent-banner__link {
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-banner__link:hover {
  color: #cbd5e1;
}

.cookie-consent-banner__accept {
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.cookie-consent-banner__accept:hover {
  background: #e2e8f0;
}

.cookie-consent-banner__accept:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 2px;
}
