/* ==========================================================================
   REELS — header button, page strip and the swipeable popup player.
   Loaded only on pages where reels exist. Same palette and type as site.css.
   ========================================================================== */

/* --- header button: small, with a slow brass pulse ----------------------- */
.hdr__reels {
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--bone); text-decoration: none;
  border: 1px solid rgba(195, 154, 78, 0.55);
  transition: border-color 320ms var(--ease), background 320ms var(--ease), color 320ms var(--ease);
}
.hdr__reels svg { width: 19px; height: 19px; overflow: visible; }
.hdr__reels-f { fill: none; stroke: currentColor; stroke-width: 1.6; }
.hdr__reels-p { fill: var(--brass); transform-origin: 12.6px 12px; animation: rl-beat 2.8s var(--ease) infinite; }
.hdr__reels::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid var(--brass); opacity: 0;
  animation: rl-ring 2.8s var(--ease) infinite;
}
.hdr__reels:hover, .hdr__reels:focus-visible { border-color: var(--brass); background: rgba(195, 154, 78, 0.14); color: var(--brass-lift); }
.hdr__reels-n {
  position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--brass); color: var(--navy);
  font-size: 0.56rem; font-weight: 500; line-height: 16px; text-align: center; letter-spacing: 0;
}
@keyframes rl-ring { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
@keyframes rl-beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } }
@media (min-width: 981px) and (max-width: 1240px) { .hdr__acts { gap: 10px; } }
@media (max-width: 980px) { .hdr__reels { width: 36px; height: 36px; } }

/* --- strip on the page --------------------------------------------------- */
.rlx__head { margin-bottom: clamp(26px, 3.4vw, 46px); }
.rlx__all { white-space: nowrap; }
.rlx__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 17vw, 218px);
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding-bottom: 10px; margin: 0;
}
.rlx__card {
  scroll-snap-align: start; display: block; text-decoration: none; color: var(--ink);
}
.band--dark .rlx__card { color: var(--bone); }
.rlx__media {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: 3px; background: var(--navy);
  box-shadow: 0 1px 0 var(--line);
}
.rlx__media img, .rlx__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease);
}
.rlx__card:hover .rlx__media img, .rlx__card:hover .rlx__media video { transform: scale(1.04); }
.rlx__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 15, 27, 0.7), rgba(6, 15, 27, 0) 45%);
}
.rlx__ph { position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 20%, var(--navy-3), var(--navy) 70%); }
.rlx__play {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 50%; border: 1px solid rgba(250, 248, 244, 0.7); background: rgba(10, 26, 47, 0.35);
  backdrop-filter: blur(4px); transition: background 320ms var(--ease), border-color 320ms var(--ease);
}
.rlx__play::before {
  content: ""; position: absolute; left: 19px; top: 15px;
  border-left: 14px solid var(--bone); border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.rlx__card:hover .rlx__play { background: var(--brass); border-color: var(--brass); }
.rlx__src {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass-lift);
}
.rlx__t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 12px; font-size: 0.9rem; line-height: 1.45;
}
.rlx__from { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--muted); }
.rlx__card:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

