/* /articles/ — polaroid wall + reader. Builds on /qw/qw.css. */

.art {
    padding-top: 28px;
}

/* ---- header ------------------------------------------------------------ */

.art-head {
    position: relative;
    text-align: center;
    margin: 6px auto 22px;
    max-width: 760px;
}

.art-head__tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.art-head__tags .qw-tag:nth-child(2) {
    transform: rotate(3deg) translateY(-3px);
}

.art-head__title {
    display: block;
    width: max-content;
    margin: 0 auto;
    font-size: clamp(64px, 12vw, 132px);
}

.art-head__lead {
    max-width: 520px;
    margin: 14px auto 0;
    font-family: var(--font-pixel);
    font-size: 15px;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.45);
}

.art-head__count {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.5);
    transform: rotate(-3deg);
}

.art-head__deco {
    position: absolute;
    pointer-events: none;
    animation: art-float 5s ease-in-out infinite;
}

.art-head__deco--a {
    width: 110px;
    top: 20px;
    right: -30px;
}

@keyframes art-float {
    50% {
        transform: translateY(-10px) rotate(8deg);
    }
}

/* ---- topic chips ------------------------------------------------------- */

.art-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 30px;
}

.art-filter[hidden] {
    display: none;
}

.art-chip {
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: rgba(253, 253, 253, 0.6);
    border: 1px solid rgba(253, 253, 253, 0.9);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.8) inset;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-family: var(--font-pixel);
    font-size: 15px;
    text-transform: uppercase;
    transition: transform 0.35s var(--ease-pop), background-color 0.2s;
}

.art-chip:hover {
    transform: translateY(-2px) rotate(-3deg);
    background: var(--white);
}

.art-chip[aria-pressed='true'] {
    background: var(--yellow);
    border-color: var(--yellow);
    box-shadow: 0 4px 0 rgba(22, 22, 22, 0.12);
    transform: rotate(-3deg) scale(1.06);
}

/* ---- polaroid bits ----------------------------------------------------- */

.art-tape {
    position: absolute;
    top: -14px;
    left: 50%;
    width: 120px;
    height: 32px;
    margin-left: -60px;
    background: rgba(255, 217, 0, 0.78);
    border-radius: 3px;
    transform: rotate(-4deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    -webkit-mask: radial-gradient(circle at 0 50%, transparent 4px, #000 4.5px) left / 51% 100% no-repeat,
        radial-gradient(circle at 100% 50%, transparent 4px, #000 4.5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 50%, transparent 4px, #000 4.5px) left / 51% 100% no-repeat,
        radial-gradient(circle at 100% 50%, transparent 4px, #000 4.5px) right / 51% 100% no-repeat;
}

/* ---- featured ---------------------------------------------------------- */

.art-feat {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 56px;
    padding: 18px;
    border-radius: 40px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 22px 50px rgba(0, 60, 140, 0.22);
    transform: rotate(-1deg);
    transition: transform 0.5s var(--ease-pop), box-shadow 0.3s;
}

.art-feat:hover {
    transform: rotate(0.4deg) scale(1.012);
    box-shadow: 0 30px 60px rgba(0, 60, 140, 0.28);
}

.art-feat[hidden] {
    display: none;
}

.art-feat__pic {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 28px;
}

.art-feat__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
}

.art-feat__pic.is-widget img,
.art-card__pic.is-widget img {
    object-fit: contain;
    padding: 12%;
    filter: drop-shadow(0 10px 14px rgba(0, 60, 140, 0.2));
}

.art-feat__body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 16px 10px 0;
}

.art-feat__new img {
    position: absolute;
    top: -58px;
    right: -38px;
    width: 140px;
    height: auto;
    transform: rotate(10deg);
    filter: drop-shadow(0 8px 12px rgba(0, 60, 140, 0.25));
    animation: art-float 4s ease-in-out infinite;
}

.art-feat__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.art-feat__title {
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.art-feat__desc {
    font-size: 16px;
    line-height: 1.55;
    color: #45474d;
}

.art-feat__foot .qw-btn {
    background: var(--yellow);
}

.art-feat__foot .qw-btn small {
    color: #8a7600;
}

/* ---- masonry wall ------------------------------------------------------ */

.art-wall {
    list-style: none;
    columns: 3 280px;
    column-gap: 34px;
}

.art-wall__item {
    break-inside: avoid;
    padding: 14px 4px 26px;
}

.art-wall__item[hidden] {
    display: none;
}

.is-in {
    animation: art-in 0.55s var(--ease-pop) both;
}

@keyframes art-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9) rotate(var(--r, 0deg));
    }
}

