/* ==========================================================
   LLITTL.ai — a street-style poet's notebook for the very small
   Palette: high-contrast, hand-chosen.
   Fonts:   Cormorant Garamond + EB Garamond + Bebas Neue + JetBrains Mono
   ========================================================== */

:root {
    --ink:        #0A0A0A;   /* ink black */
    --cream:      #FAFAF5;   /* rice-paper cream */
    --red:        #E63946;   /* stencil red */
    --navy:       #1D3557;   /* alley-night navy */
    --frost:      #F1FAEE;   /* frost paper */
    --grey:       #A8A8A8;   /* wet-pavement grey */
    --yellow:     #FFD60A;   /* caution-tape yellow */

    --grid-gap:   2.4vw;
    --scene-progress: 0;
    --mouse-x:    50%;
    --mouse-y:    50%;
    --mouse-vel:  0;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
    overflow-x: hidden;
    cursor: crosshair;
}

body {
    line-height: 1.32;
}

/* ================================================
   FIXED RIPPLE + DRIFT CANVAS LAYERS
   ================================================ */
#ripple-canvas,
#drift-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
#ripple-canvas { z-index: 1; mix-blend-mode: multiply; }
#drift-canvas  { z-index: 2; }

/* ================================================
   MASTHEAD — site name as two lampposts
   ================================================ */
#masthead {
    position: fixed;
    top: 2.4vh;
    left: 2.4vw;
    z-index: 10;
    color: var(--ink);
    pointer-events: none;
}
.mast-rule {
    width: 38px;
    height: 1px;
    background: var(--ink);
    margin-bottom: 6px;
    opacity: 0.6;
}
.mast-name {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 28px;
    letter-spacing: -0.02em;
    line-height: 1;
}
.mast-name .mast-l {
    color: var(--ink);
    display: inline-block;
    transform: translateY(-2px);
}
.mast-name .mast-i,
.mast-name .mast-tld {
    color: var(--ink);
}
.mast-name .mast-dot {
    color: var(--red);
}
.mast-tag {
    font-family: "Bebas Neue", "Cormorant Garamond", serif;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--grey);
    margin-top: 5px;
    text-transform: uppercase;
}

/* ================================================
   SEAL RAIL — vertical strip of 11 thumbprints, right edge
   ================================================ */
#seal-rail {
    position: fixed;
    right: 2.4vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
#seal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.seal-nav {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    transform-origin: right center;
    transition: transform 0.36s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.seal-nav:hover { transform: scale(1.04); }
.seal-nav.active .seal-mark {
    background: var(--ink);
    transform: scale(1.18);
}
.seal-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--ink);
    position: relative;
    transition: transform 0.36s cubic-bezier(0.2, 0.7, 0.2, 1),
                background 0.36s ease;
}
.seal-mark::before,
.seal-mark::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid var(--ink);
    opacity: 0.5;
}
.seal-mark::after { inset: 4px; opacity: 0.3; }

.seal-label {
    font-family: "Bebas Neue", sans-serif;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--ink);
    width: 90px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.36s ease, transform 0.36s ease;
    pointer-events: none;
}
.seal-nav:hover .seal-label,
.seal-nav.active .seal-label {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================
   STAMP OVERLAY — click feedback
   ================================================ */
#stamp-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}
.click-stamp {
    position: absolute;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 1.6px solid var(--ink);
    border-radius: 50%;
    color: var(--ink);
    font-family: "Bebas Neue", sans-serif;
    font-size: 10px;
    letter-spacing: 0.18em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--frost);
    animation: click-stamp-anim 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    box-shadow: inset 0 0 0 1px var(--ink);
}
.click-stamp::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 0.6px solid var(--ink);
    border-radius: 50%;
    opacity: 0.6;
}
@keyframes click-stamp-anim {
    0%   { transform: scale(0.3) rotate(-9deg); opacity: 0; }
    18%  { transform: scale(1.06) rotate(-9deg); opacity: 1; }
    100% { transform: scale(1.18) rotate(-9deg); opacity: 0; }
}

/* ================================================
   MAIN — drops layout
   ================================================ */
#drops {
    position: relative;
    z-index: 3;
}

