/* ============================================================
   DIVE BAR — theme stylesheet (recreated from the pen, the studio's pen)
   The pen's styles are kept as-is except:
   - the pen's bare `canvas` rule is scoped to #rainCanvas (there are two
     canvases now — the fog layer must not inherit the rain's swing)
   - both canvases are pointer-events:none so the theme kit's buttons work
   - .light (an empty, unstyled div in the pen) carries a faint warm tint
     so the swinging brightness reads as lamplight (no fixture/bulb)
   - new elements (fog canvas, badge, card, tags, buttons) are styled at
     the bottom, in the theme's own idiom
   ============================================================ */

/* WHITE-FLASH RULE (site invariant, not from the pen): the UA canvas is
   white and body's background doesn't cover pre-paint moments — html
   must carry a dark background of its own. */
html {
  background: #000;
}

* {
  box-sizing: border-box;
}

body {
  background: black;
  max-width: 100svw;
  overflow: hidden;
}

:root {
  --main-shadow: 5px 5px 2px rgba(0, 0, 0, 0.8);


  --neon-text-color: white;
  --neon-glow-red: red;
  --neon-glow-crimson: crimson;

  --border-color1: #3ce0e5;
  --border-color2: #2acfd9;
  --border-color3: #1dbfcf;

  --border-shadow-outer: 5px 5px 2px rgba(0, 0, 0, 0.8);
  --border-shadow-inset: inset 5px 5px 2px rgba(0, 0, 0, 0.7);

  --pulse-duration: 2s;
  --fade-duration: 4s;
}

.banner {
  background:
    url('assets/brickwall.webp') center/cover no-repeat;

  /* Overlay color */
  background-color: rgba(0, 0, 0, 0.2);

  /* Blend overlay with image */
  background-blend-mode: overlay;
  /* or 'darken', 'multiply', 'soft-light', etc. */

  display: flex;
  align-items: center;
  justify-content: center;
  height: 100svh;
  overflow: hidden;

  /* Mask */
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, .2) 79%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, .2) 79%, rgba(0, 0, 0, 0) 100%);
  mask-repeat: no-repeat;
  mask-size: cover;
}

.light_wrap {
  position: absolute;
  width: 75svw;
  height: 250svh;
  top: -5%;
  transform-origin: top;
  border-radius: 100%;
  backdrop-filter: brightness(1.35) saturate(1.1);
  animation: swing 20s ease-in-out infinite;
  animation-delay: .5s;
  pointer-events: none;
  /* NO mask here — a mask sized to the ellipse's center masks away the
     visible top arc of this 250svh element and kills the light entirely */
}

/* the light itself: a faint warm wash over the brightened ellipse, so the
   swinging light reads as lamplight rather than raw brightness — just the
   light, no fixture/bulb */
.light {
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background: rgba(255, 236, 195, .07);
}


.banner img {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 80%;
  pointer-events: none;
}

.neon_header {
  font-family: "Tilt Neon", "tilt-neon", sans-serif;
  /*   font-family: "ht-neon", sans-serif; */
  text-transform: uppercase;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 100;
  color: white;
  width: fit-content;
  margin: auto;
  border: 6px solid var(--neon-text-color);
  padding: 0 2rem 0 1rem;
  border-radius: 100px;
  position: relative;
  z-index: 99;
  animation:
    neonPulse var(--pulse-duration) infinite alternate,
    neonFade var(--fade-duration) infinite alternate,
    neonBorderPulse var(--pulse-duration) infinite alternate,
    borderFlicker 5s infinite alternate;
}

/* Red neon text glow */
@keyframes neonPulse {

  0%,
  100% {
    text-shadow:
      0 0 5px var(--neon-text-color),
      0 0 10px var(--neon-glow-red),
      0 0 20px var(--neon-glow-red),
      0 0 40px var(--neon-glow-crimson),
      var(--main-shadow);
  }

  50% {
    text-shadow:
      0 0 5px var(--neon-text-color),
      0 0 10px var(--neon-glow-red),
      0 0 15px var(--neon-glow-red),
      0 0 50px var(--neon-glow-crimson),
      var(--main-shadow);
  }
}

/* Teal-blue neon border (inside + outside) with inset shadow */
@keyframes neonBorderPulse {

  0%,
  100% {
    box-shadow:
      0 0 10px var(--border-color1),
      0 0 20px var(--border-color2),
      0 0 30px var(--border-color3),
      inset 0 0 10px var(--border-color1),
      inset 0 0 20px var(--border-color2),
      var(--border-shadow-outer),
      var(--border-shadow-inset);
  }

  50% {
    box-shadow:
      0 0 5px var(--border-color1),
      0 0 15px var(--border-color2),
      0 0 25px var(--border-color3),
      inset 0 0 5px var(--border-color1),
      inset 0 0 15px var(--border-color2),
      var(--border-shadow-outer),
      var(--border-shadow-inset);
  }
}

/* Slow flicker for aged neon effect */
@keyframes neonFade {

  0%,
  45%,
  75%,
  100% {
    filter: brightness(100%);
  }

  50% {
    filter: brightness(95%);
  }
}

