/* ==========================================================================
   LIMERICK SPORT — scroll journey landing page
   Shared blue across all teams. Trims: Sharks aqua, Lions orange, Eagles navy.
   ========================================================================== */

:root {
  --blue:        #1A5FBF;
  --blue-mid:    #2E7DD4;
  --blue-light:  #6AAEE8;
  --navy:        #0A1A3A;
  --night:       #050D24;
  --aqua:        #17C2D8;
  --aqua-deep:   #0FA8BC;
  --orange:      #F5841F;
  --orange-deep: #D96B0A;
  --paper:       #EAF3FA;
  --white:       #FFFFFF;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --journey-vh: 650;     /* keep in sync with JOURNEY_VH in js/limerick-sport.js */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background: #041E30;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ----- type ----- */
.t-display, .t-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
}
.t-display { font-size: clamp(54px, 9vw, 116px); line-height: 0.92; }
.t-h1      { font-size: clamp(44px, 6.5vw, 84px); line-height: 0.95; }
.t-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.85;
}
.eyebrow--aqua { color: var(--aqua); }
.eyebrow--blue { color: var(--blue); }

/* ----- buttons ----- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--aqua   { background: var(--aqua);   color: var(--night); box-shadow: 0 8px 28px rgba(23, 194, 216, 0.35); }
.btn--orange { background: var(--orange); color: var(--night); box-shadow: 0 8px 28px rgba(245, 132, 31, 0.35); }
.btn--navy   { background: var(--navy);   color: var(--white); box-shadow: 0 8px 28px rgba(10, 26, 58, 0.35); }

/* ==========================================================================
   Loader + flash + canvas
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 60;
  background: var(--night);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-mark {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.04em;
  color: var(--white);
}
.preloader-mark span { color: var(--aqua); }
.preloader-bar {
  width: 180px; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 40%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--aqua), var(--blue-mid));
  animation: load-slide 1.1s ease-in-out infinite;
}
@keyframes load-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(460%); }
}

#flash {
  position: fixed; inset: 0; z-index: 50;
  background: #EAFBFF;
  opacity: 0;
  pointer-events: none;
}

#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}

/* WebGL / CDN fallback: give the page a readable gradient instead of the scene */
body.no-webgl #bg-canvas { display: none; }
body.no-webgl {
  background: linear-gradient(180deg, #041E30 0%, #0A5468 30%, #F2DFC6 55%, #CFE4F2 80%, #EAF3FA 100%);
}

/* ==========================================================================
   Header
   ========================================================================== */
.ls-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  color: var(--white);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}
body.light-world .ls-header { color: var(--navy); text-shadow: none; }

.ls-wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ls-wordmark span { color: var(--aqua); transition: color 0.5s ease; }
body.light-world .ls-wordmark span { color: var(--blue); }