.drop {
    position: relative;
    min-height: 110vh;
    padding: 12vh 9vw 12vh 9vw;
    background: var(--cream);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* the 7-column asymmetric street grid */
.scene-grid {
    display: grid;
    grid-template-columns:
        0.55fr 0.55fr 1.1fr 1.1fr 1.1fr 1.1fr 0.55fr;
    gap: var(--grid-gap);
    align-items: start;
    position: relative;
    z-index: 4;
}
.scene-grid-centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.col-marginalia {
    grid-column: 1 / span 2;
    color: var(--ink);
    transform: translateY(8vh);
}
.col-body {
    grid-column: 3 / span 4;
}
.col-rail {
    grid-column: 7 / span 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    padding-top: 6vh;
}
.col-center {
    grid-column: 1 / -1;
    width: min(720px, 84vw);
}

/* per-scene 33° rotational rhythm: rotate the body column around the drop point */
.drop[data-scene] .col-body {
    transform-origin: var(--drop-x, 50%) var(--drop-y, 50%);
    transform:
        translate(calc(sin(var(--scene-rotate, 0deg)) * 0.6vw),
                  calc(cos(var(--scene-rotate, 0deg)) * 0.3vh));
}

/* ================================================
   THE DROP POINT — 8px black circle
   ================================================ */
.drop-point {
    position: absolute;
    left: var(--drop-x, 50%);
    top:  var(--drop-y, 50%);
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--ink);
    border-radius: 50%;
    z-index: 5;
    transform: scale(calc(0.4 + var(--scene-progress, 0) * 1.2));
    opacity: calc(0.4 + var(--scene-progress, 0) * 0.6);
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.drop-point-dry { opacity: 0.06; }

.drop-coord {
    position: absolute;
    left: var(--drop-x, 50%);
    top:  var(--drop-y, 50%);
    transform: translate(12px, -2px);
    z-index: 5;
    color: var(--ink);
    opacity: 0.7;
}
.mono {
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.04em;
    color: var(--ink);
}

/* ================================================
   TITLES — Cormorant Garamond italic, display
   ================================================ */
.title-display {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(64px, 9.6vw, 220px);
    line-height: 0.94;
    letter-spacing: -0.022em;
    margin: 0 0 0.4em 0;
    color: var(--ink);
    font-feature-settings: "dlig" 1, "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    transform: translateY(calc(-2vh + var(--scene-progress, 0) * 2vh));
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.title-display em.shout {
    font-style: italic;
    color: var(--red);
    font-weight: 500;
}

.title-display em.ink-drip {
    font-style: italic;
    color: var(--ink);
    display: inline-block;
}
.title-display em.ink-drip span {
    display: inline-block;
    opacity: 0;
    transform: translateY(-0.3em);
    animation: ink-drip-letter 0.7s cubic-bezier(0.18, 0.74, 0.2, 1) forwards;
}
.title-display em.ink-drip span:nth-child(1) { animation-delay: 0.10s; }
.title-display em.ink-drip span:nth-child(2) { animation-delay: 0.24s; }
.title-display em.ink-drip span:nth-child(3) { animation-delay: 0.38s; }
.title-display em.ink-drip span:nth-child(4) { animation-delay: 0.52s; }
.title-display em.ink-drip span:nth-child(5) { animation-delay: 0.66s; }
.title-display em.ink-drip span:nth-child(6) { animation-delay: 0.80s; }
.title-display em.ink-drip span:nth-child(7) { animation-delay: 0.94s; }

@keyframes ink-drip-letter {
    0%   { opacity: 0; transform: translateY(-0.3em); }
    40%  { opacity: 0.4; transform: translateY(0.08em); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ================================================
   BODY FRAGMENT — Cormorant roman 22px
   ================================================ */
.body-fragment {
    font-family: "Cormorant Garamond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.42;
    max-width: 36em;
    color: var(--ink);
    margin: 0.6em 0 1.2em;
}
.body-fragment.muted {
    color: var(--navy);
    font-style: italic;
}
.body-fragment.fragment-pull {
    font-size: 32px;
    line-height: 1.18;
    font-style: italic;
    max-width: 22em;
}
.center-fragment {
    margin: 4vh auto 0;
    text-align: center;
    font-style: italic;
}

.num-tiny {
    font-family: "JetBrains Mono", monospace;
    font-size: 18px;
    color: var(--ink);
    background: var(--frost);
    padding: 0 4px;
    border: 1px solid var(--ink);
}

/* ================================================
   MARGINALIA — EB Garamond italic 16px
   ================================================ */
.marginalia {
    font-family: "EB Garamond", "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.46;
    color: var(--navy);
    margin: 0 0 0.8em 0;
    opacity: 0.92;
}

/* ================================================
   SEAL STAMPS — small thumbprint circles
   ================================================ */
.seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: var(--frost);
    border: 1.4px solid var(--ink);
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 0 0.5px var(--ink);
}
.seal-stamp {
    width: 48px;
    height: 48px;
    transform: rotate(-7deg);
}
.seal-stamp::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 0.6px solid var(--ink);
    border-radius: 50%;
    opacity: 0.5;
}
.seal-stamp::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 0.4px solid var(--ink);
    border-radius: 50%;
    opacity: 0.3;
}
.seal-inner {
    font-family: "Bebas Neue", sans-serif;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: var(--ink);
    text-align: center;
}

.timecode {
    font-family: "Bebas Neue", sans-serif;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--grey);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding-top: 8px;
}

