/* amamiya.monster — graffiti on weathered earth, with one cool aurora witness */

/* ----------- PALETTE TOKENS -----------
   Strict warm-earthy palette plus a single cool aurora witness:
     --umber  #3A1F12    --iron   #5C2E1A    --sienna #8B4513
     --terra  #C97B3D    --ochre  #E0A85C    --cream  #F2D8B1
     --aurora #7FC8B2    (cool tone, used only in aurora ribbon)
*/
:root {
    --color-umber:  #3A1F12;
    --color-iron:   #5C2E1A;
    --color-sienna: #8B4513;
    --color-terra:  #C97B3D;
    --color-ochre:  #E0A85C;
    --color-cream:  #F2D8B1;
    --color-aurora: #7FC8B2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #3a1f12;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 220vh;
    background-color: #8b4513;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='340' height='340'><filter id='n1'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.22  0 0 0 0 0.12  0 0 0 0 0.07  0 0 0 0.14 0'/></filter><rect width='340' height='340' filter='url(%23n1)'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='n2'><feTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='3' seed='11'/><feColorMatrix values='0 0 0 0 0.36  0 0 0 0 0.18  0 0 0 0 0.07  0 0 0 0.14 0'/></filter><rect width='560' height='560' filter='url(%23n2)'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='820' height='820'><filter id='n3'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0 0.03  0 0 0 0.14 0'/></filter><rect width='820' height='820' filter='url(%23n3)'/></svg>"),
        repeating-linear-gradient(
            0deg,
            rgba(58, 31, 18, 0.02) 0px,
            rgba(58, 31, 18, 0.02) 2px,
            transparent 2px,
            transparent 7px
        ),
        radial-gradient(ellipse at 30% 0%, #a05322 0%, #8b4513 35%, #5c2e1a 100%);
    background-blend-mode: multiply, multiply, multiply, normal, normal;
    background-attachment: fixed, fixed, fixed, scroll, scroll;
    color: #3a1f12;
    font-family: 'Inknut Antiqua', serif;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    cursor: crosshair;
    animation: hue-drift 80s ease-in-out infinite;
}

@keyframes hue-drift {
    0%, 100% { filter: hue-rotate(0deg); }
    50%      { filter: hue-rotate(-4deg); }
}

/* ----------- DARKENING VIGNETTE OVERLAY ----------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(58, 31, 18, 0.55) 100%);
    z-index: 1;
}

/* ----------- WORDMARK ------------------------------ */
.wordmark {
    position: absolute;
    top: 6vh;
    left: 4vw;
    transform: rotate(-4deg);
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(4rem, 11vw, 9rem);
    line-height: 0.82;
    letter-spacing: -0.04em;
    color: #c97b3d;
    -webkit-text-stroke: 6px #5c2e1a;
    text-shadow:
        5px 5px 0 #3a1f12,
        7px 7px 0 rgba(58, 31, 18, 0.6);
    z-index: 5;
    max-width: 38vw;
    pointer-events: auto;
    user-select: none;
}

.wordmark-text {
    display: inline-block;
    position: relative;
    transition: filter 220ms ease-out;
}

.wordmark-drips {
    position: absolute;
    left: 0;
    bottom: -34px;
    width: 100%;
    height: 60px;
    overflow: visible;
    pointer-events: none;
}

.drip {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drip-down 1.6s ease-in 0.4s forwards;
    opacity: 0.78;
}

.wordmark-drips .drip-1 { animation-delay: 0.4s; }
.wordmark-drips .drip-2 { animation-delay: 0.6s; }
.wordmark-drips .drip-3 { animation-delay: 0.55s; }
.wordmark-drips .drip-4 { animation-delay: 0.7s; }
.wordmark-drips .drip-5 { animation-delay: 0.45s; }
.wordmark-drips .drip-6 { animation-delay: 0.65s; }
.wordmark-drips .drip-7 { animation-delay: 0.5s; }

@keyframes drip-down {
    0%   { stroke-dashoffset: 80; opacity: 0.78; }
    100% { stroke-dashoffset: 0;  opacity: 0.78; }
}

/* ----------- TAGS (paragraphs scattered as flyers) ----------- */
.tag {
    position: absolute;
    max-width: clamp(280px, 28vw, 460px);
    padding: 14px 18px 22px 18px;
    z-index: 4;
    color: #3a1f12;
    background: rgba(242, 216, 177, 0.04);
    border-left: 2px solid rgba(92, 46, 26, 0.28);
    transition: filter 280ms ease-out, opacity 280ms ease-out;
    filter: saturate(0.6) brightness(0.92);
    opacity: 0.92;
}

.tag p {
    font-family: 'Inknut Antiqua', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: #2a1408;
    text-shadow: 0 1px 0 rgba(242, 216, 177, 0.22);
    mix-blend-mode: multiply;
}

.tag-heading {
    position: relative;
    display: inline-block;
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    -webkit-text-stroke: 3px #5c2e1a;
    text-shadow: 3px 3px 0 #3a1f12;
    transform: rotate(-2deg);
    transform-origin: left bottom;
}

.tag-drips {
    position: absolute;
    left: 0;
    bottom: -20px;
    width: 100%;
    height: 32px;
    overflow: visible;
    pointer-events: none;
}

.tag-drips .drip {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drip-down 1.4s ease-in forwards;
    opacity: 0.78;
}

/* The lit-up state — lifted by cursor halo (toggled in JS) */
.tag.lit {
    filter: saturate(1.1) brightness(1.05);
    opacity: 1;
}

/* Spray-paint overspray halo around each tag heading */
.tag-heading::before {
    content: "";
    position: absolute;
    left: -18px;
    top: -14px;
    right: -18px;
    bottom: -14px;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(201, 123, 61, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse at 70% 50%, rgba(224, 168, 92, 0.16) 0%, transparent 65%);
    filter: blur(3px);
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* ----------- STICKERS ----------------------------- */
.sticker {
    position: absolute;
    background: #f2d8b1;
    color: #3a1f12;
    font-family: 'Bungee Shade', cursive;
    font-size: 0.85rem;
    line-height: 1;
    padding: 8px 12px;
    border: 1px solid #3a1f12;
    box-shadow: 2px 3px 0 #5c2e1a;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 0 100%);
    z-index: 5;
    pointer-events: none;
    user-select: none;
}

/* The cream "tape" strip across some stickers */
.sticker::before {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    top: -3px;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        rgba(224, 168, 92, 0.55) 0,
        rgba(224, 168, 92, 0.55) 4px,
        rgba(201, 123, 61, 0.45) 4px,
        rgba(201, 123, 61, 0.45) 8px
    );
    transform: rotate(-2deg);
    pointer-events: none;
}

/* alternate-corner notches for variety */
.sticker:nth-child(2n) {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%, 0 88%);
}
.sticker:nth-child(3n) {
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%, 0 12%);
}

