/* ==========================
   RESET AND GLOBAL SETTINGS
========================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;

    color: #ffffff;
    background:
        radial-gradient(
            circle at 75% 10%,
            rgba(91, 34, 145, 0.8),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #170629 0%,
            #090313 55%,
            #050208 100%
        );

    font-family: "Lato", sans-serif;
}

button,
a {
    font: inherit;
}

button {
    border: 0;
}

img {
    display: block;
    max-width: 100%;
}

.page {
    position: relative;
    min-height: 100vh;
    isolation: isolate;
}


/* ==========================
   MOON
========================== */

.moon {
    position: absolute;
    z-index: -1;

    top: 130px;
    right: 3vw;

    width: clamp(130px, 18vw, 250px);

    opacity: 0.82;

    filter:
        drop-shadow(
            0 0 25px rgba(255, 245, 205, 0.75)
        );
}


/* ==========================
   HEADER AND NAVIGATION
========================== */

.site-header {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 14px clamp(20px, 5vw, 70px);

    position: relative;
    z-index: 10;

    background: rgba(7, 2, 14, 0.35);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);

    backdrop-filter: blur(8px);
}

.logo {
    color: #d4af37;
    text-decoration: none;

    font-family: "Cinzel", serif;
    font-size: clamp(18px, 2vw, 27px);
    font-weight: 600;

    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(15px, 2.5vw, 34px);
}

nav a {
    color: #ffffff;
    text-decoration: none;

    font-size: 16px;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

nav a:hover,
nav a:focus-visible {
    color: #d4af37;
    transform: translateY(-2px);
}


/* ==========================
   HERO SECTION
========================== */

.hero {
    min-height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 36px 20px 28px;

    position: relative;
    z-index: 2;
}

.hero-content {
    width: min(820px, 100%);

    text-align: center;
}

.eyebrow {
    margin: 0 0 8px;

    color: #d4af37;

    font-family: "Cinzel", serif;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: "Cinzel", serif;
}

h1 {
    margin: 0 0 14px;

    color: #f0d77d;

    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.1;

    text-shadow:
        0 0 18px rgba(212, 175, 55, 0.25);
}

.hero p {
    max-width: 710px;

    margin: 7px auto;

    color: rgba(255, 255, 255, 0.88);

    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.6;
}


/* ==========================
   BUTTONS
========================== */

.primary-button {
    min-width: 190px;

    margin-top: 18px;
    padding: 13px 30px;

    border-radius: 999px;

    color: #14051e;
    background:
        linear-gradient(
            180deg,
            #f3d778,
            #d4af37
        );

    font-size: 17px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(212, 175, 55, 0.2);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.primary-button:hover,
.primary-button:focus-visible {
    transform: translateY(-2px) scale(1.02);

    filter: brightness(1.08);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.42),
        0 0 30px rgba(212, 175, 55, 0.35);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}


/* ==========================
   READING AREA
========================== */

.reading-area {
    padding: 22px 20px 45px;

    position: relative;
    z-index: 2;

    text-align: center;
}

.reading-heading h2 {
    margin: 0;

    color: #d4af37;

    font-size: clamp(28px, 3vw, 40px);
}

.reading-heading p {
    margin: 7px 0 16px;

    color: rgba(255, 255, 255, 0.8);

    font-size: 17px;
}

.tarot-table {
    width: min(720px, 100%);

    margin: 0 auto;
    padding: 18px 20px 28px;

    border: 1px solid rgba(212, 175, 55, 0.16);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(46, 15, 67, 0.42),
            rgba(10, 3, 18, 0.55)
        );

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(6px);
}


/* ==========================
   TAROT CARD
========================== */

.card {
    width: 200px;
    height: 350px;

    margin: 0 auto;

    perspective: 1200px;

    border-radius: 14px;
}

.card-inner {
    position: relative;

    width: 100%;
    height: 100%;

    transform-style: preserve-3d;

    transition:
        transform 1s cubic-bezier(0.22, 0.75, 0.25, 1);
}

.card-face {
    position: absolute;
    inset: 0;

    overflow: hidden;

    border: 3px solid #d4af37;
    border-radius: 14px;

    background: #16071f;

    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 18px rgba(0, 0, 0, 0.45);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-cover {
    transform: rotateY(0deg);
}

.card-reveal {
    transform: rotateY(180deg);
}

#card-cover-image,
#card-image {
    width: 100%;
    height: 100%;
}

#card-cover-image {
    object-fit: cover;
}

#card-image {
    object-fit: contain;
    background: #16071f;
}

#card-image.reversed {
    transform: rotate(180deg);
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}


/* ==========================
   SHUFFLE GLOW
========================== */

.card.shuffling {
    animation: card-glow 0.8s ease-in-out infinite alternate;
}

.card.shuffling .card-inner {
    animation: card-shuffle 0.22s ease-in-out infinite alternate;
}

@keyframes card-glow {
    from {
        filter:
            drop-shadow(
                0 0 8px rgba(212, 175, 55, 0.35)
            );
    }

    to {
        filter:
            drop-shadow(
                0 0 32px rgba(240, 215, 125, 0.95)
            );
    }
}

@keyframes card-shuffle {
    from {
        transform: translateX(-4px) rotate(-1deg);
    }

    to {
        transform: translateX(4px) rotate(1deg);
    }
}


/* ==========================
   READING RESULT
========================== */

.draw-button {
    display: block;

    margin: 18px auto 0;
}

.shuffle-message {
    min-height: 24px;

    margin: 11px auto 0;

    color: #e8ce73;

    font-family: "Cinzel", serif;
    font-size: 15px;
}

.reading-result {
    max-width: 620px;

    margin: 4px auto 0;
}

#card-orientation {
    margin: 4px 0;

    color: rgba(255, 255, 255, 0.7);

    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#card-name {
    min-height: 34px;

    margin: 2px 0;

    color: #f0d77d;

    font-size: clamp(24px, 3vw, 34px);
}

#card-category {
    margin: 3px 0;

    color: #d4af37;

    font-family: "Cinzel", serif;
    font-size: 16px;
}

#card-keywords {
    margin: 5px 0;

    color: rgba(255, 255, 255, 0.7);

    font-size: 14px;
    font-style: italic;
}

#card-message {
    margin: 8px auto 0;

    color: rgba(255, 255, 255, 0.9);

    font-size: 17px;
    line-height: 1.6;
}


/* ==========================
   FOOTER
========================== */

footer {
    padding: 18px 20px;

    color: rgba(255, 255, 255, 0.55);

    text-align: center;
    font-size: 13px;
}


/* ==========================
   MOBILE DESIGN
========================== */

@media (max-width: 820px) {

    .site-header {
        flex-direction: column;

        gap: 13px;

        padding: 16px 20px;
    }

    .logo {
        white-space: normal;
        text-align: center;
    }

    nav {
        flex-wrap: wrap;
    }

    .moon {
        top: 135px;
        right: -15px;

        opacity: 0.45;
    }

    .hero {
        min-height: 340px;

        padding-top: 45px;
    }

}

@media (max-width: 520px) {

    nav {
        gap: 10px 18px;
    }

    nav a {
        font-size: 14px;
    }

    .hero {
        padding-left: 15px;
        padding-right: 15px;
    }

    .reading-area {
        padding-left: 12px;
        padding-right: 12px;
    }

    .tarot-table {
        padding-left: 12px;
        padding-right: 12px;
    }

    .card {
        width: 165px;
    }

    .primary-button {
        min-width: 175px;

        padding: 12px 24px;
    }

}


/* ==========================
   REDUCED MOTION
========================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}
/* ==========================
   READING TYPES
========================== */

.reading-types{

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:12px;

    margin:25px 0;

}

.type-button{

    background:#1d1030;

    color:white;

    border:2px solid #d4af37;

    padding:10px 22px;

    border-radius:40px;

    cursor:pointer;

    transition:0.3s;

}

.type-button:hover{

    background:#d4af37;

    color:#14051e;

}

.type-button.active{

    background:#d4af37;

    color:#14051e;

}
/* ==========================
   CURRENT NAVIGATION PAGE
========================== */

