/* =====================================================================
   Ricky Richards · 90s Week (production)
   Popup + paperclip sitewide while active.
   Skin styles apply on body.rr90-skin (/90sweek landing only).
   ===================================================================== */
:root {
  /* Palette matched to Memphis tile (assets/img/90s-week/memphis-tile.jpg) */
  --rr-teal: #00BFB3;
  --rr-purple: #A389D4;
  --rr-yellow: #FFB300;
  --rr-coral: #FF8A80;
  --rr-blue: #0071CE;
  --rr-ink: #37474F;
  --rr-paper: #F2F2F2;
  --w95-face: #c0c0c0;
  --w95-light: #ffffff;
  --w95-shadow: #808080;
  --w95-dark: #0a0a0a;
  --w95-title: #000080;
  --w95-title-2: #1084d0;
  --f-pixel: "Press Start 2P", "Courier New", monospace;
  --f-term: "VT323", "Courier New", monospace;
  --f-display: "Bungee", "Arial Black", Impact, sans-serif;
  --f-shade: "Bungee Shade", "Bungee", "Arial Black", Impact, sans-serif;
  --f-comic: "Comic Neue", "Comic Sans MS", "Chalkboard SE", cursive;
  --f-ui: Tahoma, Verdana, "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------------
   Shared Win95 chrome
   --------------------------------------------------------------------- */
.rr90-btn,
.rr90-tb {
  font-family: var(--f-ui);
  color: #000;
  background: var(--w95-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w95-dark),
    inset 1px 1px var(--w95-light),
    inset -2px -2px var(--w95-shadow),
    inset 2px 2px #dfdfdf;
  cursor: pointer;
  text-decoration: none;
}
.rr90-btn:active,
.rr90-tb:active {
  box-shadow:
    inset -1px -1px var(--w95-light),
    inset 1px 1px var(--w95-dark),
    inset -2px -2px #dfdfdf,
    inset 2px 2px var(--w95-shadow);
}
.rr90-btn:focus-visible,
.rr90-tb:focus-visible,
.rr90-clip:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -5px;
}

/* ---------------------------------------------------------------------
   Popup
   --------------------------------------------------------------------- */
.rr90-popup {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  padding: 16px;
  /* Leave room so the paperclip sticky stays clickable above the dimmed page */
  pointer-events: none;
}
.rr90-popup .rr90-backdrop,
.rr90-popup .rr90-win {
  pointer-events: auto;
}
.rr90-popup[hidden] {
  display: none !important;
}
.rr90-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 40, 0.55);
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 4px 4px;
}
.rr90-win {
  position: relative;
  width: min(520px, 100%);
  background: var(--w95-face);
  color: #000;
  padding: 3px;
  box-shadow:
    inset -1px -1px var(--w95-dark),
    inset 1px 1px #dfdfdf,
    inset -2px -2px var(--w95-shadow),
    inset 2px 2px var(--w95-light),
    8px 8px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.45;
  animation: rr90-pop 0.28s steps(4) both;
}
@keyframes rr90-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.rr90-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 3px 0 5px;
  background: linear-gradient(90deg, var(--w95-title), var(--w95-title-2));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.rr90-titlebar-icon {
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--rr-yellow) 0 0) 0 0 / 8px 8px no-repeat,
    linear-gradient(var(--rr-teal) 0 0) 8px 0 / 8px 8px no-repeat,
    linear-gradient(var(--rr-coral) 0 0) 0 8px / 8px 8px no-repeat,
    linear-gradient(var(--rr-purple) 0 0) 8px 8px / 8px 8px no-repeat;
}
.rr90-titlebar-text {
  flex: 1;
}
.rr90-titlebar-btns {
  display: flex;
  gap: 2px;
}
.rr90-tb {
  width: 20px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  line-height: 1;
}
.rr90-tb-close {
  margin-left: 2px;
}
.rr90-win-body {
  display: flex;
  gap: 18px;
  padding: 20px 18px 8px;
}
.rr90-art {
  flex: none;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}
.rr90-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rr90-copy {
  min-width: 0;
}
.rr90-copy p {
  margin: 0 0 10px;
}
.rr90-kicker {
  font-family: var(--f-pixel);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rr-ink);
}
.rr90-headline {
  font-family: var(--f-shade);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 58px);
  line-height: 0.95;
  margin: 2px 0 8px;
  color: var(--rr-purple);
  text-shadow: 3px 3px 0 var(--rr-teal);
  text-transform: uppercase;
}
.rr90-dates {
  font-family: var(--f-term);
  font-size: 24px;
  line-height: 1;
}
.rr90-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.rr90-list li {
  padding-left: 22px;
  position: relative;
  margin: 2px 0;
}
.rr90-list li::before {
  content: "\2605";
  position: absolute;
  left: 2px;
  color: var(--rr-coral);
  text-shadow: 1px 1px 0 #000;
}
.rr90-progress {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.rr90-progress-bar {
  display: block;
  height: 20px;
  padding: 2px;
  background: #fff;
  box-shadow: inset -1px -1px var(--w95-light), inset 1px 1px var(--w95-shadow);
}
.rr90-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(90deg, var(--w95-title) 0 10px, transparent 10px 12px);
  animation: rr90-install 2.4s steps(14) both 0.3s;
}
@keyframes rr90-install {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.rr90-win-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px 16px;
  flex-wrap: wrap;
}
.rr90-btn {
  min-width: 96px;
  padding: 7px 16px;
  font-size: 13px;
  text-align: center;
}
.rr90-btn--default {
  font-weight: 700;
}
/* Same raised Win95 bevel as Close — no flat black outline */

