/* Montserrat Variable Font */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  src: url("../fonts/Montserrat/Montserrat-VariableFont_wght.woff2")
    format("woff2-variations");
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  src: url("../fonts/Montserrat/Montserrat-Italic-VariableFont_wght.woff2")
    format("woff2-variations");
  font-display: swap;
}

:root {
  --ink: #0d0d0d;
  --header-h: 80px;
  --ink-soft: #2a2a2a;
  --paper: #f4f4f4;
  --paper-dark: #dcdcdc;
  --paper-light: #fafafa;
  --mid: #888888;
  --mid-dark: #555555;
  --mid-light: #bbbbbb;
  --aged: #aaaaaa;
  --accent: #7c3aed;
  --ast-global-color-1: var(--accent);
  --ast-border-color: var(--accent);
  --border: 3px solid var(--ink);
  --border-thick: 5px solid var(--ink);

  /* Per-series tones (all grayscale) */
  --rg-color: #1a1a1a;
  --ii-color: #555555;
  --wt-color: #2e2e2e;

  /* ---- Accent Color Palette ---- */
  /* Numered slots decouple palette positions from colour names so colours
     can be swapped / replaced without renaming. The active one is copied
     into --accent at runtime. */
  --accent-100: #ff5b7a;
  --accent-200: #ff6d00;
  --accent-300: #f4a520;
  --accent-400: #00c853;
  --accent-500: #00b8d4;
  --accent-600: #5394ff;
  --accent-700: #a180fd;
  --accent-800: #ff5790;
}

/* Anchor-link offset: prevents the sticky #masthead from
   obscuring section headings when navigating via hash links
   (e.g. #retailers, #creator).

   Two-pronged approach:
   1. scroll-padding-top on html — native browser fragment
      navigation (full-URL links like site.com/#retailers).
   2. scroll-margin-top on section[id] — JS smooth-scroll
      (scrollIntoView) targets. */
html {
  scroll-padding-top: var(--header-h) !important;
}

section[id] {
  scroll-margin-top: var(--header-h);
}

/* ---- Animated Accent Colour Cycling ---- */
/* Register --accent so the browser can interpolate between colour stops. */
@property --accent {
  syntax: "<color>";
  initial-value: #ff2d55;
  inherits: true;
}

/* When the cycling class is present, animate --accent through the palette.
   Text on accent backgrounds is always black (--ink). */
:root.accent-cycling {
  animation: accent-cycle 20s ease-in-out infinite;
}

@keyframes accent-cycle {
  0% {
    --accent: #ff5b7a;
  }
  12.5% {
    --accent: #ff6d00;
  }
  25% {
    --accent: #f4a520;
  }
  37.5% {
    --accent: #00c853;
  }
  50% {
    --accent: #00b8d4;
  }
  62.5% {
    --accent: #5394ff;
  }
  75% {
    --accent: #a180fd;
  }
  87.5% {
    --accent: #ff5790;
  }
  100% {
    --accent: #ff5b7a;
  }
}

body {
  --swatch-size: 2rem;
  font-family: "Montserrat", "Arial", sans-serif;
}
.wrapper {
  margin: 0 auto !important;
  width: 100%;
  max-width: 1320px !important;
  padding-inline: 20px;
  /* max-width: clamp(350px, 90%, 1320px) !important; */
}

/* Halftone Dark */
.halftone {
  position: relative !important;
  z-index: 0;
}

.halftone::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(13, 13, 13, 0.08) 1px,
    transparent 1px
  );
  background-size: 7px 7px;
  pointer-events: none;
  z-index: -1;
}

/* Halftone Light */
.halftone-light {
  position: relative;
  z-index: 0;
}

.halftone-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 7px 7px;
  pointer-events: none;
  z-index: -1;
}

/* Primary Menu */

.site-header-section a.menu-link {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem;
  transition: color 0.15s ease;
  border: none !important;
  outline: none;
}

.site-header-section a.menu-link:focus,
.site-header-section a.menu-link:focus-visible {
  outline: none;
}