/* ----------- AURORA RIBBON ------------------------ */
.aurora {
    position: fixed;
    top: 0;
    right: 8vw;
    width: 700px;
    height: 100vh;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: blur(24px);
    z-index: 3;
    animation: aurora-drift 22s ease-in-out infinite;
    overflow: visible;
}

@keyframes aurora-drift {
    0%, 100% { transform: translateX(-35px); }
    50%      { transform: translateX(35px); }
}

.aurora-wave {
    transform-origin: center;
}

.aurora-wave-1 { animation: wave-phase-1 11s linear infinite; }
.aurora-wave-2 { animation: wave-phase-2 17s linear infinite; }
.aurora-wave-3 { animation: wave-phase-3 23s linear infinite; }

@keyframes wave-phase-1 {
    0%   { transform: translateX(0px) scaleX(1); }
    50%  { transform: translateX(28px) scaleX(1.04); }
    100% { transform: translateX(0px) scaleX(1); }
}

@keyframes wave-phase-2 {
    0%   { transform: translateX(0px) scaleX(1); }
    50%  { transform: translateX(-22px) scaleX(0.96); }
    100% { transform: translateX(0px) scaleX(1); }
}

@keyframes wave-phase-3 {
    0%   { transform: translateX(0px) scaleX(1); }
    50%  { transform: translateX(18px) scaleX(1.02); }
    100% { transform: translateX(0px) scaleX(1); }
}

/* ----------- CURSOR HALO -------------------------- */
.halo {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #c97b3d 0%, rgba(201, 123, 61, 0.5) 35%, transparent 70%);
    mix-blend-mode: multiply;
    opacity: 0.5;
    pointer-events: none;
    z-index: 6;
    transform: translate(-9999px, -9999px);
    will-change: transform;
}

.trail-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: multiply;
}

.trail-dot {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 123, 61, 0.85) 0%, transparent 70%);
    pointer-events: none;
    will-change: transform, opacity;
}

/* ----------- DESATURATION OUTSIDE HALO ------------ */
/* Make "out of halo" content read at -40% chroma. The halo lifts what it covers
   via mix-blend-mode: multiply on a warm pigment, which restores chromatic warmth
   over the desaturated baseline. */
.tag,
.wordmark {
    /* baseline desaturation; the halo paints warmth back on top via blend */
    transition: filter 280ms ease-out;
}

/* ----------- RESPONSIVE FALLBACK ------------------ */
@media (max-width: 720px) {
    body { min-height: 320vh; }
    .wordmark {
        max-width: 92vw;
        font-size: clamp(3.2rem, 18vw, 6rem);
        -webkit-text-stroke: 4px #5c2e1a;
    }
    .tag {
        max-width: 84vw !important;
        left: 6vw !important;
    }
    .tag-1 { top: 36vh; }
    .tag-2 { top: 56vh; }
    .tag-3 { top: 76vh; }
    .tag-4 { top: 100vh; }
    .tag-5 { top: 124vh; }
    .tag-6 { top: 148vh; }
    .tag-7 { top: 174vh; }
    .tag-8 { top: 200vh; }
    .tag-9 { top: 228vh; }
    .tag-10 { top: 256vh; }
    .aurora { right: -120px; width: 480px; }
    .sticker { font-size: 0.72rem; padding: 6px 9px; }
}
