/* Website designed by @blu on the Hack Club Slack */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    /* Brand */
    --navbar-bg: #b875ff;
    --nav-text: #ffffff;
    --button-text: #c289ff;

    /* Backgrounds */
    --background: #fde09d;
    --background-alt: #ffcfa2;
    --box-hover: #ffc289;
    --dark-box: #dea876;
    --dark-box-hover: #be8f64;

    /* Text & borders */
    --text-primary: #5d5031;
    --accent-warm: #94703e;
    --border-muted: #7a725e;

    /* Ice cream accent palette */
    --strawberry: #ffb3c6;
    --strawberry-dark: #e8829b;
    --strawberry-hover: #ffd6e3;
    --vanilla: #fff8f0;
    --chocolate-shadow: #c4845a;
}

/* ============================================================
   Base Styles
   ============================================================ */
body {
    background: #fffacc;
    background: radial-gradient(
        circle,
        rgba(255, 250, 204, 1) 0%,
        rgba(253, 247, 157, 1) 30%,
        rgba(253, 224, 157, 1) 100%
    );
}

* {
    box-sizing: border-box;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 520;
}

h1,
h3,
h4,
h5,
h6,
p,
li{
    margin-left: 1.5em;
    margin-right: 2.5em;
}

a, button {
    cursor: pointer;
}

h1 { font-size: 3.25rem; }
h2 { font-size: 2.5rem; padding-left: 1rem; }
h3 { font-size: 1.75rem; }
p  { font-size: 20px; }

a:hover {
    color: black;
    transition: color 0.75s cubic-bezier(0.55, 0.055, 0.675, 0.675);
}

hr {
    border-color: sandybrown;
    border-radius: 20px;
    border-style: dotted;
    border-width: 10px;
}

html, body {
    /* the x scroll is caused by the swirl logo that's always underneath the navbar at the right of the screen */
    /* this will just keep the scroll hidden since there isn't actually real content to scroll for */
    overflow-x: hidden;
}
::selection {
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center {
    text-align: center;
}

.preahvihear-regular {
    font-family: 'Preahvihear', sans-serif;
    font-weight: 400;
    font-style: normal;
}


.inline-icon {
    background: none;
    width: 20px;
    vertical-align: middle;
}

.btn-link {
    text-decoration: none;
    color: var(--button-text);
}

/* ============================================================
   Navbar
   ============================================================ */

/* Navbar code based on dhyans.dev (modified) */
.navbar {
    padding: 0;
    margin: 0;
    background-color: var(--navbar-bg);
    height: 5.4em;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: 'Preahvihear', sans-serif;
    font-weight: 700;
    width: 100%;
}

.navbar__container {
    background-color: var(--navbar-bg);
    display: flex;
    justify-content: flex-end;
    height: 5em;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 5%;
}

.navbar__menu {
    padding: 0;
    background-color: var(--navbar-bg);
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
}

.navbar__item {
    padding: 0;
    background-color: var(--navbar-bg);
    height: 5em;
    margin: 0;
}

.navbar__links {
    background-color: var(--navbar-bg);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 1.5rem;
    height: 100%;
}

.navbar__links:hover {
    color: yellow;
    transition: color 0.5s;
}

.navbar__submit-item {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    margin: 0;
    background-color: var(--navbar-bg);
}

.navbar__btn {
    background-color: lightskyblue;
    border-radius: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 0.4em 1.5rem;
}

.navbar__btn:hover {
    color: black;
    background-color: white;
    transition: background-color 0.5s ease-in, color 0.5s ease-in;
}

/* Hack Club flag banner (code from Hack Club brand website) */
.banner {
    position: absolute;
    top: 0;
    left: 10px;
    border: 0;
}

.banner > a > img {
    width: 128px;
}
.banner > p {
    margin: 0;
    margin-top: -12px;
    color: var(--nav-text);
    font-size: 1.1rem;
    text-shadow: 0.6px 0.6px 1.2px lightskyblue;
}

.banner > a > img {
    animation: wave-flag 1.5s linear infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    .banner:hover a img {
        transition: transform 0.1875s cubic-bezier(0.375, 0, 0.675, 1);
        transform-origin: top left;
    }
}

@keyframes wave-flag {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-5deg); }
}

/* ============================================================
   Homepage Hero
   ============================================================ */
#circle {
    height: 38rem;
    width: 55rem;
    background-color: var(--navbar-bg);
    border-radius: 50%;
    position: sticky;
    margin-top: -21rem;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   Leader Zone steps (leader-zone.html)
   ============================================================ */
.leader-zone-step-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.leader-zone-step-number {
    font-size: 2.67rem;
    font-weight: bold;
    padding: 2rem;
    width: 0.5rem;
    height: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--navbar-bg);
    color: white;
    border-radius: 999px;
    margin: 0;
}

.leader-zone-step-text {
    margin: 0;
    padding-left: 0;
}

.leader-zone-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 2.5em;
    padding-left: 1.5em;
    font-size: 1.1rem;
}

.leader-zone-list li {
    margin: 0;
    padding-left: 0.5rem;
}

.leader-zone-images {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 2.5em 1rem 2.5em;
}

.leader-zone-images img {
    width: 25%;
    border-radius: 12px;
    object-fit: cover;
}

