/* ==========================================================================
   24QW Playground — blog + FAQ ("reader") sections.
   Blog posts are collectible cards; FAQ is the app's HOW TO INSTALL screen.
   Builds on qw.css tokens (accent: blog = lime, faq = blue).
   ========================================================================== */

/* ---- shared heads ------------------------------------------------------- */

.bl-head,
.fq-head {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) 0 clamp(26px, 4vw, 44px);
    text-align: center;
}

.bl-head .qw-sticker,
.fq-head .qw-sticker {
    display: block;
    width: fit-content;
    margin: 0 auto;
    font-size: clamp(72px, 14vw, 150px);
}

.bl-head .qw-sticker {
    /* lime needs a darker edge to read on the white outline */
    filter: drop-shadow(0 3px 0 rgba(22, 22, 22, 0.75)) drop-shadow(0 12px 18px rgba(0, 70, 160, 0.3));
}

.bl-head__lead,
.fq-head__lead {
    max-width: 46ch;
    margin: 30px auto 0;
    font-family: var(--font-pixel);
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.35;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.45);
}

/* sticker title with tags/stickers pinned to its corners */
.rd-stack {
    position: relative;
    width: fit-content;
    margin: 0 auto;
    padding: 0 clamp(30px, 6vw, 70px);
}

.rd-stack > :not(h1) {
    position: absolute;
    z-index: 2;
}

.rd-stack .qw-tag {
    font-size: clamp(12px, 1.4vw, 15px);
}

.rd-stack__tl {
    top: 8%;
    left: -8px;
    transform: rotate(-9deg);
}

.rd-stack__br {
    bottom: -4px;
    right: -6px;
    transform: rotate(6deg);
}

.rd-stack__tr {
    top: -14%;
    right: -40px;
    width: clamp(76px, 10vw, 130px);
    transform: rotate(12deg);
}

.rd-stack__q {
    top: -6%;
    left: -24px;
    width: clamp(58px, 8vw, 100px);
    transform: rotate(-14deg);
}

.rd-stack__label {
    bottom: -22%;
    right: -60px;
    width: clamp(120px, 15vw, 180px);
    transform: rotate(7deg);
}

@media (max-width: 640px) {
    .bl-head .qw-sticker,
    .fq-head .qw-sticker {
        font-size: 92px;
    }

    .rd-stack {
        padding: 0 30px;
    }

    .rd-stack__tl {
        top: -18px;
        left: -4px;
    }

    .rd-stack__br {
        bottom: -18px;
        right: -4px;
    }

    .rd-stack__tr {
        top: -30px;
        right: -26px;
        width: 80px;
    }

    .rd-stack__q {
        top: -28px;
        left: -34px;
        width: 62px;
    }

    .rd-stack__label {
        right: -50px;
        bottom: -34px;
        width: 120px;
    }
}

/* ---- blog: collectible cards -------------------------------------------- */

.bl-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(22px, 3vw, 36px);
    max-width: 1000px;
    margin: 0 auto;
}

.bl-list__item {
    flex: 1 1 calc(50% - 18px);
    min-width: 0;
}

.bl-list__item.is-first {
    flex-basis: 100%;
}

.bl-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    border-radius: 36px;
    text-decoration: none;
    color: var(--ink);
    transform: rotate(calc(var(--tilt, 0) * 0.6deg));
    transition: transform 0.5s var(--ease-pop), box-shadow 0.3s;
}

.bl-card:hover,
.bl-card:focus-visible {
    transform: rotate(calc(var(--tilt, 0) * -0.4deg)) translateY(-6px) scale(1.015);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.85) inset, 0 28px 50px rgba(0, 60, 140, 0.22);
}

.bl-card:active {
    transform: scale(0.98);
}

.bl-card__art {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 0 0 4px var(--white);
}

.bl-card__art img {
    width: 52%;
    height: auto;
    max-width: 240px;
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 14px 18px rgba(0, 40, 100, 0.3));
    transform: rotate(-6deg);
    transition: transform 0.6s var(--ease-pop);
}

.bl-card:hover .bl-card__art img {
    transform: rotate(5deg) scale(1.08);
    animation: bl-wiggle 0.6s ease-in-out;
}

@keyframes bl-wiggle {
    30% { transform: rotate(9deg) scale(1.1); }
    60% { transform: rotate(2deg) scale(1.06); }
}

.bl-card__no {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px 4px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--lime);
    font-family: var(--font-pixel);
    font-size: 13px;
    text-transform: uppercase;
}

