/*
 * SPDX-License-Identifier: MIT
 * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, subject to the MIT License terms.
 * See https://opensource.org/licenses/MIT for the full licence text.
 */

/* ===== GUMTOPIA PARK - LIQUID GLASS DARK MODE ===== */

@font-face {
  font-family: "Comic Code";
  src:
    url("https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff2")
      format("woff2"),
    url("https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff")
      format("woff");
  font-weight: 400;
}
@font-face {
  font-family: "Comic Code";
  src:
    url("https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff2")
      format("woff2"),
    url("https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff")
      format("woff");
  font-style: italic;
}
@font-face {
  font-family: "Comic Code";
  src:
    url("https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff2")
      format("woff2"),
    url("https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff")
      format("woff");
  font-weight: 500;
}
@font-face {
  font-family: "Comic Code";
  src:
    url("https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff2")
      format("woff2"),
    url("https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff")
      format("woff");
  font-weight: 700;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink: #ff6eb4;
  --pink-light: #ff9dd0;
  --pink-pale: rgba(255, 110, 180, 0.08);
  --pink-dark: #d94f94;
  --purple: #c084fc;
  --purple-dark: #a855f7;
  --purple-pale: rgba(192, 132, 252, 0.08);
  --mint: #6ee7b7;
  --mint-dark: #10b981;
  --yellow: #dfc350;
  --yellow-dark: #f59e0b;
  --coral: #fca5a5;
  --blue: #7dd3fc;

  /* Backgrounds */
  --bg: #08050f;
  --bg-blob-1: rgba(255, 110, 180, 0.18);
  --bg-blob-2: rgba(168, 85, 247, 0.18);
  --bg-blob-3: rgba(110, 231, 183, 0.1);

  /* Glass surfaces */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-bright: rgba(255, 110, 180, 0.4);
  --glass-blur: blur(20px);
  --glass-blur-heavy: blur(40px);

  /* Fallback for no backdrop-filter (Firefox) */
  --glass-fallback: rgba(20, 10, 35, 0.85);

  /* Text */
  --white: #ffffff;
  --text-dark: rgba(255, 255, 255, 0.95);
  --text-mid: rgba(255, 255, 255, 0.6);
  --text-light: rgba(255, 255, 255, 0.3);

  /* Glows */
  --glow-pink: 0 0 30px rgba(255, 110, 180, 0.35);
  --glow-purple: 0 0 30px rgba(192, 132, 252, 0.35);
  --glow-mint: 0 0 30px rgba(110, 231, 183, 0.35);
  --glow-sm-pink: 0 0 12px rgba(255, 110, 180, 0.25);

  /* Structure */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --content-max: 1680px; /* site-wide content width cap */
  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.5s ease;
}

html {
  scroll-behavior: smooth;
}

/* ===== PAGE TRANSITION ===== */
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ANIMATED BACKGROUND ===== */
body {
  font-family: "Comic Code", "Courier New", monospace;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  animation: page-enter 0.35s ease-out;
}

/* Fade-out state toggled by main.js right before navigation */
body.page-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  body,
  body.page-leaving {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* Animated background blobs */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 12s ease-in-out infinite;
}

body::before {
  width: 600px;
  height: 600px;
  background: var(--bg-blob-1);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

body::after {
  width: 500px;
  height: 500px;
  background: var(--bg-blob-2);
  bottom: -150px;
  right: -150px;
  animation-delay: -6s;
}

/* Extra blob via pseudo on main */
main::before {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  background: var(--bg-blob-3);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: blobFloat 16s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--pink-light);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  color: var(--purple);
}

/* ===== GLASS MIXIN ===== */
.glass {
  background: var(--glass-fallback);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4 {
  font-family: "Comic Code", monospace;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

/* ===== OPENING TIMES BANNER ===== */
.opening-banner {
  position: relative;
  z-index: 1001;
  background: linear-gradient(
    90deg,
    rgba(217, 79, 148, 0.9),
    rgba(168, 85, 247, 0.9),
    rgba(217, 79, 148, 0.9)
  );
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--white);
  text-align: center;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--glass-border-bright);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.opening-banner span {
  margin: 0 0.5rem;
  opacity: 0.75;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--glass-fallback);
  background: rgba(8, 5, 15, 0.6);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 4px 0 rgba(255, 110, 180, 0.2);
}

.navbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
}

.navbar-brand:hover {
  color: var(--pink-light);
  text-shadow: var(--glow-pink);
}

.navbar-brand .brand-icon {
  font-size: 1.6rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-mid);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  position: relative;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 110, 180, 0.12);
  border-color: rgba(255, 110, 180, 0.25);
  text-shadow: var(--glow-sm-pink);
}

.nav-links a.active {
  color: var(--white);
  background: rgba(255, 110, 180, 0.2);
  border-color: rgba(255, 110, 180, 0.5);
  box-shadow:
    var(--glow-sm-pink),
    0 0 0 1px rgba(255, 110, 180, 0.2) inset;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.hero::before {
  content: "🫧🫧🫧🫧🫧🫧🫧🫧🫧🫧🫧🫧";
  position: absolute;
  top: 8%;
  left: 0;
  right: 0;
  font-size: 2rem;
  opacity: 0.06;
  letter-spacing: 2.5rem;
  pointer-events: none;
  animation: floatBubbles 8s ease-in-out infinite;
}

@keyframes floatBubbles {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow:
    0 0 60px rgba(255, 110, 180, 0.6),
    0 0 120px rgba(192, 132, 252, 0.3);
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 110, 180, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--pink-light);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 110, 180, 0.4);
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: var(--glow-sm-pink);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-mid);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: "Comic Code", monospace;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-dark), var(--purple-dark));
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--glow-pink),
    0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  color: var(--white);
  box-shadow:
    var(--glow-pink),
    0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--purple-dark), rgba(192, 132, 252, 0.8));
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--glow-purple),
    0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  color: var(--white);
  box-shadow:
    var(--glow-purple),
    0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-mint {
  background: linear-gradient(135deg, var(--mint-dark), var(--mint));
  color: var(--bg);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--glow-mint);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Fills the remaining viewport height so pages with thin content
   (like contact) don't leave a big empty gap above the footer, and
   the layout stays stable when a success banner is inserted. */