.grant-option-desc {
    color: var(--border-muted);
    font-weight: 500;
    font-size: 1rem;
    margin: 0.25rem 0 0 0;
}

div.rotate {
    transform: rotate(-25deg);
    margin-top: 20px;
    margin-left: 245px;
    font-size: 45px;
    font-weight: bold;
    color: white;
}

div.rotate:hover {
    color: var(--text-primary);
    transition: color 0.5s;
}

#swirl-logo {
    background: none;
    width: 25rem;
    height: 25rem;
    margin-top: 2rem;
    margin-bottom: -8rem;
}

#main-text {
    text-align: center;
}

/* ============================================================
   Buttons — match navbar pill style
   ============================================================ */
button {
    font-size: 1.25rem;
    background-color: lightskyblue;
    border: 0;
    border-radius: 1em;
    color: white;
    margin-top: 20px;
    padding: 0.4em 1.5rem;
    cursor: pointer;
    font-family: 'Preahvihear', sans-serif;
    font-weight: 700;
}

button:hover {
    color: black;
    background-color: white;
    transition: background-color 0.5s ease-in, color 0.5s ease-in;
}

button a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   Content Blocks
   ============================================================ */
div.main-content {
    margin-left: 2.5em;
    margin-right: 2.5em;
    padding-top: 1em;
    padding-bottom: 1em;
    background: var(--background);
    border-radius: 24px;
    border: 2px solid rgba(184, 117, 255, 0.15);
}

div.inspiration {
    font-size: 21px;
}

div.list {
    margin-left: 50px;
    font-size: 18px;
}

div.list_indent {
    margin-left: 60px;
}

/* ============================================================
   Gallery (gallery.html)
   ============================================================ */
#gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

#swirl-ships {
    color: var(--accent-warm);
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.gallery-pagination span {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gallery-pagination button {
    margin-top: 0;
    font-size: 1rem;
    padding: 0.3em 1.2rem;
}

.gallery-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gallery-pagination button:disabled:hover {
    background-color: lightskyblue;
    color: white;
}

@media (max-width: 1100px) {
    #gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
    #gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    #gallery { grid-template-columns: 1fr; }
}

.gallery-item {
    background: var(--dark-box);
    border-radius: 16px;
    padding: 0.6rem;
    box-shadow: 0 4px 0 var(--chocolate-shadow);
    text-align: center;
    transition: transform 0.5s ease, background-color 0.5s ease;
    min-width: 0;
    overflow: hidden;
}

.gallery-item:hover {
    transform: scale(1.04);
    background-color: var(--dark-box-hover);
}

.gallery-item a:hover {
    transform: none;
    transition: none;
}

.gallery-item__title {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item__img {
    width: 100%;
    height: 7rem;
    margin: 0.5rem 0;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-item__actions {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.gallery-item button {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    padding: 0.25em 0.8rem;
}

/* ============================================================
   Requirements Grid (requirements.html)
   ============================================================ */
.req-grid {
    margin: auto;
    max-width: 1000px;
    font-size: 1.2em;
    text-align: center;
    display: grid;
    row-gap: 0.4em;
    column-gap: 2em;
    grid-template-areas:
        'req-a req-b req-c'
        'img-a img-b img-c'
        'space space space'
        'req-d req-e req-f'
        'img-d img-e img-f'
        '. req-h.'
        '. img-h .';
    padding: 2rem;
}

.req-grid img {
    height: 100px;
    max-width: 100%;
    object-fit: contain;
}

.space {
    grid-area: space;
    padding: 10rem;
}

img.swirl-req-img {
    float: right;
    width: 15rem;
    height: 31rem;
    position: relative;
    top: -6.25rem;
    margin-right: 8rem;
    margin-bottom: -6.25rem;
}


/* ============================================================
   Footer
   ============================================================ */
footer {
    background-color: var(--text-primary);
    color: #ffffff;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
    position: relative;
    margin-left: 0;
}

footer a {
    color: #ffffff;
}

/* ============================================================
   Grids & Cards
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 2rem 1rem;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--dark-box);
    border-radius: 20px;
    padding: 1rem;
    font-size: 1.5rem;
}

.item img:not(.inline-icon) {
    width: 100%;
    max-width: 220px;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* ============================================================
   Responsive — Mobile (max-width: 700px)
   ============================================================ */
@media (max-width: 700px) {
    .navbar {
        height: 3em;
        font-size: 1em;
    }

    .navbar__links {
        display: none;
        flex-direction: column;
        background-color: var(--navbar-bg);
        width: 100%;
        text-align: center;
        padding: 1em 0;
    }

    .navbar__links.active {
        display: flex;
    }

    .navbar__links .navbar__btn {
        padding: 0 0.1rem;
    }

    .banner img {
        width: 1em;
    }

    #circle {
        height: 18rem;
        width: 25rem;
        margin-top: -16rem;
    }

    #swirl-logo {
        width: 10rem;
        height: 10rem;
        margin-top: 1rem;
        margin-bottom: -4rem;
    }

    div.rotate {
        margin-left: 3rem;
        font-size: 1rem;
        padding-left: 2rem;
    }

    h1 { font-size: 3rem; }

    #main-text { font-size: 2rem; }

    .leader-zone-images {
        flex-direction: column;
        align-items: center;
    }

    .leader-zone-images img {
        width: 80%;
    }

    .leader-zone-list {
        margin: 0 1em;
    }
}
