/* ==========================================================================
   GBM Studies — Prototype 01 — Our Story, replacement for the reach map
   Option A  about-story-a.html  .as-wall   learner stories mosaic + player
   Option B  about-story-b.html  .as-film   cinematic film band + photo strip
   Shared: counters (.as-count), "Sample clip" tag, prototype switcher.
   Builds on tokens.css, site.css and pages.css.
   ========================================================================== */

.as-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .6rem; border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); background: rgba(3,17,11,.62); box-shadow: inset 0 0 0 1px rgba(230,211,166,.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- Shared slim counter row ---------- */
.as-count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.as-count li { padding: 1.1rem 1.2rem 1.15rem 0; }
.as-count li + li { padding-left: 1.2rem; border-left: 1px solid var(--line-dark); }
.as-count b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.6rem); line-height: 1; color: var(--gold-300); font-variant-numeric: tabular-nums; }
.as-count span { display: block; margin-top: .4rem; font-size: .82rem; color: rgba(246,238,219,.62); }

/* ==========================================================================
   Option A — Learner stories wall
   ========================================================================== */
.as-wall__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem 4rem; align-items: end; }
.as-wall__head .as-count { align-self: end; }
.as-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.6rem 0 1.4rem; }
.as-chips button { display: inline-flex; align-items: center; gap: .5rem; height: 38px; padding: 0 1rem; border-radius: var(--radius-pill); font-size: .84rem; font-weight: 500; color: rgba(246,238,219,.78); box-shadow: inset 0 0 0 1px var(--line-dark); transition: background-color .3s, color .3s, box-shadow .3s; }
.as-chips button small { min-width: 20px; padding: 0 .4rem; border-radius: 999px; font-size: .7rem; color: rgba(246,238,219,.55); background: rgba(246,238,219,.08); }
.as-chips button:hover { color: var(--ivory-50); box-shadow: inset 0 0 0 1px rgba(230,211,166,.45); }
.as-chips button[aria-pressed="true"] { color: var(--emerald-950); background: var(--gold-300); box-shadow: none; }
.as-chips button[aria-pressed="true"] small { color: var(--emerald-950); background: rgba(3,17,11,.12); }

/* masonry: rows are 10px; js/about-story.js sets each tile's row span from its content */
.as-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 10px; grid-auto-flow: dense; gap: 14px; }
.as-tile { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.35rem; border-radius: 22px; overflow: hidden; background: rgba(246,238,219,.045); box-shadow: inset 0 0 0 1px var(--line-dark); opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out), box-shadow .3s; }
.as-tile.is-in { opacity: 1; transform: none; }
.as-tile[hidden] { display: none; }
.as-tile--wide { grid-column: span 2; }
.as-tile--tall { grid-row: span 2; }
.as-tile--big { grid-column: span 2; grid-row: span 2; }
.as-tile:hover { box-shadow: inset 0 0 0 1px rgba(230,211,166,.35); }
.as-tile__q { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.22; color: var(--ivory-50); }
.as-tile--wide .as-tile__q, .as-tile--big .as-tile__q { font-size: clamp(1.4rem, 1.1rem + .8vw, 1.85rem); }
.as-tile__q::before { content: "\201C"; display: block; height: .5em; margin-bottom: .1rem; font-size: 2.2em; line-height: 1; color: var(--gold-400); }
.as-tile__who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.as-tile__av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--emerald-950); background: var(--grad-gold); }
.as-tile__who b { display: block; font-weight: 600; font-size: .9rem; color: var(--ivory-50); }
.as-tile__who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; color: rgba(246,238,219,.6); }
.as-tile__prog { display: inline-flex; align-self: flex-start; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: var(--radius-pill); font-size: .72rem; color: var(--gold-300); background: rgba(214,185,124,.1); }