nav a.current-page {
    color: #d4af37;
}


/* ==========================
   TAROT LIBRARY PAGE
========================== */

.cards-page {
    position: relative;
    z-index: 2;

    padding: 45px 20px 70px;
}

.cards-introduction {
    width: min(850px, 100%);

    margin: 0 auto 40px;

    text-align: center;
}

.cards-introduction h1 {
    margin-bottom: 18px;
}

.cards-introduction p:not(.eyebrow) {
    max-width: 700px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.82);

    font-size: 18px;
    line-height: 1.7;
}

.card-library {
    width: min(1300px, 100%);

    margin: 0 auto;
}

.card-library > h2 {
    margin: 0 0 25px;

    color: #f0d77d;

    font-size: clamp(28px, 3vw, 40px);
    text-align: center;
}


/* ==========================
   LIBRARY CONTROLS
========================== */

.library-controls {
    padding: 22px;

    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 20px;

    background: rgba(14, 4, 25, 0.65);

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.3);
}

.search-label {
    display: block;

    margin-bottom: 8px;

    color: #d4af37;

    font-family: "Cinzel", serif;
    font-size: 15px;
}

.card-search {
    width: 100%;

    padding: 14px 18px;

    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 12px;
    outline: none;

    color: #ffffff;
    background: rgba(5, 2, 10, 0.72);

    font-family: "Lato", sans-serif;
    font-size: 16px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.card-search::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.card-search:focus {
    border-color: #f0d77d;

    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.12);
}

.card-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 18px;
}

.filter-button {
    padding: 9px 18px;

    border: 1px solid #d4af37;
    border-radius: 999px;

    color: #ffffff;
    background: transparent;

    cursor: pointer;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.active {
    color: #16071f;
    background: #d4af37;

    transform: translateY(-1px);
}

.card-count {
    margin: 20px 0 14px;

    color: rgba(255, 255, 255, 0.66);

    text-align: center;
}


/* ==========================
   CARD LIBRARY GRID
========================== */

.tarot-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(155px, 1fr)
        );

    gap: 24px;
}

.library-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    padding: 0;

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 15px;

    color: #ffffff;
    background: rgba(17, 5, 29, 0.92);

    cursor: pointer;

    box-shadow:
        0 13px 35px rgba(0, 0, 0, 0.38);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.library-card:hover,
.library-card:focus-visible {
    border-color: #f0d77d;

    transform:
        translateY(-7px)
        scale(1.015);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.48),
        0 0 25px rgba(212, 175, 55, 0.18);
}

.library-card img {
    width: 100%;
    aspect-ratio: 2 / 3;

    object-fit: cover;

    background: #100519;
}

.library-card-information {
    display: flex;
    flex-direction: column;

    min-height: 82px;

    padding: 12px 9px;

    text-align: center;
}

.library-card-group {
    margin-bottom: 5px;

    color: #d4af37;

    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.library-card-name {
    color: #ffffff;

    font-family: "Cinzel", serif;
    font-size: 15px;
    line-height: 1.35;
}

.no-card-results {
    margin: 35px auto;

    color: rgba(255, 255, 255, 0.7);

    font-size: 18px;
    text-align: center;
}


/* ==========================
   CARD MEANING MODAL
========================== */

body.modal-open {
    overflow: hidden;
}

.card-modal {
    position: fixed;
    z-index: 1000;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;
}

.card-modal[hidden] {
    display: none;
}

.modal-background {
    position: absolute;

    inset: 0;

    background: rgba(2, 0, 5, 0.86);

    backdrop-filter: blur(7px);
}

.modal-content {
    position: relative;
    z-index: 1;

    width: min(900px, 100%);
    max-height: calc(100vh - 50px);

    overflow-y: auto;

    padding: 30px;

    border: 1px solid rgba(212, 175, 55, 0.52);
    border-radius: 22px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            #261036,
            #0c0413
        );

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(212, 175, 55, 0.14);
}

.close-modal {
    position: absolute;

    top: 12px;
    right: 15px;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    color: #f0d77d;
    background: rgba(255, 255, 255, 0.06);

    font-size: 31px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.close-modal:hover,
.close-modal:focus-visible {
    color: #170629;
    background: #d4af37;

    transform: rotate(7deg);
}

.modal-card-layout {
    display: grid;

    grid-template-columns:
        minmax(190px, 260px)
        1fr;

    gap: 32px;

    align-items: start;
}

.modal-image-area img {
    width: 100%;

    border: 3px solid #d4af37;
    border-radius: 15px;

    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.55);
}

.modal-card-information {
    padding-top: 12px;
}

#modal-card-group {
    margin: 0 0 7px;

    color: #d4af37;

    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#modal-card-name {
    margin: 0 45px 8px 0;

    color: #f0d77d;

    font-size: clamp(28px, 4vw, 44px);
}

#modal-card-keywords {
    margin: 0 0 24px;

    color: rgba(255, 255, 255, 0.65);

    font-style: italic;
}

.meaning-section {
    margin-top: 18px;
    padding: 18px;

    border-left: 3px solid #d4af37;
    border-radius: 0 12px 12px 0;

    background: rgba(255, 255, 255, 0.04);
}

.meaning-section h3 {
    margin: 0 0 8px;

    color: #e8ce73;

    font-size: 20px;
}

.meaning-section p {
    margin: 0;

    color: rgba(255, 255, 255, 0.87);

    font-size: 16px;
    line-height: 1.65;
}


/* ==========================
   LIBRARY MOBILE DESIGN
========================== */

@media (max-width: 700px) {

    .cards-page {
        padding-top: 35px;
    }

    .tarot-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 15px;
    }

    .modal-card-layout {
        grid-template-columns: 1fr;
    }

    .modal-image-area {
        width: min(210px, 65%);

        margin: 0 auto;
    }

    .modal-card-information {
        text-align: center;
    }

    #modal-card-name {
        margin-right: 0;
    }

    .meaning-section {
        text-align: left;
    }

}

@media (max-width: 390px) {

    .tarot-grid {
        grid-template-columns: 1fr;
    }

    .library-card {
        width: min(220px, 100%);

        margin: 0 auto;
    }

    .modal-content {
        padding: 25px 16px;
    }

}
/* ==========================
   ABOUT PAGE
========================== */

.about-page {
    position: relative;
    z-index: 2;

    width: min(1050px, 100%);

    margin: 0 auto;
    padding: 55px 20px 75px;
}

.about-introduction {
    max-width: 850px;

    margin: 0 auto 45px;

    text-align: center;
}

.about-introduction h1 {
    margin: 0 0 22px;

    color: #f0d77d;

    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.15;
}

.about-opening {
    max-width: 720px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.88);

    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.75;
}


/* ==========================
   ABOUT CONTENT SECTIONS
========================== */

.about-content {
    display: grid;

    gap: 22px;
}

.about-section {
    display: grid;

    grid-template-columns: 75px 1fr;

    gap: 24px;

    align-items: start;

    padding: 28px;

    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(42, 13, 61, 0.58),
            rgba(10, 3, 18, 0.72)
        );

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.28);

    transition:
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.about-section:hover {
    border-color: rgba(212, 175, 55, 0.48);

    transform: translateY(-3px);

    box-shadow:
        0 23px 58px rgba(0, 0, 0, 0.36);
}

.about-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 65px;
    height: 65px;

    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 50%;

    color: #f0d77d;

    background: rgba(212, 175, 55, 0.07);

    font-family: "Cinzel", serif;
    font-size: 31px;

    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.1);
}

.about-section h2 {
    margin: 0 0 12px;

    color: #e8ce73;

    font-size: clamp(23px, 3vw, 31px);
}

.about-section p {
    margin: 0 0 12px;

    color: rgba(255, 255, 255, 0.84);

    font-size: 17px;
    line-height: 1.72;
}

.about-section p:last-child {
    margin-bottom: 0;
}


/* ==========================
   ABOUT NOTICE
========================== */

.about-notice {
    margin-top: 30px;
    padding: 28px;

    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(80, 49, 10, 0.18),
            rgba(19, 6, 29, 0.76)
        );

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.28);
}

