@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400;0,500;0,700;1,400&family=IM+Fell+English+SC&display=swap');

/* ============================================================
   Witch's cabinet
   ============================================================ */

:root {
    --night: #0d160f;
    --ink: #162217;
    --moss: #253d27;
    --forest: #3f673d;
    --sage: #789364;

    --gold: #d4ad57;
    --gold-light: #f1d486;
    --gold-dark: #765823;

    --wine: #7d2638;
    --wine-dark: #421622;
    --plum: #684477;
    --plum-dark: #30203d;
    --walnut: #714b32;

    --paper: #e8d5a5;
    --paper-dark: #ad8e56;
    --cream: #f4e8c3;
    --white: #fff8dd;

    --shadow: rgba(3, 8, 4, 0.78);
    --gold-line: rgba(212, 173, 87, 0.6);
    --glass: rgba(12, 23, 14, 0.82);

    --display-font: 'IM Fell English SC', Georgia, serif;
    --body-font: 'Alegreya', Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--cream);
    font-family: var(--body-font);
    background-color: var(--night);
    background-image:
        linear-gradient(rgba(12, 23, 14, 0.84), rgba(12, 23, 14, 0.94)),
        url('pics/background.png');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/* ============================================================
   Background texture and occult lattice
   ============================================================ */

body::before {
    position: fixed;
    z-index: -2;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0.48;
    background-image:
        /* Large golden lattice */
        repeating-linear-gradient(
            45deg,
            rgba(241, 212, 134, 0.075) 0,
            rgba(241, 212, 134, 0.075) 1px,
            transparent 1px,
            transparent 48px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(241, 212, 134, 0.075) 0,
            rgba(241, 212, 134, 0.075) 1px,
            transparent 1px,
            transparent 48px
        ),

        /* Small uneven flecks */
        radial-gradient(
            circle at 20% 30%,
            rgba(241, 212, 134, 0.16) 0 1px,
            transparent 2px
        ),
        radial-gradient(
            circle at 70% 18%,
            rgba(255, 248, 221, 0.11) 0 1px,
            transparent 2px
        ),

        /* Paper-like grain */
        repeating-linear-gradient(
            0deg,
            rgba(241, 212, 134, 0.045) 0,
            rgba(241, 212, 134, 0.045) 1px,
            transparent 1px,
            transparent 9px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.08) 0,
            rgba(0, 0, 0, 0.08) 1px,
            transparent 1px,
            transparent 13px
        );

    background-size:
        auto,
        auto,
        170px 190px,
        230px 260px,
        auto,
        auto;

    background-position:
        0 0,
        24px 18px,
        0 0,
        47px 61px,
        0 0,
        0 0;
}


body::after {
    position: fixed;
    z-index: 20;
    inset: 0;
    content: '';
    pointer-events: none;
    box-shadow:
        inset 0 0 120px rgba(0, 0, 0, 0.72),
        inset 0 0 0 1px rgba(212, 173, 87, 0.12);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--display-font);
    font-weight: 400;
}

a {
    color: inherit;
}

::selection {
    color: var(--night);
    background: var(--gold-light);
}

/* ============================================================
   Decorative hanging objects
   ============================================================ */

/* ============================================================
   Hanging potion bottles
   They stay attached to the viewport while the page scrolls.
   ============================================================ */

.decor {
    position: fixed;
    z-index: 15;
    top: clamp(8px, 2vw, 24px);
    bottom: auto;
    width: clamp(105px, 13vw, 180px);
    aspect-ratio: 1;
    pointer-events: none;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: contain;
    filter:
        drop-shadow(0 12px 12px rgba(0, 0, 0, 0.65))
        drop-shadow(0 0 8px rgba(212, 173, 87, 0.18));
    opacity: 0.96;
    transform-origin: 50% -35px;
}

/* String from the top of the page to the bottle */
.decor::before {
    position: absolute;
    top: -90px;
    left: 50%;
    width: 1px;
    height: 92px;
    content: '';
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold),
        transparent
    );
    box-shadow:
        0 0 5px rgba(212, 173, 87, 0.65),
        2px 0 0 rgba(255, 248, 221, 0.08);
}