.bl-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 10px 8px;
}

.bl-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bl-card__tags .qw-tag:nth-child(2) {
    transform: rotate(3deg);
}

.bl-card__title {
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: var(--ink);
}

.bl-card__excerpt {
    max-width: 60ch;
    font-size: 16px;
    line-height: 1.55;
    color: #2d3340;
}

.bl-card__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 4px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--item-r);
    background: var(--lime);
    font-family: var(--font-pixel);
    font-size: 15px;
    text-transform: uppercase;
    box-shadow: 0 4px 0 rgba(22, 22, 22, 0.12);
    transition: transform 0.3s var(--ease-pop);
}

.bl-card__go svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-pop);
}

.bl-card:hover .bl-card__go svg {
    transform: translateX(4px);
}

/* featured (newest) card: side by side on wide screens */
@media (min-width: 820px) {
    .is-first .bl-card {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
    }

    .is-first .bl-card__art {
        flex: 0 0 44%;
        aspect-ratio: auto;
        min-height: 340px;
    }

    .is-first .bl-card__art img {
        width: 64%;
    }

    .is-first .bl-card__body {
        justify-content: center;
        padding: 26px 30px;
    }

    .is-first .bl-card__title {
        font-size: clamp(40px, 5vw, 64px);
    }
}

/* ---- blog post ---------------------------------------------------------- */

.bp {
    max-width: 900px;
}

.bp-hero {
    position: relative;
    padding: clamp(28px, 5vw, 56px) 0 clamp(26px, 4vw, 40px);
    text-align: center;
}

.bp-hero__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.bp-hero__tags .qw-tag {
    font-size: 14px;
    text-decoration: none;
}

.bp-hero__tags .qw-tag:nth-child(3) {
    transform: rotate(-2deg);
}

.bp-title {
    display: inline-block;
    max-width: 14ch;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(44px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: var(--lime);
    -webkit-text-stroke: 0.15em var(--white);
    paint-order: stroke fill;
    filter: drop-shadow(0 3px 0 rgba(22, 22, 22, 0.75)) drop-shadow(0 12px 18px rgba(0, 70, 160, 0.3));
    transform: rotate(-2deg);
    text-wrap: balance;
}

.bp-hero__lead {
    max-width: 52ch;
    margin: 22px auto 0;
    font-size: clamp(16px, 1.8vw, 19px);
    line-height: 1.5;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.5);
}

.bp-hero__deco {
    position: absolute;
    right: -110px;
    top: 40px;
    display: grid;
    place-items: center;
    width: clamp(92px, 14vw, 170px);
    aspect-ratio: 1;
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 0 0 4px var(--white), 0 16px 30px rgba(0, 60, 140, 0.25);
    transform: rotate(8deg);
    transition: transform 0.5s var(--ease-pop);
}

@media (max-width: 1180px) and (min-width: 641px) {
    .bp-hero__deco {
        right: -20px;
        top: 0;
        width: 100px;
    }
}

.bp-hero__deco:hover {
    transform: rotate(-4deg) scale(1.06);
}

.bp-hero__deco img {
    width: 100%;
    height: auto;
}

.bp-body {
    padding: clamp(26px, 6vw, 64px) clamp(20px, 6vw, 64px);
}

.bp-body .qw-prose,
.fs-body .qw-prose {
    max-width: 68ch;
    margin: 0 auto;
}

.bp-body .qw-prose > :first-child,
.fs-body .qw-prose > :first-child {
    margin-top: 0;
}

.qw-prose .screen-gallery {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 18px);
    margin: 28px 0;
}

.qw-prose .screen-gallery img {
    width: 0;
    flex: 1;
    max-width: 230px;
    margin: 0;
    border: 3px solid var(--white);
    border-radius: 22px;
    transition: transform 0.4s var(--ease-pop);
}

.qw-prose .screen-gallery img:nth-child(odd) {
    transform: rotate(-2deg);
}

.qw-prose .screen-gallery img:nth-child(even) {
    transform: rotate(2deg);
}

.qw-prose .screen-gallery img:hover {
    transform: rotate(0) scale(1.04);
}

.bp-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.bp-pager .qw-btn {
    max-width: 100%;
    min-height: 64px;
    text-align: center;
    flex-direction: column-reverse;
    gap: 2px;
}

.bp-pager .qw-btn small {
    font-size: 12px;
    color: #6b7a00;
}

