/* ==========================================================================
   TEXT EFFECTS — one shared file for the whole site

   HOW TO USE
   1. Upload this file to a "css" folder at the top of your site:
          /css/text-effects.css
   2. Add this line inside <head> on any page that needs the effects:
          <link rel="stylesheet" href="/css/text-effects.css">
      (The "/" at the start means it works from any folder.)
   3. Wrap text in a class:
          <span class="jitter">the end is nigh</span>
      Combine effects with a space:
          <span class="brand-text jitter">APOCALYPSE PROPHET</span>
      Use ONE animated effect per piece of text (e.g. not jitter + wobble
      together). To stack two, nest them:
          <span class="flicker"><span class="jitter">text</span></span>

   To tweak an effect for the whole site, change it here once.
   ========================================================================== */


/* --------------------------------------------------------------------------
   BRAND OUTLINE — white text with a black outline (like the site header)
   -------------------------------------------------------------------------- */

/* Thin outline, for normal-sized text */
.brand-text {
    font-family: "Times New Roman", Times, serif;
    color: #ffffff;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
         0px -1px 0 #000,
         0px  1px 0 #000,
        -1px  0px 0 #000,
         1px  0px 0 #000;
}

/* Thick outline, for big headings */
.brand-text-lg {
    font-family: "Times New Roman", Times, serif;
    color: #ffffff;
    text-shadow:
        -2px -2px 0 #000,
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
         0px -2px 0 #000,
         0px  2px 0 #000,
        -2px  0px 0 #000,
         2px  0px 0 #000;
}


/* --------------------------------------------------------------------------
   MOVING EFFECTS
   (display: inline-block is needed so inline text can move)
   -------------------------------------------------------------------------- */

/* JITTER — nervous, twitchy shaking */
.jitter {
    display: inline-block;
    animation: fx-jitter 0.3s steps(2) infinite;
}

@keyframes fx-jitter {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-1px, 1px); }
    50%  { transform: translate(1px, -1px); }
    75%  { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

/* JITTER-HARD — the same, but more violent */
.jitter-hard {
    display: inline-block;
    animation: fx-jitter-hard 0.2s steps(2) infinite;
}

@keyframes fx-jitter-hard {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-2px, 2px) rotate(-1deg); }
    50%  { transform: translate(2px, -1px) rotate(1deg); }
    75%  { transform: translate(-2px, -2px) rotate(0deg); }
    100% { transform: translate(2px, 1px) rotate(-1deg); }
}

/* WOBBLE — slow, seasick sway */
.wobble {
    display: inline-block;
    animation: fx-wobble 2s ease-in-out infinite;
}

@keyframes fx-wobble {
    0%, 100% { transform: rotate(-1deg) translateY(0); }
    50%      { transform: rotate(1deg) translateY(-2px); }
}

/* FLOAT — gentle drifting up and down */
.float {
    display: inline-block;
    animation: fx-float 3s ease-in-out infinite;
}

@keyframes fx-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* SHAKE-HOVER — still until the mouse goes over it, then shakes */
.shake-hover {
    display: inline-block;
}

.shake-hover:hover {
    animation: fx-jitter-hard 0.2s steps(2) infinite;
}


/* --------------------------------------------------------------------------
   LIGHT EFFECTS
   -------------------------------------------------------------------------- */

/* FLICKER — like a dying neon sign */
.flicker {
    animation: fx-flicker 3s linear infinite;
}

@keyframes fx-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55%                     { opacity: 0.2; }
}

/* BLINK — the old-school <blink> tag */
.blink {
    animation: fx-blink 1s steps(1) infinite;
}

@keyframes fx-blink {
    50% { opacity: 0; }
}

/* GLOW — soft pulsing white glow */
.glow {
    animation: fx-glow 2s ease-in-out infinite;
}

@keyframes fx-glow {
    0%, 100% { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3)); }
    50%      { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)); }
}

/* GLITCH — text jumps sideways with red/blue colour splitting */
.glitch {
    display: inline-block;
    animation: fx-glitch 2.5s steps(1) infinite;
}

@keyframes fx-glitch {
    0%, 88%, 100% { transform: translate(0); filter: none; }
    90% { transform: translate(-2px, 0);   filter: drop-shadow(2px 0 #ff0000) drop-shadow(-2px 0 #00ffff); }
    92% { transform: translate(2px, 1px);  filter: drop-shadow(-2px 0 #ff0000) drop-shadow(2px 0 #00ffff); }
    94% { transform: translate(0, -1px);   filter: drop-shadow(1px 0 #ff0000) drop-shadow(-1px 0 #00ffff); }
}


/* --------------------------------------------------------------------------
   TEXTURE EFFECTS
   -------------------------------------------------------------------------- */

/* METAL-GRUNGE — scratched brushed-metal lettering, no images needed.
   Combine with a moving effect, e.g. class="metal-grunge jitter" */
.metal-grunge {
    font-family: Impact, "Arial Black", Haettenschweiler, sans-serif;
    font-size: 1.3em;
    letter-spacing: 1px;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;   /* lets very long words break instead of spilling out */
    color: #b8b8b8;   /* fallback for very old browsers */
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .metal-grunge {
        background-image:
            /* fine diagonal scratches */
            repeating-linear-gradient(115deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 5px),
            /* rough grime streaks */
            repeating-linear-gradient(20deg, rgba(40, 30, 20, 0.35) 0 2px, transparent 2px 11px),
            /* the chrome bands */
            linear-gradient(180deg, #f4f4f4 0%, #9d9d9d 22%, #e6e6e6 38%, #4f4f4f 52%, #bdbdbd 68%, #6d6d6d 84%, #dcdcdc 100%);
        background-size: auto, auto, 100% 1.2em;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(1px 1px 0 #000) drop-shadow(-1px -1px 0 #222);
    }
}


/* --------------------------------------------------------------------------
   SPEED MODIFIERS — add alongside any moving/light effect
   e.g. <span class="wobble slow">
   -------------------------------------------------------------------------- */

.slow { animation-duration: 4s !important; }
.fast { animation-duration: 0.15s !important; }