/* Desktop active anchor-link highlight (toggled by JS scroll observer).
   The border-bottom is added with !important because the default
   .site-header-section a.menu-link uses border: none !important. */
.ast-builder-menu-1 .menu-link.is-active {
  color: #fff;
  border-bottom: 2px solid var(--accent) !important;
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.masthead-logo {
  height: 42px;
  width: 42px;
  display: block;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.studio-tag {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--paper-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}

.publisher-tag {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 0.55rem;
  color: var(--aged);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}

/* ===== Announcement Bar ===== */
#announce-bar {
  background: var(--accent);
  color: var(--ink);
  text-align: center;
  padding: 5px 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  z-index: 100;
}

#announce-bar a {
  color: var(--ink);
  text-decoration: underline;
  font-weight: 800;
}

#announce-bar strong {
  font-weight: 900;
}

#announce-bar span.emoji {
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5));
  font-size: 1rem;
  margin-right: 0.25rem !important;
}

/* ===== Accent Colour Swatch Picker ===== */
#accent-picker {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

#accent-picker-toggle {
  width: var(--swatch-size);
  height: var(--swatch-size);
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 !important;
}

#accent-picker-toggle:hover {
  transform: scale(1.1);
}

#accent-picker-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

#accent-picker-swatches {
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

#accent-picker-swatches.open {
  display: flex;
}

.accent-swatch {
  width: var(--swatch-size);
  height: var(--swatch-size);
  border-radius: 50%;
  border: 2px solid #2a2a2a;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  flex-shrink: 0;
  padding: 0 !important;
}

.accent-swatch:hover {
  transform: scale(1.2);
  border-color: var(--ink);
}

.accent-swatch.active {
  border-color: var(--ink);
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 0 4px var(--ink);
}

/* Randomize button (dice icon) inside swatches tray */
#accent-picker-randomize {
  width: var(--swatch-size);
  height: var(--swatch-size);
  border-radius: 50%;
  border: 2px solid var(--mid-light);
  background: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
  flex-shrink: 0;
  color: var(--ink-soft);
  padding: 0 !important;
}

#accent-picker-randomize:hover {
  transform: scale(1.2);
  border-color: var(--ink);
}

#accent-picker-randomize img.emoji {
  width: 1rem !important;
  height: 1rem !important;
}

/* Cycle button (play/pause) inside swatches tray */
#accent-picker-cycle {
  width: var(--swatch-size);
  height: var(--swatch-size);
  border-radius: 50%;
  border: 2px solid var(--mid-light);
  background: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
  flex-shrink: 0;
  color: var(--ink-soft);
  padding: 0 !important;
}

#accent-picker-cycle:hover {
  transform: scale(1.2);
  border-color: var(--ink);
}

/* Small label above toggle */
#accent-picker-label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#accent-picker-label.visible {
  opacity: 1;
}

/* Responsive: shift picker up on mobile */
@media (max-width: 600px) {
  #accent-picker {
    bottom: 30px;
    left: 30px;
  }

  #accent-picker-swatches {
    max-width: 9rem;
    padding: 0.5rem;
    gap: 0.3rem;
  }

  .accent-swatch,
  #accent-picker-randomize,
  #accent-picker-cycle {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* ===== Scrolling Ticker (Text Wrap) ===== */
.text-wrap {
  background: var(--ink);
  border-top: 2px solid #2a2a2a;
  border-bottom: 2px solid #222;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.45rem 0;
}

.text-wrap .ticker {
  display: inline-block;
  animation: ticker-scroll 28s linear infinite;
}

.text-wrap .ticker-item {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid-light);
  margin-right: 4rem;
}

.text-wrap .ticker-item::before {
  content: "\2605  ";
  color: var(--accent);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ── Smart Sticky Masthead ────────────────────────────────────────
 * The #announce-bar sits above #masthead in normal document flow.
 * When scrolling down, the announce-bar scrolls off-screen naturally;
 * #masthead sticks to top:0 and stays visible. Scrolling back up
 * brings the announce-bar back into view. No JavaScript needed.
 */
#masthead {
  position: sticky;
  top: 0;
  z-index: 99;
}