.about-notice h2 {
    margin: 0 0 12px;

    color: #f0d77d;

    font-size: clamp(24px, 3vw, 32px);
}

.about-notice p {
    max-width: 790px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.8);

    font-size: 16px;
    line-height: 1.7;
}


/* ==========================
   ABOUT CALL TO ACTION
========================== */

.about-action {
    margin-top: 38px;

    text-align: center;
}

.about-action p {
    margin: 0 auto 18px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 18px;
    line-height: 1.6;
}

.about-button {
    display: inline-block;

    margin-top: 0;

    text-decoration: none;
}


/* ==========================
   ABOUT MOBILE DESIGN
========================== */

@media (max-width: 650px) {

    .about-page {
        padding-top: 40px;
    }

    .about-section {
        grid-template-columns: 1fr;

        gap: 16px;

        padding: 23px;

        text-align: center;
    }

    .about-symbol {
        margin: 0 auto;
    }

    .about-section p {
        text-align: left;
    }

}

@media (max-width: 420px) {

    .about-page {
        padding-left: 13px;
        padding-right: 13px;
    }

    .about-section,
    .about-notice {
        padding: 20px 17px;
    }

}
/* ==========================
   NEW HOMEPAGE
========================== */

.home-hero {
    position: relative;
    z-index: 2;

    min-height: 560px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 75px 20px 65px;
}

.home-hero-content {
    width: min(900px, 100%);

    text-align: center;
}

.home-hero h1 {
    max-width: 900px;

    margin: 0 auto 22px;

    font-size: clamp(43px, 7vw, 78px);
    line-height: 1.08;
}

.home-hero-opening {
    max-width: 720px;

    margin: 0 auto 12px;

    color: rgba(255, 255, 255, 0.94);

    font-family: "Cinzel", serif;
    font-size: clamp(19px, 2.5vw, 25px);
    line-height: 1.55;
}

.home-hero-description {
    max-width: 720px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.72);

    font-size: 17px;
    line-height: 1.72;
}

.home-hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 15px;

    margin-top: 28px;
}

.home-primary-action {
    display: inline-block;

    margin-top: 0;

    text-decoration: none;
}

.secondary-button {
    display: inline-block;

    min-width: 190px;

    padding: 12px 29px;

    border: 1px solid rgba(212, 175, 55, 0.8);
    border-radius: 999px;

    color: #f0d77d;
    background: rgba(20, 5, 30, 0.5);

    font-size: 17px;
    font-weight: 700;
    text-decoration: none;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
    color: #15051f;
    background: #d4af37;

    transform: translateY(-2px);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.38),
        0 0 24px rgba(212, 175, 55, 0.25);
}


/* ==========================
   SHARED SECTION HEADING
========================== */

.section-heading {
    max-width: 780px;

    margin: 0 auto 34px;

    text-align: center;
}

.section-heading h2 {
    margin: 0 0 14px;

    color: #f0d77d;

    font-size: clamp(30px, 4vw, 46px);
}

.section-heading > p:last-child {
    max-width: 690px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.74);

    font-size: 17px;
    line-height: 1.7;
}


/* ==========================
   HOMEPAGE FEATURE CARDS
========================== */

.home-features {
    position: relative;
    z-index: 2;

    padding: 70px 20px 80px;

    background:
        linear-gradient(
            180deg,
            rgba(10, 3, 18, 0.18),
            rgba(28, 8, 41, 0.48),
            rgba(10, 3, 18, 0.18)
        );
}

.feature-grid {
    width: min(1150px, 100%);

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 24px;

    margin: 0 auto;
}

.feature-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 335px;

    padding: 30px 27px;

    overflow: hidden;

    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(45, 14, 65, 0.64),
            rgba(10, 3, 18, 0.8)
        );

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.3);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.feature-card::before {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    top: -70px;
    right: -70px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(212, 175, 55, 0.13),
            transparent 70%
        );
}

.feature-card:hover {
    border-color: rgba(212, 175, 55, 0.5);

    transform: translateY(-6px);

    box-shadow:
        0 28px 65px rgba(0, 0, 0, 0.4),
        0 0 28px rgba(212, 175, 55, 0.08);
}

.feature-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    margin-bottom: 22px;

    border: 1px solid rgba(212, 175, 55, 0.48);
    border-radius: 50%;

    background: rgba(212, 175, 55, 0.06);

    font-size: 29px;

    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.08);
}

.feature-card h3 {
    margin: 0 0 13px;

    color: #e8ce73;

    font-size: 24px;
}

.feature-card p {
    margin: 0 0 25px;

    color: rgba(255, 255, 255, 0.75);

    font-size: 16px;
    line-height: 1.7;
}

.feature-card a {
    margin-top: auto;

    color: #f0d77d;

    font-weight: 700;
    text-decoration: none;
}

.feature-card a span {
    display: inline-block;

    margin-left: 5px;

    transition: transform 0.25s ease;
}

.feature-card a:hover span {
    transform: translateX(5px);
}


/* ==========================
   HOMEPAGE REFLECTION
========================== */

.home-reflection {
    position: relative;
    z-index: 2;

    width: min(1120px, calc(100% - 40px));

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;

    gap: 55px;

    align-items: center;

    margin: 0 auto;
    padding: 90px 0;
}

.reflection-content h2 {
    margin: 0 0 18px;

    color: #f0d77d;

    font-size: clamp(31px, 4vw, 46px);
}

.reflection-content p:not(.eyebrow) {
    margin: 0 0 15px;

    color: rgba(255, 255, 255, 0.77);

    font-size: 17px;
    line-height: 1.75;
}

.text-link {
    display: inline-block;

    margin-top: 9px;

    color: #f0d77d;

    font-weight: 700;
    text-decoration: none;
}

.text-link span {
    display: inline-block;

    margin-left: 5px;

    transition: transform 0.25s ease;
}

.text-link:hover span {
    transform: translateX(5px);
}

.reflection-quote {
    position: relative;

    padding: 45px 35px 35px;

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 26px;

    text-align: center;

    background:
        radial-gradient(
            circle at top,
            rgba(100, 40, 140, 0.24),
            transparent 62%
        ),
        rgba(12, 4, 20, 0.65);

    box-shadow:
        0 25px 65px rgba(0, 0, 0, 0.36);
}

.quote-mark {
    display: block;

    height: 55px;

    color: rgba(240, 215, 125, 0.72);

    font-family: Georgia, serif;
    font-size: 80px;
    line-height: 1;
}

.reflection-quote blockquote {
    margin: 0;

    color: rgba(255, 255, 255, 0.9);

    font-family: "Cinzel", serif;
    font-size: clamp(20px, 2.6vw, 28px);
    line-height: 1.6;
}

.quote-symbol {
    display: block;

    margin-top: 20px;

    color: #d4af37;

    font-size: 25px;
}


/* ==========================
   HOMEPAGE FINAL ACTION
========================== */

.home-call-to-action {
    position: relative;
    z-index: 2;

    padding: 35px 20px 85px;
}

.home-call-to-action > div {
    width: min(950px, 100%);

    margin: 0 auto;
    padding: 48px 30px;

    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 26px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(66, 22, 89, 0.55),
            rgba(12, 4, 20, 0.8)
        );

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);
}

.home-call-to-action h2 {
    margin: 0 0 14px;

    color: #f0d77d;

    font-size: clamp(30px, 4vw, 45px);
}

.home-call-to-action p:not(.eyebrow) {
    max-width: 700px;

    margin: 0 auto 25px;

    color: rgba(255, 255, 255, 0.77);

    font-size: 17px;
    line-height: 1.7;
}


/* ==========================
   FREE READING PAGE
========================== */

.reading-page-introduction {
    position: relative;
    z-index: 2;

    width: min(850px, 100%);

    margin: 0 auto;
    padding: 55px 20px 22px;

    text-align: center;
}

.reading-page-introduction h1 {
    margin: 0 0 17px;

    color: #f0d77d;

    font-size: clamp(39px, 6vw, 62px);
}

