/* ===========================================================
   loves.day  --  v2
   Graffiti-style love declaration wall.
   Palette: muted/weathered street-art.
   ============================================================ */

:root {
    --wall: #e0d8d0;            /* warm concrete */
    --wall-dark: #d0c8c0;       /* darker concrete (noise) */
    --rose: #b86a78;            /* faded spray-paint pink */
    --teal: #6a8c8c;            /* weathered teal */
    --gold: #b8a050;            /* aged stencil gold */
    --indigo: #5a5a8c;          /* dusk purple */
    --sage: #7a9070;            /* faded green */
    --ink: #0a0a0a;             /* deep shadow ink */

    --hero-rose: #b86a78;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--wall);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

/* -------------------------------------------------------------
   Wall textures: concrete + grain
   ------------------------------------------------------------- */

#wall-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(184, 106, 120, 0.04), transparent 55%),
        radial-gradient(ellipse at 75% 65%, rgba(90, 90, 140, 0.04), transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(122, 144, 112, 0.05), transparent 55%),
        var(--wall);
}

#wall-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.18;
    mix-blend-mode: multiply;
    background-image:
        repeating-radial-gradient(circle at 13% 27%, rgba(10, 10, 10, 0.35) 0, rgba(10, 10, 10, 0) 1px, transparent 2px),
        repeating-radial-gradient(circle at 67% 73%, rgba(10, 10, 10, 0.30) 0, rgba(10, 10, 10, 0) 1px, transparent 2px),
        repeating-radial-gradient(circle at 41% 11%, rgba(10, 10, 10, 0.25) 0, rgba(10, 10, 10, 0) 1px, transparent 2px),
        repeating-radial-gradient(circle at 89% 41%, rgba(10, 10, 10, 0.30) 0, rgba(10, 10, 10, 0) 1px, transparent 2px),
        repeating-linear-gradient(132deg, rgba(208, 200, 192, 0.22) 0, rgba(208, 200, 192, 0.22) 1px, transparent 1px, transparent 3px);
    background-size: 7px 7px, 5px 5px, 9px 9px, 6px 6px, 100% 100%;
}

/* additional concrete crackle */
#wall-grain::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 22% 8%, rgba(10,10,10,0.05) 0 1px, transparent 2px),
        radial-gradient(circle at 81% 32%, rgba(10,10,10,0.05) 0 1px, transparent 2px),
        radial-gradient(circle at 9% 71%, rgba(10,10,10,0.04) 0 1px, transparent 2px),
        radial-gradient(circle at 56% 89%, rgba(10,10,10,0.05) 0 1px, transparent 2px);
    background-size: 360px 360px;
    background-repeat: repeat;
    opacity: 0.7;
}

/* -------------------------------------------------------------
   HERO
   ------------------------------------------------------------- */

#hero {
    position: relative;
    z-index: 5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 6vw;
    text-align: center;
    overflow: hidden;
}

#hero-eyebrow {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(10, 10, 10, 0.55);
    margin-bottom: clamp(20px, 4vh, 36px);
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp 800ms ease 1500ms forwards;
}
#hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--rose);
}

#hero-title {
    font-family: "Recursive", "Inter", sans-serif;
    font-weight: 900;
    font-variation-settings: "CASL" 0.6, "wght" 900;
    font-size: clamp(64px, 16vw, 220px);
    line-height: 0.95;
    color: var(--hero-rose);
    transform: skewX(-3deg);
    text-shadow: 0 1px 0 rgba(10, 10, 10, 0.04);
    margin: 0;
    position: relative;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.02em;
    letter-spacing: -0.02em;
}

.hero-letter {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: translateY(-12px) rotate(-1deg) scale(0.92);
    /* JS toggles .sprayed class */
}

.hero-letter.sprayed {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, 0deg)) scale(1);
    transition:
        opacity 220ms cubic-bezier(0.2, 0.7, 0.4, 1),
        transform 320ms cubic-bezier(0.2, 0.7, 0.4, 1);
}