/* Small hook above each bottle */
.decor::after {
    position: absolute;
    top: -98px;
    left: calc(50% - 7px);
    content: '✦';
    color: var(--gold-light);
    font-family: Georgia, serif;
    font-size: 15px;
    text-shadow: 0 0 10px var(--gold);
}

.decor-left {
    left: clamp(10px, 3vw, 42px);
    background-image: url('pics/decor-left.png');
    animation: bottle-sway-left 5.8s ease-in-out infinite;
}

.decor-right {
    right: clamp(10px, 3vw, 42px);
    background-image: url('pics/decor-right.png');
    animation: bottle-sway-right 6.5s ease-in-out -1.8s infinite;
}

@keyframes bottle-sway-left {
    0%,
    100% {
        transform: rotate(-5deg) translateY(0);
    }

    50% {
        transform: rotate(3deg) translateY(6px);
    }
}

@keyframes bottle-sway-right {
    0%,
    100% {
        transform: rotate(5deg) translateY(0);
    }

    50% {
        transform: rotate(-3deg) translateY(7px);
    }
}


/* ============================================================
   Header and banner
   ============================================================ */

.hero {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--gold-line);
    background: var(--ink);
    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.58),
        0 2px 0 rgba(241, 212, 134, 0.2);
}

.banner {
    position: relative;
    width: 100%;
    height: clamp(260px, 43vw, 540px);
    overflow: hidden;
    line-height: 0;
}

.banner::before {
    position: absolute;
    z-index: 1;
    inset: 12px;
    content: '';
    pointer-events: none;
    border: 1px solid rgba(241, 212, 134, 0.42);
    box-shadow:
        inset 0 0 0 7px rgba(13, 22, 15, 0.18),
        inset 0 0 0 8px rgba(241, 212, 134, 0.12);
}

.banner::after {
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    height: 48%;
    content: '';
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(13, 22, 15, 0.94)
    );
}

.banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.84) contrast(1.08);
}

/* ============================================================
   Intro
   ============================================================ */

.intro {
    position: relative;
    z-index: 1;
    padding: 54px 20px 30px;
    text-align: center;
}

.intro-content {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}

.intro-content::before,
.intro-content::after {
    position: absolute;
    top: 50%;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 30px;
    text-shadow: 0 0 12px rgba(241, 212, 134, 0.55);
}

.intro-content::before {
    left: -30px;
    content: '☽';
}

.intro-content::after {
    right: -30px;
    content: '☾';
}

.intro-title {
    color: var(--gold-light);
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    letter-spacing: 0.055em;
    line-height: 1;
    text-shadow:
        0 2px 0 var(--gold-dark),
        0 0 18px rgba(212, 173, 87, 0.52),
        0 7px 15px rgba(0, 0, 0, 0.65);
}

.intro-title::after {
    display: block;
    width: min(390px, 78%);
    height: 14px;
    margin: 22px auto 20px;
    content: '✦  ✧  ✦';
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 15px;
    line-height: 14px;
    letter-spacing: 0.55em;
    text-shadow: 0 0 10px rgba(212, 173, 87, 0.8);
}

.intro-description {
    max-width: 690px;
    margin: 0 auto 14px;
    color: var(--cream);
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    line-height: 1.55;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

.intro-hint {
    display: inline-block;
    padding: 6px 18px;
    color: var(--gold-light);
    font-size: 1rem;
    font-style: italic;
    letter-spacing: 0.04em;
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
    text-shadow: 0 0 9px rgba(212, 173, 87, 0.5);
}

@keyframes candle-flicker {
    0%,
    100% {
        opacity: 0.76;
    }

    50% {
        opacity: 1;
    }
}

.intro-hint::before {
    margin-right: 9px;
    content: '☼';
    color: var(--gold-light);
    animation: candle-flicker 2.8s ease-in-out infinite;
}

/* ============================================================
   Main collection and groups
   ============================================================ */

.collection {
    position: relative;
    z-index: 1;
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto 80px;
}

.card-group {
    --accent: var(--gold);
    --accent-soft: rgba(212, 173, 87, 0.5);
    --accent-glow: rgba(212, 173, 87, 0.25);

    position: relative;
    margin-top: 76px;
    padding: 30px clamp(14px, 3vw, 42px) 42px;
    border: 1px solid rgba(212, 173, 87, 0.2);
    border-top: 0;
    background: rgba(8, 17, 10, 0.28);
}

.card-group::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    content: '';
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    box-shadow: 0 0 16px var(--accent-glow);
}