/* video tiles */
.as-tile--video { padding: 0; background: var(--emerald-900); }
.as-tile__media, .as-tile__media video, .as-tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-tile__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,17,11,.15) 0%, rgba(3,17,11,.35) 45%, rgba(3,17,11,.9) 100%); }
.as-tile__open { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: .9rem; padding: 1.3rem 1.35rem; text-align: left; color: inherit; }
.as-tile__open:focus-visible { outline: 2px solid var(--gold-400); outline-offset: -4px; border-radius: 22px; }
.as-tile__open .as-tag { position: absolute; top: 1rem; left: 1rem; }
.as-tile__play { position: absolute; top: .85rem; right: .85rem; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; color: var(--emerald-950); background: var(--grad-gold); box-shadow: 0 16px 40px -16px rgba(0,0,0,.7); transition: transform .45s var(--ease-spring); }
.as-tile--video:hover .as-tile__play, .as-tile__open:focus-visible .as-tile__play { transform: scale(1.08); }
.as-tile--video .as-tile__q { font-size: 1.25rem; }

/* player */
.as-player { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px; overflow: hidden; color: var(--ivory-50); background: var(--emerald-950); box-shadow: 0 40px 120px -30px rgba(0,0,0,.8); }
.as-player::backdrop { background: rgba(3,17,11,.78); }
.as-player[open] { animation: asIn .45s var(--ease-out); }
.as-player__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; }
.as-player__head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.as-player__head small { display: block; margin-top: .2rem; font-size: .8rem; color: rgba(246,238,219,.6); }
.as-player__acts { display: flex; gap: .5rem; }
.as-player__acts button { display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 .9rem; border-radius: var(--radius-pill); font-size: .82rem; color: var(--ivory-50); box-shadow: inset 0 0 0 1px var(--line-dark); transition: box-shadow .3s, background-color .3s; }
.as-player__acts button:hover { box-shadow: inset 0 0 0 1px rgba(230,211,166,.5); }
.as-player__acts button[aria-pressed="true"] { color: var(--emerald-950); background: var(--gold-300); box-shadow: none; }
.as-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.as-player video::cue { font-family: var(--font-sans); font-size: 1rem; color: #fff; background: rgba(3,17,11,.78); }
.as-player__quote { padding: 1rem 1.2rem 1.3rem; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.35; color: rgba(246,238,219,.85); }
@keyframes asIn { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Option B — Inside GBM film band
   ========================================================================== */
.as-film { padding-top: 0; }
.as-band { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 21 / 9; min-height: 520px; max-height: 86vh; display: flex; align-items: flex-end; color: var(--ivory-50); background: #04140d url("../assets/course_campus_corporate.jpg") center / cover no-repeat; }
.as-band__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.as-band__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,17,11,.92) 0%, rgba(3,17,11,.55) 45%, rgba(3,17,11,.2) 100%), linear-gradient(0deg, rgba(3,17,11,.95) 0%, rgba(3,17,11,0) 55%); }
.as-band__inner { width: 100%; padding-bottom: clamp(2rem, 1rem + 3vw, 3.6rem); }
.as-band__inner .pg-h2 { max-width: 15ch; }
.as-band__lead { margin-top: 1rem; max-width: 46ch; color: rgba(246,238,219,.74); }
.as-band .as-count { margin-top: 2rem; max-width: 900px; border-color: rgba(230,211,166,.22); }
.as-band .as-count li + li { border-color: rgba(230,211,166,.22); }
.as-band__ctrl { position: absolute; top: clamp(5.5rem, 4rem + 3vw, 7rem); right: var(--gutter); display: flex; align-items: center; gap: .6rem; }
.as-band__toggle { display: inline-flex; align-items: center; gap: .5rem; height: 40px; padding: 0 1rem; border-radius: var(--radius-pill); font-size: .82rem; color: var(--ivory-50); background: rgba(3,17,11,.55); box-shadow: inset 0 0 0 1px rgba(230,211,166,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: box-shadow .3s; }
.as-band__toggle:hover { box-shadow: inset 0 0 0 1px rgba(230,211,166,.6); }
.as-band__toggle:focus-visible, .as-strip__nav button:focus-visible, .as-strip:focus-visible, .as-chips button:focus-visible, .as-switch a:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; }