/* --- the popup ----------------------------------------------------------- */
html.rl-lock, html.rl-lock body { overflow: hidden; }
.rl {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(6, 15, 27, 0.94); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 260ms var(--ease);
}
.rl.is-open { opacity: 1; }
.rl[hidden] { display: none; }
.rl__stage {
  position: relative;
  height: min(92vh, 900px); height: min(92dvh, 900px);
  aspect-ratio: 9 / 16; max-width: 100vw;
  border-radius: 6px; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.rl__track {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.rl__track::-webkit-scrollbar { display: none; }
.rl__slide {
  position: relative; height: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden; background: #000;
}
.rl__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8); }
.rl__media { position: absolute; inset: 0; }
.rl__media iframe, .rl__media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.rl__media video { object-fit: cover; }
.rl__slide--instagram .rl__media iframe { background: #fff; }
/* YouTube: scale the 16:9 player up so a vertical short fills the frame */
.rl__slide--youtube .rl__media iframe { top: 50%; left: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); }
.rl__hit { position: absolute; inset: 0 0 0 0; z-index: 2; cursor: pointer; }
.rl__slide--instagram .rl__hit, .rl__slide--drive .rl__hit { inset: 0 0 auto 0; height: 14%; }
.rl__flash {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(10, 26, 47, 0.55); pointer-events: none;
  opacity: 0; transform: scale(0.8); transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.rl__flash.is-on { opacity: 1; transform: scale(1); }
.rl__flash::before { content: ""; position: absolute; left: 25px; top: 20px; border-left: 18px solid var(--bone); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.rl__flash--pause::before { left: 22px; top: 21px; width: 6px; height: 22px; border: 0; background: var(--bone); box-shadow: 13px 0 0 var(--bone); }

.rl__info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 60px 64px 20px 18px; color: var(--bone);
  background: linear-gradient(to top, rgba(6, 15, 27, 0.86), rgba(6, 15, 27, 0.5) 55%, rgba(6, 15, 27, 0));
  pointer-events: none;
}
.rl__slide--instagram .rl__info, .rl__slide--drive .rl__info { padding-top: 16px; background: rgba(6, 15, 27, 0.88); }
.rl__info > * { pointer-events: auto; }
.rl__t { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.12rem; line-height: 1.3; }
.rl__c { margin: 6px 0 0; font-size: 0.8rem; line-height: 1.55; color: rgba(239, 234, 225, 0.78); max-height: 4.7em; overflow-y: auto; }
.rl__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rl__btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border: 1px solid rgba(239, 234, 225, 0.35); border-radius: 999px; background: rgba(10, 26, 47, 0.35);
  color: var(--bone); font: inherit; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 260ms var(--ease), border-color 260ms var(--ease), color 260ms var(--ease);
}
.rl__btn:hover, .rl__btn:focus-visible { border-color: var(--brass); color: var(--brass-lift); }
.rl__btn--brass { background: var(--brass); border-color: var(--brass); color: var(--navy); }
.rl__btn--brass:hover, .rl__btn--brass:focus-visible { background: var(--brass-lift); border-color: var(--brass-lift); color: var(--navy); }
.rl__btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.rl__ui { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.rl__ui > * { pointer-events: auto; }
.rl__top {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 26px 16px; background: linear-gradient(to bottom, rgba(6, 15, 27, 0.6), rgba(6, 15, 27, 0));
  pointer-events: none;
}
.rl__top > * { pointer-events: auto; }
.rl__count { font-size: 0.62rem; letter-spacing: 0.24em; color: var(--brass-lift); }
.rl__round {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(239, 234, 225, 0.3); background: rgba(10, 26, 47, 0.45);
  color: var(--bone); cursor: pointer; padding: 0;
  transition: border-color 260ms var(--ease), background 260ms var(--ease);
}
.rl__round:hover, .rl__round:focus-visible { border-color: var(--brass); background: rgba(195, 154, 78, 0.25); }
.rl__round svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rl__side { position: absolute; right: 10px; bottom: 22px; z-index: 5; display: grid; gap: 10px; }
.rl__round[disabled] { opacity: 0.35; cursor: default; }
.rl__hint {
  position: absolute; left: 50%; top: 46%; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 999px; background: rgba(10, 26, 47, 0.7); color: var(--bone);
  font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none; animation: rl-hint 2.6s var(--ease) forwards;
}
@keyframes rl-hint { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.rl__toast {
  position: absolute; left: 50%; top: 64px; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 3px; background: var(--brass); color: var(--navy); font-size: 0.72rem;
  pointer-events: none;
}

/* desktop: arrows beside the frame */
.rl__arrows { position: absolute; right: calc(50% - min(92vh, 900px) * 9 / 32 - 64px); top: 50%; transform: translateY(-50%); display: grid; gap: 12px; z-index: 6; }
.rl__close-d { position: absolute; top: 22px; right: 24px; z-index: 6; }

@media (max-width: 720px), (max-height: 520px) {
  .rl { background: #000; }
  .rl__stage { width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .rl__arrows, .rl__close-d { display: none; }
  .rl__info { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (min-width: 721px) and (min-height: 521px) { .rl__top .rl__x { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hdr__reels::after, .hdr__reels-p, .rl__hint { animation: none; }
  .rl, .rlx__media img { transition: none; }
}

/* the extra header button needs ~48px; on the narrowest desktop widths the
   menu tightens slightly so everything stays on one line */
@media (min-width: 981px) and (max-width: 1120px) {
  .hdr__inner { gap: 16px; }
  .nav__list { gap: 13px; }
  .nav__link { letter-spacing: 0.12em; }
  .hdr__acts { gap: 8px; }
}
@media (max-width: 480px) {
  .hdr__acts { gap: 8px; }
  .hdr__reels { width: 34px; height: 34px; }
  .hdr__reels svg { width: 17px; height: 17px; }
}
