/* =========================================================
   VTuber Blöcke
   Own CI inside the Sandrina site, built like the project's
   social posts: grid paper, brush logo, Anton bands, taped
   paper notes, lime stickers, piles of notepads.
   Used by the landing page section (.vb-teaser) and by
   vtuber-bloecke.html (body.vb-page).
   ========================================================= */

.vb {
    --vb-ink: #241e2f;
    --vb-purple: #6b0ae1;
    --vb-pink: #ef60ba;
    --vb-pink-soft: #ffd6ee;
    --vb-tape: #f39bd6;
    --vb-lime: #b7fe29;
    --vb-grid: url("../Sources/img/web/vtuber-bloecke/grid.webp");
    --vb-head: "Anton", "Lexend", Impact, sans-serif;
    --vb-label: "Lexend", "Outfit", system-ui, sans-serif;
    color: var(--vb-ink);
}

/* ---------- Paper ---------- */
.vb-paper {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #fff;
}

/* the grid itself, a bit see-through so it stays soft */
.vb-paper::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--vb-grid) 0 0 / 256px 256px;
    opacity: 0.5;
    pointer-events: none;
}

/* pink watercolour washes, like on the social posts */
.vb-wash {
    position: absolute;
    z-index: -1;
    width: clamp(300px, 42vw, 680px);
    aspect-ratio: 1.6;
    border-radius: 50%;
    background: var(--vb-pink-soft);
    filter: blur(60px);
    mix-blend-mode: multiply;
    opacity: 0.6;
    pointer-events: none;
}

/* torn paper edge where the paper meets the rest of the site */
.vb-edge {
    position: absolute;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 3;
    background: var(--bg);
    pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v6l-6 4-7-5-9 6-6-3-8 5-7-6-9 5-6-2-8 4-9-6-6 5-8-4-7 5-6-3-9 4-6-5-7 3-6-2V0z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v6l-6 4-7-5-9 6-6-3-8 5-7-6-9 5-6-2-8 4-9-6-6 5-8-4-7 5-6-3-9 4-6-5-7 3-6-2V0z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x;
}

.vb-edge--top { top: 0; }
.vb-edge--bottom { bottom: 0; transform: scaleY(-1); }

