/* =========================================
   PIXELHEIM — zine.css
   Your creative toolkit. Mix, match, abuse.
   These classes are building blocks —
   combine them, override them, ignore them.
   ========================================= */


/* ---- ROTATION ---- */
/* Tilt things. Everything feels more alive tilted. */

.tilt-left-1  { transform: rotate(-1deg); }
.tilt-left-2  { transform: rotate(-2.5deg); }
.tilt-left-3  { transform: rotate(-4deg); }
.tilt-right-1 { transform: rotate(1deg); }
.tilt-right-2 { transform: rotate(2.5deg); }
.tilt-right-3 { transform: rotate(4deg); }
.tilt-wild    { transform: rotate(-7deg); }


/* ---- LAYERING ---- */
/* Stack things on top of each other. */

.layer-box {
  position: relative;
}

.layer-over {
  position: absolute;
  /* set top/left/right/bottom inline or in your issue CSS */
}

.z-back   { z-index: 1; }
.z-mid    { z-index: 5; }
.z-front  { z-index: 10; }
.z-top    { z-index: 20; }


/* ---- TYPOGRAPHY TREATMENTS ---- */

.typewriter {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.typewriter-worn {
  /* Slightly imperfect typewriter feel */
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  opacity: 0.92;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3), -0.5px 0 0 rgba(255,255,255,0.05);
}

.headline-stamp {
  font-family: var(--font-header);
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.headline-scream {
  /* For when you need it LOUD */
  font-family: var(--font-header);
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.text-scratched {
  text-decoration: line-through;
  opacity: 0.6;
}

.text-handwritten {
  /* Use with a handwriting font if you load one */
  font-style: italic;
  letter-spacing: 0.03em;
}

.text-ransom {
  /* Mix with inline spans of different sizes/fonts */
  display: inline;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0 0.15em;
  font-family: var(--font-header);
  font-weight: 700;
  text-transform: uppercase;
}

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-header);
  font-size: 4.5em;
  line-height: 0.75;
  margin: 0.05em 0.1em 0 0;
  color: var(--color-accent);
  font-weight: 700;
}


/* ---- COLOR UTILITIES ---- */

.ink-acid    { color: var(--color-accent); }
.ink-red     { color: var(--color-accent-2); }
.ink-cyan    { color: var(--color-accent-3); }
.ink-muted   { color: var(--color-muted); }
.ink-white   { color: var(--color-text); }

.bg-acid     { background: var(--color-accent); color: var(--color-bg); }
.bg-red      { background: var(--color-accent-2); color: var(--color-text); }
.bg-surface  { background: var(--color-surface); }
.bg-invert   { background: var(--color-text); color: var(--color-bg); }


/* ---- BORDERS AND BOXES ---- */

.border-rough {
  border: 2px solid var(--color-text);
  padding: 1rem;
}

.border-accent {
  border: 2px solid var(--color-accent);
  padding: 1rem;
}

.box-stamp {
  border: 3px solid var(--color-text);
  padding: 0.75rem 1.25rem;
  display: inline-block;
  font-family: var(--font-header);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.box-redacted {
  background: var(--color-text);
  color: var(--color-text);
  /* Text is invisible — redacted */
  padding: 0 0.25em;
  user-select: none;
}

.box-redacted:hover {
  /* Reveal on hover if you want that trick */
  /* color: var(--color-bg); */
}


/* ---- LAYOUT HELPERS ---- */

.float-left  { float: left; margin: 0 1.5rem 1rem 0; }
.float-right { float: right; margin: 0 0 1rem 1.5rem; }
.clearfix::after { content: ''; display: table; clear: both; }

.col-2 {
  columns: 2;
  column-gap: 2rem;
}

.col-3 {
  columns: 3;
  column-gap: 1.5rem;
}

.col-break {
  break-after: column;
}

.overflow-canvas {
  /* Let content break out of normal flow */
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding: 2rem var(--gutter);
}

.pull-quote {
  border-left: 4px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-text);
  max-width: 50ch;
}


/* ---- IMAGE TREATMENTS ---- */

.img-polaroid {
  background: #f0ead8;
  padding: 0.75rem 0.75rem 2.5rem;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
  display: inline-block;
  max-width: 280px;
}

.img-polaroid img {
  filter: sepia(0.2) contrast(1.05);
}

.img-clipped {
  clip-path: polygon(0 3%, 100% 0, 98% 97%, 2% 100%);
}

.img-grainy {
  filter: contrast(1.1) brightness(0.95);
  /* Add noise via SVG filter or CSS for extra texture */
}

.img-duotone-acid {
  filter: grayscale(1) contrast(1.2) brightness(0.9) sepia(0.3);
  mix-blend-mode: screen;
}

.caption-zine {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}


/* ---- DIVIDERS ---- */

.divider-tape {
  /* Looks like masking tape across the page */
  display: block;
  height: 24px;
  background: rgba(212, 255, 0, 0.25);
  border-top: 1px solid rgba(212, 255, 0, 0.4);
  border-bottom: 1px solid rgba(212, 255, 0, 0.4);
  margin: 2rem calc(-1 * var(--gutter));
  transform: rotate(-0.3deg);
}

.divider-rough {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

.divider-stars {
  text-align: center;
  color: var(--color-muted);
  font-family: var(--font-mono);
  margin: 2rem 0;
}

.divider-stars::before {
  content: '* * * * * * *';
  letter-spacing: 0.5em;
}


/* ---- NOISE AND TEXTURE ---- */

.texture-noise {
  position: relative;
}

.texture-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.scanlines {
  position: relative;
}

.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}


/* ---- SPACING UTILITIES ---- */

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 2rem; }
.mt-4  { margin-top: 4rem; }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 2rem; }
.mb-4  { margin-bottom: 4rem; }

.p-1   { padding: 0.5rem; }
.p-2   { padding: 1rem; }
.p-3   { padding: 2rem; }


/* ---- RESPONSIVE NOTES ---- */
/* Some zine layouts will inevitably break on mobile.
   That's okay. But if you want to tame specific things: */

@media (max-width: 600px) {
  .col-2, .col-3 {
    columns: 1;
  }

  .float-left, .float-right {
    float: none;
    margin: 0 0 1rem 0;
  }

  .headline-scream {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }
}
