/* The flip-through annual report (/annual-report). Colours and type come from the site's
   own tokens (--t2-*), declared in every page's <head>. */

.ar-section { padding-top: clamp(40px, 5vw, 64px); }

/* The frame holds the book and its controls; it is also what goes full screen. */
.ar-frame {
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 24px;
  background: var(--t2-purple-tint);
  padding: clamp(16px, 3vw, 40px) clamp(8px, 3vw, 40px) clamp(16px, 2.5vw, 28px);
}
.ar-frame:fullscreen {
  max-width: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--t2-ink);
}
.ar-frame:fullscreen .ar-book { width: min(100%, calc((100vh - 120px) * 1.414)); margin: 0 auto; }
.ar-frame:fullscreen .ar-count,
.ar-frame:fullscreen .ar-hint { color: var(--t2-white); }

.ar-book { position: relative; outline-offset: 6px; }
/* Keep a whole spread on screen: an A4 page is 1 : 1.414, so a two-page spread at a given
   height is 1.414 times that height wide. */
.ar-book.is-book { width: min(100%, calc((100vh - 230px) * 1.414)); min-width: min(100%, 300px); margin: 0 auto; }
/* A closed book (cover, or back cover) sits in the middle rather than on one half. */
.ar-book.is-book .stf__parent { transition: transform 0.5s ease; }
.ar-book.is-book.at-start .stf__parent { transform: translateX(-25%); }
.ar-book.is-book.at-end .stf__parent { transform: translateX(25%); }
@media (prefers-reduced-motion: reduce) { .ar-book.is-book .stf__parent { transition: none; } }
.ar-book:focus-visible { outline: 3px solid var(--t2-purple); }

/* Without the script: a plain scrolling list of pages. */
.ar-pages {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: 16px;
}
.ar-pages img,
.ar-page img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--t2-white);
}
.ar-pages img { box-shadow: 0 2px 12px rgba(40, 36, 74, 0.15); }

/* With the script: the book. */
.ar-page { background: var(--t2-white); overflow: hidden; }
.ar-page img { height: 100%; object-fit: cover; }
.ar-book.is-book .stf__block { filter: drop-shadow(0 6px 18px rgba(40, 36, 74, 0.22)); }

.ar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-top: clamp(16px, 2.5vw, 24px);
}
.ar-controls[hidden] { display: none; }
.ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--t2-purple);
  border-radius: 999px;
  background: var(--t2-white);
  color: var(--t2-purple);
  font: 600 16px/1 var(--t2-font);
  cursor: pointer;
}
.ar-btn:hover { background: var(--t2-purple); color: var(--t2-white); }
.ar-btn:focus-visible { outline: 3px solid var(--t2-ink); outline-offset: 2px; }
.ar-btn:disabled { cursor: default; border-style: dashed; border-color: var(--t2-charcoal-soft); background: var(--t2-white); color: var(--t2-charcoal-soft); }
.ar-btn[aria-pressed="false"][data-ar-sound] { border-style: dashed; }
.ar-btn svg { width: 20px; height: 20px; flex: none; }
.ar-btn[data-ar-sound] .ar-icon-off { display: none; }
.ar-btn[data-ar-sound][aria-pressed="false"] .ar-icon-on { display: none; }
.ar-btn[data-ar-sound][aria-pressed="false"] .ar-icon-off { display: inline; }
.ar-btn[hidden] { display: none; }

.ar-count {
  min-width: 10.5em;
  margin: 0;
  text-align: center;
  font: 600 16px/1.4 var(--t2-font);
  color: var(--t2-ink);
}
.ar-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--t2-text-soft);
}
.ar-download { margin-top: clamp(24px, 3vw, 32px); text-align: center; }

/* What's inside: two columns of contents links on wider screens. */
.ar-contents {
  list-style: none;
  margin: 24px auto 0;
  padding: 0;
  max-width: 880px;
  columns: 2 320px;
  column-gap: 40px;
  text-align: left;
}
.ar-contents li { break-inside: avoid; border-bottom: 1px solid var(--t2-mist); }
.ar-contents a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px;
  color: var(--t2-ink);
  text-decoration: none;
  font-size: 17px;
}
.ar-contents a:hover .ar-contents-title,
.ar-contents a:focus-visible .ar-contents-title { text-decoration: underline; }
.ar-contents-page { color: var(--t2-purple); font-weight: 600; white-space: nowrap; }

@media (max-width: 640px) {
  .ar-btn { padding: 0 14px; font-size: 15px; }
  .ar-count { order: -1; flex-basis: 100%; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ar-hint[hidden] { display: none; }

/* Hero: the report cover stands on the site's decorative circles, at book size rather than
   stretched to the width of the hero column. */
.sc-hero-right:has(.ar-hero-cover) { width: 100%; max-width: 400px; margin-inline: auto; }
.sc-hero-photo.ar-hero-cover {
  position: relative;
  z-index: 1;
  width: 78%;
  height: auto;
  margin: 8% auto;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(40, 36, 74, 0.28);
}
