

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f7f5f1;
    color: #222;
}


/* =========================
   HERO
========================= */

.hero {
    position: relative;
    min-height: 75vh;

    background-image: url("img/TcBanner.webp");
    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;

    padding: 2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.85rem;
    margin-top: .8rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.9;
    font-weight: 600;
    letter-spacing: -4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin: 1.5rem 0 2rem;
}

.hero-button {
    display: inline-block;

    padding: 0.9rem 2rem;

    border: 1px solid white;
    border-radius: 50px;

    color: white;
    text-decoration: none;

    transition: 0.25s ease;
}

.hero-button:hover {
    background: white;
    color: #222;
}


/* =========================
   GENERAL SECTIONS
========================= */

.intro,
.notice,
.game-section {
    padding: 7rem 1.5rem;
}

.section-content,
.notice-card,
.game-heading {
    max-width: 900px;
    margin: auto;
}

.section-label {
    display: block;

    margin-bottom: 1rem;

    color: #a45c35;

    font-size: 0.8rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 3px;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

p {
    line-height: 1.8;
}


/* =========================
   INTRO
========================= */

.intro {
    background: #fff;
}

.intro p {
    max-width: 700px;
    color: #666;
    font-size: 1.05rem;
}


/* =========================
   NOTICE
========================= */

.notice {
    background: #1d2925;
    color: white;
}

.notice-card {
    display: flex;
    gap: 2rem;

    padding: 3rem;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.05);
}

.notice-icon {
    font-size: 2rem;
    color: #e6b85c;
}

.notice-card h2 {
    font-size: 2rem;
}

.notice-card p {
    color: #d5d5d5;
    margin-bottom: 1rem;
}

.notice-small {
    font-size: 0.85rem;
    opacity: 0.7;
}


/* =========================
   GAME SECTION
========================= */

.game-section {
    background: #f7f5f1;
}

.game-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.game-heading p {
    color: #777;
}


/* =========================
   SCORE PANEL
========================= */

.score-panel {
    max-width: 900px;
    margin: 0 auto 2rem;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    flex-wrap: wrap;
}

.score-item {
    min-width: 110px;

    padding: 0.8rem 1.2rem;

    background: white;

    border-radius: 12px;

    text-align: center;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.score-label {
    display: block;

    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;

    color: #999;
}

.restart {
    border: none;
    border-radius: 50px;

    padding: 0.9rem 1.5rem;

    background: #1d2925;
    color: white;

    font-family: inherit;

    cursor: pointer;

    transition: 0.25s ease;
}

.restart:hover {
    transform: translateY(-2px);
    background: #a45c35;
}



/* =========================
   GAME BOARD
========================= */

.wrapper {
    width: 100%;
    max-width: 600px;
    margin: auto;

    padding: 25px;

    background: white;

    border-radius: 24px;

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.cards {
    height: 400px;
    width: 400px;

    margin: auto;

    display: flex;
    flex-wrap: wrap;

    justify-content: space-between;

    list-style: none;
}

.cards .card {
    cursor: pointer;
    user-select: none;

    position: relative;

    perspective: 1000px;
    transform-style: preserve-3d;

    height: calc(25% - 10px);
    width: calc(25% - 10px);
}

.card .view {
    width: 100%;
    height: 100%;

    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #fff;

    pointer-events: none;

    backface-visibility: hidden;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);

    transition: transform 0.25s linear;
}


/* FRONT */

.card .front-view {
    background: #1d2925;
}

.card .front-view span {
    color: #fff;
    font-size: 45px;
}


/* BACK */

.card .back-view {
    transform: rotateY(-180deg);
}

.card .back-view img {
    max-width: 55%;
    max-height: 55%;
    object-fit: contain;
}


/* FLIPPED */

.card.flip .front-view {
    transform: rotateY(180deg);
}

.card.flip .back-view {
    transform: rotateY(0);
}


/* WRONG MATCH SHAKE */

.card.shake {
    animation: shake 0.35s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-13px);
    }

    40% {
        transform: translateX(13px);
    }

    60% {
        transform: translateX(-8px);
    }

    80% {
        transform: translateX(8px);
    }
}


/* =========================
   RESPONSIVE GAME
========================= */

@media screen and (max-width: 700px) {

    .cards {
        height: 350px;
        width: 350px;
    }

    .card .front-view span {
        font-size: 35px;
    }

    .card .back-view img {
        max-width: 50px;
    }
}


@media screen and (max-width: 530px) {

    .wrapper {
        padding: 15px;
    }

    .cards {
        height: 300px;
        width: 300px;
    }

    .card .front-view span {
        font-size: 30px;
    }

    .card .back-view img {
        max-width: 40px;
    }
}


@media screen and (max-width: 420px) {

    .cards {
        height: 280px;
        width: 280px;
    }

    .card .front-view span {
        font-size: 25px;
    }

    .card .back-view img {
        max-width: 35px;
    }

}



/* =========================
   FOOTER
========================= */

footer {
    padding: 4rem 1.5rem;

    background: #151c19;

    color: white;

    text-align: center;
}

footer h2 {
    font-size: 1.5rem;
}

footer p {
    color: #aaa;
    font-size: 0.85rem;
}

.footer-disclaimer {
    margin-top: 0.5rem;
    opacity: 0.6;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .hero {
        min-height: 65vh;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .intro,
    .notice,
    .game-section {
        padding: 5rem 1rem;
    }

    .notice-card {
        flex-direction: column;
        padding: 2rem;
    }

    .cards {
        gap: 8px;
    }

    .wrapper {
        padding: 1rem;
        border-radius: 18px;
    }

}