.as-strip-wrap { padding-top: clamp(3.5rem, 2rem + 4vw, 6rem); }
.as-strip__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.6rem; }
.as-strip__head .h3 { margin-top: .8rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.8rem); line-height: 1.05; }
.as-strip__head .h3 em { font-style: italic; color: var(--gold-300); }
.as-strip__nav { display: flex; gap: .5rem; }
.as-strip__nav button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ivory-50); box-shadow: inset 0 0 0 1px var(--line-dark); transition: box-shadow .3s, opacity .3s; }
.as-strip__nav button:hover { box-shadow: inset 0 0 0 1px rgba(230,211,166,.55); }
.as-strip__nav button:disabled { opacity: .35; cursor: default; }
.as-strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3.4); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 2px; padding: 2px 2px 1rem; scrollbar-width: none; cursor: grab; }
.as-strip::-webkit-scrollbar { display: none; }
.as-strip.is-drag { cursor: grabbing; scroll-snap-type: none; }
.as-strip.is-drag a { pointer-events: none; }
.as-shot { scroll-snap-align: start; position: relative; min-width: 0; border-radius: 22px; overflow: hidden; background: var(--emerald-900); box-shadow: inset 0 0 0 1px var(--line-dark); }
.as-shot img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease-out); user-select: none; -webkit-user-drag: none; }
.as-shot:hover img { transform: scale(1.04); }
.as-shot figcaption { position: absolute; inset: auto 0 0 0; padding: 4rem 1.2rem 1.2rem; background: linear-gradient(0deg, rgba(3,17,11,.95) 0%, rgba(3,17,11,.7) 55%, rgba(3,17,11,0) 100%); }
.as-shot small { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); }
.as-shot b { display: block; margin-top: .35rem; font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; color: var(--ivory-50); }
.as-shot p { margin-top: .4rem; font-size: .84rem; line-height: 1.45; color: rgba(246,238,219,.72); }
.as-shot a { display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; font-size: .82rem; font-weight: 600; color: var(--gold-300); }
.as-shot a i { font-size: .7rem; transition: transform .3s var(--ease-out); }
.as-shot a:hover i { transform: translateX(3px); }

/* ---------- Prototype switcher ---------- */
.as-switch { position: fixed; left: 16px; bottom: 16px; z-index: calc(var(--z-nav) - 2); display: flex; align-items: center; gap: .2rem; padding: .3rem; border-radius: var(--radius-pill); font-size: .78rem; color: var(--ivory-50); background: rgba(3,17,11,.86); box-shadow: inset 0 0 0 1px rgba(230,211,166,.25), 0 16px 40px -20px rgba(0,0,0,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.as-switch > span { padding: 0 .55rem 0 .65rem; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(246,238,219,.55); }
.as-switch a { padding: .4rem .75rem; border-radius: var(--radius-pill); color: rgba(246,238,219,.8); transition: background-color .25s, color .25s; }
.as-switch a:hover { color: var(--ivory-50); background: rgba(246,238,219,.08); }
.as-switch a[aria-current="page"] { color: var(--emerald-950); background: var(--gold-300); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .as-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .as-wall__head { grid-template-columns: minmax(0, 1fr); }
  .as-strip { grid-auto-columns: calc((100% - 32px) / 2.3); }
}
@media (max-width: 820px) {
  .as-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-count { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-count li:nth-child(3) { padding-left: 0; border-left: 0; }
  .as-count li:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .as-band { aspect-ratio: auto; min-height: 640px; max-height: none; }
  .as-band__ctrl { top: 5.2rem; }
}
@media (max-width: 560px) {
  .as-mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .as-tile, .as-tile--wide, .as-tile--tall, .as-tile--big { grid-column: auto; grid-row: auto; min-height: 190px; }
  .as-tile--video { min-height: 0; aspect-ratio: 4 / 5; }
  .as-strip { grid-auto-columns: 82%; }
  .as-strip__nav { display: none; }
  .as-player__head { flex-wrap: wrap; }
  .as-switch { bottom: 14px; left: 14px; }
  .as-switch > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .as-tile { opacity: 1; transform: none; transition: none; }
  .as-shot img, .as-tile__play { transition: none; }
  .as-player[open] { animation: none; }
}

/* Note under the film band (the programmes strip was removed) */
.as-film__note { padding-top: 1.6rem; }
.as-film__note .pg-note { margin-top: 0; }