.vb-logo {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Band: Anton on a coloured strip, like "CONVENTION" ---------- */
.vb-band {
    display: inline-block;
    margin: 0;
    padding: 0.08em 0.32em 0.04em;
    font-family: var(--vb-head);
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: var(--vb-purple);
    transform: rotate(var(--t, -2.5deg));
}

.vb-band--ink { background: var(--vb-ink); }
.vb-band--pink { color: var(--vb-ink); background: var(--vb-tape); }

/* ---------- Taped paper note ---------- */
.vb-card {
    position: relative;
    z-index: 4;
    padding: clamp(28px, 3.4vw, 40px) clamp(24px, 3vw, 36px) clamp(26px, 3vw, 34px);
    background: #fff;
    box-shadow: 0 24px 40px -24px rgba(36, 30, 47, 0.5);
    transform: rotate(var(--t, 1.5deg));
}

.vb-card p {
    font-size: clamp(1.05rem, 1.5vw, 1.18rem);
    line-height: 1.65;
}

.vb-card p + p { margin-top: 0.9em; }

.vb-card a:not(.vb-btn) {
    font-weight: 700;
    color: var(--vb-purple);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.vb-card-title {
    display: block;
    margin-bottom: 14px;
    font-family: var(--vb-head);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.02;
    text-transform: uppercase;
}

.vb-card-small {
    display: block;
    margin-bottom: 4px;
    font-family: var(--vb-label);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vb-purple);
}

/* ---------- Pill button, like the "Jetzt anmelden → Link in Bio" badge ---------- */
.vb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: var(--vb-label);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    color: #fff;
    background: var(--vb-purple);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.vb-btn:hover {
    transform: translateY(-2px) rotate(-1deg);
    background: var(--vb-ink);
}

.vb-btn img {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

/* ---------- Washi tape ---------- */
.vb-tape {
    position: absolute;
    z-index: 6;
    width: var(--w, 120px);
    height: var(--h, 28px);
    background: rgba(243, 155, 214, 0.82);
    transform: rotate(var(--t, -4deg));
    clip-path: polygon(0 4%, 4% 0, 8% 6%, 12% 0, 16% 5%, 20% 0, 80% 0, 84% 5%, 88% 0, 92% 6%, 96% 0, 100% 4%, 100% 96%, 96% 100%, 92% 94%, 88% 100%, 84% 95%, 80% 100%, 20% 100%, 16% 95%, 12% 100%, 8% 94%, 4% 100%, 0 96%);
    pointer-events: none;
}

.vb-tape--lime { background: rgba(183, 254, 41, 0.8); }
.vb-tape--lilac { background: rgba(190, 160, 255, 0.72); }

/* ---------- Round sticker ---------- */
.vb-sticker {
    position: absolute;
    z-index: 7;
    display: grid;
    place-items: center;
    width: var(--s, 118px);
    aspect-ratio: 1;
    padding: 12px;
    border-radius: 50%;
    font-family: var(--vb-label);
    font-weight: 700;
    font-size: calc(var(--s, 118px) * 0.115);
    line-height: 1.15;
    text-align: center;
    color: var(--vb-ink);
    background: var(--vb-lime);
    box-shadow: 0 8px 18px -8px rgba(36, 30, 47, 0.45);
    transform: rotate(var(--t, -10deg));
}

.vb-sticker b {
    display: block;
    font-family: var(--vb-head);
    font-weight: 400;
    font-size: 1.9em;
    line-height: 1;
    color: var(--vb-purple);
}

.vb-sticker--purple { color: #fff; background: var(--vb-purple); }
.vb-sticker--purple b { color: var(--vb-lime); }

/* ---------- Notepad (A5 tear-off block) ---------- */
.vb-pad {
    position: relative;
    display: block;
    margin: 0;
    aspect-ratio: 1803 / 2551;
    background: #fff;
    transform: rotate(var(--r, 0deg));
    /* the sheets underneath and a soft shadow */
    box-shadow:
        1px 2px 0 #fff,
        2px 4px 0 #e7dff3,
        3px 6px 0 #fff,
        4px 8px 0 #ded3ee,
        5px 10px 0 #fff,
        6px 12px 0 #d3c6e8,
        0 34px 50px -24px rgba(36, 30, 47, 0.5);
}

.vb-pad > img,
.vb-pad .vb-sheet img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* a loose pile of pads */
.vb-pile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 0.98;
}

.vb-pile .vb-pad {
    position: absolute;
    width: 52%;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vb-pile .vb-pad:nth-of-type(1) { left: 0; top: 14%; --r: -11deg; }
.vb-pile .vb-pad:nth-of-type(2) { right: 0; top: 12%; --r: 9deg; }
.vb-pile .vb-pad:nth-of-type(3) { left: 24%; top: 2%; --r: -2deg; z-index: 2; }

a.vb-pile:hover .vb-pad:nth-of-type(1) { transform: translateX(-6%) rotate(-15deg); }
a.vb-pile:hover .vb-pad:nth-of-type(2) { transform: translateX(6%) rotate(13deg); }
a.vb-pile:hover .vb-pad:nth-of-type(3) { transform: translateY(-3%) rotate(-1deg); }

/* =========================================================
   Landing page section
   ========================================================= */
.vb-teaser {
    margin-bottom: clamp(64px, 10vw, 120px);
    padding-block: clamp(80px, 9vw, 128px);
}

.vb-teaser .vb-wash:nth-of-type(1) { left: -12%; bottom: -20%; }
.vb-teaser .vb-wash:nth-of-type(2) { right: -10%; top: -18%; }

.vb-teaser-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.vb-teaser .vb-logo {
    width: min(100%, 380px);
    transform: rotate(-3deg);
}

.vb-teaser .vb-card {
    max-width: 430px;
    margin: 32px 0 0 clamp(0px, 4vw, 48px);
}

.vb-teaser .vb-card .vb-tape {
    right: -24px;
    top: 10px;
    --t: 38deg;
}

.vb-teaser .vb-pile {
    width: min(100%, 680px);
    margin-inline: auto;
}

.vb-teaser .vb-pile > .vb-tape {
    left: 36%;
    top: -1%;
    --w: 30%;
    --h: 30px;
    --t: 5deg;
}

.vb-teaser .vb-pile .vb-sticker {
    right: -1%;
    top: -3%;
    --s: 140px;
    --t: 12deg;
}

@media (max-width: 860px) {
    .vb-teaser-inner { grid-template-columns: 1fr; }

    .vb-teaser .vb-pile {
        width: min(84%, 400px);
        order: -1;
    }

    .vb-teaser .vb-logo { width: min(78%, 340px); }

    .vb-teaser .vb-card { margin-left: 0; }

    .vb-teaser .vb-card .vb-tape {
        right: 24px;
        top: -14px;
        --t: 5deg;
    }

    .vb-teaser .vb-pile .vb-sticker { --s: 100px; }
}

/* =========================================================
   Sub page: one long sheet of paper, collage style
   ========================================================= */
.vb-page main.vb-paper {
    padding-bottom: clamp(96px, 12vw, 160px);
}

.vb-page .vb-wash:nth-of-type(1) { right: -12%; top: -4%; }
.vb-page .vb-wash:nth-of-type(2) { left: -16%; top: 30%; }
.vb-page .vb-wash:nth-of-type(3) { right: -14%; top: 58%; }
.vb-page .vb-wash:nth-of-type(4) { left: -10%; bottom: -6%; }

/* --- Top: logo, note, pile --- */
.vb-top {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    padding-top: clamp(56px, 7vw, 104px);
}

.vb-top .vb-logo {
    width: min(100%, 440px);
    transform: rotate(-3deg);
}

.vb-top h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.vb-top .vb-card {
    max-width: 450px;
    margin: 36px 0 0 clamp(0px, 5vw, 64px);
    --t: -1.5deg;
}

.vb-top .vb-card .vb-tape {
    right: 18%;
    top: -14px;
    --t: 4deg;
}

.vb-top .vb-pile {
    width: min(100%, 700px);
    margin-inline: auto;
}

.vb-top .vb-pile .vb-sticker {
    left: -2%;
    bottom: 2%;
    --s: 132px;
    --t: -12deg;
}

.vb-top .vb-pile > .vb-tape {
    left: 36%;
    top: -1%;
    --w: 30%;
    --h: 32px;
    --t: -3deg;
}

/* --- Season 1: pads lying around, names on tape --- */
.vb-season {
    margin-top: clamp(96px, 12vw, 176px);
}

.vb-season-head {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 28px;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.vb-season-head .vb-band + .vb-band {
    font-size: clamp(1.3rem, 2.6vw, 1.9rem);
    --t: 3deg;
}

.vb-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(56px, 6vw, 88px) clamp(28px, 3.6vw, 52px);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* lying around, not in a strict grid */
.vb-gallery li:nth-child(4n + 2) { transform: translateY(36px); }
.vb-gallery li:nth-child(4n + 3) { transform: translateY(-14px); }
.vb-gallery li:nth-child(4n + 4) { transform: translateY(22px); }

.vb-flip {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.vb-flip .vb-pad {
    --r: var(--tilt, 0deg);
    transition: transform 0.4s ease;
}

.vb-flip .vb-sheet {
    position: absolute;
    inset: 0;
}

/* tap or hover lifts the cover and shows the inside page */
.vb-flip .vb-cover {
    z-index: 2;
    transform-origin: 50% 0;
    transform: perspective(1600px) rotateX(0deg);
    transition: transform 0.7s cubic-bezier(0.3, 0.9, 0.25, 1), box-shadow 0.7s ease;
    backface-visibility: hidden;
}

.vb-flip:hover .vb-pad,
.vb-flip:focus-visible .vb-pad,
.vb-flip[aria-pressed="true"] .vb-pad {
    transform: rotate(0deg) translateY(-4px);
}

.vb-flip:hover .vb-cover,
.vb-flip:focus-visible .vb-cover,
.vb-flip[aria-pressed="true"] .vb-cover {
    transform: perspective(1600px) rotateX(72deg);
    box-shadow: 0 30px 30px -20px rgba(36, 30, 47, 0.4);
}

.vb-flip:focus-visible { outline: none; }

.vb-flip:focus-visible .vb-pad {
    outline: 3px solid var(--vb-purple);
    outline-offset: 10px;
}

/* name written on a strip of tape across the bottom of the pad */
.vb-name {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: -16px;
    padding: 6px 18px 4px;
    font-family: var(--vb-head);
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--vb-ink);
    background: rgba(243, 155, 214, 0.9);
    transform: translateX(-50%) rotate(var(--nt, -3deg));
    clip-path: polygon(0 6%, 3% 0, 6% 8%, 9% 0, 91% 0, 94% 8%, 97% 0, 100% 6%, 100% 94%, 97% 100%, 94% 92%, 91% 100%, 9% 100%, 6% 92%, 3% 100%, 0 94%);
}

.vb-gallery li:nth-child(3n + 2) .vb-name { background: rgba(183, 254, 41, 0.92); --nt: 2deg; }
.vb-gallery li:nth-child(3n + 3) .vb-name { background: rgba(203, 178, 255, 0.92); --nt: -1deg; }

.vb-season-head .vb-sticker {
    position: relative;
    --s: 108px;
    --t: 8deg;
}

/* --- Special sets --- */
.vb-special {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    margin-top: clamp(120px, 14vw, 200px);
}

.vb-special .vb-pile {
    width: min(100%, 580px);
}

.vb-special .vb-pile .vb-sticker {
    right: 0;
    top: -4%;
    --s: 118px;
    --t: 10deg;
}

.vb-special-copy .vb-card {
    margin-top: 28px;
    max-width: 440px;
    --t: 2deg;
}

.vb-special-copy .vb-card .vb-tape {
    left: 30%;
    top: -14px;
    --t: -3deg;
}

/* --- Twitter note --- */
.vb-follow {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    margin-top: clamp(120px, 14vw, 200px);
}

.vb-follow .vb-card {
    --t: -2deg;
}

.vb-follow .vb-card .vb-tape:nth-of-type(1) { left: -24px; top: 12px; --t: -36deg; }
.vb-follow .vb-card .vb-tape:nth-of-type(2) { right: -24px; bottom: 14px; --t: -36deg; }

.vb-handle {
    display: block;
    margin-top: 6px;
    font-family: var(--vb-head);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1;
    white-space: nowrap;
    color: var(--vb-purple);
}

.vb-follow-art {
    position: relative;
    width: min(100%, 360px);
    margin-inline: auto;
}

.vb-follow-art .vb-pad { --r: 6deg; }

.vb-follow-art .vb-sticker {
    left: -14%;
    top: 8%;
    --s: 126px;
    --t: -14deg;
}

/* ---------- Mascot post-its ---------- */
.vb-pad--postit {
    aspect-ratio: 1654 / 2244;
}

.vb-band--lime {
    color: var(--vb-ink);
    background: var(--vb-lime);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    --t: 4deg;
}

/* landing pile: a post-it in front, bottom right */
.vb-pile .vb-pad--postit {
    left: auto;
    right: 4%;
    top: auto;
    bottom: 0;
    width: 30%;
    z-index: 3;
    --r: 8deg;
}

a.vb-pile:hover .vb-pad--postit { transform: translate(4%, 2%) rotate(11deg); }

.vb-teaser .vb-pile .vb-sticker--new {
    left: -3%;
    right: auto;
    top: auto;
    bottom: 4%;
    --s: 150px;
    --t: -10deg;
    font-size: 15px;
}

.vb-sticker--new b { font-size: 2.1em; }

.vb-mascot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    margin-top: clamp(120px, 14vw, 200px);
}

.vb-mascot-copy .vb-band + .vb-band { margin-top: 10px; }

.vb-mascot-copy .vb-card {
    margin-top: 28px;
    max-width: 460px;
    --t: -1.5deg;
}

.vb-mascot-copy .vb-card .vb-tape {
    right: 20%;
    top: -14px;
    --t: 3deg;
}

.vb-mascot-art {
    position: relative;
    width: min(100%, 340px);
    margin-inline: auto;
}

.vb-turn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    perspective: 1400px;
    -webkit-tap-highlight-color: transparent;
}

.vb-turn-inner {
    position: relative;
    display: block;
    transform-style: preserve-3d;
    transform: rotate(5deg);
    transition: transform 0.8s cubic-bezier(0.3, 0.9, 0.25, 1);
}

.vb-turn[aria-pressed="true"] .vb-turn-inner {
    transform: rotate(-4deg) rotateY(180deg);
}

.vb-turn-front,
.vb-turn-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.vb-turn-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
}

.vb-turn:focus-visible { outline: none; }
.vb-turn:focus-visible .vb-turn-inner { outline: 3px solid var(--vb-purple); outline-offset: 10px; }

.vb-mascot-art .vb-sticker {
    right: -18%;
    top: 6%;
    --s: 112px;
    --t: 12deg;
}

@media (max-width: 1100px) {
    .vb-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vb-gallery li:nth-child(n) { transform: none; }
    .vb-gallery li:nth-child(3n + 2) { transform: translateY(28px); }
}

@media (max-width: 860px) {
    .vb-top,
    .vb-mascot,
    .vb-special,
    .vb-follow {
        grid-template-columns: 1fr;
    }

    .vb-top .vb-logo { width: min(80%, 360px); }
    .vb-top .vb-card { margin-left: 0; }
    .vb-top .vb-pile { width: min(86%, 400px); }

    .vb-special .vb-pile { width: min(90%, 440px); margin-inline: auto; }

    .vb-follow-art { width: min(64%, 260px); }

    .vb-mascot-art { width: min(62%, 260px); }

    .vb-teaser .vb-pile .vb-sticker--new { --s: 118px; font-size: 12px; left: -6%; }

    .vb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vb-gallery li:nth-child(n) { transform: none; }
    .vb-gallery li:nth-child(2n) { transform: translateY(28px); }
}

@media (max-width: 560px) {
    .vb-top .vb-pile .vb-sticker { --s: 104px; }
    .vb-special .vb-pile .vb-sticker { --s: 92px; }
    .vb-follow-art .vb-sticker { --s: 100px; left: -20%; }
    .vb-season-head .vb-sticker { --s: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    .vb-pile .vb-pad,
    .vb-flip .vb-pad,
    .vb-flip .vb-cover,
    .vb-turn-inner,
    .vb-btn {
        transition: none;
    }
}