.section-fill {
  flex: 1 0 auto;
  width: 100%; /* prevent flex-column + margin:0 auto from shrinking to content */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}
.section-title p {
  color: var(--text-mid);
  font-size: 1rem;
}

.section-title .title-tag {
  display: inline-block;
  background: rgba(253, 230, 138, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(253, 230, 138, 0.3);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== CARDS ===== */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: var(--glass-fallback);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: var(--transition);
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-bright);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    var(--glow-pink),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.15), rgba(192, 132, 252, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.card-body {
  padding: 1.25rem;
}
.card-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}
.card-body p {
  color: var(--text-mid);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* card variants — subtle tints */
.card-pink {
  background: rgba(255, 110, 180, 0.06);
}
.card-mint {
  background: rgba(110, 231, 183, 0.06);
}
.card-yellow {
  background: rgba(253, 230, 138, 0.06);
}
.card-purple {
  background: rgba(192, 132, 252, 0.06);
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-pink {
  background: rgba(255, 110, 180, 0.25);
  color: var(--pink-light);
  border: 1px solid rgba(255, 110, 180, 0.4);
}
.badge-purple {
  background: rgba(192, 132, 252, 0.25);
  color: var(--purple);
  border: 1px solid rgba(192, 132, 252, 0.4);
}
.badge-mint {
  background: rgba(110, 231, 183, 0.25);
  color: var(--mint);
  border: 1px solid rgba(110, 231, 183, 0.4);
}
.badge-yellow {
  background: rgba(253, 230, 138, 0.25);
  color: var(--yellow);
  border: 1px solid rgba(253, 230, 138, 0.4);
}
.badge-coral {
  background: rgba(252, 165, 165, 0.25);
  color: var(--coral);
  border: 1px solid rgba(252, 165, 165, 0.4);
}
.badge-past {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== SEARCH ===== */
.search-wrapper {
  max-width: 580px;
  margin: 0 auto 3rem;
  position: relative;
}

.search-wrapper input {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-family: "Comic Code", monospace;
  outline: none;
  transition: var(--transition-fast);
  background: var(--glass-fallback);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-dark);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.search-wrapper input::placeholder {
  color: var(--text-light);
}

.search-wrapper input:focus {
  border-color: var(--glass-border-bright);
  box-shadow:
    var(--glow-pink),
    0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--glass-fallback);
  background: rgba(15, 8, 25, 0.85);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    var(--glow-sm-pink);
  z-index: 100;
  overflow: hidden;
  display: none;
}

.search-result-item {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: rgba(255, 110, 180, 0.1);
}
.search-result-item .type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple);
  letter-spacing: 1px;
}
.search-result-item h4 {
  font-size: 0.95rem;
  margin: 0.15rem 0;
  color: var(--text-dark);
}
.search-result-item p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== PAGE HERO ===== */
.page-hero {
  position: relative;
  padding: 3.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255, 110, 180, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 30%, rgba(192, 132, 252, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  position: relative;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(255, 110, 180, 0.4);
}

.page-hero p {
  position: relative;
  opacity: 0.65;
  font-size: 1rem;
  color: var(--text-mid);
}

/* ===== FORMS ===== */
.form-wrap {
  background: var(--glass-fallback);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  padding: 2.5rem;
  width: 70%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: "Comic Code", monospace;
  transition: var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dark);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-sm-pink);
  background: rgba(255, 255, 255, 0.08);
}

.form-group select option {
  background: #1a0a2e;
  color: var(--text-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  max-height: 400px;
}

.error-msg {
  color: #f87171;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: block;
  visibility: hidden;
  min-height: 1.1em;
  font-weight: 600;
}
.error-msg.show {
  visibility: visible;
}

/* ===== SUCCESS BANNER ===== */
.success-banner {
  background: rgba(110, 231, 183, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  font-weight: 700;
  box-shadow: var(--glow-mint);
  width: 70%;
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  color: var(--mint);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--glass-fallback);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.faq-item:hover {
  border-color: var(--glass-border-bright);
  box-shadow:
    var(--glow-sm-pink),
    0 4px 20px rgba(0, 0, 0, 0.2);
}

.faq-question {
  padding: 1.1rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  user-select: none;
  color: var(--text-dark);
}

.faq-question:hover {
  background: rgba(255, 110, 180, 0.06);
}
.faq-question .faq-icon {
  font-size: 1.2rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
  color: var(--pink-light);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    padding 0.35s ease;
  padding: 0 1.5rem;
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* ===== EVENTS ===== */
.events-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
}

.events-controls select {
  padding: 0.6rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-family: "Comic Code", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--glass-fallback);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition-fast);
}

.events-controls select option {
  background: #1a0a2e;
}

.events-controls select:focus {
  outline: none;
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-sm-pink);
}

.event-card {
  background: var(--glass-fallback);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-bright);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    var(--glow-pink);
  color: inherit;
}

.event-card.is-past {
  opacity: 0.45;
}

.event-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.event-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple);
}
.event-card h3 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
  color: var(--text-dark);
}
.event-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.5;
}