/* Header Cart Icon */

.ast-site-header-cart .ast-addon-cart-wrap i.astra-icon::after {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.ast-site-header-cart .ast-addon-cart-wrap i.astra-icon::after,
.ast-theme-transparent-header
  .ast-site-header-cart
  .ast-addon-cart-wrap
  i.astra-icon::after {
  color: #000;
}

.ast-site-header-cart
  .ast-site-header-cart-li:hover
  .ast-addon-cart-wrap
  i.astra-icon::after {
  color: #000;
}

/* Scroll to top */
#ast-scroll-top {
  color: #000;
  border-radius: 50%;
  border: 2px solid var(--ink);
  height: 32px;
  width: 32px;
  line-height: 1.8;
}

/* ── Header Mini Cart Dropdown ──────────────────────────────────────
   Dark theme. Loaded globally (not just on WooCommerce pages) because
   the cart icon appears in the site header on every page. */
.ast-site-header-cart .widget_shopping_cart {
  background: #1a1a1a;
  border: 3px solid #2e2e2e;
  box-shadow: 4px 4px 0 var(--accent);
  padding: 0.5rem;
}

.ast-site-header-cart .widget_shopping_cart .product_list_widget li,
.woocommerce
  .ast-site-header-cart
  .widget_shopping_cart
  .product_list_widget
  li {
  padding: 0.5em 1.7em 0.5em 3.25em !important;
  color: #fff;
}
.ast-site-header-cart .widget_shopping_cart .product_list_widget,
.woocommerce .ast-site-header-cart .widget_shopping_cart .product_list_widget {
  padding: 0;
}
.woocommerce .ast-site-header-cart .widget_shopping_cart p.total {
  padding: 0.5rem;
  color: #fff !important;
}
.woocommerce-js .widget_shopping_cart .total strong,
.woocommerce-js .widget_shopping_cart .total span,
.woocommerce .widget_shopping_cart .total span,
.woocommerce .widget_shopping_cart .total strong {
  color: #fff !important;
}
.ast-site-header-cart .widget_shopping_cart p.buttons,
.ast-site-header-cart .widget_shopping_cart p.total,
.woocommerce .ast-site-header-cart .widget_shopping_cart p.buttons {
  padding: 0.5rem;
}

/* Dropdown arrow — match the dark border color */
.ast-site-header-cart .widget_shopping_cart::before,
.ast-site-header-cart .widget_shopping_cart::after {
  border-bottom-color: #2e2e2e !important;
}

.woocommerce-mini-cart {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  color: #fff;
}
.woocommerce-mini-cart-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  /* gap: 0.75rem; */
  padding: 0.85rem 0;
  border-bottom: 1px solid #2e2e2e;
  position: relative;
  color: #fff;
}
.woocommerce-mini-cart-item:first-child {
  padding-top: 0;
}

/* ── Remove button ───
   Astra sets opacity: .5 + color: var(--ast-global-color-3) by default,
   plus a :before circle border.  We override all three for visibility:
   color, opacity, and the circle border. */