.art-card {
    position: relative;
    display: block;
    padding: 12px 12px 20px;
    border-radius: 30px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(0, 60, 140, 0.18);
    transform: rotate(var(--r, -1deg));
    transition: transform 0.45s var(--ease-pop), box-shadow 0.3s;
}

.art-card:hover {
    transform: rotate(calc(var(--r, -1deg) * -1)) translateY(-6px) scale(1.035);
    box-shadow: 0 24px 44px rgba(0, 60, 140, 0.26);
}

.art-card:active {
    transform: scale(0.97);
}

.art-card__pic {
    display: block;
    aspect-ratio: var(--ar, 1/1);
    border-radius: 20px;
    overflow: hidden;
}

.art-card__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.art-card:hover .art-card__pic img {
    transform: scale(1.06) rotate(-1deg);
}

.art-card__date {
    position: absolute;
    top: 2px;
    left: -6px;
}

.art-card__topic {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 5px 11px 4px;
    border-radius: 999px;
    background: var(--yellow);
    font-family: var(--font-pixel);
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    transform: rotate(4deg);
    box-shadow: 0 3px 0 rgba(22, 22, 22, 0.1);
}

.art-card__topic--culture {
    background: var(--pink);
    color: var(--white);
}

.art-card__topic--collecting {
    background: var(--mint);
}

.art-card__title {
    margin: 14px 6px 0;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.art-card__desc {
    display: block;
    margin: 8px 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5b5d63;
}

.art-empty {
    text-align: center;
    font-size: 24px;
    margin: 20px 0 40px;
}

/* ==========================================================================
   single article
   ========================================================================== */

.art-read {
    padding-top: 28px;
}

.art-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    max-width: 1060px;
    margin: 18px auto 46px;
}

.art-polaroid {
    position: relative;
    padding: 14px 14px 52px;
    border-radius: 30px;
    background: var(--white);
    box-shadow: 0 24px 50px rgba(0, 60, 140, 0.25);
    transform: rotate(-3deg);
    transition: transform 0.5s var(--ease-pop);
}

.art-polaroid:hover {
    transform: rotate(1deg) scale(1.02);
}

.art-polaroid__pic {
    aspect-ratio: 4 / 3.4;
    border-radius: 20px;
    overflow: hidden;
}

.art-polaroid__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-polaroid__pic.is-widget img {
    object-fit: contain;
    padding: 14%;
    filter: drop-shadow(0 12px 16px rgba(0, 60, 140, 0.22));
}

