/* TAMAX References page.
   Loaded only by references.html and fr/references.html. Every colour,
   radius and duration comes from tokens.css, so the page follows the rest
   of the site if a token changes. No inline styles: the CSP allows none. */

/* ------------------------------------------------------------- page head
   Only the breadcrumb is shown; the page title is visually hidden, so the
   slider starts right under the header. */

.tx-refs-head {
  padding-bottom: var(--tx-2);
}

/* ---------------------------------------------------------------- slider
   A native horizontal scroller with snap points: swipe, trackpad and
   keyboard scrolling work with or without slider.js, which only adds the
   buttons, the dots and a slow autoplay. The track bleeds to the edge of
   the viewport while its first card stays aligned with the page content. */

.tx-refs-slider {
  --tx-ref-w: clamp(16.5rem, 13rem + 12vw, 21.5rem);
  position: relative;
}

.tx-refs {
  display: flex;
  gap: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  margin: 0 calc(-1 * var(--tx-gutter));
  padding: 0.75rem var(--tx-gutter) 1.75rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--tx-gutter);
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--tx-gutter), #000 calc(100% - var(--tx-gutter)), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--tx-gutter), #000 calc(100% - var(--tx-gutter)), transparent 100%);
}

.tx-refs::-webkit-scrollbar {
  display: none;
}

.tx-refs > li {
  flex: 0 0 var(--tx-ref-w);
  scroll-snap-align: start;
}

/* With slider.js running the track glides continuously, so snapping and
   smooth scrolling are switched off: either would fight the motion. */
.tx-refs-slider.is-enhanced .tx-refs {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

/* ------------------------------------------------------------------ card */

.tx-ref {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--tx-surface-border);
  border-radius: var(--tx-r-lg);
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(11, 123, 208, 0.16) 0%, rgba(11, 123, 208, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  overflow: hidden;
  transition:
    opacity var(--tx-dur-slow) var(--tx-ease),
    transform var(--tx-dur-slow) var(--tx-ease),
    border-color var(--tx-dur) var(--tx-ease),
    box-shadow var(--tx-dur-slow) var(--tx-ease);
}

/* A gradient hairline that lights up on hover, drawn as a masked border so
   the card keeps its own border-radius. */
.tx-ref::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: var(--tx-brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity var(--tx-dur) var(--tx-ease);
  pointer-events: none;
}

.tx-ref:hover,
.tx-ref:focus-within {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--tx-shadow-glow), 0 18px 36px rgba(0, 0, 0, 0.32);
}

.tx-ref:hover::before,
.tx-ref:focus-within::before {
  opacity: 1;
}

/* ------------------------------------------------------- browser preview */

.tx-ref__preview {
  display: block;
  margin: var(--tx-3) var(--tx-3) 0;
  border: 1px solid var(--tx-surface-border);
  border-radius: var(--tx-r);
  overflow: hidden;
  background: var(--tx-midnight);
  color: inherit;
  text-decoration: none;
}

.tx-ref__bar {
  display: flex;
  align-items: center;
  gap: var(--tx-2);
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--tx-surface-border);
  background: rgba(255, 255, 255, 0.04);
}

.tx-ref__dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.tx-ref__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(167, 190, 210, 0.35);
}

.tx-ref__url {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--tx-r-pill);
  background: rgba(4, 16, 31, 0.7);
  font-family: var(--tx-font-mono);
  font-size: 0.6875rem;
  color: var(--tx-on-dark-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-ref__url svg {
  flex: none;
  color: var(--tx-sky);
}

.tx-ref__shot {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tx-ref__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform-origin: 50% 0;
  transition: transform 1.2s var(--tx-ease), filter var(--tx-dur-slow) var(--tx-ease);
  filter: saturate(0.92);
}

/* A soft fade into the card at the bottom of the screenshot. */
.tx-ref__shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(180deg, rgba(4, 16, 31, 0) 0%, rgba(4, 16, 31, 0.55) 100%);
  pointer-events: none;
}

.tx-ref:hover .tx-ref__shot img,
.tx-ref:focus-within .tx-ref__shot img {
  transform: scale(1.045);
  filter: saturate(1.05);
}

/* ------------------------------------------------------------------ body */

.tx-ref__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--tx-3);
  padding: var(--tx-4) var(--tx-4) var(--tx-4);
}

.tx-ref__head {
  display: flex;
  align-items: center;
  gap: var(--tx-3);
}

.tx-ref__logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: calc(-1 * var(--tx-7));
  border: 1px solid var(--tx-border-strong);
  border-radius: var(--tx-r);
  background: var(--tx-white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.tx-ref__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Logos whose own background is dark sit on the card colour, not on white. */
.tx-ref__logo--dark {
  background: #0b1020;
}

.tx-ref__titles {
  min-width: 0;
}

.tx-ref__kicker {
  margin: 0 0 0.1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-sky);
}

.tx-ref__title {
  margin: 0;
  font-family: var(--tx-font-display);
  font-size: var(--tx-fs-lg);
  line-height: var(--tx-lh-snug);
  color: var(--tx-white);
}

.tx-ref__index {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--tx-font-mono);
  font-size: var(--tx-fs-xs);
  color: rgba(167, 190, 210, 0.55);
}

.tx-ref__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tx-2);
  margin-top: auto;
  padding-top: var(--tx-3);
  border-top: 1px solid var(--tx-surface-border);
}

.tx-ref__domain {
  font-family: var(--tx-font-mono);
  font-size: var(--tx-fs-xs);
  color: var(--tx-on-dark-muted);
}

.tx-ref__visit svg {
  transition: transform var(--tx-dur) var(--tx-ease);
}

.tx-ref__visit:hover svg,
.tx-ref__visit:focus-visible svg {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------- mobile */

.tx-ref__visit {
  min-height: 2.25rem;
  padding-inline: 0.85rem;
  font-size: var(--tx-fs-xs);
}

@media (max-width: 35.99em) {
  .tx-refs-slider {
    --tx-ref-w: min(80vw, 19rem);
  }
}

/* ------------------------------------------------------- reduced motion */

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

  .tx-ref,
  .tx-ref::before,
  .tx-ref__shot img,
  .tx-ref__visit svg {
    transition: none;
  }

  .tx-ref:hover,
  .tx-ref:focus-within {
    transform: none;
  }

  .tx-ref:hover .tx-ref__shot img,
  .tx-ref:focus-within .tx-ref__shot img {
    transform: none;
  }
}

.tx-refs-section {
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
}

