/* =========================================================
   TOWNTUNE V2 - CATALOGUE / LANDING PAGES
   Used by Games, Colouring Books and Printable Tools.
   ========================================================= */

body.catalogue-page .main-nav > a.active {
    background: rgba(104, 224, 211, 0.13);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(104, 224, 211, 0.22);
}

.catalogue-main {
    padding-top: 24px;
}

.catalogue-hero {
    position: relative;
    min-height: 350px;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    overflow: hidden;
    padding: clamp(34px, 5vw, 64px);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 32px;
    box-shadow: 0 22px 55px rgba(0,0,0,.25);
}

.catalogue-hero::before,
.catalogue-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.catalogue-hero::before {
    width: 420px;
    height: 420px;
    right: -180px;
    top: -210px;
    background: rgba(255,255,255,.08);
}

.catalogue-hero::after {
    width: 260px;
    height: 260px;
    left: 38%;
    bottom: -190px;
    background: rgba(255,255,255,.045);
}

.catalogue-hero-games {
    background:
        radial-gradient(circle at 75% 35%, rgba(74, 221, 211, .22), transparent 28%),
        linear-gradient(135deg, #142a55, #18225d 58%, #0f5362);
}

.catalogue-hero-colouring {
    background:
        radial-gradient(circle at 80% 22%, rgba(255, 255, 255, .16), transparent 28%),
        linear-gradient(135deg, #44215f, #763b8f 52%, #b04f85);
}

.catalogue-hero-printables {
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .13), transparent 28%),
        linear-gradient(135deg, #103d46, #126c67 54%, #1c7e77);
}

.catalogue-hero-copy {
    position: relative;
    z-index: 3;
    max-width: 700px;
}

.catalogue-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(4, 16, 34, .20);
    color: rgba(255,255,255,.88);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.catalogue-hero h1 {
    margin: 15px 0 17px;
    color: #fff;
    font-size: clamp(48px, 6.7vw, 86px);
    line-height: .93;
    letter-spacing: -4px;
}

.catalogue-hero-copy > p {
    max-width: 660px;
    margin: 0;
    color: rgba(236,245,255,.82);
    font-size: clamp(16px, 1.7vw, 20px);
    line-height: 1.6;
    font-weight: 650;
}

.catalogue-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.catalogue-chip-row a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.catalogue-chip-row a:hover {
    background: rgba(255,255,255,.17);
}


/* =========================================================
   HERO VISUALS
   ========================================================= */

.catalogue-hero-visual,
.printable-hero-visual {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
    aspect-ratio: 1 / .82;
    justify-self: end;
}

.hero-mini-card,
.printable-hero-visual span {
    position: absolute;
    width: clamp(94px, 10vw, 138px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 27%;
    color: #fff;
    font-size: clamp(40px, 5vw, 64px);
    box-shadow: 0 24px 40px rgba(0,0,0,.22);
    backdrop-filter: blur(8px);
}

.hero-mini-card-1 {
    left: 2%;
    top: 8%;
    background: linear-gradient(135deg, #596cff, #8558dc);
    transform: rotate(-8deg);
}

.hero-mini-card-2 {
    right: 3%;
    top: 0;
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
    transform: rotate(8deg);
}

.hero-mini-card-3 {
    left: 12%;
    bottom: 2%;
    background: linear-gradient(135deg, #ff8d5d, #ff4e83);
    transform: rotate(5deg);
}

.hero-mini-card-4 {
    right: 10%;
    bottom: 8%;
    background: linear-gradient(135deg, #20b790, #0f8b8d);
    transform: rotate(-7deg);
}

.printable-hero-visual span:nth-child(1) {
    left: 2%;
    top: 4%;
    background: linear-gradient(135deg, #ffbd43, #ef7e2e);
    transform: rotate(-8deg);
}

.printable-hero-visual span:nth-child(2) {
    right: 4%;
    top: 3%;
    background: linear-gradient(135deg, #5e77ff, #7252d8);
    transform: rotate(8deg);
}

.printable-hero-visual span:nth-child(3) {
    left: 14%;
    bottom: 0;
    background: linear-gradient(135deg, #27ad93, #117e89);
    transform: rotate(5deg);
}

.printable-hero-visual span:nth-child(4) {
    right: 10%;
    bottom: 8%;
    background: linear-gradient(135deg, #ef658c, #bc4cd8);
    transform: rotate(-7deg);
}


/* =========================================================
   BOOK STACK
   ========================================================= */

.book-stack {
    position: relative;
    z-index: 2;
    width: min(100%, 420px);
    height: 310px;
    justify-self: end;
}

.book-stack-cover {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(150px, 17vw, 215px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 6px solid rgba(255,255,255,.88);
    border-radius: 17px;
    box-shadow: 0 28px 48px rgba(0,0,0,.30);
}

.book-stack-cover-1 {
    transform: translate(-80%, -49%) rotate(-10deg);
}

.book-stack-cover-2 {
    z-index: 2;
    transform: translate(-50%, -54%) rotate(1deg);
}

.book-stack-cover-3 {
    transform: translate(-20%, -47%) rotate(10deg);
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.catalogue-heading {
    align-items: end;
}

.catalogue-heading > div {
    max-width: 800px;
}

.catalogue-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--tt-muted);
    font-size: 15px;
    line-height: 1.6;
}

.catalogue-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    color: #cbd7e8;
    font-size: 12px;
    font-weight: 900;
}


/* =========================================================
   GAME CATALOGUE
   ========================================================= */

.catalogue-game-grid .game-meta h3 {
    min-height: 34px;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalogue-game-grid .game-meta p {
    white-space: normal;
}

.catalogue-game-grid .game-art {
    aspect-ratio: 1 / .88;
}


/* =========================================================
   COLOURING BOOK GRID
   ========================================================= */

.catalogue-book-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.catalogue-book-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 22px;
    background: rgba(255,255,255,.055);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.catalogue-book-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 20px 38px rgba(0,0,0,.25);
}

.catalogue-book-cover {
    padding: 14px 14px 0;
}

.catalogue-book-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.catalogue-book-copy {
    padding: 16px 16px 18px;
}

.catalogue-book-copy h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.15;
}

.catalogue-book-copy p {
    min-height: 60px;
    margin: 8px 0 14px;
    color: #9fafc4;
    font-size: 13px;
    line-height: 1.5;
}

.catalogue-book-copy span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.catalogue-book-copy b {
    font-size: 18px;
}


/* =========================================================
   PRINTABLE TOOL GRID
   ========================================================= */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tool-tile {
    position: relative;
    min-height: 170px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(104,224,211,.11), transparent 30%),
        rgba(255,255,255,.055);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0,0,0,.15);
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.tool-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(104,224,211,.28);
    box-shadow: 0 19px 36px rgba(0,0,0,.23);
}

.tool-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(104,224,211,.20), rgba(109,124,255,.24));
    font-size: 34px;
    box-shadow: inset 0 1px rgba(255,255,255,.12);
}

.tool-copy {
    min-width: 0;
}

.tool-copy > span {
    color: #70dfd3;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tool-copy h3 {
    margin: 5px 0 7px;
    color: #fff;
    font-size: 20px;
    line-height: 1.15;
}

.tool-copy p {
    margin: 0;
    color: #98a9bf;
    font-size: 13px;
    line-height: 1.5;
}

.tool-arrow {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 19px;
    font-weight: 900;
}


/* =========================================================
   BOTTOM INFO
   ========================================================= */

.catalogue-info-section {
    margin-top: 66px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .catalogue-hero {
        grid-template-columns: minmax(0, 1.08fr) minmax(270px, .92fr);
    }

    .catalogue-book-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE / SMALL TABLET
   ========================================================= */

@media (max-width: 820px) {
    .catalogue-main {
        padding-top: 14px;
    }

    .catalogue-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 24px;
        border-radius: 25px;
    }

    .catalogue-hero h1 {
        margin-top: 13px;
        font-size: clamp(46px, 12vw, 68px);
        letter-spacing: -3px;
    }

    .catalogue-hero-visual,
    .printable-hero-visual {
        width: min(100%, 360px);
        height: 210px;
        aspect-ratio: auto;
        justify-self: center;
    }

    .book-stack {
        width: min(100%, 360px);
        height: 250px;
        justify-self: center;
    }

    .catalogue-book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .catalogue-hero {
        padding: 24px 19px 21px;
        border-radius: 22px;
    }

    .catalogue-hero h1 {
        font-size: 48px;
        line-height: .95;
        letter-spacing: -2.6px;
    }

    .catalogue-hero-copy > p {
        font-size: 15px;
        line-height: 1.55;
    }

    .catalogue-chip-row {
        margin-top: 18px;
        gap: 7px;
    }

    .catalogue-chip-row a {
        min-height: 36px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .catalogue-hero-visual,
    .printable-hero-visual {
        height: 184px;
    }

    .hero-mini-card,
    .printable-hero-visual span {
        width: 88px;
        border-radius: 22px;
        font-size: 39px;
    }

    .book-stack {
        height: 220px;
    }

    .book-stack-cover {
        width: 142px;
        border-width: 4px;
        border-radius: 13px;
    }

    .catalogue-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    .catalogue-heading p {
        margin-top: 7px;
        font-size: 14px;
    }

    .catalogue-count {
        min-height: 32px;
    }

    .catalogue-game-grid {
        gap: 11px;
    }

    .catalogue-game-grid .game-art {
        aspect-ratio: 1 / .90;
    }

    .catalogue-game-grid .game-meta h3 {
        min-height: 32px;
    }

    .catalogue-book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .catalogue-book-card {
        border-radius: 17px;
    }

    .catalogue-book-cover {
        padding: 8px 8px 0;
    }

    .catalogue-book-cover img {
        border-radius: 11px;
    }

    .catalogue-book-copy {
        padding: 11px 11px 13px;
    }

    .catalogue-book-copy h3 {
        font-size: 14px;
    }

    .catalogue-book-copy p {
        min-height: 0;
        display: -webkit-box;
        overflow: hidden;
        font-size: 11px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .catalogue-book-copy span {
        font-size: 11px;
    }

    .tool-tile {
        min-height: 0;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 12px;
        padding: 17px;
        border-radius: 18px;
    }

    .tool-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 27px;
    }

    .tool-copy h3 {
        font-size: 16px;
    }

    .tool-copy p {
        font-size: 12px;
    }

    .tool-arrow {
        width: 33px;
        height: 33px;
    }

    .catalogue-info-section {
        margin-top: 50px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {
    .catalogue-hero h1 {
        font-size: 43px;
    }

    .catalogue-book-grid {
        grid-template-columns: 1fr;
    }

    .catalogue-book-copy p {
        -webkit-line-clamp: 2;
    }

    .tool-tile {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .tool-arrow {
        display: none;
    }
}