@media (max-width: 760px) {
  .rr90-art {
    display: none;
  }
  .rr90-win-body {
    padding: 16px 14px 6px;
  }
}

/* ---------------------------------------------------------------------
   Paperclip sticky
   --------------------------------------------------------------------- */
.rr90-clip {
  position: fixed;
  z-index: 100010; /* above .rr90-popup overlay */
  /* Sit left of the chat launcher (~60px wide, 20px from the right edge). */
  right: calc(96px + env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.35));
  transition: transform 0.15s ease;
}
.rr90-clip[hidden] {
  display: none !important;
}
.rr90-clip:hover {
  transform: translateY(-4px) rotate(-3deg);
}
.rr90-clip-img {
  width: 72px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}
.rr90-clip-bubble {
  font-family: var(--f-pixel);
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  color: var(--rr-ink);
  background: var(--rr-yellow);
  border: 2px solid var(--rr-ink);
  padding: 6px 8px;
  max-width: 110px;
  box-shadow: 3px 3px 0 var(--rr-ink);
}
@media (max-width: 640px) {
  .rr90-clip-img {
    width: 56px;
  }
  .rr90-clip-bubble {
    font-size: 7px;
    padding: 5px 6px;
    max-width: 92px;
  }
}

/* ---------------------------------------------------------------------
   /90sweek landing skin (body.rr90-skin)
   Fonts + buttons + light Memphis texture — matches Alex / mockup "rad"
   --------------------------------------------------------------------- */
body.rr90-skin {
  background: #fff;
}

body.rr90-skin .marketing-banner {
  background: linear-gradient(90deg, var(--rr-purple), var(--rr-coral) 35%, var(--rr-yellow) 65%, var(--rr-teal));
  border-top: 3px solid var(--rr-ink);
  border-bottom: 3px solid var(--rr-ink);
}
body.rr90-skin .marketing-banner .post-header-text {
  font-family: var(--f-display) !important;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-block: 10px;
}

body.rr90-skin main h1 > span,
body.rr90-skin main h2 {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 var(--rr-teal), 6px 6px 0 var(--rr-purple);
}
body.rr90-skin main h3 {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
}

body.rr90-skin section.bg-lightgrey,
body.rr90-skin .spacer.bg-lightgrey,
body.rr90-skin .introduction-module,
body.rr90-skin .brand-grid-module {
  background-color: var(--rr-paper) !important;
  /* Fixed attachment so the tile lines up across Brands + spacers (no chopped seams) */
  background-image: url("../img/90s-week/memphis-tile.jpg");
  background-size: 720px 720px;
  background-repeat: repeat;
  background-position: 0 0;
  background-attachment: fixed;
}
/* Subtle readable wash behind Product Categories / intro copy only — not Brands */
body.rr90-skin .introduction-module {
  background-image:
    radial-gradient(ellipse 52% 62% at 50% 50%, rgba(242, 242, 242, 0.82) 48%, rgba(242, 242, 242, 0) 100%),
    url("../img/90s-week/memphis-tile.jpg");
  background-size: 100% 100%, 720px 720px;
  background-repeat: no-repeat, repeat;
  background-position: center, 0 0;
  background-attachment: scroll, fixed;
}
@media (max-width: 1023px) {
  /* iOS/Safari struggle with fixed backgrounds — keep a larger soft tile instead */
  body.rr90-skin section.bg-lightgrey,
  body.rr90-skin .spacer.bg-lightgrey,
  body.rr90-skin .introduction-module,
  body.rr90-skin .brand-grid-module {
    background-attachment: scroll;
    background-size: 560px 560px;
  }
  body.rr90-skin .introduction-module {
    background-attachment: scroll, scroll;
    background-size: 100% 100%, 560px 560px;
  }
}
body.rr90-skin .introduction-module > .container {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 1024px) {
  body.rr90-skin .introduction-module > .container {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}
body.rr90-skin .introduction-module h1 > span {
  display: inline-block;
  background: #fff;
  padding: 0.15em 0.45em;
  border: 3px solid var(--rr-ink);
  box-shadow: 6px 6px 0 var(--rr-yellow);
  text-shadow: 2px 2px 0 var(--rr-teal);
}

body.rr90-skin .button {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
  background: var(--rr-yellow) !important;
  color: var(--rr-ink) !important;
  border: 3px solid var(--rr-ink) !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 var(--rr-ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
body.rr90-skin .button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--rr-ink);
}

body.rr90-skin .site-header img[alt="Ricky Richards"]:hover {
  animation: rr90-jiggle 0.5s steps(4) 2;
}
@keyframes rr90-jiggle {
  25% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rr90-win,
  .rr90-progress-fill,
  .rr90-clip,
  body.rr90-skin .button,
  body.rr90-skin .site-header img[alt="Ricky Richards"] {
    animation: none !important;
    transition: none !important;
  }
  .rr90-progress-fill {
    clip-path: none;
  }
}
