@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* VINTAGE COLOR PALETTE*/
:root {
--almond: #f1dac4;
--lilac: #a69cac;
--lilacdarker: #8a7a93;
--dusty-grape: #474973;
--space-indigo: #161b33;
--ink-black: #0d0c1d;
--white: #ffffff;
}


* {
  font-family: 'Ubuntu';
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.main h1{
    margin: 0px;
    margin-top: 12.5rem;
    display: flex;
    font-size: clamp(3rem, 7vw, 5rem);
    justify-content: center;
    color: var(--white);
}

.main h2{
    margin: 0px;
    height: auto;
    display : flex;
    justify-content: center;
    font-size: clamp(2.5rem, 8vw, 6.25rem);
    color: var(--white);
}

.main p{
    height: auto;
    display : flex;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    text-align: center;
}


.menu-button {
    position: absolute;
    top: 40px;
    left: 40px;
    padding: 0.625rem 1.25rem;
    background-color: #33333300;
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.875rem;
    z-index: 50; /* stays above the menu so it's always clickable to close */
}

.menu {
    position: absolute;
    top: 35px;
    left: 100px;
    background-color: var(--dusty-grape);
    padding: 1rem;
    border-radius: 5px;
    border: 4px solid var(--lilac);
    right: 20px;
    height: auto;
    display: flex;
    justify-content: flex-start;
    gap: 3rem;
    transform-origin: top left;
    z-index: 40;
}

.menu a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
}

.nav-links {
    display: flex;
    gap: 5rem;
    flex-wrap: wrap;
}

.nav-socials {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.menu a:hover {
    background-color: var(--space-indigo);
    color: var(--white);
}

.hidden {
    display: none;
}


body {
    background-color: var(--ink-black);
}

.grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 7rem;
    padding: 0 1rem;
}

.grid a {
    text-decoration: none;
    color: #000;
    font-size: 1rem;
}

.grid-item {
    background-color: var(--lilac);
    padding: 1rem;
    border-radius: 10px;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: center;
    transition: transform 0.3s ease;
}

.grid-item h2 {
    display: flex;
    justify-content: center;
    color: #000;
    font-size: 2.5rem;
}

.grid-item p {
    display: flex;
    justify-content: center;
    color: #000;
    font-size: 1rem;

}

.grid-item:hover {
    background-color: var(--lilacdarker);  
    transform: scale(1.05);
}

:focus-visible {
    outline: 2px solid var(--ink-black);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--white);   
}


/* --- Home entrance: hero + cards slide up in a stagger on load --- */
@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main h1 {
    animation: riseIn 0.6s ease both;
    animation-delay: 0.1s;
}

.main p {
    animation: riseIn 0.6s ease both;
    animation-delay: 0.25s;
}

.grid a {
    animation: riseIn 0.6s ease both;
}

.grid a:nth-child(1) { animation-delay: 0.4s; }
.grid a:nth-child(2) { animation-delay: 0.5s; }
.grid a:nth-child(3) { animation-delay: 0.6s; }
.grid a:nth-child(4) { animation-delay: 0.7s; }

@keyframes slideIn {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
    to {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        animation-delay: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 600px) {
    .main h1,
    .main h2,
    .main p {
        justify-content: center;
        text-align: center;
        margin-left: 0;
        padding-left: 0;
    }

    .grid {
        grid-template-columns: 1fr;
    }

  .menu-button {
    position: absolute;          
  }
  body:has(#menu:not(.hidden)) .menu-button { 
    position: fixed; 
  }

  .menu {
    position: fixed;          
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 76%;
    max-width: 300px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    border: none;
    border-right: 4px solid var(--lilac);
    border-radius: 0 12px 12px 0;
    padding: 7rem 1.5rem 2rem 2.5rem;  
  }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        width: auto;
    }

    .nav-socials {
        flex-direction: column;
        gap: 0.5rem;
        width: auto;
        margin-top: auto;       
        margin-left: 0;
    }
}