.no-events,
.events-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  font-style: italic;
  grid-column: 1 / -1;
}

/* ===== ACTIVITY ===== */
.activity-wrap {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.game-board {
  display: grid;
  gap: 0.75rem;
  margin: 0 auto 2rem;
}

.game-card {
  aspect-ratio: 1;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  user-select: none;
  position: relative;
  transform-style: preserve-3d;
}

.game-card:hover:not(.flipped):not(.matched) {
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.4),
    var(--glow-sm-pink);
  border-color: var(--glass-border-bright);
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: calc(var(--radius-sm) - 1px);
}

.game-card.flipped .card-inner,
.game-card.matched .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius-sm) - 1px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-front {
  background: linear-gradient(135deg, rgba(217, 79, 148, 0.4), rgba(168, 85, 247, 0.4));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.8rem;
}

.card-back {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: rotateY(180deg);
  font-size: 2.2rem;
}

.game-card.matched .card-back {
  background: rgba(110, 231, 183, 0.15);
  border-color: rgba(110, 231, 183, 0.4);
}

.game-card.matched {
  cursor: default;
  box-shadow: var(--glow-mint);
  border-color: rgba(110, 231, 183, 0.4);
}

.game-card.matched:hover {
  transform: none;
}

.game-card.wrong .card-inner {
  animation: wrongShake 0.4s ease;
}

@keyframes wrongShake {
  0%,
  100% {
    transform: rotateY(180deg) translateX(0);
  }
  25% {
    transform: rotateY(180deg) translateX(-6px);
  }
  75% {
    transform: rotateY(180deg) translateX(6px);
  }
}

.win-message {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.win-box {
  background: var(--glass-fallback);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    var(--glow-pink),
    var(--glow-purple);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.win-box h2 {
  margin: 0.5rem 0;
  color: var(--text-dark);
}
.win-box p {
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.game-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.stat-box {
  background: var(--glass-fallback);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--glass-fallback);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    var(--glow-purple);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 110, 180, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 110, 180, 0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--pink-light);
  transition: var(--transition);
  box-shadow: var(--glow-sm-pink);
}

.modal-close:hover {
  background: rgba(255, 110, 180, 0.35);
  transform: scale(1.1);
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.modal-box h2 {
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}
.modal-box p {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
  background: var(--glass-fallback);
  background: rgba(8, 5, 15, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-mid);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

footer h4 {
  color: var(--pink-light);
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: var(--glow-sm-pink);
}

footer ul {
  list-style: none;
}
footer ul li {
  margin-bottom: 0.4rem;
}
footer ul a {
  color: var(--text-mid);
  font-size: 0.85rem;
}
footer ul a:hover {
  color: var(--pink-light);
  text-shadow: var(--glow-sm-pink);
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--text-mid);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition-fast);
}
.footer-socials a:hover {
  color: var(--pink-light);
  border-color: rgba(255, 110, 180, 0.45);
  background: rgba(255, 110, 180, 0.12);
  box-shadow: var(--glow-sm-pink);
  transform: translateY(-1px);
}
.footer-socials svg {
  display: block;
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

.opening-times-highlight {
  background: rgba(255, 110, 180, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--pink-light);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 110, 180, 0.35);
  box-shadow: var(--glow-sm-pink);
}

/* ===== HIGHLIGHT STRIP ===== */
.highlight-strip {
  background: rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(253, 230, 138, 0.2);
  border-bottom: 1px solid rgba(253, 230, 138, 0.2);
  padding: 1rem 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--yellow);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Fullscreen overlay menu on mobile — slides down from the top */
  .nav-links {
    display: flex; /* always rendered; transform hides it */
    position: fixed;
    inset: 0; /* cover the entire viewport */
    width: 100vw;
    height: 100vh;
    z-index: 1500; /* above navbar (1000) and opening-banner (1001) */
    background: rgba(8, 5, 15, 0.98);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.25rem;
    padding: 4rem 1.5rem;

    /* Hidden state: slid up off-screen, non-interactive */
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.25s ease,
      visibility 0s linear 0.38s; /* delay hiding until slide completes */
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease,
      visibility 0s linear 0s; /* show immediately on open */
  }

  .nav-links a {
    width: auto;
    min-width: 180px;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    text-align: center;
  }

  /* Keep the hamburger tappable ABOVE the overlay so it can close it */
  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1600;
  }

  /* Hamburger → X when the menu is open */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 4rem 1.5rem;
  }
  .section {
    padding: 2.5rem 1.25rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .form-wrap {
    padding: 1.5rem;
    width: 100%;
  }
  .success-banner {
    width: 100%;
  }
  .events-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .game-board {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .opening-banner {
    font-size: 0.78rem;
  }
  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
  }
  h1 {
    font-size: 1.9rem;
  }
  .card-front {
    font-size: 1.4rem;
  }
  .card-back {
    font-size: 1.8rem;
  }
  .stat-box {
    font-size: 0.78rem;
    padding: 0.5rem 0.9rem;
  }
}

/* ===== HERO IMAGE OVERLAY ===== */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 5, 15, 0.75) 0%,
    rgba(217, 79, 148, 0.4) 50%,
    rgba(8, 5, 15, 0.75) 100%
  );
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  z-index: 1;
}

.habitat-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.habitat-hero .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(8, 5, 15, 0.8) 0%,
    rgba(168, 85, 247, 0.35) 50%,
    rgba(8, 5, 15, 0.8) 100%
  );
}

/* main landmark — flex column so .section-fill pages can still fill the viewport */
main#main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
}

/* ===== ACCESSIBILITY ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--pink-light, #ff6eb4);
  color: #0b0713;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Clearer focus rings across interactive elements */