.card-group::after {
    position: absolute;
    top: -13px;
    left: calc(50% - 13px);
    width: 25px;
    height: 25px;
    content: '✦';
    color: var(--accent);
    font-size: 18px;
    line-height: 25px;
    text-align: center;
    background: var(--night);
    text-shadow: 0 0 10px var(--accent);
}

.card-group:first-child {
    margin-top: 28px;
}

.card-group.accent-gold {
    --accent: var(--gold-light);
    --accent-soft: rgba(212, 173, 87, 0.54);
    --accent-glow: rgba(212, 173, 87, 0.32);
}

.card-group.accent-forest {
    --accent: #90b875;
    --accent-soft: rgba(144, 184, 117, 0.5);
    --accent-glow: rgba(102, 166, 86, 0.3);
}

.card-group.accent-plum {
    --accent: #c18fd5;
    --accent-soft: rgba(193, 143, 213, 0.5);
    --accent-glow: rgba(151, 84, 178, 0.33);
}

.card-group.accent-wine {
    --accent: #e07888;
    --accent-soft: rgba(224, 120, 136, 0.5);
    --accent-glow: rgba(166, 39, 62, 0.32);
}

.card-group.accent-walnut {
    --accent: #d39b67;
    --accent-soft: rgba(211, 155, 103, 0.5);
    --accent-glow: rgba(166, 101, 57, 0.3);
}

.group-title {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--accent);
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    letter-spacing: 0.09em;
    line-height: 1.15;
    text-align: center;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.75),
        0 0 15px var(--accent-glow);
}

.group-title::before,
.group-title::after {
    flex: 1 1 80px;
    height: 1px;
    content: '';
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent)
    );
    box-shadow: 0 0 10px var(--accent-glow);
}

.group-title::after {
    background: linear-gradient(
        90deg,
        var(--accent),
        transparent
    );
}

.group-title > span {
    flex: 0 1 auto;
}

.group-desc {
    max-width: 720px;
    margin: 12px auto 0;
    color: rgba(244, 232, 195, 0.88);
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   Lorebook notice
   ============================================================ */

.lorebook-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 820px;
    margin: 18px auto 0;
    padding: 16px 20px;
    color: var(--cream);
    font-size: 0.96rem;
    line-height: 1.45;
    text-align: left;
    border: 1px solid var(--accent-soft);
    border-left-width: 4px;
    border-radius: 3px;
    background: rgba(212, 173, 87, 0.08);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 248, 221, 0.12);
}

.lorebook-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.lorebook-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lorebook-text {
    display: block;
}

.lorebook-text strong {
    color: var(--gold-light);
    font-weight: 700;
}

.lorebook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 36px;
    padding: 8px 18px;
    color: var(--night);
    font-family: var(--body-font);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 2px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 248, 221, 0.15);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.lorebook-btn:hover {
    box-shadow:
        0 5px 10px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(212, 173, 87, 0.3);
    filter: brightness(1.12);
    transform: translateY(-2px);
}

.lorebook-btn:active {
    transform: translateY(0);
}

.lorebook-btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .lorebook-notice {
        margin-top: 14px;
        padding: 13px 15px;
        font-size: 0.88rem;
    }

    .lorebook-icon {
        font-size: 1.3rem;
    }

    .lorebook-content {
        gap: 10px;
    }

    .lorebook-btn {
        min-height: 34px;
        padding: 7px 14px;
        font-size: 0.86rem;
    }
}