/* spray "overspray" halo behind each hero letter */
.hero-letter::before {
    content: "";
    position: absolute;
    inset: -22% -28%;
    background: radial-gradient(ellipse, rgba(184, 106, 120, 0.20) 0%, rgba(184, 106, 120, 0) 70%);
    z-index: -1;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 400ms ease 80ms;
    pointer-events: none;
}
.hero-letter.sprayed::before { opacity: 1; }

/* drips on selected letters */
.hero-letter::after {
    content: "";
    position: absolute;
    left: 38%;
    top: 88%;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--hero-rose), rgba(184, 106, 120, 0));
    border-radius: 0 0 4px 4px;
    transition: height 460ms cubic-bezier(0.3, 0.7, 0.4, 1) 220ms;
    pointer-events: none;
}
.hero-letter.sprayed::after { height: 28px; }
.hero-letter:nth-child(1).sprayed::after { height: 38px; left: 30%; }
.hero-letter:nth-child(3).sprayed::after { height: 22px; left: 55%; }
.hero-letter:nth-child(5).sprayed::after { height: 50px; left: 24%; }
.hero-letter:nth-child(7).sprayed::after { height: 32px; left: 60%; }
.hero-letter:nth-child(9).sprayed::after { height: 44px; left: 40%; }

.hero-dot {
    color: var(--gold);
}
.hero-dot::before {
    background: radial-gradient(ellipse, rgba(184, 160, 80, 0.22) 0%, rgba(184, 160, 80, 0) 70%);
}
.hero-dot::after {
    background: linear-gradient(to bottom, var(--gold), rgba(184, 160, 80, 0));
}

#hero-sub {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.6vw, 18px);
    color: rgba(10, 10, 10, 0.65);
    letter-spacing: 0.04em;
    margin-top: clamp(20px, 4vh, 36px);
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp 800ms ease 1700ms forwards;
}

#hero-overspray {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 38% at 50% 50%, rgba(184, 106, 120, 0.10), transparent 70%),
        radial-gradient(ellipse 40% 24% at 30% 60%, rgba(184, 160, 80, 0.06), transparent 70%),
        radial-gradient(ellipse 30% 18% at 70% 40%, rgba(106, 140, 140, 0.06), transparent 70%);
    opacity: 0;
    animation: fadeIn 1200ms ease 600ms forwards;
}

#scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 800ms ease 2100ms forwards;
}
.scroll-label {
    font-family: "Bebas Neue", "Inter", sans-serif;
    font-size: 12px;
    letter-spacing: 0.36em;
    color: rgba(10, 10, 10, 0.55);
    text-transform: uppercase;
}
.scroll-arrow {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, rgba(10,10,10,0.5), rgba(10,10,10,0));
    position: relative;
    animation: scrollPulse 1.8s ease-in-out infinite;
}
.scroll-arrow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border-right: 1px solid rgba(10, 10, 10, 0.5);
    border-bottom: 1px solid rgba(10, 10, 10, 0.5);
    transform: rotate(45deg);
}

@keyframes scrollPulse {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* -------------------------------------------------------------
   THE WALL
   ------------------------------------------------------------- */

#the-wall {
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 380vh;
    padding-bottom: 12vh;
}

/* -- Declarations: positioned chaos --------------------------- */