:focus-visible {
  outline: 2px solid var(--pink-light, #ff6eb4);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 4px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1rem 2rem 0;
  font-size: 0.85rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0;
  margin: 0;
  color: var(--text-mid);
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumbs li + li::before {
  content: "/";
  color: rgba(255, 255, 255, 0.3);
}
.breadcrumbs a {
  color: var(--text-mid);
  text-decoration: none;
  transition: var(--transition-fast);
}
.breadcrumbs a:hover {
  color: var(--pink-light);
}
.breadcrumbs [aria-current="page"] {
  color: var(--pink-light);
  font-weight: 600;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 110, 180, 0.4);
  background: rgba(20, 10, 35, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s;
  box-shadow: var(--glow-sm-pink, 0 0 12px rgba(255, 110, 180, 0.4));
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: rgba(255, 110, 180, 0.18);
  transform: translateY(-2px);
}

/* ===== CONSERVATION ===== */
.conservation-card .card-body {
  text-align: center;
}
.impact-badge {
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(110, 231, 183, 0.1);
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: var(--radius-sm);
  color: var(--mint, #6ee7b7);
  font-size: 0.8rem;
  line-height: 1.4;
}
.impact-badge strong {
  color: var(--mint, #6ee7b7);
}

/* ===== NEWSLETTER (footer) ===== */
.footer-newsletter .newsletter-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-newsletter input[type="email"] {
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--white, #fff);
  font-size: 0.9rem;
  font-family: inherit;
}
.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: rgba(255, 110, 180, 0.5);
  background: rgba(255, 110, 180, 0.05);
}
.footer-newsletter .btn {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  width: 100%;
}
.newsletter-status {
  font-size: 0.8rem;
  min-height: 1em;
  margin: 0;
}
.newsletter-status.success {
  color: var(--mint, #6ee7b7);
}
.newsletter-status.error {
  color: #ff8a9a;
}

/* ===== MESSAGE CHAR COUNTER ===== */
.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: 1.2em;
  margin-top: 0.35rem;
}
.char-count {
  font-size: 0.8rem;
  color: var(--text-light, rgba(255, 255, 255, 0.55));
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.char-count.under {
  color: #f6c177;
}
.char-count.ok {
  color: var(--mint, #6ee7b7);
}
.char-count.over {
  color: #ff8a9a;
}

/* ===== FIND US ===== */
.find-us-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr);
  gap: 2rem;
  align-items: stretch;
  max-width: var(--content-max);
  margin: 0 auto;
}

.find-us-card {
  background: var(--glass-fallback);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.find-us-card h2 {
  margin: 0;
  color: var(--white, #fff);
}
.address-block {
  font-style: normal;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-mid);
}
.address-block strong {
  color: var(--pink-light, #ff6eb4);
  font-size: 1.1rem;
}
.address-block .postcode {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white, #fff);
}
.find-us-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.meta-label {
  color: var(--text-mid);
  font-weight: 600;
}
.meta-value {
  color: var(--white, #fff);
}
.meta-value a {
  color: var(--pink-light, #ff6eb4);
  text-decoration: none;
}
.meta-value a:hover {
  text-decoration: underline;
}

/* what3words — the signature red slashes */
.w3w-slashes {
  color: #e11f26;
  font-weight: 800;
  margin-right: 0.1rem;
  letter-spacing: -1px;
}

.find-us-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  min-height: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.map-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.85) contrast(0.95);
}

@media (max-width: 860px) {
  .find-us-grid {
    grid-template-columns: 1fr;
  }
  .map-wrap {
    min-height: 320px;
  }
}

/* ===== 404 PAGE ===== */
.error-page {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
}
.error-emoji {
  font-size: 4.5rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 110, 180, 0.4));
}
.error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ff6eb4 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-page h1 {
  margin-bottom: 1rem;
}
.error-page code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95em;
  color: var(--pink-light, #ff6eb4);
  word-break: break-all;
}

/* ===== ADMIN FINE PRINT ===== */
/* Faux-legalese with rickroll lyrics smuggled in. Rendered small and
   faded so it reads like generic boilerplate at a glance — the lyrics
   only land if the marker actually reads it. */
.admin-fineprint {
  max-width: 720px;
  margin: 3rem auto 1.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.78rem;
  line-height: 1.65;
  font-style: italic;
}
.admin-fineprint h3 {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.85rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.admin-fineprint p {
  margin: 0 0 0.7rem;
}
.admin-fineprint p:last-child {
  margin-bottom: 0;
}
/* Make selection nice and obvious so even highlight reveals lyrics clearly. */
.admin-fineprint ::selection {
  background: rgba(255, 110, 180, 0.55);
  color: #fff;
}

/* ===== ADMIN DVD BOUNCER ===== */
.dvd-bouncer {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: auto;
  pointer-events: none;
  z-index: 9000; /* above page content, below bubbles + click trap */
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18));
  transition: filter 220ms ease;
}
/* Corner celebration — fires when both X and Y hit a wall in the same frame. */
.dvd-bouncer--sparkle {
  animation: dvd-corner-celebration 900ms ease-out;
}
@keyframes dvd-corner-celebration {
  0% {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18)) brightness(1);
  }
  18% {
    filter: drop-shadow(0 0 24px rgba(255, 235, 100, 0.95))
      drop-shadow(0 0 48px rgba(255, 110, 180, 0.75)) brightness(1.6) saturate(1.4);
  }
  45% {
    filter: drop-shadow(0 0 36px rgba(255, 255, 255, 1))
      drop-shadow(0 0 72px rgba(192, 132, 252, 0.95)) brightness(2) saturate(1.6);
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18)) brightness(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dvd-bouncer {
    display: none !important;
  }
}
@media (max-width: 640px) {
  .dvd-bouncer {
    width: 90px;
  }
}

