/* Localized motion layer: layout, palette, photographs and typography stay intact. */
:root { --ab-ease: cubic-bezier(.22, 1, .36, 1); }
/* Readable before JS, with JS disabled, or if motion.js cannot load. */
.reveal { opacity: 1; transform: none; }
.gallery-card { animation: none; }
.ab-motion-ready .ab-reveal {
  transition: opacity 760ms var(--ab-ease), transform 760ms var(--ab-ease),
    box-shadow 260ms ease, border-color 260ms ease;
  transition-delay: var(--ab-delay, 0ms), var(--ab-delay, 0ms), 0ms, 0ms;
}
.ab-motion-ready .ab-reveal:not(.visible) { opacity: 0; transform: translate3d(0, 22px, 0); }
.ab-motion-ready .ab-reveal.visible { opacity: 1; transform: none; }
.ab-motion-ready .hero-content > .ab-reveal { transition-duration: 950ms; }
.ab-motion-ready .hero-image { animation: ab-photo-entry 1400ms var(--ab-ease) both; }
@keyframes ab-photo-entry { from { opacity: .45; } to { opacity: 1; } }
.header { transition: box-shadow 320ms ease, border-color 320ms ease; }
.header.has-scrolled { box-shadow: 0 12px 32px #00000024; border-bottom-color: var(--accent); }
.button, .nav-book, .gallery-card, .partner-card, .contact-links > a {
  transition: translate 320ms var(--ab-ease), box-shadow 320ms ease,
    background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}
.button > span:last-child, .text-link > span:last-child, .contact-links > a > span:last-child,
.brand-monogram > span { display: inline-block; transition: transform 320ms var(--ab-ease); }
.gallery-photo { overflow: hidden; }
.gallery-photo img { transition: transform 650ms var(--ab-ease), filter 650ms ease; }
#menu-toggle span { transition: transform 280ms var(--ab-ease); }
#menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
#menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
/* Existing active navigation underline also works on keyboard focus. */
.header nav a:focus-visible:after { transform: scaleX(1); }
.button:focus-visible, .nav-book:focus-visible { box-shadow: 0 0 0 4px #fa61562b; }
.gallery-card:focus-visible img { transform: scale(1.025); }
.lightbox:not([hidden]) .lightbox-panel { animation: ab-dialog-entry 220ms var(--ab-ease) both; }
@keyframes ab-dialog-entry { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 961px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ab-motion-ready .hero-image { transform: translate3d(0, var(--ab-shift, 0px), 0) scale(1.025); }
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: none; translate: 0 -3px; }
  .button:hover > span:last-child, .text-link:hover > span:last-child,
  .contact-links > a:hover > span:last-child, .brand:hover .brand-monogram > span { transform: translate(2px, -2px); }
  .partner-card:hover { translate: 0 -4px; border-color: var(--accent); }
  .gallery-card:hover img { transform: scale(1.03); }
}
@media (max-width: 600px) {
  .ab-motion-ready .ab-reveal { transition-duration: 580ms; }
  .ab-motion-ready .ab-reveal:not(.visible) { transform: translate3d(0, 14px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ab-motion-ready .ab-reveal, .ab-motion-ready .hero-image,
  .lightbox:not([hidden]) .lightbox-panel { opacity: 1; transform: none; animation: none; transition: none; }
  .button, .nav-book, .gallery-card, .partner-card, .contact-links > a { translate: none !important; }
  .gallery-card:hover img, .gallery-card:focus-visible img,
  .button:hover > span:last-child, .text-link:hover > span:last-child,
  .contact-links > a:hover > span:last-child { transform: none; }
}

/* V2: signature photographic reveal and a portrait collage using existing photos. */
.athlete-photo > #portrait-image { position: relative; z-index: 1; }
.athlete-photo-accent { position: absolute; inset: 18px -16px -18px 20px; border: 1px solid var(--accent); pointer-events: none; }
.athlete-inset { position: absolute; right: -28px; bottom: 76px; width: 43%; height: 39%; z-index: 2;
  border: 7px solid var(--background); box-shadow: 0 18px 45px #0007; transform: rotate(3deg); overflow: hidden; }
.athlete-inset img { object-position: 48% 42%; }
.athlete-photo figcaption { z-index: 3; }
.athlete-photo::before { content: 'AB'; position: absolute; left: -32px; top: -86px;
  font: 900 clamp(110px,15vw,210px)/1 Arial,sans-serif; letter-spacing: -.08em; color: transparent;
  -webkit-text-stroke: 1px var(--border); pointer-events: none; }
.ab-motion-ready .hero-image { animation: ab-cinematic-entry 1600ms var(--ab-ease) both; }
@keyframes ab-cinematic-entry {
  from { opacity: .25; clip-path: polygon(100% 0,100% 0,100% 100%,100% 100%); }
  to { opacity: 1; clip-path: polygon(0 0,100% 0,100% 100%,0 100%); }
}
@supports (-webkit-text-stroke: 1px red) {
  .ab-motion-ready .hero-last { -webkit-text-stroke: 1px var(--accent); animation: ab-title-ink 1750ms ease both; }
  @keyframes ab-title-ink { 0%,40% { color: transparent; } 100% { color: var(--accent); } }
}
.ab-motion-ready .hero::after { content:''; position:absolute; bottom:0; left:0; width:100%; height:2px;
  background:var(--accent); transform-origin:left; animation: ab-line-entry 1400ms var(--ab-ease) 250ms both; }
@keyframes ab-line-entry { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ab-motion-ready .athlete-photo.visible > #portrait-image { animation: ab-portrait-reveal 1100ms var(--ab-ease) both; }
@keyframes ab-portrait-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ab-motion-ready .athlete-photo .athlete-inset { opacity:0; transform:translateY(30px) rotate(7deg); }
.ab-motion-ready .athlete-photo.visible .athlete-inset { animation:ab-inset-entry 1000ms var(--ab-ease) 220ms both; }
@keyframes ab-inset-entry { to { opacity:1; transform:translateY(0) rotate(3deg); } }
.record-panel { position:relative; }
.ab-motion-ready .record-panel::before { content:''; position:absolute; height:3px; background:var(--accent);
  top:-2px; left:0; width:100%; transform:scaleX(0); transform-origin:left; }
.ab-motion-ready .record-panel.visible::before { animation:ab-line-entry 900ms var(--ab-ease) both; }
@media (hover:hover) and (pointer:fine) {
  .athlete-inset { transition:rotate 550ms var(--ab-ease); }
  .athlete-photo:hover .athlete-inset { rotate:-3deg; }
}
@media (max-width:600px) {
  .athlete-photo-accent { inset:12px -7px -12px 12px; }
  .athlete-photo::before { left:-8px; top:-48px; font-size:120px; }
  .athlete-inset { right:10px; bottom:64px; width:42%; height:36%; border-width:5px; }
  .ab-motion-ready .hero-image { animation:ab-photo-entry 900ms ease both; }
  .ab-motion-ready .hero-last { animation-duration:1200ms; }
}
@media (prefers-reduced-motion:reduce) {
  .ab-motion-ready .hero-image, .ab-motion-ready .hero-last,
  .ab-motion-ready .athlete-photo.visible > #portrait-image,
  .ab-motion-ready .athlete-photo .athlete-inset, .ab-motion-ready .athlete-photo.visible .athlete-inset {
    animation:none; opacity:1; clip-path:none; color:var(--accent);
  }
  .ab-motion-ready .athlete-photo .athlete-inset { transform:rotate(3deg); }
  .ab-motion-ready .hero::after, .ab-motion-ready .record-panel::before { animation:none; transform:scaleX(1); }
  .athlete-photo:hover .athlete-inset { rotate:none; }
}

/* Statistics move inside their own ribbon, never the document. */
.facts #fact-list { width:100%; max-width:none; display:block; overflow:hidden; }
.facts-track { display:flex; width:max-content; animation:ab-facts-travel 44s linear infinite; }
.facts-group { display:flex; align-items:center; justify-content:space-around; gap:64px;
  flex-shrink:0; min-width:100vw; padding:0 40px; }
.facts-group .fact { flex:0 0 auto; min-width:230px; padding:0 22px; }
.facts-group .fact strong { white-space:nowrap; }
@keyframes ab-facts-travel { to { transform:translateX(-50%); } }
.facts #fact-list.is-paused .facts-track, .facts #fact-list:hover .facts-track { animation-play-state:paused; }
.facts-controls { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:16px; }
.facts-controls .facts-note { margin:0; }
.facts-motion-toggle { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; min-height:44px;
  flex-shrink:0; border:1px solid var(--border); background:transparent; color:var(--muted); font:10px/1.4 var(--sans); }
.facts-motion-toggle:hover, .facts-motion-toggle:focus-visible { color:var(--paper); border-color:var(--accent); }
@media(max-width:600px) {
  .facts-group { gap:28px; padding:0 20px; }
  .facts-group .fact { flex-direction:row; text-align:left; min-width:210px; padding:0 12px; }
  .facts-group .fact small { max-width:100px; }
  .facts-controls { gap:10px; }
  .facts-motion-toggle { font-size:9px; padding:7px; }
}
@media(prefers-reduced-motion:reduce) {
  .facts-track { display:block; width:100%; animation:none; transform:none; }
  .facts-group[aria-hidden] { display:none; }
  .facts-group { min-width:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 20px; }
  .facts-group .fact { min-width:0; padding:0; flex-direction:column; text-align:center; }
}