/* Flicker effect for broken letters */
.flicker {
  filter: brightness(.95)
}

.flicker:nth-child(odd) {
  animation: flicker var(--pulse-duration) infinite;
}

.flicker:nth-child(even) {
  animation: flicker 10s infinite;
}

@keyframes flicker {

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    text-shadow:
      0 0 5px var(--neon-text-color),
      0 0 10px var(--neon-glow-red),
      0 0 50px var(--neon-glow-red),
      var(--main-shadow);
  }

  20%,
  22%,
  24%,
  55% {
    text-shadow: none;
  }
}

/* Flicker effect for the border */
@keyframes borderFlicker {

  0%,
  98%,
  100% {
    box-shadow:
      0 0 10px var(--border-color1),
      0 0 20px var(--border-color2),
      0 0 30px var(--border-color3),
      inset 0 0 10px var(--border-color1),
      inset 0 0 20px var(--border-color2),
      var(--border-shadow-outer),
      var(--border-shadow-inset);
  }

  99% {
    box-shadow: none;
  }
}

/* the pen styled a bare `canvas` — scoped to the rain canvas so the fog
   layer (added below) doesn't ride the wind swing */
#rainCanvas {
  position: absolute;
  transform-origin: top;
  width: 200%;
  height: 200%;
  z-index: 99;
  animation: rainswing 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes swing {
  0% {
    transform: rotate(3deg);
    opacity: 1;
  }

  5% {
    transform: rotate(1deg);
  }

  10% {
    transform: rotate(4deg);
  }

  15% {
    transform: rotate(-4deg);
  }

  22% {
    transform: rotate(3deg);
  }

  30% {
    transform: rotate(-3deg);
  }

  38% {
    transform: rotate(1deg);
  }

  45% {
    transform: rotate(-3deg);
  }

  45% {
    transform: rotate(3deg);
  }

  52% {
    transform: rotate(-5deg);
  }

  60% {
    transform: rotate(3deg);
  }

  68% {
    transform: rotate(-2deg);
  }

  75% {
    transform: rotate(8deg);
  }

  82% {
    transform: rotate(15deg);
    opacity: 1;
  }

  83% {
    opacity: 0;
  }

  84% {
    opacity: 0;
  }

  85.7% {
    opacity: 1;
  }

  85.9% {
    opacity: 0;
  }

  86% {
    opacity: 1;
  }

  100% {
    transform: rotate(3deg);
  }

}

@keyframes rainswing {
  0% {
    transform: rotate(8deg);
  }

  5% {
    transform: rotate(6deg);
  }

  10% {
    transform: rotate(9deg);
  }

  14.5% {
    background: transparent;
  }

  15% {
    transform: rotate(-9deg);
    background: rgba(255, 255, 255, .4)
  }

  15.5% {
    background: transparent;
  }

  22% {
    transform: rotate(16deg);
  }

  30% {
    transform: rotate(-16deg);
  }

  38% {
    transform: rotate(12deg);
  }

  45% {
    transform: rotate(-12deg);
  }

  45% {
    transform: rotate(16deg);
  }

  52% {
    transform: rotate(-20deg);
  }

  60% {
    transform: rotate(16deg);
  }

  64.5% {
    background: transparent;
  }

  65% {
    transform: rotate(-18deg);
    background: rgba(255, 255, 255, .3);
  }

  67% {
    background: transparent;
  }

  67.5% {
    transform: rotate(-18deg);
    background: rgba(255, 255, 255, .2);
  }

  68% {
    background: transparent;
  }

  68.5% {
    transform: rotate(-18deg);
    background: rgba(255, 255, 255, .4);
  }

  69% {
    background: transparent;
  }

  68% {
    transform: rotate(-14deg);
  }

  75% {
    transform: rotate(30deg);
  }

  82% {
    transform: rotate(40deg);
  }

  100% {
    transform: rotate(16deg);
  }

}

/* ============================================================
   Everything below is new: the fog layer + the theme-for-sale kit
   (badge, card, tags, buttons), styled in the theme's own idiom.
   ============================================================ */

/* fog sits flush over the banner (no swing — fog hangs, it doesn't ride
   the gusts the way rain does) and paints BELOW .light_wrap in DOM order,
   so the swinging light genuinely brightens the fog inside its beam */
#fogCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the pen left .container bare — it becomes the theme header column.
   z-index must clear #rainCanvas (99) so the card sits in front of the rain. */
.container {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.9rem, 2.5svh, 1.6rem);
  padding: 1rem;
  max-width: min(94svw, 48rem);
}

.theme_badge {
  margin: 0;
  font-family: "Tilt Neon", sans-serif;
  font-size: .85rem;
  letter-spacing: .35em;
  text-indent: .35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
  background: rgb(0 0 0 / 76%);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 4px;
  padding: .45em 1.1em;
  text-shadow: 0 0 6px rgba(60, 224, 229, .55), 2px 2px 2px rgba(0, 0, 0, .8);
  box-shadow: var(--main-shadow), inset 0 0 12px rgba(0, 0, 0, .6);
}