.reading-page-introduction p:not(.eyebrow) {
    max-width: 700px;

    margin: 5px auto;

    color: rgba(255, 255, 255, 0.8);

    font-size: 17px;
    line-height: 1.65;
}

.reading-page-area {
    padding-top: 15px;
}

.reading-instruction {
    margin: 0 auto 17px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 15px;
    font-style: italic;
}

.reading-guidance {
    width: min(950px, 100%);

    margin: 58px auto 0;
}

.reading-guidance > h2 {
    margin: 0 0 27px;

    color: #e8ce73;

    font-size: clamp(27px, 3vw, 38px);
}

.guidance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}

.guidance-grid article {
    padding: 24px 20px;

    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 18px;

    background: rgba(22, 7, 31, 0.58);
}

.guidance-grid span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 39px;
    height: 39px;

    margin: 0 auto 13px;

    border: 1px solid rgba(212, 175, 55, 0.52);
    border-radius: 50%;

    color: #f0d77d;

    font-family: "Cinzel", serif;
}

.guidance-grid h3 {
    margin: 0 0 8px;

    color: #e8ce73;

    font-size: 20px;
}

.guidance-grid p {
    margin: 0;

    color: rgba(255, 255, 255, 0.7);

    font-size: 15px;
    line-height: 1.6;
}


/* ==========================
   HOMEPAGE AND READING MOBILE
========================== */

@media (max-width: 850px) {

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 0;
    }

    .home-reflection {
        grid-template-columns: 1fr;

        gap: 35px;

        text-align: center;
    }

    .reflection-content p:not(.eyebrow) {
        text-align: left;
    }

}

@media (max-width: 700px) {

    .home-hero {
        min-height: 520px;

        padding-top: 60px;
    }

    .home-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .home-hero-actions a {
        width: min(280px, 100%);
    }

    .guidance-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {

    .home-hero h1 {
        font-size: 40px;
    }

    .home-features {
        padding-left: 13px;
        padding-right: 13px;
    }

    .feature-card {
        padding: 25px 22px;
    }

    .home-reflection {
        width: calc(100% - 26px);
    }

    .reflection-quote {
        padding: 38px 22px 30px;
    }

    .home-call-to-action {
        padding-left: 13px;
        padding-right: 13px;
    }

    .home-call-to-action > div {
        padding: 38px 20px;
    }

}
/* ==========================
   HOMEPAGE TAROT CARD FAN
========================== */

.tarot-card-fan {
    position: relative;

    width: 390px;
    height: 230px;

    margin: 25px auto 45px;
}

.fan-glow {
    position: absolute;

    width: 300px;
    height: 180px;

    left: 50%;
    top: 50%;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(212, 175, 55, 0.23),
            rgba(126, 57, 166, 0.14) 38%,
            transparent 72%
        );

    filter: blur(14px);

    transform:
        translate(-50%, -45%);

    animation:
        fanGlowPulse 4s ease-in-out infinite;
}

.fan-card {
    position: absolute;

    width: 112px;
    height: 196px;

    left: 50%;
    bottom: 8px;

    overflow: hidden;

    border: 1px solid rgba(240, 215, 125, 0.7);
    border-radius: 8px;

    background: #170720;

    box-shadow:
        0 17px 32px rgba(0, 0, 0, 0.55),
        0 0 17px rgba(212, 175, 55, 0.13);

    transform-origin:
        center 115%;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        filter 0.35s ease;
}

.fan-card img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.fan-card-one {
    z-index: 1;

    transform:
        translateX(-50%)
        translateX(-104px)
        translateY(25px)
        rotate(-24deg);
}

.fan-card-two {
    z-index: 2;

    transform:
        translateX(-50%)
        translateX(-54px)
        translateY(8px)
        rotate(-12deg);
}

.fan-card-three {
    z-index: 5;

    transform:
        translateX(-50%)
        translateY(-1px)
        rotate(0deg);
}

.fan-card-four {
    z-index: 2;

    transform:
        translateX(-50%)
        translateX(54px)
        translateY(8px)
        rotate(12deg);
}

.fan-card-five {
    z-index: 1;

    transform:
        translateX(-50%)
        translateX(104px)
        translateY(25px)
        rotate(24deg);
}

.tarot-card-fan:hover .fan-card {
    box-shadow:
        0 21px 38px rgba(0, 0, 0, 0.62),
        0 0 25px rgba(212, 175, 55, 0.28);

    filter: brightness(1.07);
}

.tarot-card-fan:hover .fan-card-one {
    transform:
        translateX(-50%)
        translateX(-112px)
        translateY(19px)
        rotate(-27deg);
}

.tarot-card-fan:hover .fan-card-two {
    transform:
        translateX(-50%)
        translateX(-59px)
        translateY(3px)
        rotate(-14deg);
}

.tarot-card-fan:hover .fan-card-three {
    transform:
        translateX(-50%)
        translateY(-10px)
        rotate(0deg);
}

.tarot-card-fan:hover .fan-card-four {
    transform:
        translateX(-50%)
        translateX(59px)
        translateY(3px)
        rotate(14deg);
}

.tarot-card-fan:hover .fan-card-five {
    transform:
        translateX(-50%)
        translateX(112px)
        translateY(19px)
        rotate(27deg);
}

@keyframes fanGlowPulse {

    0%,
    100% {
        opacity: 0.55;

        transform:
            translate(-50%, -45%)
            scale(0.94);
    }

    50% {
        opacity: 1;

        transform:
            translate(-50%, -45%)
            scale(1.08);
    }

}


/* ==========================
   CARD FAN MOBILE DESIGN
========================== */

@media (max-width: 550px) {

   .tarot-card-fan {
    width: 300px;
    height: 190px;

    margin: 22px auto 38px;
}

    .fan-card {
        width: 88px;
        height: 154px;
    }

    .fan-card-one {
        transform:
            translateX(-50%)
            translateX(-80px)
            translateY(24px)
            rotate(-24deg);
    }

    .fan-card-two {
        transform:
            translateX(-50%)
            translateX(-42px)
            translateY(8px)
            rotate(-12deg);
    }

    .fan-card-three {
        transform:
            translateX(-50%)
            translateY(0)
            rotate(0deg);
    }

    .fan-card-four {
        transform:
            translateX(-50%)
            translateX(42px)
            translateY(8px)
            rotate(12deg);
    }

    .fan-card-five {
        transform:
            translateX(-50%)
            translateX(80px)
            translateY(24px)
            rotate(24deg);
    }

    .tarot-card-fan:hover .fan-card-one {
        transform:
            translateX(-50%)
            translateX(-85px)
            translateY(20px)
            rotate(-26deg);
    }

    .tarot-card-fan:hover .fan-card-two {
        transform:
            translateX(-50%)
            translateX(-45px)
            translateY(4px)
            rotate(-14deg);
    }

    .tarot-card-fan:hover .fan-card-three {
        transform:
            translateX(-50%)
            translateY(-7px)
            rotate(0deg);
    }

    .tarot-card-fan:hover .fan-card-four {
        transform:
            translateX(-50%)
            translateX(45px)
            translateY(4px)
            rotate(14deg);
    }

    .tarot-card-fan:hover .fan-card-five {
        transform:
            translateX(-50%)
            translateX(85px)
            translateY(20px)
            rotate(26deg);
    }

}

@media (prefers-reduced-motion: reduce) {

    .fan-glow {
        animation: none;
    }

    .fan-card {
        transition: none;
    }

}
/* ==========================
   ADVERTISEMENT AREAS
========================== */

.advertisement-section {
    position: relative;
    z-index: 2;

    padding: 35px 20px;
}

.advertisement-container {
    width: min(1050px, 100%);

    margin: 0 auto;

    text-align: center;
}

.advertisement-label {
    margin: 0 0 8px;

    color: rgba(255, 255, 255, 0.38);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.advertisement-slot {
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto;

    overflow: hidden;

    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(27, 8, 39, 0.5),
            rgba(10, 3, 17, 0.7)
        );

    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.18);

    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}

.advertisement-slot p {
    margin: 0;

    color: rgba(255, 255, 255, 0.25);

    font-size: 13px;
    letter-spacing: 0.7px;
}

