:root {
  --paper: #111111;
  --ink: #f4f1ea;
  --neon-pink: #ff0055;
  --neon-yellow: #ccff00;
  --neon-cyan: #00ffff;
}

html,
body {
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  font-family: 'Roboto Mono', monospace;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
}

/* Texture Utilities */
.halftone-bg {
  background-image: radial-gradient(#222 20%, transparent 20%), radial-gradient(#222 20%, transparent 20%);
  background-color: transparent;
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
  opacity: 0.1;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Paper Effects */
.ripped-edge-top {
  clip-path: polygon(0% 10px, 5% 0px, 10% 12px, 15% 2px, 20% 10px, 25% 0px, 30% 12px, 35% 2px,
      40% 10px, 45% 0px, 50% 12px, 55% 2px, 60% 10px, 65% 0px, 70% 12px, 75% 2px,
      80% 10px, 85% 0px, 90% 12px, 95% 2px, 100% 10px, 100% 100%, 0% 100%);
}

.ripped-edge-bottom {
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 12px),
      85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 12px), 65% 100%,
      60% calc(100% - 10px), 55% 100%, 50% calc(100% - 12px), 45% 100%, 40% calc(100% - 10px),
      35% 100%, 30% calc(100% - 12px), 25% 100%, 20% calc(100% - 10px), 15% 100%,
      10% calc(100% - 12px), 5% 100%, 0% calc(100% - 10px));
}

.tape-strip {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  transform: rotate(-2deg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.photocopy-effect {
  filter: contrast(130%) brightness(70%) grayscale(100%) sepia(10%);
}

.cutout-text {
  background: var(--ink);
  color: #111;
  padding: 0.1em 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Glitch */
@keyframes glitch {
  0% {
    transform: translate(0)
  }

  20% {
    transform: translate(-2px, 2px)
  }

  40% {
    transform: translate(-2px, -2px)
  }

  60% {
    transform: translate(2px, 2px)
  }

  80% {
    transform: translate(2px, -2px)
  }

  100% {
    transform: translate(0)
  }
}

.hover-glitch:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* Buttons (ZineComponents) */
.zbtn {
  padding: 0.75rem 1.5rem;
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.25rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  box-shadow: 4px 4px 0px 0px rgba(255, 255, 255, 0.2);
}

.zbtn:hover {
  box-shadow: none;
  transform: translate(4px, 4px) rotate(-1deg) scale(1.05);
}

.zbtn:active {
  transform: translate(2px, 2px) scale(0.98);
}

.zbtn-primary {
  background: var(--ink);
  color: #111;
  border: 2px solid transparent;
}

.zbtn-primary:hover {
  background: var(--neon-pink);
  color: #fff;
}

.zbtn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.zbtn-outline:hover {
  background: var(--ink);
  color: #111;
}

.zbtn-neon {
  background: var(--neon-yellow);
  color: #111;
  border: 2px solid transparent;
}

.zbtn-neon:hover {
  background: #fff;
  color: #111;
}

/* GlitchText helper */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch .g-main {
  position: relative;
  z-index: 1;
}

.glitch .g-c1,
.glitch .g-c2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .7;
  mix-blend-mode: screen;
}

.glitch .g-c1 {
  color: var(--neon-yellow);
  transform: translate(2px, -2px);
}

.glitch .g-c2 {
  color: var(--neon-pink);
  transform: translate(-2px, 2px);
}

/* Ripped Section */
.ripped-section {
  position: relative;
  padding: 4rem 1rem;
  overflow: hidden;
}

.ripped-section .rs-inner {
  position: relative;
  z-index: 10;
  max-width: 80rem;
  margin: 0 auto;
}

.ripped-section .rs-halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
}

.ripped-section .rs-top,
.ripped-section .rs-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 1rem;
  z-index: 10;
}

.ripped-section .rs-top {
  top: -1px;
  transform: rotate(180deg);
}

.ripped-section .rs-bottom {
  bottom: -1px;
}

/* Marquee */
@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

.animate-marquee {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 20s linear infinite;
}

/* Font outline helper used in Music page */
.font-outline-2 {
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.25);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: #000;
  background-image: repeating-linear-gradient(45deg, #000, #000 10px, #111 10px, #111 20px);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border: 3px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink);
}

/* Small helpers */
.mix-blend-hard-light {
  mix-blend-mode: hard-light;
}

.pointer-events-none {
  pointer-events: none;
}

.pointer-events-auto {
  pointer-events: auto;
}

/* --- Flip card (album swap) --- */
.flip-card {
  position: relative;
  display: block;
  width: 100%;
  perspective: 1200px;
  cursor: pointer;
}

/* the old offset block vibe (you wanted an image instead of pink, but the offset feels nice) */
/* --- Flip card (album swap) --- */
.flip-card{
  position: relative;
  display: block;
  width: 100%;
  perspective: 1200px;
  cursor: pointer;
  overflow: hidden;          /* ✅ recorta cualquier “rayita” */
}

.flip-card__offset{
  position: absolute;
  inset: 0;
  transform: translate(1rem, 1rem);
  background-image: var(--offset-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;              /* ✅ quita la línea */
  filter: contrast(125%);
  opacity: 0.85;
}

.flip-card__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(.2, .8, .2, 1);
  z-index: 2;
}

.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}

.flip-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card__front {
  transform: rotateY(0deg);
}

.flip-card__back {
  transform: rotateY(180deg);
}

/* A little polish */
.flip-card:focus {
  outline: 2px solid var(--neon-yellow);
  outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .flip-card__inner {
    transition: none;
  }
}

/* Accessible focus */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--neon-yellow);
  outline-offset: 2px;
}


/* Hint flotante para indicar flip */
.flip-hint{
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  letter-spacing: .04em;
  z-index: 50;
  pointer-events: none; /* no estorba el click */
  user-select: none;
  backdrop-filter: blur(6px);
  opacity: .95;
  transition: opacity .25s ease, transform .25s ease;
}

.flip-hint__icon{
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 14px;
  transform-origin: center;
  animation: flipHintSpin 1.6s ease-in-out infinite;
}

@keyframes flipHintSpin{
  0%   { transform: rotate(0deg) scale(1); opacity: .9; }
  40%  { transform: rotate(180deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: .9; }
}

/* Cuando ya lo volteó una vez (si agregas la clase), lo escondes */
.flip-card.hint-dismissed .flip-hint{
  opacity: 0;
  transform: translateY(6px);
}

/* Disco: girar cuando suena */
@keyframes discSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.disc-btn { cursor: pointer; }
.disc-img { display: block; }

/* Al reproducir, girar constante */
.disc-btn.is-playing .disc-img{
  animation: discSpin 1.2s linear infinite;
}

/* Freak*/
.nav-freak-btn {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  filter: none;
}

.nav-freak-btn img {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.freak-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.freak-overlay.hidden {
  display: none;
}

.freak-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.freak-overlay-panel {
  position: relative;
  z-index: 2;
  width: min(1400px, calc(100vw - 40px));
  height: min(90vh, calc(100vh - 40px));
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.freak-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.freak-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

body.freak-overlay-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .nav-freak-btn img {
    width: 150px;
  }

  .freak-overlay-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: 12px;
  }

  .freak-overlay-close {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }
}

.nav-freak-btn-mobile {
  justify-content: center;
  margin: 0 auto 10px;
}

.nav-freak-btn-mobile img {
  width: min(240px, 70vw);
}