/* ===== ADMIN "TIME WASTED" TIMER ===== */
.admin-timer-line {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  justify-content: center;
}
.admin-timer-value {
  font-family: "Comic Code", ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.25), rgba(192, 132, 252, 0.25));
  padding: 0.18em 0.55em;
  border-radius: 999px;
  border: 1px solid rgba(255, 110, 180, 0.4);
  box-shadow: 0 0 18px rgba(255, 110, 180, 0.2);
  min-width: 4ch;
  text-align: center;
  letter-spacing: 0.02em;
}
.admin-timer-hint {
  font-size: 0.8rem;
  opacity: 0.65;
  font-style: italic;
}

/* ===== ADMIN CLICK-TRAP OVERLAY ===== */
/* Invisible, full-viewport. Catches the first real pointer/touch/key event
   so we get a user-activation gesture and can play audio. Self-destructs
   the moment it's triggered. */
.admin-click-trap {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: transparent;
  cursor: pointer;
  /* Subtle dim that fades in only with the hint, so it doesn't affect
       the page until we want to draw attention. */
  transition: background-color 600ms ease;
}
.admin-click-trap--show-hint {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.admin-click-trap--show-hint::before {
  content: "Click anywhere to begin";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.85rem 1.6rem;
  background: rgba(20, 16, 28, 0.85);
  color: #fff;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 110, 180, 0.35);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 110, 180, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation:
    admin-click-trap-hint-in 700ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both,
    admin-click-trap-hint-pulse 2.4s ease-in-out 700ms infinite;
}
@keyframes admin-click-trap-hint-in {
  from {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes admin-click-trap-hint-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.5),
      0 0 30px rgba(255, 110, 180, 0.25);
  }
  50% {
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.5),
      0 0 50px rgba(255, 110, 180, 0.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-click-trap--show-hint::before {
    animation: none;
  }
}

/* ===== ADMIN NAV "DOUBLE-TAP" WIGGLE ===== */
/* Quick playful flourish on the Admin link the moment it's clicked, so it
   feels like the button physically taps itself twice on the way out. */
.admin-double-tap {
  animation: admin-double-tap-kf 320ms ease-out;
  color: #ffca28 !important;
  text-shadow: 0 0 8px rgba(255, 152, 0, 0.7);
}
@keyframes admin-double-tap-kf {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(0.88);
  }
  40% {
    transform: scale(1.1);
  }
  60% {
    transform: scale(0.92);
  }
  80% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-double-tap {
    animation: none;
  }
}

/* ===== ADMIN VIDEO (centered + flame border) ===== */
.admin-video {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.5rem auto 3.5rem;
  padding: 1rem;
}
.admin-video__frame {
  position: relative;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    #fff176 0%,
    #ffca28 18%,
    #ff9800 36%,
    #ff5722 55%,
    #f44336 75%,
    #ffca28 100%
  );
  background-size: 300% 300%;
  animation: flame-shift 3s ease-in-out infinite;
  box-shadow:
    0 0 18px rgba(255, 152, 0, 0.55),
    0 0 36px rgba(255, 87, 34, 0.45),
    0 0 70px rgba(244, 67, 54, 0.3);
}
.admin-video__frame::before,
.admin-video__frame::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff176, #ffca28, #ff9800, #ff5722, #f44336, #ffca28);
  background-size: 300% 300%;
  z-index: -1;
  pointer-events: none;
}
.admin-video__frame::before {
  animation:
    flame-shift 2.4s ease-in-out infinite reverse,
    flame-flicker 1.8s ease-in-out infinite;
  filter: blur(14px);
  opacity: 0.85;
}
.admin-video__frame::after {
  inset: -22px;
  animation:
    flame-shift 5s ease-in-out infinite,
    flame-flicker 2.6s ease-in-out infinite reverse;
  filter: blur(28px);
  opacity: 0.55;
}
.admin-video__frame iframe,
.admin-video__frame video {
  display: block;
  border-radius: 12px;
  background: #000;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
@keyframes flame-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes flame-flicker {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  25% {
    opacity: 0.7;
    transform: scale(1.015);
  }
  50% {
    opacity: 0.95;
    transform: scale(0.99);
  }
  75% {
    opacity: 0.78;
    transform: scale(1.01);
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-video__frame,
  .admin-video__frame::before,
  .admin-video__frame::after {
    animation: none !important;
  }
}
@media (max-width: 640px) {
  .admin-video__frame iframe,
  .admin-video__frame video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* ===== GLOBAL CURSOR BUBBLE TRAIL ===== */
.cursor-bubble {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.55) 18%,
    rgba(255, 110, 180, 0.35) 45%,
    rgba(192, 132, 252, 0.2) 72%,
    transparent 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset -2px -2px 5px rgba(255, 255, 255, 0.35),
    inset 2px 2px 5px rgba(255, 110, 180, 0.2),
    0 0 10px rgba(255, 110, 180, 0.45),
    0 0 18px rgba(192, 132, 252, 0.3);
  z-index: 9999;
  opacity: 0;
  will-change: transform, opacity;
  animation: bubble-rise 1500ms ease-out forwards;
}
@keyframes bubble-rise {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift, 0px), -90px) scale(1.15);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-bubble {
    display: none !important;
  }
}
@media (hover: none) {
  .cursor-bubble {
    display: none !important;
  }
}
/* User-controlled toggle in the accessibility menu — instantly hides any
   bubbles already in flight when the option is switched off. */
html[data-cursor="off"] .cursor-bubble {
  display: none !important;
}