.advertisement-wide {
    width: min(970px, 100%);
    min-height: 110px;
}


/* ==========================
   READING PAGE ADVERTISEMENT
========================== */

.reading-advertisement {
    width: min(730px, 100%);

    max-height: 0;

    margin: 0 auto;

    overflow: hidden;

    opacity: 0;

    visibility: hidden;

    transform: translateY(15px);

    transition:
        max-height 0.55s ease,
        margin 0.55s ease,
        padding 0.55s ease,
        opacity 0.45s ease,
        transform 0.45s ease,
        visibility 0s linear 0.55s;
}

.reading-advertisement.visible {
    max-height: 250px;

    margin-top: 35px;
    padding-top: 5px;

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    transition:
        max-height 0.55s ease,
        margin 0.55s ease,
        padding 0.55s ease,
        opacity 0.45s ease 0.15s,
        transform 0.45s ease 0.15s,
        visibility 0s;
}

.advertisement-reading {
    width: min(728px, 100%);
    min-height: 100px;
}


/* ==========================
   CARDS PAGE ADVERTISEMENT
========================== */

.cards-advertisement {
    padding-top: 10px;
    padding-bottom: 38px;
}


/* ==========================
   ADVERTISEMENT MOBILE DESIGN
========================== */

@media (max-width: 700px) {

    .advertisement-section {
        padding-left: 13px;
        padding-right: 13px;
    }

    .advertisement-wide {
        min-height: 100px;
    }

    .advertisement-reading {
        min-height: 100px;
    }

}

@media (max-width: 420px) {

    .advertisement-slot {
        border-radius: 9px;
    }

    .advertisement-wide,
    .advertisement-reading {
        min-height: 90px;
    }

}
/* =========================================
   MAGICAL ANIMATED BACKGROUND
========================================= */

html {
    background: #08030f;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(94, 47, 129, 0.27),
            transparent 45%
        ),
        radial-gradient(
            circle at 15% 35%,
            rgba(75, 30, 103, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 65%,
            rgba(93, 42, 119, 0.13),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            #100519 0%,
            #09030f 48%,
            #050209 100%
        );
}

/*
This layer creates the small stars.
It stays behind all of the website content.
*/

body::before {
    content: "";

    position: fixed;
    inset: 0;

    z-index: 0;

    pointer-events: none;

    background-image:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.85) 0 1px,
            transparent 1.4px
        ),
        radial-gradient(
            circle,
            rgba(224, 194, 255, 0.65) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle,
            rgba(255, 224, 149, 0.6) 0 1px,
            transparent 1.5px
        );

    background-size:
        110px 110px,
        170px 170px,
        230px 230px;

    background-position:
        10px 20px,
        55px 75px,
        90px 30px;

    opacity: 0.55;

    animation:
        star-drift 70s linear infinite,
        star-flicker 6s ease-in-out infinite alternate;
}

/*
This layer creates the slowly moving mist.
*/

body::after {
    content: "";

    position: fixed;
    inset: -15%;

    z-index: 0;

    pointer-events: none;

    background:
        radial-gradient(
            ellipse at 20% 35%,
            rgba(129, 73, 157, 0.12),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 75% 60%,
            rgba(88, 45, 126, 0.12),
            transparent 45%
        ),
        radial-gradient(
            ellipse at 50% 90%,
            rgba(151, 94, 154, 0.07),
            transparent 38%
        );

    filter: blur(18px);

    animation: mist-drift 24s ease-in-out infinite alternate;
}

/*
Keep the actual website above the animated background.
*/

.page {
    position: relative;
    z-index: 1;
}

/* Star movement */

@keyframes star-drift {

    from {
        background-position:
            10px 20px,
            55px 75px,
            90px 30px;
    }

    to {
        background-position:
            10px 240px,
            55px 415px,
            90px 490px;
    }

}

/* Very gentle star brightness change */

@keyframes star-flicker {

    0% {
        opacity: 0.38;
    }

    50% {
        opacity: 0.58;
    }

    100% {
        opacity: 0.46;
    }

}

/* Slow mist movement */