.woocommerce-mini-cart-item a.remove {
  color: var(--paper-light) !important;
  opacity: 1 !important;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.woocommerce-mini-cart-item a.remove::before {
  border-color: var(--paper-light) !important;
}
.woocommerce-mini-cart-item a.remove svg,
.woocommerce-mini-cart-item a.remove svg path {
  fill: var(--paper-light) !important;
}
.woocommerce-mini-cart-item a.remove:hover {
  color: var(--accent) !important;
  opacity: 1 !important;
  background: transparent;
}
.woocommerce-mini-cart-item a.remove:hover::before {
  border-color: var(--accent) !important;
}
.woocommerce-mini-cart-item a.remove:hover svg,
.woocommerce-mini-cart-item a.remove:hover svg path {
  fill: var(--accent) !important;
}

/* ── Product link ─── Merged duplicate a:not(.remove) blocks */
.woocommerce-mini-cart-item a:not(.remove) {
  display: flex;
  align-items: flex-start;
  /* gap: 0.75rem; */
  text-decoration: none;
  flex: 1;
  padding-right: 30px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff !important;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  margin-left: 0.75rem;
  text-align: left;
}
.woocommerce-mini-cart-item a:not(.remove):hover {
  color: var(--accent) !important;
}
.woocommerce-mini-cart-item a:not(.remove) img {
  width: 60px;
  height: auto;
  border: 2px solid #2e2e2e;
  flex-shrink: 0;
}

.woocommerce-mini-cart-item .quantity {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--paper-light) !important;
  width: 100%;
  /* padding-left: calc(60px + 0.75rem); */
  text-align: left;
  margin-left: 0.75rem;
  margin-top: -0.35rem;
}

.woocommerce-mini-cart-item .quantity span {
  color: var(--paper-light) !important;
}
.woocommerce-mini-cart__total {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 2px solid #2e2e2e;
  padding: 0.85rem 0 0.75rem;
  margin: 0 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.woocommerce-mini-cart__total .woocommerce-Price-amount {
  font-weight: 900;
  font-size: 1rem;
  color: var(--accent);
}
.woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.astra-cart-drawer-content
  .woocommerce-mini-cart__buttons
  a.button.wc-forward:not(.checkout) {
  background: var(--ink) !important;
  border: 2px solid var(--accent) !important;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ── Mini-cart buttons ──
   Wired to btn-dark utility properties via existing selectors
   (no HTML class injection needed).
   .wc-forward → .btn-dark--light treatment
   .checkout   → .btn-dark--accent treatment */

/* Base (shared with .btn-dark) */
.woocommerce-mini-cart__buttons .button.ast-continue-shopping,
.woocommerce-mini-cart__buttons .button.wc-forward,
.woocommerce-mini-cart__buttons .button.checkout {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 0.75em 1em;
  line-height: 1.3;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-width: 2px;
  border-style: solid;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease-in-out;
}
/* Hover invariant (shared with .btn-dark:hover) */
.woocommerce-mini-cart__buttons .button.wc-forward:hover,
.woocommerce-mini-cart__buttons .button.ast-continue-shopping:hover,
.woocommerce-mini-cart__buttons .button.checkout:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.2);
}

/* View cart → light variant (.btn-dark--light) */
.woocommerce-mini-cart__buttons .button.wc-forward {
  border-color: var(--accent) !important;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2);
  color: var(--accent) !important;
}
.woocommerce-mini-cart__buttons .button.wc-forward:hover {
  background: transparent !important;
  border-color: var(--paper-light) !important;
  color: var(--paper-light) !important;
}

/* Checkout → accent variant (.btn-dark--accent) */

.woocommerce-mini-cart__buttons .button.ast-continue-shopping,
.woocommerce-mini-cart__buttons .button.checkout {
  background: var(--accent) !important;
  border-color: var(--ink) !important;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2);
  color: var(--ink) !important;
}
.woocommerce-mini-cart__buttons .button.ast-continue-shopping:hover,
.woocommerce-mini-cart__buttons .button.checkout:hover {
  background: var(--paper-light) !important;
  border-color: var(--ink) !important;
  color: var(--ink) !important;
}

.woocommerce-mini-cart__empty-message {
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  color: var(--mid-light);
  text-align: center;
  padding: 1rem 0;
  font-style: italic;
}

/* ==============================
   Dark-Background Button Utilities
   Apply .btn-dark + one variant (.btn-dark--accent or .btn-dark--light)
   to any <a>, <button>, or <input> on a dark surface
   (#1a1a1a, #111, --ink, etc.).
   ============================== */

/* Base: shared typography + motion invariant */
.btn-dark {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 0.75em 1em;
  line-height: 1.3;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease-in-out;
}
.btn-dark:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.2);
}