.bp-pager .qw-btn--white small {
    color: var(--blue);
}

.bp-more {
    margin-top: clamp(48px, 7vw, 80px);
    text-align: center;
}

.bp-more > .qw-sticker {
    margin-bottom: 26px;
    filter: drop-shadow(0 3px 0 rgba(22, 22, 22, 0.75)) drop-shadow(0 10px 18px rgba(0, 70, 160, 0.25));
}

.bl-list--more {
    text-align: left;
}

.bl-list--more .bl-card__title {
    font-size: clamp(24px, 3vw, 32px);
}

.bp-signup {
    max-width: 640px;
    margin: clamp(56px, 8vw, 96px) auto 0;
    padding: 70px clamp(20px, 5vw, 44px) 32px;
    text-align: center;
}

.bp-signup__sticker {
    width: min(260px, 70%);
    margin: -120px auto 4px;
    transform: rotate(-5deg);
}

.bp-signup__title {
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.1;
    text-transform: uppercase;
}

.bp-signup__lead {
    max-width: 40ch;
    margin: 10px auto 20px;
    color: #2d3340;
}

.bp-signup .qw-form {
    margin: 0 auto;
}

/* ---- FAQ: the HOW TO INSTALL panel -------------------------------------- */

.fq,
.fs {
    max-width: 880px;
}

.fq-head .qw-sticker {
    transform: rotate(-4deg);
}

.fq-panel {
    padding: clamp(24px, 5vw, 52px) clamp(14px, 4vw, 44px);
    background: rgba(253, 253, 253, 0.62);
    border-radius: 40px;
}

.fq-panel__title {
    margin-bottom: clamp(16px, 3vw, 28px);
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    color: var(--blue);
}

.fq-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fq-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    font-family: var(--font-pixel);
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 3px 0 rgba(22, 22, 22, 0.12);
    transition: transform 0.45s var(--ease-pop), background-color 0.2s;
}

.fq-list__item:nth-child(even) .fq-num {
    background: var(--yellow);
}

.fq-item__sum,
.fq-row {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.4vw, 22px);
    padding: 12px clamp(8px, 2vw, 16px);
    border-radius: 28px;
    cursor: pointer;
    list-style: none;
    text-decoration: none;
    color: var(--ink);
    transition: background-color 0.2s, transform 0.35s var(--ease-pop);
}

.fq-item__sum::-webkit-details-marker {
    display: none;
}

.fq-item__sum:hover,
.fq-row:hover {
    background: rgba(253, 253, 253, 0.85);
}

.fq-item__sum:hover .fq-num,
.fq-row:hover .fq-num {
    transform: rotate(-12deg) scale(1.1);
}

.fq-item__sum:active,
.fq-row:active {
    transform: scale(0.985);
}

.fq-item__q {
    flex: 1;
    min-width: 0;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.2;
    text-transform: uppercase;
}

/* plus that turns into a minus */
.fq-item__pm {
    position: relative;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 0 rgba(0, 60, 140, 0.12);
}

.fq-item__pm::before,
.fq-item__pm::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 3px;
    margin: -1.5px 0 0 -8px;
    border-radius: 2px;
    background: var(--blue);
    transition: transform 0.4s var(--ease-pop);
}

.fq-item__pm::after {
    transform: rotate(90deg);
}

.fq-item[open] .fq-item__pm::after {
    transform: rotate(0);
}

.fq-item[open] > .fq-item__sum {
    background: var(--white);
    border-radius: 28px 28px 0 0;
}

.fq-item[open] .fq-num {
    background: var(--blue);
    color: var(--white);
    transform: rotate(-8deg);
}

.fq-item__a {
    overflow: hidden;
    padding: 0 clamp(14px, 3vw, 24px) 20px calc(48px + clamp(20px, 4.4vw, 38px));
    border-radius: 0 0 28px 28px;
    background: var(--white);
}

.fq-item__text {
    max-width: 62ch;
    font-size: 16px;
    line-height: 1.6;
    color: #2d3340;
}

.fq-item__text > * + * {
    margin-top: 0.7em;
}

.fq-item__text strong {
    color: var(--ink);
}

.fq-item__more {
    min-height: 44px;
    margin-top: 14px;
    padding: 6px 22px;
    font-size: 14px;
}