/* ============================================================
   Cards
   ============================================================ */

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: clamp(24px, 3vw, 42px);
    margin-top: 34px;
}

.card {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 2 / 3;
    justify-self: center;
    cursor: pointer;
    perspective: 1300px;
    outline: none;
}

.card::before,
.card::after {
    position: absolute;
    z-index: 5;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 0 8px var(--accent-glow);
}

.card::before {
    top: 9px;
    left: 10px;
    content: '⌜';
}

.card::after {
    right: 10px;
    bottom: 9px;
    content: '⌟';
}

.card:hover {
    transform: translateY(-9px) rotate(-0.5deg);
}

.card:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 7px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.78s cubic-bezier(0.22, 0.75, 0.24, 1);
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid var(--accent-soft);
    border-radius: 3px;
    backface-visibility: hidden;
    box-shadow:
        0 16px 28px var(--shadow),
        0 0 0 5px rgba(11, 22, 13, 0.82),
        0 0 0 6px var(--accent-soft),
        inset 0 0 0 1px rgba(255, 248, 221, 0.12);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    z-index: 2;
}

.card-front::before,
.card-back::before {
    position: absolute;
    z-index: 3;
    inset: 7px;
    content: '';
    pointer-events: none;
    border: 1px solid rgba(241, 212, 134, 0.18);
}

.card:hover .card-front,
.card:hover .card-back {
    border-color: var(--accent);
    box-shadow:
        0 20px 36px rgba(0, 0, 0, 0.82),
        0 0 0 5px rgba(11, 22, 13, 0.82),
        0 0 0 6px var(--accent),
        0 0 28px var(--accent-glow);
}

/* Front */

.card-front {
    display: flex;
    flex-direction: column;
    background-color: var(--moss);
}

.card-image {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: var(--ink);
}

.card-image::after {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(10, 18, 11, 0.03) 55%,
            rgba(10, 18, 11, 0.45)
        ),
        linear-gradient(
            90deg,
            rgba(212, 173, 87, 0.08),
            transparent 25%,
            transparent 75%,
            rgba(212, 173, 87, 0.08)
        );
    mix-blend-mode: screen;
}

.card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.card:hover .card-image img {
    filter: saturate(1.12) contrast(1.04);
    transform: scale(1.045);
}

.card-footer {
    position: relative;
    z-index: 2;
    min-height: 96px;
    padding: 14px 18px 16px;
    text-align: center;
    border-top: 2px solid var(--accent);
    background:
        linear-gradient(
            135deg,
            rgba(63, 103, 61, 0.98),
            rgba(18, 35, 21, 0.99)
        );
}

.card-footer::before {
    position: absolute;
    top: -8px;
    left: calc(50% - 7px);
    width: 13px;
    height: 13px;
    content: '✦';
    color: var(--accent);
    font-size: 12px;
    line-height: 13px;
    background: var(--moss);
}

.card-name {
    margin-bottom: 5px;
    color: var(--gold-light);
    font-size: 1.35rem;
    line-height: 1.12;
    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.82),
        0 0 9px rgba(212, 173, 87, 0.24);
}

.card-short-desc {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 248, 221, 0.9);
    font-size: 0.91rem;
    font-style: italic;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Back */

.card-back {
    display: flex;
    padding: 25px 22px 22px;
    background-color: var(--forest);
    background-image:
        linear-gradient(
            rgba(24, 44, 26, 0.83),
            rgba(12, 23, 14, 0.94)
        ),
        url('pics/background.png');
    background-position: center;
    background-size: cover;
    transform: rotateY(180deg);
}

.card-back::after {
    position: absolute;
    right: 17px;
    bottom: 15px;
    color: var(--accent);
    content: '☽  ✦  ☾';
    font-family: Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    opacity: 0.75;
}

.card-back-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.card-back .card-name {
    margin-bottom: 16px;
    padding: 0 3px 13px;
    border-bottom: 1px solid var(--accent-soft);
    text-align: center;
}