/* Variant: accent fill — flips to paper-light on hover */
.btn-dark--accent {
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
}
.btn-dark--accent:hover {
  background: var(--paper-light);
  border-color: var(--ink) !important;
  color: var(--ink) !important;
}

/* Variant: light fill — flips to accent on hover */
.btn-dark--light {
  background: var(--paper-light);
  border-color: var(--paper-light);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.2);
  color: var(--ink);
}
.btn-dark--light:hover {
  background: var(--accent);
  border-color: var(--accent) !important;
  color: #fff !important;
}

/* CREATOR SECTION */

#creator {
  background: var(--ink);
  padding: 4.5rem 0;
  border-top: 4px solid #2a2a2a;
}

.creator-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--paper);
}

.creator-label {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid-light);
  display: block;
  margin-bottom: 0.6rem;
}

.creator-img img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--paper-light);
  display: block;
  margin: 1rem auto 0.75rem;
}

.creator-inner {
  text-align: center;
  color: var(--paper);
}

.creator-inner h2 {
  text-align: center;
  color: var(--paper);
  font-weight: 900;
  font-size: 1.5rem;
}

.creator-bio {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--mid-light);
  line-height: 1.75;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

.creator-bio strong {
  font-weight: 700;
  color: var(--paper-light);
}

p.creator-email {
  margin-bottom: 0 !important;
}

p.creator-email a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--paper-light);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  border-bottom: 2px solid var(--accent);
  transform: translateY(0px);
  line-height: 1;

  transition: all 0.25s ease-in-out;
}

p.creator-email a:hover {
  transform: translateY(-2px);
  color: #fff;

  /*  --paper-light *glow* FX */
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.05),
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 12px rgba(255, 255, 255, 0.5);
}

p.creator-email a strong {
  font-size: 1.5rem;
  line-height: 1;
}

/* ── Mobile Menu Overlay (Photocopy Effect) ───────────────────────
 * A high-contrast photocopy threshold behind the mobile menu.
 *
 * backdrop-filter crushes everything underneath into binary
 * black/white.  The overlay's own bg is “photocopy paper” white
 * sitting in multiply blend mode, so the backdrop-filtered content
 * shows through while the CSS-generated toner grain scatters
 * dark speckles on top via a ::after pseudo-element.
 *
 * No SVG feTurbulence — grain is all CSS radial-gradient layers
 * (GPU-cached tiles, near-zero runtime cost).
 *
 * Toggled via JS (custom-scripts.js) when the mobile menu opens.
 * Sits just below the header/menu z-index (99).
 */
.rgs-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;

  /* Semi-transparent "paper" — sits on top of the thresholded backdrop.
     Without mix-blend-mode (which breaks backdrop-filter in WebKit),
     this simply veils the thresholded content with a paper-like tone. */
  background: rgba(255, 255, 255, 0.88);
}

/* ── Toner grain (::after pseudo) ───────────────────────────────────
   Subtle dark specks that sit on top of the paper layer.  No
   blend-mode needed — the specks are rgba(0,0,0,x) on a white-ish
   background, so they naturally read as photocopier toner. */
