/* =============================================
   TopCasinoList.online - Main Stylesheet
   New Zealand Online Casino Comparison
   Design system: "Paua" - ink base, iridescent
   teal->violet signature gradient, gold CTAs
   ============================================= */

:root {
  /* base */
  --bg: #0A0D14;
  --bg-2: #0D111B;
  --surface: #10151F;
  --surface-2: #161C2A;
  --surface-3: #1D2536;
  --border: #222B3E;
  --border-hi: #35425E;

  /* paua iridescence */
  --teal: #2DD4BF;
  --blue: #5B8DEF;
  --violet: #8B5CF6;
  --pink: #E879A9;
  --iri: linear-gradient(115deg, #2DD4BF 0%, #5B8DEF 45%, #8B5CF6 100%);
  --teal-dim: rgba(45, 212, 191, 0.10);
  --violet-dim: rgba(139, 92, 246, 0.12);

  /* gold (CTAs, ratings) */
  --gold: #F6C453;
  --gold-deep: #E8952E;
  --gold-grad: linear-gradient(135deg, #F8D06E 0%, #F0A93C 55%, #E8952E 100%);
  --gold-dim: rgba(246, 196, 83, 0.12);

  --danger: #F0716A;

  /* text */
  --text: #EEF2F9;
  --text-2: #B2BDCF;
  --muted: #8593A9;
  --btn-text: #171006;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;

  --topbar-h: 34px;
  --header-h: 66px;
  --max-w: 1240px;
  --radius: 12px;
  --radius-sm: 7px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 500px at 85% -100px, rgba(91, 141, 239, 0.07), transparent 60%),
    radial-gradient(900px 450px at -10% 25%, rgba(45, 212, 191, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  padding-top: calc(var(--topbar-h) + var(--header-h));
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
strong { font-weight: 700; }
h1, h2, h3, h4 { font-family: var(--font-display); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Iridescent text utility */
.iri-text {
  background: var(--iri);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons --- */
.tap {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 9px;
  font-weight: 800;
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  white-space: nowrap;
  border: none;
  text-align: center;
}
.tap-solid {
  background: var(--gold-grad);
  color: var(--btn-text);
  box-shadow: 0 4px 18px rgba(240, 169, 60, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tap-solid:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 26px rgba(240, 169, 60, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tap-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--border-hi);
}
.tap-ghost:hover { border-color: var(--teal); background: var(--teal-dim); }

/* =============================================
   TOP BAR (iridescent hairline on very top)
   ============================================= */
.crown {
  background: #070A10;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 600;
}
.crown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--iri);
}
.crown-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.crown a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.crown a:hover { color: var(--text); }
.crown-left { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crown-right { white-space: nowrap; }

/* =============================================
   HEADER
   ============================================= */
.shell-header {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  /* transparent glass floating over the hero (btcreels treatment) */
  background: rgba(10, 13, 20, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* solid once scrolled past the hero */
.shell-header.scrolled {
  background: rgba(10, 13, 20, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}
.mast-core {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.shell-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.brand-lock { display: block; height: 46px; width: auto; }
.foot-logo .brand-lock { height: 36px; }

/* Desktop nav */
.shell-nav { display: none; }

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.18s, background 0.18s;
}
.menu-toggle:hover { border-color: var(--teal); background: var(--teal-dim); }
.menu-toggle img { filter: invert(96%); }
.glyph-close { display: none; }
.glyph-open { display: block; }
body.menu-open .glyph-close { display: block; }
body.menu-open .glyph-open { display: none; }
body.menu-open .menu-toggle { border-color: var(--teal); background: var(--teal-dim); }

@media (min-width: 900px) {
  .shell-nav { display: flex; align-items: center; }
  .menu-toggle { display: none !important; }
  .pocket-nav { display: none !important; }
}

.shell-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.shell-nav a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.shell-nav a:hover { color: var(--text); background: var(--surface-2); }
.shell-nav a[aria-current="page"] { color: var(--teal); background: var(--teal-dim); }

/* Dropdowns */
.menu-dropdown { position: relative; }
.menu-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.menu-dropdown-toggle:hover,
.menu-dropdown.open .menu-dropdown-toggle { color: var(--text); background: var(--surface-2); }
.menu-dropdown-toggle .caret {
  filter: invert(78%);
  transition: transform 0.2s var(--ease);
}
.menu-dropdown.open .caret { transform: rotate(180deg); }

.menu-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 216px;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  z-index: 510;
}
.menu-dropdown.open .menu-dropdown-menu { display: flex; }
.menu-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 5px;
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
}
.menu-dropdown-menu a:hover {
  color: var(--teal);
  background: var(--teal-dim);
  padding-left: 1.1rem;
}
/* Long menus (Reviews) scroll instead of overflowing the viewport */
.menu-dropdown-menu--scroll {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}
.menu-dropdown-menu--scroll > li { flex-shrink: 0; }
.menu-dropdown-menu--scroll::-webkit-scrollbar { width: 5px; }
.menu-dropdown-menu--scroll::-webkit-scrollbar-track { background: transparent; }
.menu-dropdown-menu--scroll::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 4px;
}
.menu-dropdown-menu--scroll::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* Mega dropdowns (Casino Lists, Guides & Law): the panel anchors to the
   header container, not the toggle, so it never clips the viewport edge */
.menu-dropdown--mega { position: static; }
.menu-dropdown-menu--mega {
  width: min(720px, calc(100vw - 40px));
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 0.35rem 1.4rem;
  padding: 1.05rem 1.15rem 1.15rem;
}
.menu-dropdown--mega.open .menu-dropdown-menu--mega { display: grid; }
.menu-dropdown-menu--cols-2 {
  width: min(500px, calc(100vw - 40px));
  grid-template-columns: repeat(2, 1fr);
}
.wing-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wing-label {
  padding: 0.2rem 0.85rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

/* Site search (header bar on desktop, top of the mobile nav overlay) */
.mast-finder { display: none; }
@media (min-width: 900px) {
  .mast-finder { display: block; flex: 1 1 auto; min-width: 150px; max-width: 340px; }
  .mast-finder .finder-bar input { font-size: 0.875rem; }
}
.finder-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.finder-bar:focus-within { border-color: var(--teal); background: rgba(255, 255, 255, 0.1); }
.finder-bar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.5rem 0.2rem 0.5rem 0.85rem;
}
.finder-bar input::placeholder { color: var(--muted); }
.finder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.7rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background 0.18s var(--ease);
}
.finder-btn img { filter: invert(78%); }
.finder-btn:hover { background: var(--teal-dim); }
.pocket-search { padding: 1rem 1.5rem 0.25rem; }

/* Search results dropdown (attached to <body>, positioned under the bar) */
.finder-results {
  display: none;
  position: fixed;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  z-index: 900;
  max-height: 380px;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}
.finder-results.visible { display: block; }
.finder-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.finder-result-item:last-child { border-bottom: none; }
.finder-result-item:hover,
.finder-result-item.active { background: var(--teal-dim); }
.finder-result-icon { display: flex; flex-shrink: 0; margin-top: 2px; }
.finder-result-icon img { filter: invert(70%); }
.finder-result-text { flex: 1; min-width: 0; }
.finder-result-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finder-result-title mark { background: none; color: var(--teal); font-weight: 700; }
.finder-result-cat { display: block; font-size: 0.7rem; color: var(--muted); margin-top: 1px; }
.finder-no-results {
  padding: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Mobile nav overlay */
.pocket-nav {
  display: none;
  position: fixed;
  inset: calc(var(--topbar-h) + var(--header-h)) 0 0 0;
  background: var(--bg);
  z-index: 400;
  overflow-y: auto;
  border-top: 2px solid var(--teal);
}
body.menu-open .pocket-nav { display: block; }

.pocket-nav > ul {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 2rem;
}
.pocket-nav a {
  display: block;
  padding: 0.95rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
}
.pocket-nav a:hover,
.pocket-nav a[aria-current="page"] { color: var(--teal); background: var(--teal-dim); padding-left: 2rem; }
.pocket-nav .pocket-section-label {
  padding: 1.5rem 1.5rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  border-bottom: 1px solid var(--border);
}

/* =============================================
   FOOTER
   ============================================= */
.shell-footer, #footer {
  background: #070A10;
  border-top: 1px solid var(--border);
  margin-top: 72px;
  position: relative;
}
#footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 141, 239, 0.55), rgba(139, 92, 246, 0.55), transparent);
}
.foot-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px 20px 24px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 720px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.foot-logo { font-size: 1.25rem; display: inline-block; margin-bottom: 12px; }
.foot-blurb { font-size: 13px; color: var(--text-2); margin-bottom: 12px; max-width: 420px; }
.foot-notice { font-size: 12px; color: var(--muted); max-width: 420px; }
.foot-notice a { color: var(--teal); text-decoration: underline; }
.foot-head {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}
.foot-col ul li { margin-bottom: 8px; }
.foot-col ul a { font-size: 13.5px; color: var(--text-2); transition: color 0.15s; }
.foot-col ul a:hover { color: var(--teal); }

.foot-rg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 40px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.foot-rg-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  color: var(--danger);
  font-weight: 800;
  font-size: 14px;
}
.foot-rg p { font-size: 13px; color: var(--text-2); }
.foot-rg a { color: var(--teal); text-decoration: underline; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 719px) {
  .foot-grid { text-align: center; }
  .foot-blurb, .foot-notice { margin-left: auto; margin-right: auto; }
  .foot-rg { flex-direction: column; align-items: center; text-align: center; }
  .foot-bottom { justify-content: center; text-align: center; }
}

/* =============================================
   BACK TO TOP
   ============================================= */
.top-lift {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold-grad);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 350;
  box-shadow: 0 8px 24px rgba(240, 169, 60, 0.35);
}
.top-lift.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.top-lift img { filter: brightness(0) saturate(100%); }

/* =============================================
   SHARED PAGE HERO
   ============================================= */
.stage {
  position: relative;
  /* pull the hero up behind the transparent fixed header */
  margin-top: calc(-1 * (var(--topbar-h) + var(--header-h)));
  padding-top: calc(var(--topbar-h) + var(--header-h));
  background-image: url('/images/paua-dusk.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(8, 10, 16, 0.93) 0%, rgba(8, 10, 16, 0.78) 46%, rgba(8, 10, 16, 0.38) 100%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.30) 0%, rgba(8, 10, 16, 0.10) 40%, var(--bg) 100%);
}
.stage > * { position: relative; }
