html, body {
    overflow: hidden;
}

.about-wrapper {
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 95vh;
    height: 95dvh;
    box-sizing: border-box;
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background-color: #c6def1;
    border: 1px solid #c4a882;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 0 0 0 28px;
    box-shadow: 4px -2px 10px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.about-header h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: clamp(20px, 2.2vw, 36px);
    color: #4A3728;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    padding: 14px 0;
}

.home-btn {
    font-size: 3rem;
    font-weight: 900;
    color: #4A3728;
    text-decoration: none;
    line-height: 1;
    border: none;
    border-left: 1px solid #c4a882;
    border-radius: 0 8px 0 0;
    padding: 0 3vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 300ms;
    background-color: #bfd9ee;
}

.home-btn:hover {
    background-color: #aacae5;
}

.about-body {
    flex: 1;
    display: flex;
    border: 1px solid #c4a882;
    box-shadow: 6px 6px 24px rgba(0,0,0,0.18);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.about-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.about-grid::-webkit-scrollbar {
    display: none;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    flex-shrink: 0;
    min-height: 420px;
}

/* ---- Custom scrollbar ---- */

.custom-scrollbar {
    width: 20px;
    display: flex;
    flex-direction: column;
    background: #e8ddd0;
    border-left: 1px solid #c4a882;
    flex-shrink: 0;
    user-select: none;
}

.scroll-btn {
    height: 20px;
    background: #e8ddd0;
    border: none;
    border-bottom: 1px solid #c4a882;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #4A3728;
    flex-shrink: 0;
    padding: 0;
}

.scroll-btn-down {
    border-bottom: none;
    border-top: 1px solid #c4a882;
}

.scroll-btn:hover {
    background: #d4c4b0;
}

.scroll-track {
    flex: 1;
    position: relative;
    background: #e8ddd0;
    cursor: pointer;
}

.scroll-thumb {
    position: absolute;
    left: 0;
    right: 0;
    background: #5c3d28;
    cursor: pointer;
    min-height: 24px;
}

.scroll-thumb:hover {
    background: #4A3728;
}

/* ---- Grid cells ---- */

.cell {
    border: 1px solid #c4a882;
    min-height: 280px;
    box-sizing: border-box;
}

.span-half       { grid-column: span 3; }
.span-third      { grid-column: span 2; }
.span-two-thirds { grid-column: span 4; }

.text-cell {
    padding: clamp(1.2rem, 2.5vw, 2.5rem);
    background-color: #faedcb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.welcome-cell {
    background-color: #faedcb;
    justify-content: center;
    padding-bottom: 15%;
}

.img-cell {
    overflow: hidden;
    background-color: rgba(0,0,0,0.04);
}

.img-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-row:nth-child(2) .text-cell { background-color: #c9e4de; }
.grid-row:nth-child(3) .text-cell { background-color: #f7d9c4; }

.cell h1 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.2vw, 36px);
    color: #4A3728;
    line-height: 1.3;
}

.cell h3 {
    text-align: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 4vw, 10000px);
    color: #4A3728;
}

.cell h2 {
    text-align: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: clamp(21px, 3.3vw, 100000px);
    color: #4A3728;
}

.cell p {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 1.8vw, 25px);
    color: #4A3728;
    line-height: 1.75;
}

.cell a {
    color: #4A3728;
    font-weight: 400;
    text-decoration: underline;
    text-decoration-color: rgba(74, 55, 40, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms;
}

.cell a:hover {
    text-decoration-color: #4A3728;
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
    .about-wrapper {
        width: 100%;
        height: 100dvh;
    }

    .home-btn {
        font-size: 2rem;
        padding: 0 5vw;
    }

    /* Collapse the 6-column grid: every cell becomes full width and rows
       stack in DOM order (text/image alternate naturally). */
    .grid-row {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .span-half,
    .span-third,
    .span-two-thirds {
        grid-column: 1 / -1;
    }

    .cell {
        min-height: 0;
    }

    .img-cell {
        height: 60vw;
        max-height: 340px;
    }

    /* The custom scrollbar's drag logic is mouse-only, so it does nothing on
       touch. Hide it and let the grid scroll natively. */
    .custom-scrollbar {
        display: none;
    }

    .welcome-cell {
        padding-bottom: clamp(1.2rem, 2.5vw, 2.5rem);
    }
}