.rgs-mobile-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;

  background-image:
    radial-gradient(circle at 12% 8%, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    radial-gradient(
      circle at 28% 35%,
      rgba(0, 0, 0, 0.09) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 45% 15%,
      rgba(0, 0, 0, 0.14) 1px,
      transparent 1px
    ),
    radial-gradient(circle at 65% 42%, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
    radial-gradient(
      circle at 82% 28%,
      rgba(0, 0, 0, 0.13) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 18% 65%,
      rgba(0, 0, 0, 0.08) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 38% 78%,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 55% 92%,
      rgba(0, 0, 0, 0.09) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 75% 55%,
      rgba(0, 0, 0, 0.11) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 92% 70%,
      rgba(0, 0, 0, 0.14) 1px,
      transparent 1px
    ),
    radial-gradient(circle at 5% 48%, rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    radial-gradient(
      circle at 52% 52%,
      rgba(0, 0, 0, 0.17) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 88% 12%,
      rgba(0, 0, 0, 0.08) 1px,
      transparent 1px
    ),
    radial-gradient(circle at 35% 50%, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 68% 88%, rgba(0, 0, 0, 0.13) 1px, transparent 1px);
  background-size: 120px 120px;
}

.rgs-mobile-overlay.is-active {
  opacity: 1;
  pointer-events: auto;

  /* Binary threshold pipeline — only active while overlay is visible,
     so normal content is untouched when the menu is closed.
     grayscale → slight blur for toner bleed → blow out highlights →
     extreme contrast to crush everything to pure black or white. */
  backdrop-filter: grayscale(100%) blur(0.5px) brightness(1.2) contrast(3000%);
  -webkit-backdrop-filter: grayscale(100%) blur(0.5px) brightness(1.2)
    contrast(3000%);
}

/* Preview Reader Pages */
.reader-description img.page-img {
  max-height: 80vh !important;
  width: auto !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .rgs-mobile-overlay {
    transition: none;
  }
}
/* Mobile menu toggle button */
button.menu-toggle {
  padding: 0px !important;
  outline: none !important;
}
button.menu-toggle:active,
button.menu-toggle:focus,
button.menu-toggle:focus-within {
  outline: none !important;
  border: none !important;
}

@media (max-width: 480px) {
  #announce-bar {
    padding: 5px;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.62rem;
  }

  #ast-mobile-header
    .ast-builder-grid-row.ast-builder-grid-row-has-sides.ast-builder-grid-row-no-center {
    gap: 0rem;
  }
  #ast-mobile-header .publisher-tag {
    font-size: 0.5rem;
    letter-spacing: 0.15em;
  }

  .masthead-brand {
    gap: 0.5rem;
  }

  #creator {
    padding: 2rem 0;
  }

  .masthead-brand {
    justify-content: center;
    align-items: center !important;
  }
}

/* ── Mobile Menu Dark Theme ────────────────────────────────────
 * Matches the mini-cart widget_shopping_cart dark design:
 *   #1a1a1a background, 3px solid #2e2e2e border,
 *   4px 4px 0 var(--accent) shadow, white Montserrat links,
 *   accent hover/active.
 *
 * Scoped under .ast-builder-menu-mobile to match/beat Astra's
 * default specificity.  Wrapped in Astra's tablet/mobile
 * breakpoint (max-width: 921px) so these only apply when the
 * hamburger menu is active.
 * ============================================================== */
@media (max-width: 921px) {
  /* ── Panel container ──
     The .main-navigation div wraps the UL when the menu opens. */
  .ast-builder-menu-mobile .main-navigation {
    background: #1a1a1a;
    border: 3px solid #2e2e2e;
    box-shadow: 4px 4px 0 var(--accent);
  }

  /* ── Menu list (match Astra's 3-class specificity) ──
     Astra uses: .ast-builder-menu-mobile .main-navigation .main-header-menu
     which beats a 2-class chain, so we must match it + !important
     on background-color to override var(--ast-global-color-4). */
  .ast-builder-menu-mobile .main-navigation .main-header-menu {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
  }
  .ast-builder-menu-mobile .main-navigation .main-header-menu > .menu-item {
    border-bottom: 1px solid #2e2e2e;
  }
  .ast-builder-menu-mobile
    .main-navigation
    .main-header-menu
    > .menu-item:last-child {
    border-bottom: none;
  }

  /* ── Menu links ──
     White text, Montserrat, uppercase — mirrors mini-cart
     product links (custom-styles.css:606–612). */
  .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-link {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0.9rem 1.2rem;
    transition: color 0.15s ease;
  }
  .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-link:hover {
    color: var(--accent) !important;
  }

  /* ── Active / current page ── */
  .ast-builder-menu-mobile
    .main-navigation
    .main-header-menu
    .current-menu-item
    > .menu-link,
  .ast-builder-menu-mobile
    .main-navigation
    .main-header-menu
    .current_page_item
    > .menu-link {
    color: var(--accent) !important;
  }

  /* JS-scroll-based active highlight (toggled by frontend.js observer).
     Matches the 3-class chain + !important to beat the default
     color: #fff !important on .menu-link at (0,4,0). */
  .ast-builder-menu-mobile
    .main-navigation
    .main-header-menu
    .menu-link.is-active {
    color: var(--accent) !important;
  }

  /* ── Sub-menu (if any) ──
     Inherit dark bg, slightly indented. */
  .ast-builder-menu-mobile .main-navigation .sub-menu {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-color: #2e2e2e;
  }
  .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item {
    border-bottom: 1px solid #2e2e2e;
  }
  .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item:last-child {
    border-bottom: none;
  }
}

