/* The Amsterdam Adventure: book layer (phase A). Full-bleed chapter slider, hand-drawn bullets,
   topic mosaic, transparent cover shadow, text-only notes. Loaded after amx.css. */

:root {
  --amx-saffron: #b35500;
  --amx-red: #b3261e;
  --amx-blue: #1f5fad;
  --amx-deepblue: #14306b;
  --amx-green: #2e7d32;
  --amx-violet: #6a3d9a;
  --amx-dot-on: #3d3d3d;
  --amx-dot-off: #c9c9c9;
}

/* ---------- home title: one line on desktop, two on phones ---------- */
.amx-home-title { white-space: nowrap; font-size: clamp(1.7rem, 4.2vw, 3rem); line-height: 1.08; }
.amx-home-title__line { display: inline; }
@media (max-width: 640px) {
  .amx-home-title { white-space: normal; font-size: clamp(2rem, 10vw, 2.6rem); }
  .amx-home-title__line { display: block; }
}
.amx-band--home { border-bottom: 0; }

/* ---------- full-width chapter slider ---------- */
.amx-slider { position: relative; width: 100%; margin: 0; padding: 0; background: var(--surface, #fff); }
.amx-home-book .amx-slider { margin-top: 0; }
.amx-slider__stage { position: relative; }
.amx-slider__track {
  display: flex; gap: 0; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.amx-slider__track::-webkit-scrollbar { display: none; }
.amx-slider__track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.amx-slider__slide { position: relative; flex: 0 0 20%; min-width: 0; scroll-snap-align: start; }
.amx-slider__card { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; background: var(--surface, #fff); }
.amx-slider__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--shade); }
.amx-slider__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.amx-slider__card:hover .amx-slider__media img, .amx-slider__card:focus-visible .amx-slider__media img { transform: scale(1.04); }
.amx-slider__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 5px; padding: 14px clamp(12px, 1.4vw, 22px) 6px; }
.amx-slider__label { font: 10.5px/1.2 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.amx-slider__title { font: 13.5px/1.35 var(--sans); color: var(--ink); }
.amx-slider__intro { font: 12px/1.5 var(--ui); color: var(--muted); }
.amx-slider__more { margin-top: auto; padding-top: 6px; font: 12px/1.3 var(--ui); color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.amx-slider__card:hover .amx-slider__title { color: var(--accent-ink); }
.amx-slider__slide.is-current .amx-slider__label::after { content: " \00b7  you are here"; letter-spacing: .06em; text-transform: none; color: var(--muted); }

/* arrows overlaid on the first and last visible images */
.amx-slider__btn {
  position: absolute; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: clamp(40px, 3.6vw, 56px); aspect-ratio: auto; height: calc(20vw * 10 / 16);
  padding: 0; border: 0; color: #fff; background: linear-gradient(90deg, rgba(10, 20, 35, .55), rgba(10, 20, 35, 0));
  font: 40px/1 var(--ui); cursor: pointer; transition: opacity var(--t) var(--ease), background var(--t) var(--ease);
}
.amx-slider__btn--prev { left: 0; }
.amx-slider__btn--next { right: 0; background: linear-gradient(270deg, rgba(10, 20, 35, .55), rgba(10, 20, 35, 0)); }
.amx-slider__btn span { display: block; transform: translateY(-2px); text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.amx-slider__btn:hover { background-color: rgba(10, 20, 35, .15); }
.amx-slider__btn:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.amx-slider__btn:disabled { opacity: 0; pointer-events: none; }

/* hand-drawn pagination bullets: the supplied drawing used as a mask, tinted grey */
.amx-slider__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.6vw, 22px); margin: 0; padding: 6px 16px 14px; list-style: none; background: var(--surface, #fff); }
.amx-slider__dot { display: block; width: 34px; height: 26px; padding: 3px; border: 0; background: transparent; cursor: pointer; }
.amx-slider__dot-art {
  display: block; width: 100%; height: 100%;
  background-color: var(--amx-dot-off);
  -webkit-mask: url("../images/ornaments/dot-slider.png") center / contain no-repeat;
          mask: url("../images/ornaments/dot-slider.png") center / contain no-repeat;
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.amx-slider__dot:hover .amx-slider__dot-art { background-color: #9a9a9a; }
.amx-slider__dot[aria-current="true"] .amx-slider__dot-art { background-color: var(--amx-dot-on); transform: scale(1.08); }
.amx-slider__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 1099px) {
  .amx-slider__slide { flex-basis: calc(100% / 3); }
  .amx-slider__btn { height: calc(100vw / 3 * 10 / 16); }
}
@media (max-width: 700px) {
  .amx-slider__slide { flex-basis: 80%; }
  .amx-slider__btn { height: calc(80vw * 10 / 16); width: 40px; font-size: 34px; }
  .amx-slider__dot { width: 26px; height: 22px; }
}

/* inner pages: the slider sits directly under the site header */
body:not(.ambook-home) .amx-slider { margin-bottom: clamp(8px, 2vw, 20px); border-bottom: 1px solid var(--line-soft); }

/* ---------- topic mosaic: zero gaps, 1px black separators ---------- */
.amx-mosaic { margin: 0; padding: 0; background: #000; }
.amx-mosaic__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.amx-mosaic__item { position: relative; min-width: 0; overflow: hidden; border-left: 1px solid #000; aspect-ratio: 1 / 1; background: #1a1a1a; }
.amx-mosaic__item:first-child { border-left: 0; }
.amx-mosaic__link { position: absolute; inset: 0; display: block; overflow: hidden; color: #fff; text-decoration: none; }
.amx-mosaic__img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 900ms cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.amx-mosaic__title {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 12px 12px 13px; font: 700 17px/1.2 var(--sans); color: #fff;
  background: var(--amx-mosaic-colour, var(--amx-deepblue));
  transform: translateY(101%); transition: transform 420ms cubic-bezier(.2, .7, .2, 1);
}
.amx-mosaic__link:hover .amx-mosaic__img, .amx-mosaic__link:focus-visible .amx-mosaic__img, .amx-mosaic__link.is-revealed .amx-mosaic__img { transform: scale(1.09); }
.amx-mosaic__link:hover .amx-mosaic__title, .amx-mosaic__link:focus-visible .amx-mosaic__title, .amx-mosaic__link.is-revealed .amx-mosaic__title { transform: translateY(0); }
.amx-mosaic__link:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.amx-mosaic__item--1 { --amx-mosaic-colour: var(--amx-saffron); }
.amx-mosaic__item--2 { --amx-mosaic-colour: var(--amx-red); }
.amx-mosaic__item--3 { --amx-mosaic-colour: var(--amx-blue); }
.amx-mosaic__item--4 { --amx-mosaic-colour: var(--amx-deepblue); }
.amx-mosaic__item--5 { --amx-mosaic-colour: var(--amx-red); }
.amx-mosaic__item--6 { --amx-mosaic-colour: var(--amx-saffron); }
.amx-mosaic__item--7 { --amx-mosaic-colour: var(--amx-green); }
.amx-mosaic__item--8 { --amx-mosaic-colour: var(--amx-violet); }
@media (max-width: 1099px) {
  .amx-mosaic__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .amx-mosaic__item:nth-child(4n + 1) { border-left: 0; }
  .amx-mosaic__item:nth-child(n + 5) { border-top: 1px solid #000; }
}
@media (max-width: 600px) {
  .amx-mosaic__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amx-mosaic__item { border-left: 1px solid #000; border-top: 0; }
  .amx-mosaic__item:nth-child(odd) { border-left: 0; }
  .amx-mosaic__item:nth-child(n + 3) { border-top: 1px solid #000; }
  .amx-mosaic__title { font-size: 15.5px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .amx-mosaic__img, .amx-mosaic__title, .amx-slider__media img { transition: none; } }

/* ---------- transparent book cover: shadow follows the artwork ---------- */
.amx-cover-float img, .amx-team__cover img {
  box-shadow: none; background: transparent;
  filter: drop-shadow(10px 14px 12px rgba(20, 24, 30, .26)) drop-shadow(3px 4px 3px rgba(20, 24, 30, .16));
}
.amx-team__cover { background: transparent; border: 0; padding: 0; }
.amx-support-hero img { box-shadow: none; filter: none; }

/* ---------- text-only update notes ---------- */
.amx-notes { padding-block: clamp(26px, 4vw, 44px) clamp(30px, 4vw, 48px); border-top: 1px solid var(--line-soft); }
.amx-notes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); }
.amx-note { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; text-decoration: none; }
.amx-note:hover { color: var(--accent-ink); }
@media (max-width: 760px) { .amx-notes__grid { grid-template-columns: 1fr; } }

/* arrows sized from the slider's own width (exact image height) */
.amx-slider__stage { container-type: inline-size; }
@supports (height: 1cqw) {
  .amx-slider__btn { height: calc(20cqw * 10 / 16); }
  @media (max-width: 1099px) { .amx-slider__btn { height: calc(100cqw / 3 * 10 / 16); } }
  @media (max-width: 700px) { .amx-slider__btn { height: calc(80cqw * 10 / 16); } }
}