.theme_card {
  background: rgb(0 0 0 / 94%);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: clamp(1rem, 2.8svh, 1.6rem) clamp(1.1rem, 3vw, 1.9rem);
  backdrop-filter: blur(7px) brightness(.9);
  box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: #e9e4da;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: clamp(.92rem, 1.6svh, 1.05rem);
  line-height: 1.55;
  max-width: 44rem;
  text-align: center;
}

.theme_card p {
  margin: 0 0 .85em;
}

.theme_tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin: 0 0 1.1em;
  padding: 0;
}

.theme_tags li {
  font-family: "Tilt Neon", sans-serif;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #bff3f6;
  padding: .3em 1em;
  border: 1px solid var(--border-color2);
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  text-shadow: 0 0 6px var(--border-color1);
  box-shadow: 0 0 8px rgba(42, 207, 217, .35), inset 0 0 6px rgba(42, 207, 217, .18);
}

.theme_actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
}

.btn {
  font-family: "Tilt Neon", sans-serif;
  font-size: .95rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .6em 1.5em;
  border-radius: 999px;
  transition: box-shadow .25s ease, text-shadow .25s ease;
}

/* "inquire" wears the sign's red neon */
.btn_neon {
  color: #fff;
  border: 2px solid var(--neon-text-color);
  background: rgba(0, 0, 0, .5);
  text-shadow: 0 0 4px var(--neon-text-color), 0 0 10px var(--neon-glow-red), 0 0 22px var(--neon-glow-crimson);
  box-shadow: 0 0 10px rgba(220, 20, 60, .5), inset 0 0 10px rgba(220, 20, 60, .35), var(--main-shadow);
}

.btn_neon:hover,
.btn_neon:focus-visible {
  text-shadow: 0 0 5px var(--neon-text-color), 0 0 14px var(--neon-glow-red), 0 0 34px var(--neon-glow-crimson);
  box-shadow: 0 0 18px rgba(220, 20, 60, .75), inset 0 0 14px rgba(220, 20, 60, .5), var(--main-shadow);
}

/* "all themes" wears the border's teal */
.btn_ghost {
  color: #bff3f6;
  border: 2px solid var(--border-color2);
  background: rgba(0, 0, 0, .5);
  text-shadow: 0 0 6px var(--border-color1);
  box-shadow: 0 0 8px rgba(42, 207, 217, .4), inset 0 0 8px rgba(42, 207, 217, .2), var(--main-shadow);
}

.btn_ghost:hover,
.btn_ghost:focus-visible {
  text-shadow: 0 0 10px var(--border-color1);
  box-shadow: 0 0 16px rgba(42, 207, 217, .65), inset 0 0 12px rgba(42, 207, 217, .35), var(--main-shadow);
}

.btn:focus-visible {
  outline: 2px solid #bff3f6;
  outline-offset: 3px;
}

/* squeeze the column on short screens so the whole kit fits one view */
@media (max-height: 700px) {
  .theme_card p:first-child {
    display: none;
  }
}

/* reduced motion: kill the swings and flickers; the sign's glow lives in
   its animation keyframes, so restore it as a steady state. The rain canvas
   is hidden outright — the rAF drawing loop in theme.js is continuous
   motion that `animation: none` can't stop (theme.js stays untouched:
   The owner's hand tuning). Twin pair below (html.reduce-motion = the main
   site's motion toggle, stamped pre-paint by /js/deck.js) — edit both. */
@media (prefers-reduced-motion: reduce) {

  .light_wrap,
  .neon_header,
  .flicker {
    animation: none !important;
  }

  #rainCanvas {
    display: none;
  }

  .neon_header {
    text-shadow:
      0 0 5px var(--neon-text-color),
      0 0 10px var(--neon-glow-red),
      0 0 20px var(--neon-glow-red),
      0 0 40px var(--neon-glow-crimson),
      var(--main-shadow);
    box-shadow:
      0 0 10px var(--border-color1),
      0 0 20px var(--border-color2),
      0 0 30px var(--border-color3),
      inset 0 0 10px var(--border-color1),
      inset 0 0 20px var(--border-color2),
      var(--border-shadow-outer),
      var(--border-shadow-inset);
  }
}

html.reduce-motion .light_wrap,
html.reduce-motion .neon_header,
html.reduce-motion .flicker {
  animation: none !important;
}

html.reduce-motion #rainCanvas {
  display: none;
}

html.reduce-motion .neon_header {
  text-shadow:
    0 0 5px var(--neon-text-color),
    0 0 10px var(--neon-glow-red),
    0 0 20px var(--neon-glow-red),
    0 0 40px var(--neon-glow-crimson),
    var(--main-shadow);
  box-shadow:
    0 0 10px var(--border-color1),
    0 0 20px var(--border-color2),
    0 0 30px var(--border-color3),
    inset 0 0 10px var(--border-color1),
    inset 0 0 20px var(--border-color2),
    var(--border-shadow-outer),
    var(--border-shadow-inset);
}