.declaration {
    position: absolute;
    left: var(--x, 10%);
    top: var(--y, 0);
    transform-origin: 0 50%;
    transform:
        translate3d(0, 8px, 0)
        rotate(var(--angle, 0deg))
        scale(var(--scale, 1));
    opacity: 0;
    transition:
        opacity 550ms cubic-bezier(0.2, 0.7, 0.3, 1),
        transform 700ms cubic-bezier(0.2, 0.7, 0.3, 1);
    color: var(--color, #b86a78);
    will-change: transform, opacity;
    max-width: 36vw;
    pointer-events: none;
}

.declaration.in-view {
    opacity: var(--op, 1);
    transform:
        translate3d(0, 0, 0)
        rotate(var(--angle, 0deg))
        scale(var(--scale, 1));
}

.declaration .tag {
    font-family: "Recursive", "Inter", sans-serif;
    font-weight: 300;
    font-variation-settings: "CASL" var(--casl, 0.4), "wght" 300;
    font-size: clamp(11px, 1.1vw, 15px);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    margin-right: 6px;
    color: var(--color);
    opacity: 0.7;
}

.declaration .connector {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(10, 10, 10, 0.55);
    margin: 0 6px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.declaration .loved {
    display: block;
    font-family: "Recursive", "Inter", sans-serif;
    font-weight: var(--wght, 700);
    font-variation-settings: "CASL" var(--casl, 0.5), "wght" var(--wght, 700);
    font-size: clamp(20px, calc(var(--scale, 1) * 2.4vw), 56px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--color);
    margin-top: 4px;
    position: relative;
    /* spray-paint overspray halo */
    background: radial-gradient(ellipse 120% 140% at 50% 55%,
        color-mix(in srgb, var(--color) 18%, transparent) 0%,
        transparent 70%);
    padding: 8px 14px 10px;
    border-radius: 4px;
}

/* drip effect for declarations marked data-drip="true" */
.declaration[data-drip="true"] .loved::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 24%;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--color), transparent);
    border-radius: 0 0 3px 3px;
    transition: height 500ms cubic-bezier(0.3, 0.7, 0.4, 1) 250ms;
}
.declaration[data-drip="true"].in-view .loved::after {
    height: 38px;
}
.declaration[data-drip="true"] .loved::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 62%;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--color), transparent);
    border-radius: 0 0 2px 2px;
    transition: height 600ms cubic-bezier(0.3, 0.7, 0.4, 1) 380ms;
}
.declaration[data-drip="true"].in-view .loved::before {
    height: 22px;
}

/* center proximity emphasis: declarations closer to viewport mid get slightly brighter */
.declaration.near-center {
    filter: none;
}
.declaration.far-edge {
    filter: brightness(0.94) saturate(0.9);
}

/* -- Stencil pieces ------------------------------------------- */

.stencil-piece {
    position: absolute;
    left: 50%;
    top: var(--stencil-top, 0);
    transform: translateX(-50%);
    width: clamp(220px, 30vw, 380px);
    z-index: 8;
    pointer-events: none;
}

.stencil-piece-large {
    width: clamp(280px, 40vw, 520px);
}

.stencil-shape {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    color: var(--stencil-color, #b86a78);
}

.stencil-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--stencil-color, #b86a78);
    opacity: 0;
    transform: scale(0.85);
    transition:
        opacity 700ms ease,
        transform 700ms cubic-bezier(0.2, 0.7, 0.3, 1);
    /* simulate stencil overspray edges */
    filter: drop-shadow(0 0 0.5px color-mix(in srgb, var(--stencil-color) 60%, transparent));
}

.stencil-piece.revealed .stencil-icon {
    opacity: 0.92;
    transform: scale(1);
    /* clip-path animates from rectangle to natural icon outline via mask */
    animation: stencilEdge 1200ms ease-out 0ms 1;
}

@keyframes stencilEdge {
    0%   { clip-path: inset(0 0 0 0); }
    35%  { clip-path: inset(8% 12% 8% 12%); }
    100% { clip-path: inset(0 0 0 0); }
}

.stencil-counter {
    position: relative;
    z-index: 2;
    font-family: "Bebas Neue", "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(36px, 8vw, 96px);
    letter-spacing: 0.08em;
    color: var(--wall);
    background: var(--stencil-color, #b86a78);
    padding: 6px 18px 2px;
    line-height: 1;
    mix-blend-mode: multiply;
    /* stencil cutout effect */
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--stencil-color, #b86a78) 60%, transparent);
}

.stencil-label {
    position: relative;
    z-index: 2;
    font-family: "Bebas Neue", "Inter", sans-serif;
    font-size: clamp(11px, 1.1vw, 14px);
    letter-spacing: 0.32em;
    color: rgba(10, 10, 10, 0.65);
    text-transform: uppercase;
    margin-top: 14px;
    text-align: center;
}

/* -- Wall end ------------------------------------------------- */

#wall-end {
    position: absolute;
    left: 0; right: 0;
    top: 348vh;
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(208, 200, 192, 0.6) 50%,
        rgba(208, 200, 192, 0.95) 100%);
    z-index: 9;
}