.art-polaroid__cap {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 12px;
    font-family: var(--font-hand);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.2;
    color: var(--blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-polaroid .art-tape {
    top: -16px;
    width: 140px;
    margin-left: -70px;
}

.art-polaroid__sticker {
    position: absolute;
    right: -26px;
    bottom: -22px;
    width: 96px;
    height: auto;
    transform: rotate(12deg);
    filter: drop-shadow(0 8px 12px rgba(0, 60, 140, 0.25));
    animation: art-float 5s ease-in-out infinite;
}

.art-hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.art-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    list-style: none;
}

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

.art-hero__tags .qw-tag:nth-child(3n) {
    transform: rotate(-1deg);
}

.art-hero__title {
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(32px, 4.4vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--ink);
    -webkit-text-stroke: 0.14em var(--white);
    paint-order: stroke fill;
    filter: drop-shadow(0 8px 16px rgba(0, 70, 160, 0.22));
    text-wrap: balance;
}

.art-hero__desc {
    max-width: 520px;
    font-size: 17px;
    line-height: 1.55;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(253, 253, 253, 0.55);
    border: 1px solid rgba(253, 253, 253, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.art-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.art-hero__meta .qw-tag {
    font-size: 14px;
}

.art-hero__meta .art-read-time {
    background: var(--yellow);
    color: var(--ink);
    transform: rotate(3deg);
}

.art-body {
    background: rgba(253, 253, 253, 0.95);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    max-width: calc(68ch + 2 * clamp(22px, 5vw, 64px));
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px);
    border-radius: 40px;
}

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

.art-body .qw-prose p:first-child::first-letter {
    float: left;
    margin: 6px 10px 0 0;
    padding: 6px 10px 2px;
    border-radius: 14px;
    background: var(--yellow);
    font-family: var(--font-pixel);
    font-size: 46px;
    line-height: 1;
    transform: rotate(-4deg);
}

/* ---- signup + read next ----------------------------------------------- */

.art-signup {
    position: relative;
    max-width: 640px;
    margin: 64px auto 0;
    padding: 56px clamp(18px, 4vw, 40px) 28px;
    text-align: center;
}

.art-signup__sticker {
    position: absolute;
    top: -46px;
    left: 50%;
    width: 230px;
    margin-left: -115px;
}

.art-signup__lead {
    margin-bottom: 16px;
    font-family: var(--font-pixel);
    font-size: 16px;
    line-height: 1.3;
    text-transform: uppercase;
}

.art-signup .qw-form {
    max-width: 480px;
    margin: 0 auto;
}

.art-next {
    margin: 72px auto 0;
    max-width: 1060px;
}

.art-next__head {
    text-align: center;
    margin-bottom: 18px;
}

.art-next__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.art-next__all {
    margin-top: 34px;
    text-align: center;
}

/* ---- mobile ------------------------------------------------------------ */

@media (max-width: 860px) {
    .art-feat,
    .art-hero {
        grid-template-columns: 1fr;
    }

    .art-feat__body {
        padding: 4px 6px 8px;
    }

    .art-feat__new img {
        top: -64px;
        right: -18px;
        width: 110px;
    }

    .art-next__list {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .art-hero__text {
        align-items: center;
        text-align: center;
    }

    .art-hero__tags,
    .art-hero__meta {
        justify-content: center;
    }

    .art-polaroid {
        max-width: 440px;
        width: calc(100% - 24px);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .art,
    .art-read {
        padding-top: 16px;
    }

    .art-head__deco--a {
        width: 70px;
        right: -4px;
        top: 6px;
    }

    .art-head__lead {
        font-size: 13px;
    }

    .art-feat {
        padding: 12px;
        border-radius: 32px;
        margin-bottom: 36px;
    }

    .art-feat__pic,
    .art-feat__pic img {
        border-radius: 22px;
    }

    .art-wall {
        columns: 2;
        column-gap: 14px;
    }

    .art-wall__item {
        padding: 10px 0 16px;
    }

    .art-card {
        padding: 8px 8px 14px;
        border-radius: 22px;
    }

    .art-card__pic {
        border-radius: 15px;
    }

    .art-card__title {
        margin: 10px 4px 0;
        font-size: 15px;
    }

    .art-wall .art-card__desc {
        display: none;
    }

    .art-filter {
        gap: 6px;
    }

    .art-chip {
        height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }

    .art-card__topic {
        top: 14px;
        right: 12px;
        font-size: 9px;
    }

    .art-card__date {
        font-size: 11px;
    }

    .art-body {
        border-radius: 30px;
    }

    .art-body .qw-prose {
        font-size: 17px;
    }

    .art-polaroid__sticker {
        width: 72px;
        right: -12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .art-head__deco,
    .art-feat__new img,
    .art-polaroid__sticker {
        animation: none;
    }
}

.art-body .qw-prose > :first-child {
    margin-top: 0;
}

@media (max-width: 860px) {
    .art-next__list .art-card {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: center;
        column-gap: 14px;
        padding: 10px;
    }

    .art-next__list .art-card__pic {
        grid-row: 1;
        aspect-ratio: 1 / 1 !important;
    }

    .art-next__list .art-card__title {
        margin: 0;
        font-size: 16px;
    }

    .art-next__list .art-card__desc {
        display: none;
    }

    .art-next__list .art-card__date {
        top: -8px;
    }
}