/* ================================================
   SIDEWALK CRACK — 0.5px wet-pavement-grey
   ================================================ */
.sidewalk-crack {
    position: absolute;
    left: 6vw;
    right: 6vw;
    bottom: 18vh;
    width: 88vw;
    height: 100px;
    color: var(--grey);
    opacity: 0.7;
    pointer-events: none;
    z-index: 3;
}
.sidewalk-crack-major {
    height: 220px;
    bottom: 14vh;
    opacity: 0.85;
}

/* ================================================
   FOOTNOTE BAND
   ================================================ */
.scene-footnote {
    position: absolute;
    bottom: 6vh;
    left: 9vw;
    right: 9vw;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 4;
    border-top: 1px solid var(--grey);
    padding-top: 10px;
}
.scene-footnote-center {
    justify-content: center;
    border-top: 0;
}
.footnote-text {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    color: var(--navy);
}
.caution-tape {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--yellow);
    border: 0.5px solid var(--ink);
}

/* ================================================
   DROP 4 — concentric ring text
   ================================================ */
.ring-text {
    position: relative;
    margin: 3vh 0 0;
    padding-left: 0;
}
.ring-text .ring {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-style: italic;
    line-height: 1.42;
    color: var(--ink);
    max-width: 38em;
    margin: 0.5em 0;
    transform: translateX(0);
    opacity: 0.95;
}
.ring-text .ring-1 { padding-left: 0;     color: var(--ink); }
.ring-text .ring-2 { padding-left: 1.2em; color: var(--navy); }
.ring-text .ring-3 { padding-left: 2.4em; color: var(--ink); }
.ring-text .ring-4 { padding-left: 1.8em; color: var(--navy); }
.ring-text .ring-5 { padding-left: 0.9em; color: var(--ink); }
.ring-text .ring-6 { padding-left: 2.2em; color: var(--navy); font-style: italic; }

/* ================================================
   DROP 5 — anthology
   ================================================ */