/* ── Hamburger toggle icon color ──
   Ensure the three-bar icon is visible against the dark header.
   Lives outside the 921px media query because the toggle button
   exists at all screen sizes (just hidden on desktop). */
.ast-mobile-menu-trigger-minimal {
  color: var(--paper-light) !important;
}
.ast-mobile-menu-trigger-minimal .menu-toggle-icon {
  color: var(--paper-light);
}

/* ── Mobile Cart Drawer Dark Theme ─────────────────────────────
 * Matches the mini-cart widget_shopping_cart + mobile menu dark
 * design.  Astra injects much of this inline via Customizer
 * settings, so we use #id selectors + !important to override.
 *
 * HTML template:
 *   .astra-mobile-cart-overlay
 *   #astra-mobile-cart-drawer.astra-cart-drawer
 *     ├─ .astra-cart-drawer-header
 *     │   ├─ button.astra-cart-drawer-close
 *     │   └─ .astra-cart-drawer-title
 *     └─ .astra-cart-drawer-content
 *         └─ .widget_shopping_cart (inherits from mini-cart rules)
 * ============================================================== */

/* ── Overlay ── */
.astra-mobile-cart-overlay {
  background: rgba(0, 0, 0, 0.7) !important;
}

/* ── Drawer container ── */
#astra-mobile-cart-drawer.astra-cart-drawer {
  background: #1a1a1a !important;
  border-left: 3px solid #2e2e2e !important;
  box-shadow: -4px 4px 0 var(--accent) !important;
}

/* ── Header ── */
#astra-mobile-cart-drawer .astra-cart-drawer-header {
  border-bottom-color: #2e2e2e !important;
  padding: 1.2rem 1.5rem;
}

#astra-mobile-cart-drawer .astra-cart-drawer-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff !important;
}

/* ── Close button ── */
#astra-mobile-cart-drawer .astra-cart-drawer-close {
  color: var(--paper-light) !important;
  border-radius: 0;
}
#astra-mobile-cart-drawer .astra-cart-drawer-close:hover {
  color: var(--accent) !important;
}
#astra-mobile-cart-drawer .astra-cart-drawer-close .ast-close-svg {
  fill: currentColor;
}

/* ── Content area links ──
   Inherits .woocommerce-mini-cart-item a:not(.remove) from
   existing mini-cart rules, but those are scoped under
   .ast-site-header-cart.  Re-scope for the drawer. */
#astra-mobile-cart-drawer
  .astra-cart-drawer-content
  .widget_shopping_cart_content
  a:not(.button) {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff !important;
  transition: color 0.15s ease;
}
#astra-mobile-cart-drawer
  .astra-cart-drawer-content
  .widget_shopping_cart_content
  a:not(.button):hover {
  color: var(--accent) !important;
}

/* ── Separators (match mini-cart #2e2e2e) ── */
#astra-mobile-cart-drawer .widget_shopping_cart .mini_cart_item {
  border-bottom-color: #2e2e2e !important;
}

/* ── Total section ── */
#astra-mobile-cart-drawer .woocommerce-mini-cart__total {
  border-top-color: #2e2e2e !important;
  border-bottom-color: #2e2e2e !important;
}