/* =====================================================================
   ACCESSIBILITY MENU — themes, colourblind palettes, dyslexia font
   ---------------------------------------------------------------------
   The site's default look (already defined at the top of this file) is
   the "dark" theme. Everything below is layered on top of that via
   data-* attributes on <html>, set by /js/accessibility.js and the
   inline boot script in views/partials/header.ejs.
   ===================================================================== */

/* OpenDyslexic — loaded only when the user picks the dyslexia font.
   The @font-face is declared up-front but the font files are not
   downloaded until something on the page actually requests this family. */
@font-face {
  font-family: "OpenDyslexic";
  src: url("https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Regular.woff")
    format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Bold.woff")
    format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Italic.woff")
    format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

html[data-font="dyslexic"] body,
html[data-font="dyslexic"] input,
html[data-font="dyslexic"] textarea,
html[data-font="dyslexic"] button,
html[data-font="dyslexic"] select {
  font-family: "OpenDyslexic", "Atkinson Hyperlegible", "Comic Code", "Courier New", monospace;
  letter-spacing: 0.01em;
}

/* Plain system monospace stack — keeps the coder vibe Comic Code provides
   but uses each platform's native programming font. No web download. */
html[data-font="mono"] body,
html[data-font="mono"] input,
html[data-font="mono"] textarea,
html[data-font="mono"] button,
html[data-font="mono"] select {
  font-family:
    ui-monospace, "SF Mono", "Cascadia Mono", "Source Code Pro", Menlo, Consolas,
    "DejaVu Sans Mono", monospace;
}

/* ----------------------- LIGHT THEME ----------------------- */
html[data-theme="light"] {
  --bg: #fef6fb;
  --bg-blob-1: rgba(255, 110, 180, 0.18);
  --bg-blob-2: rgba(168, 85, 247, 0.14);
  --bg-blob-3: rgba(110, 231, 183, 0.18);

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(40, 20, 60, 0.12);
  --glass-border-bright: rgba(217, 79, 148, 0.55);
  --glass-fallback: rgba(255, 250, 255, 0.92);

  --text-dark: #1a0f2e;
  --text-mid: rgba(26, 15, 46, 0.72);
  --text-light: rgba(26, 15, 46, 0.45);

  /* slightly deeper accents so they stay legible on near-white backgrounds */
  --pink: #d94f94;
  --pink-light: #e36aa8;
  --pink-dark: #b1356f;
  --purple: #9333ea;
  --purple-dark: #7e22ce;
  --mint-dark: #059669;
  --yellow: #b45309;

  --glow-pink: 0 0 24px rgba(217, 79, 148, 0.28);
  --glow-purple: 0 0 24px rgba(147, 51, 234, 0.28);
  --glow-mint: 0 0 24px rgba(5, 150, 105, 0.25);
  --glow-sm-pink: 0 0 10px rgba(217, 79, 148, 0.22);
}

/* The navbar/footer hardcode dark-purple rgba() values so the data-theme
   variable swap alone isn't enough — explicit overrides for light mode. */
html[data-theme="light"] .navbar {
  background: rgba(255, 250, 255, 0.78);
  box-shadow:
    0 4px 20px rgba(40, 20, 60, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 4px 0 rgba(217, 79, 148, 0.18);
}
html[data-theme="light"] footer {
  background: rgba(255, 250, 255, 0.92);
  color: var(--text-mid);
}
html[data-theme="light"] .footer-bottom {
  border-top-color: rgba(40, 20, 60, 0.08);
}
html[data-theme="light"] .footer-socials a {
  background: rgba(40, 20, 60, 0.04);
}
html[data-theme="light"] .breadcrumbs li + li::before {
  color: rgba(40, 20, 60, 0.3);
}
html[data-theme="light"] .nav-toggle span {
  background: var(--text-dark);
}
html[data-theme="light"] .navbar-brand {
  color: var(--text-dark);
}
html[data-theme="light"] .btn-outline {
  color: var(--text-dark);
  background: rgba(40, 20, 60, 0.04);
  border-color: rgba(40, 20, 60, 0.18);
}
html[data-theme="light"] .btn-outline:hover {
  background: rgba(40, 20, 60, 0.08);
  color: var(--text-dark);
  border-color: rgba(40, 20, 60, 0.35);
}
html[data-theme="light"] .btn-mint {
  color: #f7fff9;
}
html[data-theme="light"] .btn::before {
  background: rgba(255, 255, 255, 0.25);
}
html[data-theme="light"] .opening-banner {
  background: rgba(217, 79, 148, 0.1);
  color: var(--text-dark);
}
html[data-theme="light"] .opening-times-highlight {
  background: rgba(217, 79, 148, 0.15);
  color: var(--pink-dark);
}
html[data-theme="light"] .skip-link {
  background: var(--pink);
  color: #fff;
}
html[data-theme="light"] .back-to-top {
  background: rgba(255, 250, 255, 0.92);
  border-color: rgba(217, 79, 148, 0.4);
}
html[data-theme="light"] .back-to-top:hover {
  background: rgba(217, 79, 148, 0.14);
}
/* The cursor bubble trail is white-tinted; soften it on light backgrounds */
html[data-theme="light"] .cursor-bubble {
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 110, 180, 0.85) 0%,
    rgba(217, 79, 148, 0.45) 30%,
    rgba(147, 51, 234, 0.25) 65%,
    transparent 100%
  );
  border-color: rgba(217, 79, 148, 0.45);
  box-shadow:
    inset -2px -2px 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(217, 79, 148, 0.4);
}