.anthology {
    list-style: none;
    padding: 0;
    margin: 3vh 0 0;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 22px;
    line-height: 1.6;
    max-width: 32em;
    color: var(--ink);
}
.anthology li {
    border-bottom: 1px solid var(--grey);
    padding: 6px 0 6px 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.anthology .num {
    font-family: "Bebas Neue", sans-serif;
    font-style: normal;
    font-size: 14px;
    letter-spacing: 0.16em;
    color: var(--red);
    min-width: 36px;
    text-align: right;
}

/* ================================================
   DROP 6 — press tilt
   ================================================ */
.drop-tilt {
    transform: rotate(0deg);
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.drop-tilt:hover { transform: rotate(1.5deg); }
.press-quote {
    margin: 4vh 0 0 0;
    border-left: 1px solid var(--ink);
    padding-left: 24px;
    max-width: 30em;
}
.press-quote p {
    font-family: "Cormorant Garamond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.5;
    color: var(--ink);
    margin: 0 0 1em 0;
}
.press-quote p:last-child {
    font-style: italic;
    font-size: 14px;
    color: var(--navy);
}

/* ================================================
   DROP 7 — halftone tiny
   ================================================ */
#halftone-tiny {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin: 3vh 0;
    border: 1px solid var(--ink);
    background: var(--cream);
    display: block;
}

/* ================================================
   DROP 8 — refusal list w/ strike
   ================================================ */
.refusal-list {
    list-style: none;
    padding: 0;
    margin: 3vh 0 0 0;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 14px 64px;
}
.refused-word {
    position: relative;
    display: inline-block;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 30px;
    color: var(--ink);
    padding: 4px 8px;
    line-height: 1;
}
.refused-word .word {
    display: inline-block;
}
.refused-word .strike {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-30%);
    width: 100%;
    height: 30px;
    color: var(--red);
    pointer-events: none;
}
.refused-word .strike path {
    stroke-dasharray: 280;
    stroke-dashoffset: 280;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.refused-word.struck .strike path {
    stroke-dashoffset: 0;
}

/* ================================================
   DROP 10 — big seal
   ================================================ */
.big-seal-wrap {
    width: 480px;
    height: 480px;
    max-width: 80vw;
    max-height: 80vw;
    position: relative;
    margin: 0 auto;
}
.big-seal {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--frost);
    border: 2.4px solid var(--ink);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: big-seal-spin 22s linear infinite;
    box-shadow:
        inset 0 0 0 6px var(--frost),
        inset 0 0 0 7px var(--ink);
}
.big-seal-rings {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--ink);
    pointer-events: none;
}
.big-seal-text {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(11px, 1.4vw, 16px);
    letter-spacing: 0.32em;
    color: var(--ink);
    text-align: center;
    position: relative;
    z-index: 2;
}
@keyframes big-seal-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ================================================
   DROP 11 — the dry puddle
   ================================================ */
.drop-dry { background: var(--cream); }
.title-dry {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 32px;
    color: var(--ink);
    text-align: center;
    max-width: 22em;
    margin: 14vh auto 0;
    line-height: 1.4;
}
.seal-end {
    position: absolute;
    bottom: 6vh;
    right: 6vw;
}

/* ================================================
   DIAGNOSTIC STRIP
   ================================================ */
#diag {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 11;
    display: flex;
    gap: 16px;
    pointer-events: none;
    opacity: 0.6;
}

/* ================================================
   SCROLLBAR & SELECTION
   ================================================ */
::selection {
    background: var(--red);
    color: var(--cream);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--ink); }

/* ================================================
   WORD-CLICK UNDERLINE — body words that are tapped
   ================================================ */
.word-clicked {
    position: relative;
    display: inline-block;
}
.word-clicked::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 1.6px;
    background: var(--red);
    transform-origin: left center;
    animation: word-underline 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes word-underline {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ================================================
   RESPONSIVE — mobile/portrait: 7→3 columns
   ================================================ */
@media (max-width: 800px) {
    .drop {
        padding: 10vh 6vw;
    }
    .scene-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .col-marginalia,
    .col-body,
    .col-rail,
    .col-center {
        grid-column: 1 / -1;
        transform: none !important;
    }
    .col-rail {
        flex-direction: row;
        justify-content: flex-start;
        padding-top: 0;
    }
    .timecode {
        writing-mode: horizontal-tb;
    }
    .title-display {
        font-size: clamp(48px, 14vw, 96px);
    }
    .body-fragment.fragment-pull { font-size: 24px; }
    .refusal-list {
        grid-template-columns: 1fr;
    }

    /* seal rail under the bottom edge as a horizontal strip */
    #seal-rail {
        right: auto;
        left: 0;
        top: auto;
        bottom: 0;
        transform: none;
        width: 100%;
        background: var(--cream);
        border-top: 1px solid var(--grey);
        padding: 8px 12px;
    }
    #seal-list {
        flex-direction: row;
        justify-content: space-between;
        gap: 4px;
        overflow-x: auto;
    }
    .seal-label { display: none; }
    .mast-tag { display: none; }
}

/* ================================================
   REDUCED MOTION — static printed rings
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .title-display em.ink-drip span { opacity: 1; transform: none; }
    .refused-word .strike path { stroke-dashoffset: 0; }
    .big-seal { animation: none; }
}