@keyframes mist-drift {

    0% {
        transform:
            translate3d(-2%, -1%, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(2%, 1%, 0)
            scale(1.04);
    }

    100% {
        transform:
            translate3d(-1%, 3%, 0)
            scale(1.02);
    }

}


/* =========================================
   ANIMATED MOON
========================================= */

.moon {
    filter:
        drop-shadow(
            0 0 14px rgba(232, 210, 255, 0.34)
        )
        drop-shadow(
            0 0 34px rgba(159, 98, 192, 0.24)
        );

    animation: moon-breathe 5s ease-in-out infinite;
}

@keyframes moon-breathe {

    0%,
    100% {
        filter:
            drop-shadow(
                0 0 12px rgba(232, 210, 255, 0.28)
            )
            drop-shadow(
                0 0 28px rgba(159, 98, 192, 0.18)
            );

        transform: scale(1);
    }

    50% {
        filter:
            drop-shadow(
                0 0 20px rgba(239, 221, 255, 0.48)
            )
            drop-shadow(
                0 0 48px rgba(168, 101, 205, 0.32)
            );

        transform: scale(1.015);
    }

}


/* =========================================
   ACCESSIBILITY
========================================= */

/*
People who disable animations on their device
will see the same design without movement.
*/

@media (prefers-reduced-motion: reduce) {

    body::before,
    body::after,
    .moon {
        animation: none;
    }

}

/* =========================================
   READING TEXT REVEAL
========================================= */

.reading-result {
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        filter 0.5s ease;
}

.reading-result.preparing-reveal {
    opacity: 0;

    transform: translateY(18px);

    filter: blur(4px);
}

.reading-result.show-reading {
    animation:
        reading-text-reveal 0.85s
        cubic-bezier(0.22, 1, 0.36, 1)
        both;
}

/*
Reveal individual pieces of reading text
one after another.
*/

.reading-result.show-reading > * {
    opacity: 0;

    animation:
        reading-line-reveal 0.65s
        ease forwards;
}

.reading-result.show-reading > *:nth-child(1) {
    animation-delay: 0.05s;
}

.reading-result.show-reading > *:nth-child(2) {
    animation-delay: 0.15s;
}

.reading-result.show-reading > *:nth-child(3) {
    animation-delay: 0.25s;
}

.reading-result.show-reading > *:nth-child(4) {
    animation-delay: 0.35s;
}

.reading-result.show-reading > *:nth-child(5) {
    animation-delay: 0.45s;
}

.reading-result.show-reading > *:nth-child(6) {
    animation-delay: 0.55s;
}

/* =========================================
   MAGICAL REVEAL KEYFRAMES
========================================= */

@keyframes magical-card-shuffle {

    0% {
        transform:
            translateY(0)
            rotate(0deg)
            scale(1);
    }

    18% {
        transform:
            translateY(-7px)
            translateX(-8px)
            rotate(-2.5deg)
            scale(1.015);
    }

    38% {
        transform:
            translateY(-12px)
            translateX(9px)
            rotate(2.5deg)
            scale(1.025);
    }

    58% {
        transform:
            translateY(-8px)
            translateX(-5px)
            rotate(-1.5deg)
            scale(1.02);
    }

    78% {
        transform:
            translateY(-15px)
            translateX(4px)
            rotate(1deg)
            scale(1.035);
    }

    100% {
        transform:
            translateY(-10px)
            rotate(0deg)
            scale(1.025);
    }

}

@keyframes magical-card-rise {

    0% {
        transform:
            translateY(-10px)
            rotate(0deg)
            scale(1.025);
    }

    55% {
        transform:
            translateY(-32px)
            rotate(-1.5deg)
            scale(1.055);
    }

    100% {
        transform:
            translateY(-18px)
            rotate(0deg)
            scale(1.035);
    }

}

@keyframes revealed-card-float {

    0%,
    100% {
        transform:
            translateY(-18px)
            rotate(0deg)
            scale(1.035);
    }

    50% {
        transform:
            translateY(-24px)
            rotate(0.4deg)
            scale(1.045);
    }

}

@keyframes card-aura-reveal {

    0% {
        opacity: 0.25;

        transform:
            translate(-50%, -50%)
            scale(0.72);
    }

    55% {
        opacity: 0.95;

        transform:
            translate(-50%, -50%)
            scale(1.18);
    }

    100% {
        opacity: 0.58;

        transform:
            translate(-50%, -50%)
            scale(1);
    }

}

@keyframes card-aura-breathe {

    0%,
    100% {
        opacity: 0.38;

        transform:
            translate(-50%, -50%)
            scale(0.9);
    }

    50% {
        opacity: 0.62;

        transform:
            translate(-50%, -50%)
            scale(1.06);
    }

}

@keyframes reading-text-reveal {

    from {
        opacity: 0;

        transform: translateY(22px);

        filter: blur(5px);
    }

    to {
        opacity: 1;

        transform: translateY(0);

        filter: blur(0);
    }

}

@keyframes reading-line-reveal {

    from {
        opacity: 0;

        transform: translateY(12px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}

/* =========================================
   MOBILE ADJUSTMENTS
========================================= */

@media (max-width: 700px) {

    .card-container::before,
    .tarot-card-container::before,
    .card-stage::before {
        width: 225px;
        height: 225px;
    }

}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .tarot-card,
    .card,
    .card-inner,
    .reading-result,
    .reading-result > *,
    .card-container::before,
    .tarot-card-container::before,
    .card-stage::before {
        animation: none !important;
        transition: none !important;
    }

}
/* =========================================
   TYPOGRAPHY POLISH
========================================= */

body {
    color: rgba(255, 255, 255, 0.86);
    font-family: "Lato", sans-serif;
    line-height: 1.7;
}

h1,
h2,
h3,
.logo {
    font-family: "Cinzel", serif;
}

h1 {
    margin-bottom: 20px;

    color: #f2dfaa;

    font-size: clamp(2.1rem, 5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;

    text-shadow:
        0 0 18px rgba(226, 190, 100, 0.14);
}

h2 {
    color: #ead7a0;

    font-size: clamp(1.55rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.025em;
}

h3 {
    color: #ead7a0;

    line-height: 1.35;
    letter-spacing: 0.02em;
}

p {
    max-width: 760px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 1rem;
    line-height: 1.75;
}

.eyebrow {
    margin-bottom: 10px;

    color: rgba(232, 199, 119, 0.82);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.reading-introduction,
.about-introduction,
.home-hero {
    text-align: center;
}

.reading-introduction p,
.about-introduction p,
.home-hero p {
    margin-left: auto;
    margin-right: auto;
}


/* =========================================
   BUTTON POLISH
========================================= */

.primary-button,
.type-button,
button,
.home-hero a,
.about-button {
    position: relative;

    border-radius: 999px;

    font-family: "Lato", sans-serif;
    font-weight: 700;
    letter-spacing: 0.035em;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        color 0.22s ease;
}

.primary-button {
    min-width: 190px;
    padding: 14px 28px;

    border: 1px solid rgba(236, 202, 120, 0.65);

    background:
        linear-gradient(
            135deg,
            rgba(133, 83, 156, 0.95),
            rgba(90, 51, 116, 0.96)
        );

    color: #fff7df;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.3),
        0 0 18px rgba(195, 138, 218, 0.12);
}

.primary-button:hover {
    transform: translateY(-2px);

    border-color: rgba(244, 216, 147, 0.9);

    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.38),
        0 0 24px rgba(210, 158, 229, 0.22);
}

.primary-button:active {
    transform: translateY(0) scale(0.985);
}

.primary-button:focus-visible,
.type-button:focus-visible,
nav a:focus-visible {
    outline: 2px solid #e8c777;
    outline-offset: 4px;
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.type-button {
    padding: 10px 18px;

    border: 1px solid rgba(226, 195, 122, 0.18);

    background: rgba(255, 255, 255, 0.035);

    color: rgba(255, 255, 255, 0.72);
}

.type-button:hover {
    transform: translateY(-1px);

    border-color: rgba(226, 195, 122, 0.42);

    color: #fff5d8;
}

.type-button.active {
    border-color: rgba(236, 203, 124, 0.72);

    background:
        linear-gradient(
            135deg,
            rgba(129, 78, 151, 0.72),
            rgba(75, 39, 97, 0.78)
        );

    color: #fff6dc;

    box-shadow:
        0 0 18px rgba(182, 120, 210, 0.16);
}


/* =========================================
   NAVIGATION POLISH
========================================= */

.site-header nav a {
    position: relative;

    padding: 8px 4px;

    color: rgba(255, 255, 255, 0.72);

    text-decoration: none;

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.site-header nav a::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 0;

    width: 0;
    height: 1px;

    background: #e8c777;

    transform: translateX(-50%);

    transition: width 0.22s ease;
}

.site-header nav a:hover,
.site-header nav a.current-page {
    color: #f3dfaa;

    text-shadow:
        0 0 12px rgba(232, 199, 119, 0.12);
}

.site-header nav a:hover::after,
.site-header nav a.current-page::after {
    width: 100%;
}


/* =========================================
   SECTION SPACING
========================================= */

main > section {
    margin-bottom: clamp(42px, 7vw, 90px);
}
.about-content {
    margin-bottom: 30px;
}

.about-content .about-section {
    margin-bottom: 0;
}

.reading-result,
.about-section,
.home-reflection,
.reading-reminder {
    padding: clamp(22px, 4vw, 38px);

    border: 1px solid rgba(224, 190, 111, 0.12);
    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(30, 12, 42, 0.68),
            rgba(10, 4, 17, 0.72)
        );

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.22);
}


/* =========================================
   MOBILE POLISH
========================================= */

@media (max-width: 700px) {

    body {
        line-height: 1.65;
    }

    h1 {
        font-size: clamp(1.9rem, 10vw, 2.8rem);
    }

    h2 {
        font-size: clamp(1.4rem, 7vw, 2rem);
    }

    .primary-button {
        width: min(100%, 300px);
    }

    .reading-type-buttons {
        gap: 10px;
    }

    .type-button {
        flex: 1 1 calc(50% - 10px);
    }

}
/* =========================================
   READING PAGE CARD AREA POLISH
========================================= */

.reading-experience {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
}

.card-container {
    position: relative;
    isolation: isolate;

    display: flex;
    align-items: center;
    justify-content: center;

    width: min(100%, 430px);
    min-height: 420px;

    margin: 20px auto 28px;
}

/*
Glow behind the card.

This does not animate or transform the card itself,
so it will not interfere with the flip.
*/

.card-container::before {
    content: "";

    position: absolute;
    left: 50%;
    top: 50%;

    width: 330px;
    height: 330px;

    z-index: -2;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(232, 197, 111, 0.18) 0%,
            rgba(150, 91, 184, 0.14) 34%,
            rgba(86, 39, 111, 0.08) 52%,
            transparent 72%
        );

    filter: blur(5px);

    transform: translate(-50%, -50%);

    animation: safe-card-glow 5s ease-in-out infinite;
}

/*
Soft decorative ring behind the card.
*/

.card-container::after {
    content: "";

    position: absolute;
    left: 50%;
    top: 50%;

    width: 280px;
    height: 280px;

    z-index: -1;

    border: 1px solid rgba(226, 194, 115, 0.13);
    border-radius: 50%;

    box-shadow:
        0 0 28px rgba(196, 131, 220, 0.09),
        inset 0 0 28px rgba(226, 194, 115, 0.04);

    transform: translate(-50%, -50%);
}

@keyframes safe-card-glow {

    0%,
    100% {
        opacity: 0.58;
        filter: blur(5px);
    }

    50% {
        opacity: 0.92;
        filter: blur(8px);
    }

}


/* =========================================
   READING CONTROLS POLISH
========================================= */

.reading-controls {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 13px;

    margin: 0 auto 34px;

    text-align: center;
}

.shuffle-message {
    min-height: 26px;
    margin: 0;

    color: rgba(236, 215, 165, 0.7);

    font-size: 0.92rem;
    font-style: italic;
    letter-spacing: 0.025em;
}


/* =========================================
   READING RESULT POLISH
========================================= */

.reading-result {
    position: relative;

    width: min(760px, 100%);
    margin: 38px auto 0;

    overflow: hidden;

    text-align: left;
}

.reading-result::before {
    content: "";

    position: absolute;
    left: 22%;
    right: 22%;
    top: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(236, 201, 119, 0.72),
            transparent
        );
}

.card-orientation {
    width: fit-content;

    margin: 0 auto 10px;
    padding: 5px 13px;

    border: 1px solid rgba(232, 198, 118, 0.22);
    border-radius: 999px;

    color: rgba(244, 221, 166, 0.82);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.reading-result h2,
.reading-result #card-name {
    margin: 0 0 8px;

    text-align: center;
}

.card-category {
    margin: 0 auto 25px;

    color: rgba(214, 180, 228, 0.82);

    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reading-keywords,
.reading-message {
    margin-top: 22px;
    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.reading-keywords h3,
.reading-message h3 {
    margin: 0 0 8px;

    color: rgba(240, 216, 158, 0.94);

    font-size: 1rem;
}

.reading-keywords p,
.reading-message p {
    margin: 0;

    color: rgba(255, 255, 255, 0.76);
}

.reading-reflection {
    margin: 26px 0 0;
    padding: 16px 18px;

    border-left: 2px solid rgba(232, 198, 118, 0.52);

    background: rgba(255, 255, 255, 0.025);

    color: rgba(255, 255, 255, 0.62);

    font-size: 0.9rem;
    font-style: italic;
}


/* =========================================
   READING TYPE AREA POLISH
========================================= */

.reading-type-section {
    width: min(760px, 100%);

    margin: 0 auto 24px;

    text-align: center;
}

.reading-type-section h2 {
    margin-bottom: 20px;
}

.reading-type-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 11px;
}

.reading-focus {
    width: min(680px, 100%);

    margin: 0 auto 10px;
    padding: 14px 20px;

    border: 1px solid rgba(222, 190, 115, 0.09);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.018);

    text-align: center;
}

.reading-focus p {
    margin: 0 auto;

    color: rgba(255, 255, 255, 0.67);

    font-style: italic;
}


/* =========================================
   MOBILE READING POLISH
========================================= */

@media (max-width: 700px) {

    .reading-experience {
        width: min(100% - 22px, 920px);
    }

    .card-container {
        min-height: 360px;
        margin-top: 10px;
    }

    .card-container::before {
        width: 260px;
        height: 260px;
    }

    .card-container::after {
        width: 225px;
        height: 225px;
    }

    .reading-result {
        margin-top: 30px;
        padding: 24px 19px;
    }

    .reading-keywords,
    .reading-message {
        margin-top: 18px;
        padding-top: 17px;
    }

}


/* Keep animations disabled when requested */

@media (prefers-reduced-motion: reduce) {

    .card-container::before {
        animation: none;
    }

}
/* =========================================
   HOMEPAGE FEATURE CARD POLISH
========================================= */

.home-features {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;
}

.feature-card {
    position: relative;

    min-height: 265px;
    padding: 30px 26px;

    overflow: hidden;

    border: 1px solid rgba(232, 199, 119, 0.12);
    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(34, 14, 47, 0.78),
            rgba(12, 5, 20, 0.82)
        );

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.24);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.feature-card::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(197, 132, 220, 0.12),
            transparent 34%
        );

    opacity: 0;

    transition: opacity 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);

    border-color: rgba(232, 199, 119, 0.28);

    box-shadow:
        0 24px 50px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(174, 109, 199, 0.08);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin-bottom: 22px;

    border: 1px solid rgba(232, 199, 119, 0.24);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(135, 80, 157, 0.28),
            rgba(71, 34, 93, 0.2)
        );

    color: #eedaa1;

    font-size: 1.45rem;

    box-shadow:
        0 0 18px rgba(193, 127, 217, 0.09);
}

