/* The Amsterdam Adventure: polish layer. White pages with a rice-paper edge, calmer navigation,
   larger carousel arrows, phone-first refinements and gentle page transitions. Loaded last. */

/* ---------- white page, aged rice paper along the left edge ---------- */
:root { --bg: #ffffff; --surface: #ffffff; --shade: #f6f4ef; --shade-2: #eeebe3; --line: #dedad0; --line-soft: #ece9e1; }
body.amx { background: #fff; }
body.amx::after {
  content: ""; position: fixed; z-index: -1; top: 0; bottom: 0; left: 0; width: clamp(18px, 15vw, 230px);
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="260" height="260"%3E%3Cfilter id="a" x="0" y="0"%3E%3CfeTurbulence stitchTiles="stitch" type="fractalNoise" baseFrequency=".012 .03" numOctaves="3" seed="11"/%3E%3CfeColorMatrix values="0 0 0 0 .80  0 0 0 0 .70  0 0 0 0 .45  0 0 0 .55 -.12"/%3E%3C/filter%3E%3Cfilter id="b" x="0" y="0"%3E%3CfeTurbulence stitchTiles="stitch" type="fractalNoise" baseFrequency=".9 .07" numOctaves="2" seed="4"/%3E%3CfeColorMatrix values="0 0 0 0 .62  0 0 0 0 .54  0 0 0 0 .36  0 0 0 1.1 -.62"/%3E%3C/filter%3E%3Cfilter id="c" x="0" y="0"%3E%3CfeTurbulence stitchTiles="stitch" type="fractalNoise" baseFrequency="1.6" numOctaves="1" seed="2"/%3E%3CfeColorMatrix values="0 0 0 0 .5  0 0 0 0 .45  0 0 0 0 .32  0 0 0 .9 -.55"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" fill="%23fbf6e8"/%3E%3Crect width="100%25" height="100%25" filter="url(%23a)"/%3E%3Crect width="100%25" height="100%25" filter="url(%23b)" opacity=".55"/%3E%3Crect width="100%25" height="100%25" filter="url(%23c)" opacity=".35"/%3E%3C/svg%3E') 0 0 / 260px 260px repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 42%, rgba(0, 0, 0, .45) 74%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 42%, rgba(0, 0, 0, .45) 74%, transparent 100%);
  pointer-events: none;
}
.amx-header, .amx-id, .amx-bar, .amx-slider, .amx-slider__card, .amx-slider__dots, .amx-team { background: transparent; }
@media print { body.amx::after { display: none; } }

/* ---------- site title: a quiet link home that grows a little on wide screens ---------- */
.amx-id__text { font-size: clamp(11px, .42vw + 5.5px, 15px); }
.amx-id__link, .amx-id__link:visited, .amx-id__link:hover, .amx-id__link:active, .amx-id__link:focus {
  color: inherit; text-decoration: none; background: none; -webkit-tap-highlight-color: transparent;
}
.amx-id__link:focus { outline: 0; }
.amx-id__link:focus-visible { outline: 1px dotted currentColor; outline-offset: 5px; }
@media (max-width: 640px) { .amx-id__text { font-size: 10px; } }

/* ---------- carousel arrows: about 40% larger, in the book's display face ---------- */
.amx-slider__btn {
  width: clamp(56px, 5vw, 78px); font: 300 56px/1 var(--amx-f-head, Georgia, serif);
  font-variation-settings: "SOFT" 100, "WONK" 1; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(90deg, rgba(10, 18, 30, .5), rgba(10, 18, 30, 0));
}
.amx-slider__btn--next { background: linear-gradient(270deg, rgba(10, 18, 30, .5), rgba(10, 18, 30, 0)); }
.amx-slider__btn span { transform: translateY(-4px); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); transition: transform 220ms var(--ease); }
.amx-slider__btn--prev:hover span { transform: translate(-3px, -4px); }
.amx-slider__btn--next:hover span { transform: translate(3px, -4px); }
.amx-slider__btn:hover { background-color: transparent; }
@media (max-width: 700px) { .amx-slider__btn { width: 50px; font-size: 48px; } }

/* ---------- simple previous / next ---------- */
.amx-step { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; margin: 0 0 clamp(40px, 6vw, 72px); padding-top: clamp(18px, 2.4vw, 26px); border-top: 1px solid var(--line-soft); }
.amx-step__link { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 48px; padding: 4px 0; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.amx-step__link--next { margin-left: auto; align-items: flex-end; text-align: right; }
.amx-step__dir { font-family: var(--amx-f-head, Georgia, serif); font-weight: var(--amx-w-head, 560); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.1; color: var(--accent-ink); }
.amx-step__dir span { display: inline-block; transition: transform 220ms var(--ease); }
.amx-step__link--prev:hover .amx-step__dir span { transform: translateX(-4px); }
.amx-step__link--next:hover .amx-step__dir span { transform: translateX(4px); }
.amx-step__label { font: 10.5px/1.35 var(--ui); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.amx-step__spacer { flex: 1; }

/* single reading column for topic and plain pages */
.amx-prose--single { padding-bottom: clamp(30px, 5vw, 56px); }
.amx-chapter-grid { padding-bottom: clamp(30px, 5vw, 56px); }
.amx-topic-head { margin-bottom: clamp(26px, 4vw, 44px); }

/* ---------- timeline: lighter ---------- */
.amx-years { gap: 2px 18px; margin: 0 0 clamp(24px, 4vw, 40px); }
.amx-years a, .amx-years span { min-width: 0; min-height: 40px; padding: 0 2px; border: 0; background: none; color: var(--muted); font: 400 16px/1 var(--amx-f-head, Georgia, serif); font-variation-settings: "SOFT" 100, "WONK" 1; }
.amx-years a:hover { color: var(--accent-ink); border: 0; text-decoration: underline; text-underline-offset: .3em; }
.amx-timeline__events { border-left-width: 1px; padding-left: 26px; }
.amx-event { padding-bottom: clamp(26px, 3vw, 34px); }
.amx-event::before { left: -31px; top: 6px; width: 9px; height: 9px; border-width: 1.5px; }
.amx-event__date { margin-bottom: 4px; font: 11px/1.4 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.amx-event__title { margin-bottom: 6px; }
.amx-event__more { display: inline-block; margin-top: 10px; font: 12px/1.4 var(--ui); letter-spacing: .04em; color: var(--accent-ink); text-decoration: none; }
.amx-event__more:hover { text-decoration: underline; text-underline-offset: .25em; }
.amx-timeline__yearlabel { font-size: 18px; font-weight: var(--amx-w-head, 560); }

/* ---------- small ornament bullets in quiet lists (with ornaments on) ---------- */
.amx-orn .amx-aside__list li, .amx-orn .amx-footer__menu li { position: relative; padding-left: 16px; }
.amx-orn .amx-aside__list li::before, .amx-orn .amx-footer__menu li::before {
  content: ""; position: absolute; left: 0; top: .78em; width: 9px; height: 5px; background: var(--amx-bullet-2, none) center / contain no-repeat; opacity: .9;
}
.amx-orn .amx-footer__menu li::before { top: 16px; }

/* ---------- buttons ---------- */
.amx-btn, .amx-link, .amx-tool { -webkit-tap-highlight-color: transparent; }
.amx-btn { transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease); }
.amx-btn:active { transform: translateY(1px); }
.amx-band__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- vertical scrolling: no section snapping anywhere ---------- */
html:has(body.ambook-home) { scroll-snap-type: none; }
body.ambook-home .amx-snap { scroll-snap-align: none; }
html { scroll-behavior: auto; }
.amx-slider__track { touch-action: pan-x pan-y; }

/* ---------- phones: designed, not squeezed ---------- */
@media (max-width: 700px) {
  :root { --gutter: 20px; --section: 40px; }
  body.amx { font-size: 15px; }
  .amx-prose { font-size: 15px; line-height: 1.72; }
  .amx-prose > * + * { margin-top: 1em; }
  .amx-page-head, .amx-chapter-head { padding-top: 22px; }
  .amx-page-head__title, .amx-chapter-head__title, .amx-topic-head__title { max-width: none; line-height: 1.14; }
  .amx-chapter-head { padding-bottom: 16px; margin-bottom: 22px; }
  .amx-chapter-head__line { font-size: 14px; line-height: 1.55; }
  .amx-topic-head { gap: 18px; padding-block: 0 22px; }
  .amx-topic-head__banner { margin-inline: calc(var(--gutter) * -1); aspect-ratio: 16 / 9; }

  .amx-band__inner { min-height: 0; padding-block: 26px 28px; }
  .amx-band__sub { font-size: 13.5px; }
  .amx-band__actions { margin-top: 16px; }

  .amx-slider__body { padding: 12px 14px 4px; gap: 4px; }
  .amx-slider__title { font-size: 15px; }
  .amx-slider__intro { font-size: 12.5px; }
  .amx-slider__dots { gap: 4px; padding: 8px 12px 16px; }

  .amx-team__grid { gap: 26px; }
  .amx-team__cover { order: -1; width: min(52vw, 200px); }
  .amx-team__actions { flex-direction: column; align-items: stretch; }
  .amx-team__actions .amx-btn { width: 100%; }
  .amx-record { gap: 14px; padding: 22px 20px; }
  .amx-notes__grid { gap: 0; }
  .amx-note { padding-block: 14px; border-top: 1px solid var(--line-soft); }
  .amx-note:first-child { border-top: 0; padding-top: 0; }

  .amx-aside { gap: 20px; }
  .amx-step { gap: 12px; }
  .amx-step__link { flex: 1 1 0; min-width: 0; }
  .amx-step__dir { font-size: 1.15rem; }
  .amx-step__label { font-size: 10px; letter-spacing: .1em; }

  .amx-timeline__year { gap: 0; }
  .amx-timeline__yearlabel { margin: 0 0 12px; }
  .amx-years { gap: 0 16px; }

  .amx-footer__grid { gap: 26px; }
  .amx-support-hero { padding: 20px; gap: 18px; }
  .amx-support-hero img { width: 120px; }
}

/* ---------- motion: gentle page changes and swipe feedback ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 150ms cubic-bezier(.4, 0, 1, 1) both amx-vt-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(.2, .7, .2, 1) both amx-vt-in; }
@keyframes amx-vt-out { to { opacity: 0; } }
@keyframes amx-vt-in { from { opacity: 0; transform: translateY(6px); } }
.amx-main.is-swiping { transition: none; }
.amx-main.is-leaving { transition: transform 170ms cubic-bezier(.4, 0, 1, 1), opacity 170ms linear; opacity: 0; }
.amx-main.is-settling { transition: transform 240ms cubic-bezier(.2, .7, .2, 1), opacity 240ms ease; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .amx-main.is-leaving, .amx-main.is-settling { transition: none; }
}

/* paper strip on phones: a narrow edge that stays clear of the text */
@media (max-width: 700px) { body.amx::after { width: 16px; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 50%, transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 50%, transparent 100%); } }