#wall-end-message {
    font-family: "Recursive", "Inter", sans-serif;
    font-weight: 900;
    font-variation-settings: "CASL" 0.85, "wght" 900;
    font-size: clamp(48px, 11vw, 160px);
    color: var(--indigo);
    transform: skewX(-2deg);
    line-height: 0.95;
    letter-spacing: -0.02em;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.02em;
}

.end-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 250ms ease,
        transform 350ms cubic-bezier(0.3, 0.7, 0.4, 1);
    position: relative;
}
.end-letter.sprayed {
    opacity: 1;
    transform: translateY(0);
}
.end-letter::before {
    content: "";
    position: absolute;
    inset: -22% -28%;
    background: radial-gradient(ellipse, rgba(90, 90, 140, 0.20) 0%, rgba(90, 90, 140, 0) 70%);
    z-index: -1;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 400ms ease 80ms;
    pointer-events: none;
}
.end-letter.sprayed::before { opacity: 1; }
.end-letter::after {
    content: "";
    position: absolute;
    left: 38%;
    top: 88%;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--indigo), rgba(90, 90, 140, 0));
    border-radius: 0 0 4px 4px;
    transition: height 500ms cubic-bezier(0.3, 0.7, 0.4, 1) 200ms;
}
.end-letter.sprayed::after { height: 30px; }
.end-letter:nth-child(2).sprayed::after { height: 44px; left: 30%; }
.end-letter:nth-child(5).sprayed::after { height: 22px; left: 55%; }
.end-letter:nth-child(8).sprayed::after { height: 50px; left: 24%; }
.end-space {
    width: 0.5em;
    height: 1em;
    opacity: 1 !important;
}
.end-space::before, .end-space::after { display: none; }

#wall-end-sub {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.4vw, 16px);
    color: rgba(10, 10, 10, 0.6);
    letter-spacing: 0.04em;
    margin-top: 24px;
}

#wall-cta {
    margin-top: 28px;
    font-family: "Bebas Neue", "Inter", sans-serif;
    font-size: clamp(14px, 1.6vw, 18px);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    background: var(--indigo);
    color: var(--wall);
    border: none;
    padding: 16px 32px;
    cursor: pointer;
    transform: skewX(-2deg);
    transition:
        background 300ms ease,
        transform 300ms ease,
        box-shadow 300ms ease;
    box-shadow: 0 0 0 0 rgba(90, 90, 140, 0);
}
#wall-cta:hover {
    background: var(--rose);
    transform: skewX(-2deg) translateY(-2px);
    box-shadow: 0 6px 0 0 rgba(184, 106, 120, 0.18);
}
#wall-cta:active {
    transform: skewX(-2deg) translateY(0);
    box-shadow: 0 0 0 0 rgba(184, 106, 120, 0);
}

/* -------------------------------------------------------------
   Cursor spray (subtle reactive overspray that follows mouse)
   ------------------------------------------------------------- */

#cursor-spray {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    margin: -110px 0 0 -110px;
    pointer-events: none;
    z-index: 4;
    background: radial-gradient(circle, rgba(184, 106, 120, 0.10) 0%, rgba(184, 106, 120, 0) 65%);
    transform: translate3d(-9999px, -9999px, 0);
    transition: background 600ms ease;
    mix-blend-mode: multiply;
}

/* -------------------------------------------------------------
   Animations utilities
   ------------------------------------------------------------- */

@keyframes fadeIn   { to { opacity: 1; } }
@keyframes fadeUp   { to { opacity: 1; transform: translateY(0); } }

/* -------------------------------------------------------------
   Responsive tweaks
   ------------------------------------------------------------- */

@media (max-width: 720px) {
    .declaration {
        max-width: 80vw;
    }
    .declaration .loved {
        font-size: clamp(18px, calc(var(--scale, 1) * 5.5vw), 38px);
    }
    .stencil-piece {
        width: clamp(180px, 60vw, 280px);
    }
    #the-wall {
        min-height: 460vh;
    }
    #wall-end {
        top: 420vh;
    }
}