.fq-tip {
    margin-top: clamp(20px, 3vw, 32px);
    padding: 20px 24px;
    border-radius: 28px;
    background: rgba(253, 253, 253, 0.55);
    border: 1px solid rgba(253, 253, 253, 0.9);
    color: #2d3340;
}

.fq-tip__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-family: var(--font-pixel);
    font-size: 20px;
    text-transform: uppercase;
    color: var(--blue);
}

.fq-tip__title img {
    width: 28px;
    height: auto;
}

.fq-tip a {
    color: var(--blue);
    font-weight: 700;
    text-underline-offset: 3px;
}

/* ---- FAQ single --------------------------------------------------------- */

.fs-hero {
    padding: clamp(26px, 5vw, 52px) 0 clamp(24px, 4vw, 36px);
    text-align: center;
}

.fs-hero__back {
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 20px;
}

.fs-hero__back:hover {
    background: var(--lime);
    color: var(--ink);
}

.fs-hero__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 26px);
}

.fq-num--big {
    width: clamp(64px, 9vw, 100px);
    height: clamp(64px, 9vw, 100px);
    font-size: clamp(30px, 4.6vw, 50px);
    background: var(--yellow);
    box-shadow: 0 0 0 5px var(--white), 0 12px 24px rgba(0, 60, 140, 0.25);
    transform: rotate(-8deg);
}

.fs-title {
    max-width: 17ch;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(34px, 5.6vw, 66px);
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: left;
    text-transform: lowercase;
    color: var(--blue);
    -webkit-text-stroke: 0.15em var(--white);
    paint-order: stroke fill;
    filter: drop-shadow(0 4px 0 rgba(22, 22, 22, 0.12)) drop-shadow(0 10px 18px rgba(0, 70, 160, 0.25));
    transform: rotate(-2deg);
    text-wrap: balance;
}

.fs-body {
    padding: clamp(26px, 6vw, 60px) clamp(20px, 6vw, 60px);
}

.fs-contact {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: clamp(40px, 6vw, 64px) auto clamp(28px, 4vw, 44px);
    text-align: center;
}

.fs-contact__end {
    width: clamp(160px, 22vw, 210px);
    height: auto;
    transform: rotate(-5deg);
    filter: drop-shadow(0 6px 12px rgba(0, 70, 160, 0.2));
}

.fs-contact__hand {
    margin: 8px 0 4px;
    font-size: clamp(24px, 3vw, 32px);
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 60, 140, 0.4);
}

.fs-contact__link {
    display: block;
}

.fs-contact__link img {
    width: clamp(220px, 30vw, 300px);
    transform: rotate(3deg);
}

.fs-contact__link:hover img {
    transform: rotate(-3deg) scale(1.07);
}

.fs-others .fq-panel__title {
    font-size: clamp(22px, 3vw, 30px);
}

.fq-row__go {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--blue);
    transition: transform 0.3s var(--ease-pop);
}

.fq-row:hover .fq-row__go {
    transform: translateX(4px);
}

/* ---- phones ------------------------------------------------------------- */

@media (max-width: 640px) {
    .bl-head,
    .fq-head {
        padding-top: 34px;
    }

    .bl-list__item {
        flex-basis: 100%;
    }

    .bl-card {
        padding: 10px;
        border-radius: 30px;
    }

    .bl-card__art {
        border-radius: 22px;
    }

    .bl-card__body {
        padding: 16px 8px 6px;
    }

    .bp-hero {
        padding-top: 30px;
    }

    .bp-hero__deco {
        top: 104px;
        right: -6px;
        width: 62px;
        padding: 6px;
        border-radius: 18px;
        box-shadow: 0 0 0 3px var(--white), 0 10px 20px rgba(0, 60, 140, 0.25);
    }

    .bp-body {
        border-radius: 28px;
    }

    .qw-prose .screen-gallery {
        flex-wrap: wrap;
    }

    .qw-prose .screen-gallery img {
        flex: 1 1 40%;
    }

    .bp-pager .qw-btn {
        width: 100%;
    }

    .fq-panel {
        border-radius: 30px;
    }

    .fq-num {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .fq-item__pm {
        width: 30px;
        height: 30px;
    }

    .fq-item__a {
        padding-left: 18px;
    }

    .fs-hero__row {
        flex-direction: column;
        gap: 18px;
    }

    .fs-title {
        text-align: center;
    }

    .fs-body {
        border-radius: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bl-card,
    .bl-card:hover {
        transform: none;
    }

    .bl-card:hover .bl-card__art img {
        animation: none;
    }
}