.feature-card h3 {
    margin: 0 0 12px;

    font-size: 1.25rem;
}

.feature-card p {
    margin: 0 0 22px;

    color: rgba(255, 255, 255, 0.7);
}

.feature-card a {
    position: absolute;
    left: 26px;
    bottom: 26px;

    color: #ead39a;

    font-weight: 700;
    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.feature-card a:hover {
    color: #fff0c4;

    transform: translateX(3px);
}


/* =========================================
   HOMEPAGE REFLECTION POLISH
========================================= */

.home-reflection {
    width: min(980px, calc(100% - 32px));

    margin-left: auto;
    margin-right: auto;

    text-align: center;
}

.home-reflection p {
    margin-left: auto;
    margin-right: auto;
}


/* =========================================
   ADVERTISEMENT PLACEHOLDER POLISH
========================================= */

.advertisement-container {
    position: relative;
}

.advertisement-slot {
    position: relative;

    min-height: 105px;

    overflow: hidden;
}

.advertisement-slot::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            110deg,
            transparent 20%,
            rgba(255, 255, 255, 0.025) 45%,
            transparent 70%
        );

    transform: translateX(-100%);

    animation:
        advertisement-soft-shine
        8s ease-in-out infinite;
}

@keyframes advertisement-soft-shine {

    0%,
    65% {
        transform: translateX(-100%);
    }

    80%,
    100% {
        transform: translateX(100%);
    }

}


/* =========================================
   MOBILE HOMEPAGE POLISH
========================================= */

@media (max-width: 900px) {

    .feature-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 650px) {

    .home-features {
        width: min(100% - 22px, 1120px);
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        min-height: 240px;
        padding: 25px 22px;
    }

    .feature-card a {
        left: 22px;
        bottom: 22px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .advertisement-slot::before {
        animation: none;
    }

}
/* =========================================
   FOOTER POLISH
========================================= */

.site-footer,
footer {
    position: relative;

    width: 100%;
    margin-top: clamp(60px, 9vw, 110px);
    padding: 34px 24px 28px;

    border-top: 1px solid rgba(232, 199, 119, 0.12);

    background:
        linear-gradient(
            180deg,
            rgba(14, 5, 22, 0.2),
            rgba(7, 2, 12, 0.82)
        );

    text-align: center;
}

.site-footer::before,
footer::before {
    content: "";

    position: absolute;
    top: -1px;
    left: 50%;

    width: min(420px, 70%);
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(232, 199, 119, 0.55),
            transparent
        );

    transform: translateX(-50%);
}

.site-footer p,
footer p {
    margin: 0 auto;

    color: rgba(255, 255, 255, 0.48);

    font-size: 0.82rem;
    line-height: 1.65;
    letter-spacing: 0.035em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 10px 24px;

    margin-bottom: 16px;
}

.footer-links a,
.site-footer a,
footer a {
    color: rgba(232, 211, 160, 0.72);

    font-size: 0.85rem;
    text-decoration: none;

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.footer-links a:hover,
.site-footer a:hover,
footer a:hover {
    color: #f5dfa8;

    text-shadow:
        0 0 12px rgba(232, 199, 119, 0.15);
}


/* =========================================
   HEADER ALIGNMENT POLISH
========================================= */

.site-header {
    position: relative;
    z-index: 20;

    width: 100%;
    padding: 18px clamp(18px, 4vw, 52px);

    border-bottom: 1px solid rgba(232, 199, 119, 0.08);

    background:
        linear-gradient(
            180deg,
            rgba(12, 4, 20, 0.84),
            rgba(12, 4, 20, 0.4)
        );

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-header .header-inner,
.site-header .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(1180px, 100%);
    margin: 0 auto;

    gap: 28px;
}

.logo {
    color: #eedaa1;

    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.055em;
    text-decoration: none;

    text-shadow:
        0 0 18px rgba(232, 199, 119, 0.1);
}

.site-header nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: clamp(15px, 2.5vw, 30px);
}


/* =========================================
   PAGE EDGE SPACING
========================================= */

main {
    width: 100%;
    overflow: hidden;
}

main > section:first-child {
    padding-top: clamp(34px, 6vw, 76px);
}

main > section:last-child {
    margin-bottom: 0;
}