.card-description {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 19px;
    padding: 0 8px 0 2px;
    color: var(--cream);
    font-size: 1rem;
    line-height: 1.48;
    scrollbar-color: var(--accent) rgba(0, 0, 0, 0.35);
    scrollbar-width: thin;
}

.card-description p {
    margin-bottom: 12px;
}

.card-description p:last-child {
    margin-bottom: 0;
}

.card-description::-webkit-scrollbar {
    width: 6px;
}

.card-description::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.card-description::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 0;
}

/* ============================================================
   Links
   ============================================================ */

.card-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    gap: 9px;
    padding: 10px 15px;
    color: var(--cream);
    font-family: var(--body-font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(241, 212, 134, 0.52);
    border-radius: 2px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 248, 221, 0.12);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.btn:hover {
    border-color: var(--gold-light);
    box-shadow:
        0 7px 13px rgba(0, 0, 0, 0.48),
        0 0 14px rgba(212, 173, 87, 0.25);
    filter: brightness(1.13);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.btn-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    object-fit: contain;
}

.btn-janitor {
    background: linear-gradient(135deg, var(--plum), var(--wine-dark));
}

.btn-download {
    color: var(--night);
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
}

/* ============================================================
   Error and footer
   ============================================================ */

.load-error {
    max-width: 650px;
    margin: 70px auto;
    padding: 20px 24px;
    color: var(--cream);
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: center;
    border: 1px solid var(--wine);
    background: rgba(66, 22, 34, 0.76);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.footer {
    position: relative;
    z-index: 1;
    margin-top: 80px;
    padding: 38px 20px;
    color: var(--gold-light);
    font-family: var(--display-font);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-align: center;
    border-top: 1px solid var(--gold-line);
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(15, 31, 18, 0.96) 20%,
            rgba(15, 31, 18, 0.96) 80%,
            transparent
        );
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
}

.footer p::before,
.footer p::after {
    color: var(--gold);
    content: ' ✦ ';
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .decor {
        z-index: 0;
        width: 100px;
        opacity: 0.68;
    }

    .collection {
        width: min(100% - 20px, 720px);
    }

    .card-group {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 680px) {
    body {
        background-attachment: scroll;
    }

    .banner {
        height: 270px;
    }

    .banner::before {
        inset: 8px;
    }

    .intro {
        padding: 42px 20px 18px;
    }

    .intro-content::before,
    .intro-content::after {
        display: none;
    }

    .intro-title {
        font-size: clamp(2rem, 11vw, 3.2rem);
    }

    .group-title {
        gap: 10px;
        font-size: 1.55rem;
    }

    .group-title::before,
    .group-title::after {
        min-width: 15px;
    }

    .card-group {
        margin-top: 58px;
        padding-top: 25px;
    }

    .cards-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 17px;
        margin-top: 28px;
    }

    .card {
        max-width: none;
    }

    .card-footer {
        min-height: 88px;
        padding: 11px 10px 12px;
    }

    .card-name {
        font-size: 1.08rem;
    }

    .card-short-desc {
        font-size: 0.79rem;
    }

    .card-back {
        padding: 19px 15px 16px;
    }

    .card-back .card-name {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.87rem;
        line-height: 1.35;
    }

    .btn {
        min-height: 38px;
        padding: 8px 9px;
        font-size: 0.87rem;
    }

    .btn-icon {
        width: 17px;
        height: 17px;
    }

.decor {
    top: 6px;
    width: 74px;
    opacity: 0.4;
}

.decor::before {
    top: -42px;
    height: 44px;
}

.decor::after {
    top: -51px;
    font-size: 11px;
}
}

@media (max-width: 430px) {
    .collection {
        width: calc(100% - 12px);
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 29px;
    }

    .card {
        width: min(100%, 330px);
    }

    .card-footer {
        min-height: 94px;
    }

    .card-name {
        font-size: 1.28rem;
    }

    .card-short-desc {
        font-size: 0.88rem;
    }

    .card-back {
        padding: 23px 20px 19px;
    }

    .card-description {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    .btn {
        min-height: 42px;
        font-size: 0.96rem;
    }

    .decor {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