.ls-nav { display: flex; gap: 22px; align-items: center; }
.ls-nav--left { justify-content: flex-start; }
.ls-nav--right { justify-content: flex-end; gap: 10px; }
.ls-nav a {
  font-weight: 600; font-size: 14px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.ls-nav a:hover { opacity: 1; }

.pill {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700 !important;
  font-size: 13px !important;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.pill--ghost {
  border: 1px solid currentColor;
}
.pill--solid {
  background: var(--white); color: var(--navy) !important;
}
body.light-world .pill--solid { background: var(--navy); color: var(--white) !important; }

/* ==========================================================================
   Progress rail
   ========================================================================== */
.rail {
  position: fixed; right: 26px; top: 50%; z-index: 29;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 18px;
}
.rail-dot {
  position: relative;
  width: 24px; height: 24px;
  padding: 6px;                    /* 24px touch target, 12px visible dot */
  border-radius: 50%;
  background: var(--dot, #fff);
  background-clip: content-box;
  opacity: 0.45;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rail-dot:hover, .rail-dot.active, .rail-dot:focus-visible { opacity: 1; transform: scale(1.3); }
.rail-dot span {
  position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
body.light-world .rail-dot span { color: var(--navy); }
.rail-dot:hover span, .rail-dot.active span, .rail-dot:focus-visible span { opacity: 0.9; }

/* ==========================================================================
   Journey + hero
   ========================================================================== */
#journey {
  position: relative;
  height: calc(var(--journey-vh) * 1vh);
  z-index: 2;
}

.hero-stage {
  position: absolute; top: 0; left: 0; right: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
}
/* frosted panel keeps the hero copy crisp; it sits centred in the page while
   the bouncing ball is framed to its left by the camera (see js frame loop) */
.hero-inner {
  max-width: 600px;
  padding: 42px 46px;
  border-radius: 26px;
  background: rgba(5, 16, 30, 0.58);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.hero-sub {
  max-width: 520px;
  margin-top: 22px;
  font-size: 17px;
  font-weight: 400;
  opacity: 0.9;
}
.scroll-hint {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.8;
}
.scroll-hint svg { animation: hint-bob 1.6s ease-in-out infinite; }
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(7px); opacity: 1; }
}

/* ==========================================================================
   Stations
   ========================================================================== */
.station {
  position: absolute;
  left: 0; right: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 7vw;
  pointer-events: none;
}
/* top = p * (journey-vh - 100) vh.
   These three fractions (0.20 / 0.53 / 0.86) must stay in sync with:
   - the data-p values on the .rail-dot buttons in index.html
   - the setActiveDot thresholds and uM1/uM2 morph windows in js/limerick-sport.js */
.station--sharks { top: calc(0.20 * (var(--journey-vh) - 100) * 1vh); }
.station--lions  { top: calc(0.53 * (var(--journey-vh) - 100) * 1vh); }
.station--eagles { top: calc(0.86 * (var(--journey-vh) - 100) * 1vh); }

.station--right { justify-content: flex-end; }

.station-card {
  max-width: 470px;
  pointer-events: auto;
  padding: 36px 38px;
  border-radius: 22px;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
html.js .station-card { opacity: 0; transform: translateY(54px); }
html.js .station.in .station-card { opacity: 1; transform: translateY(0); }

.station--sharks .station-card {
  background: rgba(4, 26, 38, 0.66);
  border: 1px solid rgba(23, 194, 216, 0.35);
  color: var(--white);
}
.station--lions .station-card {
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(245, 132, 31, 0.45);
  color: var(--navy);
}
.station--eagles .station-card {
  background: rgba(248, 251, 255, 0.82);
  border: 1px solid rgba(10, 26, 58, 0.3);
  color: var(--navy);
}

.station-logo { height: 92px; width: auto; margin-bottom: 18px; }
/* Eagles mark is a wide horizontal lockup (~1.83:1) — constrain by height,
   let width follow, and cap the width so it never overflows the card. */
.station-logo--wide { height: auto; width: auto; max-height: 72px; max-width: 220px; }

.station--sharks .eyebrow { color: var(--aqua); }
.station--lions  .eyebrow { color: #8F4505; opacity: 1; } /* AA contrast on the light card */
.station--eagles .eyebrow { color: var(--blue); }

.station-name {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 8px 0 12px;
  opacity: 0.7;
}
.station-copy { font-size: 16px; line-height: 1.6; margin-bottom: 18px; }

.chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.chips li {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.85;
}

/* ==========================================================================
   Finale + footer
   ========================================================================== */
.finale {
  position: relative; z-index: 2;
  padding: 18vh 0 12vh;
  text-align: center;
  color: var(--navy);
  background: linear-gradient(180deg, rgba(234, 243, 250, 0) 0%, rgba(234, 243, 250, 0.9) 18%, var(--paper) 40%);
}
.finale-sub {
  max-width: 540px;
  margin: 22px auto 56px;
  font-size: 17px;
  opacity: 0.8;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.team-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 44px 26px 36px;
  border-radius: 22px;
  background: var(--white);
  border-top: 6px solid var(--navy);
  box-shadow: 0 18px 50px rgba(10, 26, 58, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(10, 26, 58, 0.16); }
.team-card--sharks { border-top-color: var(--aqua); }
.team-card--lions  { border-top-color: var(--orange); }
.team-card--eagles { border-top-color: var(--night); }
.team-card img { height: 100px; width: auto; object-fit: contain; }
/* Eagles mark is wide (~1.83:1); at 100px tall it would stretch ~183px wide
   and unbalance the grid. Constrain by width so it sits level with the others. */
.team-card--eagles img { height: auto; width: auto; max-height: 78px; max-width: 150px; }
.team-card h3 {
  font-family: var(--font-display);
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.team-card p { font-size: 14px; opacity: 0.75; }
.team-card .t-label { margin-top: 6px; }
.team-card--sharks .t-label { color: var(--aqua-deep); }
.team-card--lions  .t-label { color: var(--orange-deep); }
.team-card--eagles .t-label { color: var(--blue); }

.ls-footer {
  position: relative; z-index: 2;
  background: var(--night);
  color: var(--white);
  padding: 70px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-statement {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}
.footer-statement span { color: var(--aqua); }
.footer-tags { margin-top: 16px; font-size: 13px; opacity: 0.55; }
.footer-col h3 {
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--blue-light);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; opacity: 0.8; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.55;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .ls-header { padding: 16px 18px; grid-template-columns: auto 1fr; }
  .ls-nav--left { display: none; }
  .ls-wordmark { font-size: 20px; }
  .ls-nav--right { gap: 8px; }
  .pill { padding: 8px 14px; font-size: 12px !important; }
  .rail { right: 12px; }
  .rail-dot span { display: none; }
  .hero-stage { padding: 0 18px; }
  .hero-inner { max-width: 100%; padding: 30px 26px; }
  .station { padding: 0 18px; }
  .station--right { justify-content: flex-start; }
  .station-card { padding: 28px 24px; max-width: 100%; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .pill--ghost { display: none; }
  .pill { padding: 8px 12px; font-size: 11px !important; }
  .ls-wordmark { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint svg, .preloader-bar span { animation: none; }
  .station-card, .team-card, .btn { transition: none; }
}