/* ----------------------- COLOURBLIND-FRIENDLY PALETTES -----------------------
   These shift the accent palette to colour combinations that are
   distinguishable for the most common forms of colour-vision deficiency.
   Approach: keep luminance roughly the same, swap hues to the Okabe-Ito
   palette family for protan/deutan, and to a red-green-orange family for
   tritan. Monochrome is implemented as a grayscale filter on the body.
*/

/* Protanopia (red-blind) and Deuteranopia (green-blind) — same palette.
   Both confuse red/green; substitute blue/orange/yellow accents. */
html[data-cb="protanopia"],
html[data-cb="deuteranopia"] {
  --pink: #56b4e9;
  --pink-light: #82cdf3;
  --pink-pale: rgba(86, 180, 233, 0.1);
  --pink-dark: #1f78b4;
  --purple: #e69f00;
  --purple-dark: #b57400;
  --purple-pale: rgba(230, 159, 0, 0.1);
  --mint: #f0e442;
  --mint-dark: #c2a900;
  --yellow: #f0e442;
  --yellow-dark: #b57400;
  --coral: #cc79a7;
  --blue: #56b4e9;

  --bg-blob-1: rgba(86, 180, 233, 0.18);
  --bg-blob-2: rgba(230, 159, 0, 0.16);
  --bg-blob-3: rgba(240, 228, 66, 0.12);

  --glass-border-bright: rgba(86, 180, 233, 0.5);
  --glow-pink: 0 0 30px rgba(86, 180, 233, 0.4);
  --glow-purple: 0 0 30px rgba(230, 159, 0, 0.4);
  --glow-mint: 0 0 30px rgba(240, 228, 66, 0.3);
  --glow-sm-pink: 0 0 12px rgba(86, 180, 233, 0.3);
}

/* Hardcoded rgba() in non-variable rules — bring those in line too. */
html[data-cb="protanopia"] .nav-links a:hover,
html[data-cb="deuteranopia"] .nav-links a:hover {
  background: rgba(86, 180, 233, 0.14);
  border-color: rgba(86, 180, 233, 0.3);
}
html[data-cb="protanopia"] .nav-links a.active,
html[data-cb="deuteranopia"] .nav-links a.active {
  background: rgba(86, 180, 233, 0.22);
  border-color: rgba(86, 180, 233, 0.55);
  box-shadow:
    var(--glow-sm-pink),
    0 0 0 1px rgba(86, 180, 233, 0.22) inset;
}
html[data-cb="protanopia"] .opening-times-highlight,
html[data-cb="deuteranopia"] .opening-times-highlight {
  background: rgba(86, 180, 233, 0.22);
  border-color: rgba(86, 180, 233, 0.4);
}
html[data-cb="protanopia"] .opening-banner,
html[data-cb="deuteranopia"] .opening-banner {
  background: rgba(230, 159, 0, 0.18);
}

/* Tritanopia (blue-blind) — confuses blue/yellow; substitute red/orange/teal. */
html[data-cb="tritanopia"] {
  --pink: #e85d75;
  --pink-light: #f57f96;
  --pink-pale: rgba(232, 93, 117, 0.1);
  --pink-dark: #b3324a;
  --purple: #d55e00;
  --purple-dark: #a04400;
  --purple-pale: rgba(213, 94, 0, 0.1);
  --mint: #2ca58d;
  --mint-dark: #0e7964;
  --yellow: #d55e00;
  --yellow-dark: #a04400;
  --coral: #e85d75;
  --blue: #2ca58d;

  --bg-blob-1: rgba(232, 93, 117, 0.18);
  --bg-blob-2: rgba(213, 94, 0, 0.16);
  --bg-blob-3: rgba(44, 165, 141, 0.12);

  --glass-border-bright: rgba(232, 93, 117, 0.5);
  --glow-pink: 0 0 30px rgba(232, 93, 117, 0.4);
  --glow-purple: 0 0 30px rgba(213, 94, 0, 0.4);
  --glow-mint: 0 0 30px rgba(44, 165, 141, 0.3);
  --glow-sm-pink: 0 0 12px rgba(232, 93, 117, 0.3);
}
html[data-cb="tritanopia"] .nav-links a:hover {
  background: rgba(232, 93, 117, 0.14);
  border-color: rgba(232, 93, 117, 0.3);
}
html[data-cb="tritanopia"] .nav-links a.active {
  background: rgba(232, 93, 117, 0.22);
  border-color: rgba(232, 93, 117, 0.55);
}
html[data-cb="tritanopia"] .opening-times-highlight {
  background: rgba(232, 93, 117, 0.22);
  border-color: rgba(232, 93, 117, 0.4);
}
html[data-cb="tritanopia"] .opening-banner {
  background: rgba(213, 94, 0, 0.18);
}

/* Monochrome — full-page grayscale. Applied to body's direct children
   *except* the a11y menu, for two reasons:
     1. The user needs to see which option is selected — keep the menu
        in colour while everything else goes grayscale.
     2. Setting `filter` on `body` would create a containing block for
        position:fixed descendants, which traps the a11y panel inside
        the body's flow (it would visually slide down to the footer
        instead of floating in the viewport).
   Targeting body > * sidesteps both — each child gets its own filter
   stacking context, but no single ancestor breaks the fixed panel. */
html[data-cb="monochrome"] body > *:not(.a11y-toggle):not(.a11y-panel) {
  filter: grayscale(1) contrast(1.05);
}

/* ----------------------- ACCESSIBILITY BUTTON ----------------------- */
.a11y-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 110, 180, 0.4);
  background: rgba(20, 10, 35, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  box-shadow: var(--glow-sm-pink);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}
