/* =========================================
   TERMS OF SERVICE
========================================= */

.tos-page {
    width: 100%;
}


/* =========================================
   CARD
========================================= */

.tos-card {
    position: relative;

    width: min(700px, 100%);

    margin: 20px auto 100px;
    margin-top: 200px;

    animation:
        paperDrop
        0.35s
        ease;
}


/* =========================================
   WOOD HEADER
========================================= */

.tos-card-header {
    position: relative;
    z-index: 2;

    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px 55px;

    color: var(--cream);

    font-family: var(--heading-font);

    text-align: center;

    background:
        linear-gradient(
            rgba(30, 17, 11, 0.18),
            rgba(30, 17, 11, 0.18)
        ),
        url("https://i.pinimg.com/736x/33/4a/7c/334a7ce2bb7f6c2e93d2d2d5d7614004.jpg");

    background-size: cover;
    background-position: center;

    border:
        2px solid
        #392217;

    border-radius:
        14px 14px 0 0;
}


/* =========================================
   HEADER TITLE
========================================= */

.tos-card-header .header-title {
    position: relative;
    z-index: 1;
}

.tos-card-header .header-title h1 {
    margin: 0;

    color: #d4c0a3;

    font-size: 1.25rem;
    font-weight: 700;

    letter-spacing: 0.1em;
}


/* =========================================
   HAMMERED NAILS
========================================= */

.tos-card-header .header-nail {
    position: absolute;

    top: 50%;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #d4c0a3 35%,
            #9b8468 100%,
            #3b2d21 100%
        );

    border:
        1px solid
        #30241b;

    box-shadow:
        inset 1px 1px 2px
        rgba(255, 255, 255, 0.25),

        1px 2px 3px
        rgba(0, 0, 0, 0.4);

    transform:
        translateY(-50%);
}

.tos-card-header .header-nail.left {
    left: 22px;
}

.tos-card-header .header-nail.right {
    right: 22px;
}


/* =========================================
   PAPER
========================================= */

.tos-card-paper {
    position: relative;

    width: 100%;

    padding: 40px;

    box-sizing: border-box;

    background:
        var(--cream);

    border-radius:
        0 0 18px 18px;

    border:
        1px solid
        #dac5b5;
}


/* =========================================
   PAPER TEXTURE
========================================= */

.tos-card-paper::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    opacity: 0.3;

    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 7px,
            rgba(93, 53, 22, 0.025) 8px
        );

    border-radius:
        inherit;
}


/* =========================================
   CONTENT
========================================= */

.tos-card-content {
    position: relative;
    z-index: 1;

    max-width: 680px;

    margin: 0 auto;
}


/* =========================================
   INTRO
========================================= */

.tos-intro {
    text-align: center;

    margin-bottom: 28px;
}

.tos-intro h2 {
    margin: 0 0 10px;

    color: var(--brown-dark);

    font-family: var(--heading-font);

    font-size: 1.25rem;
    font-weight: 600;

    line-height: 1.4;
}

.tos-intro p {
    margin: 0;

    color: var(--brown);

    font-size: 0.85rem;

    line-height: 1.75;
}


/* =========================================
   ACCORDION
========================================= */

.tos-accordion {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


/* =========================================
   ACCORDION SECTION
========================================= */

.tos-section {
    overflow: hidden;

    border:
        1px solid
        #dac5b5;

    border-radius: 12px;

    background:
        #fff8e6;

    interpolate-size:
        allow-keywords;
}


/* =========================================
   ACCORDION HEADER
========================================= */

.tos-section summary {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 16px 18px;

    cursor: pointer;

    list-style: none;

    color: var(--brown-dark);

    font-family: var(--heading-font);

    font-size: 1rem;
    font-weight: 600;
}

.tos-section summary::-webkit-details-marker {
    display: none;
}

.tos-section summary:hover {
    background:
        #fdf1df;
}


/* =========================================
   TOGGLE
========================================= */

.tos-toggle {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    flex-shrink: 0;

    border-radius: 50%;

    color: #79513a;

    background:
        #f1e5d8;

    font-family: var(--body-font);

    font-size: 1.15rem;

    transition:
        transform 0.2s ease;
}

.tos-section[open] .tos-toggle {
    transform:
        rotate(45deg);
}


/* =========================================
   ACCORDION CONTENT
========================================= */

.tos-section::details-content {
    block-size: 0;

    overflow: hidden;

    transition:
        block-size 0.4s ease;
}

.tos-section[open]::details-content {
    block-size: auto;
}

.tos-content {
    padding:
        0 18px 18px;

    color: var(--brown);

    font-size: 0.88rem;

    line-height: 1.75;
}


/* =========================================
   CONTENT TEXT
========================================= */

.tos-content p {
    margin:
        0 0 12px;
}

.tos-content ul {
    margin: 0;

    padding-left: 20px;
}

.tos-content li {
    margin-bottom: 8px;
}

.tos-content li:last-child {
    margin-bottom: 0;
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .tos-section::details-content {
        transition:
            none;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {

    .tos-card {
        margin-top: 60px;
    }

    .tos-card-paper {
        padding:
            28px 22px;
    }

    .tos-card-header .header-title h1 {
        font-size: 1.05rem;
    }

    .tos-card-header .header-nail {
        width: 12px;
        height: 12px;
    }

    .tos-card-header .header-nail.left {
        left: 14px;
    }

    .tos-card-header .header-nail.right {
        right: 14px;
    }

}

.tos-section.is-closing::details-content {
    block-size: 0;
}



@media (max-width: 450px) {

    .tos-card {
        margin-top: 40px;
    }

    .tos-card-header {
        min-height: 75px;

        padding:
            15px 45px;
    }

    .tos-card-paper {
        padding:
            25px 18px;
    }

}

