/* Base layer on top of the Tailwind CDN build. */

:root {
  color-scheme: light;
  --brand-primary: #5a1b39;
  --brand-accent: #e8b93f;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  touch-action: manipulation;
}

/* Consistent, visible keyboard focus everywhere. */
:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * Geometric star motif used as a background texture.
 * Kept at very low opacity so it never competes with content.
 * ------------------------------------------------------------------ */
.pattern-surface {
  position: relative;
  isolation: isolate;
}
.pattern-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url('/static/pattern.svg');
  background-repeat: repeat;
  background-size: 132px 132px;
  pointer-events: none;
}
/* Gold motif on the maroon brand surface */
.pattern-on-dark::before {
  color: #e8b93f;
  opacity: 0.09;
}
/* Maroon motif on the cream page */
.pattern-on-light::before {
  color: #5a1b39;
  opacity: 0.05;
}

/* Thin gold rule used to separate brand bands. */
.gold-rule {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #a87c1e 18%,
    #e8b93f 50%,
    #a87c1e 82%,
    transparent 100%
  );
}

/* ------------------------------------------------------------------ *
 * Player
 * ------------------------------------------------------------------ */

/* The YouTube IFrame API replaces the #yt-player div with an <iframe> that
   keeps the id but none of the classes, so target both shapes. */
#player-region iframe,
iframe#yt-player,
#yt-player iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* Transparent shield over the player: blocks the YouTube title bar, channel
   avatar, "Watch later"/"Share" buttons and the end-screen video grid, all of
   which would otherwise let a viewer navigate away to other videos.
   Playback is driven by our own Pause/Resume button instead. */
#player-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  cursor: default;
}

/* Ticker: pause on hover/focus so a long message can be read. */
[role='marquee'] > div:hover,
[role='marquee'] > div:focus-within {
  animation-play-state: paused;
}

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [role='marquee'] > div {
    animation: none !important;
    white-space: normal;
  }
}

/* Hide number-input spinners on the ITS field. */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Screen-reader-only helper. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