.a11y-toggle:hover {
  background: rgba(255, 110, 180, 0.18);
  transform: translateY(-2px);
}
.a11y-toggle:focus-visible {
  outline: 2px solid var(--pink-light);
  outline-offset: 3px;
}
html[data-theme="light"] .a11y-toggle {
  background: rgba(255, 250, 255, 0.92);
  border-color: rgba(217, 79, 148, 0.45);
}
html[data-theme="light"] .a11y-toggle:hover {
  background: rgba(217, 79, 148, 0.14);
}

/* ----------------------- ACCESSIBILITY PANEL ----------------------- */
.a11y-panel {
  position: fixed;
  bottom: 5rem;
  left: 1.5rem;
  width: min(340px, calc(100vw - 3rem));
  /* Cap the top edge below the sticky navbar (~4.25rem) and opening-banner
     (~2rem) so the legend never disappears behind them on short viewports.
     Internal overflow-y: auto handles anything still too tall. */
  max-height: calc(100vh - 11.5rem);
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: var(--radius);
  background: var(--glass-fallback);
  background: rgba(20, 10, 35, 0.92);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 110, 180, 0.2);
  color: var(--text-dark);
  /* Above the navbar (z:1000) — belt-and-braces so the panel can never
     be clipped by it, even if the max-height calc is wrong on some viewport. */
  z-index: 1050;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom left;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.a11y-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
}
html[data-theme="light"] .a11y-panel {
  background: rgba(255, 250, 255, 0.96);
  box-shadow:
    0 20px 60px rgba(40, 20, 60, 0.18),
    0 0 0 1px rgba(217, 79, 148, 0.2);
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--glass-border);
}
.a11y-panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.a11y-panel-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.a11y-panel-close:hover {
  background: rgba(255, 110, 180, 0.18);
  color: var(--pink-light);
}

.a11y-group {
  border: none;
  padding: 0.6rem 0 0.4rem;
  margin: 0;
}
.a11y-group + .a11y-group {
  border-top: 1px solid var(--glass-border);
  margin-top: 0.4rem;
}
.a11y-group legend {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pink-light);
  margin-bottom: 0.55rem;
}

/* Segmented control (theme picker) */
.a11y-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
}
html[data-theme="light"] .a11y-segmented {
  background: rgba(40, 20, 60, 0.05);
}
.a11y-segmented label {
  position: relative;
  cursor: pointer;
}
.a11y-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.a11y-segmented label span {
  display: block;
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: var(--transition-fast);
}
.a11y-segmented label:hover span {
  color: var(--text-dark);
}
.a11y-segmented input:checked + span {
  background: linear-gradient(135deg, var(--pink-dark), var(--purple-dark));
  color: #fff;
  box-shadow: var(--glow-sm-pink);
}
.a11y-segmented input:focus-visible + span {
  outline: 2px solid var(--pink-light);
  outline-offset: 2px;
}

/* Stacked radio list (colourblind picker) */
.a11y-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.a11y-stacked label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.85rem;
  color: var(--text-dark);
}
html[data-theme="light"] .a11y-stacked label {
  background: rgba(40, 20, 60, 0.03);
}
.a11y-stacked label:hover {
  background: rgba(255, 110, 180, 0.08);
  border-color: rgba(255, 110, 180, 0.3);
}
.a11y-stacked input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-mid);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.a11y-stacked input:checked {
  border-color: var(--pink);
  background: var(--pink);
  box-shadow:
    0 0 0 3px rgba(255, 110, 180, 0.18),
    var(--glow-sm-pink);
}
.a11y-stacked input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--white);
}
.a11y-stacked input:focus-visible {
  outline: 2px solid var(--pink-light);
  outline-offset: 2px;
}
.a11y-stacked label span {
  flex: 1;
  font-weight: 500;
}
.a11y-stacked label small {
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 400;
}
.a11y-stacked label:has(input:checked) {
  border-color: rgba(255, 110, 180, 0.5);
  background: rgba(255, 110, 180, 0.1);
}

/* Toggle switch (dyslexia font) */
.a11y-switch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark);
  padding: 0.3rem 0;
}
.a11y-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.a11y-switch-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  position: relative;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
html[data-theme="light"] .a11y-switch-track {
  background: rgba(40, 20, 60, 0.08);
}
.a11y-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-mid);
  transition: var(--transition-fast);
}
.a11y-switch input:checked + .a11y-switch-track {
  background: linear-gradient(135deg, var(--pink-dark), var(--purple-dark));
  border-color: rgba(255, 110, 180, 0.5);
  box-shadow: var(--glow-sm-pink);
}
.a11y-switch input:checked + .a11y-switch-track .a11y-switch-thumb {
  left: 18px;
  background: #fff;
}
.a11y-switch input:focus-visible + .a11y-switch-track {
  outline: 2px solid var(--pink-light);
  outline-offset: 2px;
}
.a11y-switch-label {
  flex: 1;
}

.a11y-hint {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.a11y-reset {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-mid);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.a11y-reset:hover {
  background: rgba(255, 110, 180, 0.1);
  color: var(--pink-light);
  border-color: rgba(255, 110, 180, 0.4);
}
html[data-theme="light"] .a11y-reset {
  background: rgba(40, 20, 60, 0.04);
}

.a11y-footnote {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.6rem;
}

/* Mobile: full-width sheet from the bottom */
@media (max-width: 480px) {
  .a11y-panel {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 5rem;
    width: auto;
  }
  .a11y-toggle {
    left: 1rem;
    bottom: 1rem;
  }
}

/* Reduced-motion: skip the panel scale animation */
@media (prefers-reduced-motion: reduce) {
  .a11y-panel {
    transition: opacity 0.15s ease;
    transform: none;
  }
  .a11y-panel:not([hidden]) {
    transform: none;
  }
}