/* ── Contact Popover (Centred Modal) ────────────────────────────
 * Dark-themed modal triggered by the #contact menu link.
 * Always centred fixed-position on all viewports with a dark
 * overlay. Matches the mini-cart dropdown aesthetic:
 *   #1a1a1a bg, #2e2e2e border, var(--accent) shadow.
 * ============================================================== */
#rgs-contact-popover {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100001;
  width: 400px;
  max-width: calc(100vw - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  background: #1a1a1a;
  border: 3px solid #2e2e2e;
  box-shadow: 4px 4px 0 var(--accent);
  padding: 1.5rem;
  font-family: "Montserrat", sans-serif;
  color: #fff;
  text-align: left;
  box-sizing: border-box;
}

#rgs-contact-popover.is-open {
  display: block;
}

/* ── Overlay backdrop ── */
body.rgs-contact-modal-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.7);
}

/* ── Close button ── */
#rgs-contact-popover .rgs-contact-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#rgs-contact-popover .rgs-contact-close:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

/* ── Heading ── */
#rgs-contact-popover .rgs-contact-heading {
  margin: 0 0 1.25rem 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
}

/* ── Social Icons Row ── */
#rgs-contact-popover .rgs-contact-socials {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#rgs-contact-popover .rgs-contact-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid #555;
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  color: #fff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease,
    color 0.2s ease;
}

#rgs-contact-popover .rgs-contact-socials a:hover {
  transform: translateY(-2px);
}

#rgs-contact-popover .rgs-contact-socials a svg {
  width: 22px;
  height: 22px;
  display: block;
}

#rgs-contact-popover .rgs-contact-socials a.rgs-social-discord:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
  color: #5865f2;
}

#rgs-contact-popover .rgs-contact-socials a.rgs-social-instagram:hover {
  border-color: #e4405f;
  background: rgba(228, 64, 95, 0.1);
  color: #e4405f;
}

#rgs-contact-popover .rgs-contact-socials a.rgs-social-whatnot:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

/* ── Divider ── */
#rgs-contact-popover .rgs-contact-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}

#rgs-contact-popover .rgs-contact-divider::before,
#rgs-contact-popover .rgs-contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2e2e2e;
}

/* ── Form Fields ── */
#rgs-contact-popover .rgs-contact-field {
  margin-bottom: 0.75rem;
}

#rgs-contact-popover .rgs-contact-field input,
#rgs-contact-popover .rgs-contact-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  color: #fff;
  background: #2a2a2a;
  border: 2px solid #555;
  border-radius: 0;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

#rgs-contact-popover .rgs-contact-field input::placeholder,
#rgs-contact-popover .rgs-contact-field textarea::placeholder {
  color: #888;
  opacity: 1;
}

#rgs-contact-popover .rgs-contact-field input:focus,
#rgs-contact-popover .rgs-contact-field textarea:focus {
  border-color: var(--accent);
}

#rgs-contact-popover .rgs-contact-field textarea {
  min-height: 80px;
  resize: vertical;
}

/* ── Honeypot (hidden from humans, visible to bots) ── */
#rgs-contact-popover .rgs-contact-field-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── Submit Button ──
   Matches dark-button variant A (accent fill) from the style guide. */
#rgs-contact-popover .rgs-contact-submit {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1.2rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--ink) !important;
  border-radius: 0;
  background: var(--accent) !important;
  color: var(--ink) !important;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

#rgs-contact-popover .rgs-contact-submit:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.2);
  background: var(--paper-light) !important;
  color: var(--ink) !important;
  border-color: var(--ink) !important;
}

#rgs-contact-popover .rgs-contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Status Messages ── */
#rgs-contact-popover .rgs-contact-status {
  display: none;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  border: 2px solid transparent;
}

#rgs-contact-popover .rgs-contact-status.is-visible {
  display: block;
}

#rgs-contact-popover .rgs-contact-status.is-success {
  color: #22c55e;
  border-color: #22c55e;
}

#rgs-contact-popover .rgs-contact-status.is-error {
  color: #ff5b7a;
  border-color: #ff5b7a;
}