/* =========================================
   MOBILE NAVIGATION POLISH
========================================= */

@media (max-width: 700px) {

    .site-header {
        padding: 15px 14px;
    }

    .site-header .header-inner,
    .site-header .nav-container {
        flex-direction: column;

        gap: 13px;
    }

    .logo {
        max-width: 100%;

        text-align: center;
    }

    .site-header nav {
        width: 100%;

        justify-content: center;
        flex-wrap: wrap;

        gap: 5px 17px;
    }

    .site-header nav a {
        padding: 6px 2px;

        font-size: 0.84rem;
    }

    .site-footer,
    footer {
        margin-top: 55px;
        padding: 28px 18px 24px;
    }

    .footer-links {
        gap: 8px 18px;
    }

}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 390px) {

    .site-header nav {
        gap: 4px 12px;
    }

    .site-header nav a {
        font-size: 0.78rem;
    }

    .logo {
        font-size: 0.95rem;
    }

}
/* =========================================
   TAROT LIBRARY PAGE POLISH
========================================= */

.cards-page,
.card-library,
.tarot-library {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.cards-introduction,
.library-introduction {
    width: min(780px, 100%);
    margin: 0 auto clamp(38px, 6vw, 70px);

    text-align: center;
}

.cards-introduction p,
.library-introduction p {
    margin-left: auto;
    margin-right: auto;
}


/* =========================================
   CARD SUIT SECTIONS
========================================= */

.card-section,
.suit-section,
.arcana-section {
    width: 100%;
    margin-bottom: clamp(54px, 8vw, 96px);
}

.card-section > h2,
.suit-section > h2,
.arcana-section > h2 {
    position: relative;

    width: fit-content;
    margin: 0 auto 34px;
    padding: 0 26px 13px;

    text-align: center;
}

.card-section > h2::after,
.suit-section > h2::after,
.arcana-section > h2::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 0;

    width: 100%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(232, 199, 119, 0.7),
            transparent
        );

    transform: translateX(-50%);
}


/* =========================================
   TAROT CARD GRID
========================================= */

.cards-grid,
.card-grid,
.tarot-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(155px, 1fr));

    gap: clamp(17px, 2.5vw, 27px);

    width: 100%;
}

.library-card,
.tarot-library-card,
.card-item {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 12px 12px 17px;

    overflow: hidden;

    border: 1px solid rgba(232, 199, 119, 0.11);
    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(34, 14, 47, 0.75),
            rgba(11, 4, 18, 0.86)
        );

    box-shadow:
        0 15px 34px rgba(0, 0, 0, 0.23);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.library-card::before,
.tarot-library-card::before,
.card-item::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(203, 144, 224, 0.11),
            transparent 43%
        );

    opacity: 0;

    transition: opacity 0.25s ease;
}

.library-card:hover,
.tarot-library-card:hover,
.card-item:hover {
    transform: translateY(-6px);

    border-color: rgba(232, 199, 119, 0.3);

    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.34),
        0 0 22px rgba(184, 119, 210, 0.08);
}

.library-card:hover::before,
.tarot-library-card:hover::before,
.card-item:hover::before {
    opacity: 1;
}


/* =========================================
   CARD IMAGES
========================================= */

.library-card img,
.tarot-library-card img,
.card-item img {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;
    height: auto;

    border: 1px solid rgba(236, 208, 140, 0.13);
    border-radius: 9px;

    box-shadow:
        0 9px 22px rgba(0, 0, 0, 0.36);

    transition:
        filter 0.25s ease;
}

.library-card:hover img,
.tarot-library-card:hover img,
.card-item:hover img {
    filter: brightness(1.04);
}


/* =========================================
   CARD TITLES AND TEXT
========================================= */

.library-card h3,
.tarot-library-card h3,
.card-item h3 {
    position: relative;
    z-index: 1;

    margin: 16px 4px 5px;

    color: #ecd79f;

    font-size: 0.96rem;
    line-height: 1.35;
    text-align: center;
}

.library-card p,
.tarot-library-card p,
.card-item p {
    position: relative;
    z-index: 1;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.6);

    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}


/* =========================================
   CARD LINKS
========================================= */

.library-card a,
.tarot-library-card a,
.card-item a {
    color: inherit;
    text-decoration: none;
}

.library-card a:focus-visible,
.tarot-library-card a:focus-visible,
.card-item a:focus-visible {
    outline: 2px solid #e8c777;
    outline-offset: 5px;
    border-radius: 10px;
}


/* =========================================
   LIBRARY DIVIDER
========================================= */

.library-divider,
.cards-divider {
    width: min(620px, 70%);
    height: 1px;

    margin: 0 auto clamp(48px, 7vw, 78px);

    border: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(232, 199, 119, 0.22),
            transparent
        );
}


/* =========================================
   TABLET LIBRARY
========================================= */

@media (max-width: 900px) {

    .cards-grid,
    .card-grid,
    .tarot-grid {
        grid-template-columns:
            repeat(auto-fit, minmax(140px, 1fr));
    }

}


/* =========================================
   MOBILE LIBRARY
========================================= */

@media (max-width: 600px) {

    .cards-page,
    .card-library,
    .tarot-library {
        width: min(100% - 22px, 1180px);
    }

    .cards-grid,
    .card-grid,
    .tarot-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 13px;
    }

    .library-card,
    .tarot-library-card,
    .card-item {
        padding: 8px 8px 13px;
        border-radius: 12px;
    }

    .library-card h3,
    .tarot-library-card h3,
    .card-item h3 {
        margin-top: 12px;
        font-size: 0.82rem;
    }

    .library-card p,
    .tarot-library-card p,
    .card-item p {
        font-size: 0.7rem;
    }

}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 360px) {

    .cards-grid,
    .card-grid,
    .tarot-grid {
        grid-template-columns: 1fr;

        width: min(220px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

}


/* Respect reduced-motion settings */

@media (prefers-reduced-motion: reduce) {

    .library-card,
    .tarot-library-card,
    .card-item,
    .library-card img,
    .tarot-library-card img,
    .card-item img {
        transition: none;
    }

}
/* Fix reading card proportions on phones */
@media (max-width: 520px) {
    .reading-page-area .card {
        width: 200px;
        height: 350px;
        max-width: 70vw;
    }

    .reading-page-area #card-image,
    .reading-page-area #card-cover-image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}
/* =========================================
   GUIDE NAVIGATION
========================================= */

.guide-navigation {
    width: min(100%, 960px);
    margin: 3rem auto 1rem;
}

.related-guides {
    margin-bottom: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.related-guides h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: center;
}

.related-guides-introduction {
    max-width: 650px;
    margin: 0 auto 1.5rem;
    text-align: center;
    opacity: 0.85;
}

.related-guides-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.related-guide-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.16);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.related-guide-card:hover,
.related-guide-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 140, 0.45);
    background: rgba(255, 255, 255, 0.07);
}

.related-guide-icon {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.6rem;
}

.related-guide-card h3 {
    margin: 0 0 0.6rem;
    font-family: "Cinzel", serif;
    font-size: 1rem;
}

.related-guide-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.82;
}

.previous-next-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.guide-navigation-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 110px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.guide-navigation-link:hover,
.guide-navigation-link:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 140, 0.45);
    background: rgba(255, 255, 255, 0.07);
}

.guide-navigation-link.next {
    text-align: right;
}

.guide-navigation-direction {
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.65;
}

.guide-navigation-title {
    font-family: "Cinzel", serif;
    font-weight: 600;
    line-height: 1.4;
}

.guide-navigation-link.single-next {
    grid-column: 2;
}

.guide-navigation-link.single-previous {
    grid-column: 1;
}

@media (max-width: 760px) {

    .related-guides {
        padding: 1.4rem;
    }

    .related-guides-grid {
        grid-template-columns: 1fr;
    }

    .previous-next-navigation {
        grid-template-columns: 1fr;
    }

    .guide-navigation-link,
    .guide-navigation-link.next {
        min-height: auto;
        text-align: left;
    }

    .guide-navigation-link.single-next,
    .guide-navigation-link.single-previous {
        grid-column: 1;
    }
}
