@import url('https://fonts.googleapis.com/css2?family=Rubik+Vinyl&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/* css reset joshwcomeau */


/*
  1. Use a more-intuitive box-sizing model.
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}


/*
    2. Remove default margin
  */

* {
    margin: 0;
}

*::selection {
    background: #181D31;
    color: var(--clr-tertiary);
}


/*
    3. Allow percentage-based heights in the application
  */

html,
body {
    height: 100%;
}


/*
    Typographic tweaks!
    4. Add accessible line-height
    5. Improve text rendering
  */

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}


/*
    6. Improve media defaults
  */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}


/*
    7. Remove built-in form typography styles
  */

input,
button,
textarea,
select {
    font: inherit;
}


/*
    8. Avoid text overflows
  */

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}


/*
    9. Create a root stacking context
  */

#root,
#__next {
    isolation: isolate;
}

:root {
    --clr-bg-100: #fff;
    --clr-bg-900: #000;
    --clr-neutral-100: #fff;
    --clr-neutral-900: #000;
    --clr-primary: #181D31;
    --clr-secondary: #3A8891;
    --clr-tertiary: #E6DDC4;
}

body {
    background: #E6DDC4;
}

img {
    border-radius: 12px;
}


/* header */

header {
    padding-block: 1.2rem;
    padding-inline: .8rem;
}

header h1 {
    font-size: 2.6rem;
    color: var(--clr-primary);
    font-family: 'Rubik Vinyl', cursive;
    text-align: center;
}


/* article */

article {
    margin: 0 auto;
    font-size: .975rem;
    padding-block: 1.2rem;
    padding-inline: 1.2rem;
    animation: anim .8s;
}

@media screen and (min-width: 800px) {
    article {
        padding-inline: 25%;
    }
}

article .article-line {
    margin: 32px 0;
    position: relative;
    font-weight: 600;
    letter-spacing: 2px;
}

article button.btn {
    position: absolute;
    top: -16px;
    right: 0;
    border: none;
    background: transparent;
    color: var(--clr-primary);
    border-radius: 12px !important;
}

article button:active {
    transform: scale(1.2);
}

article .heading {
    color: var(--clr-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 1px;
}

article .example {
    z-index: 3;
    display: none;
    position: relative;
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto;
}

article .example button.btn-close {
    background: var(--clr-primary);
    color: var(--clr-tertiary);
    border-radius: 100vmax !important;
    font-size: 1.4rem;
}


/* grid */

.grid-container {
    max-width: 980px;
    display: grid;
    grid-template-columns: 360px;
    justify-content: center;
    margin: 0 auto;
    padding-block: 1.2rem;
    padding-inline: 1.2rem;
    gap: 12px;
}

@media screen and (min-width: 575.98px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 767.98px) {
    .grid-container {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 991.98px) {
    .grid-container {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

.grid-item {
    height: 250px;
    background: #CFF5E7;
    border-radius: 24px;
    box-shadow: 1px 1px 3px 1px #3A8891;
    transition: all .3s ease-out;
    animation: anim 1.2s alternate;
}

.item1 {
    animation-delay: 100ms;
}

.item2 {
    animation-delay: 200ms;
}

.item3 {
    animation-delay: 300ms;
}

.item4 {
    animation-delay: 400ms;
}

.item5 {
    animation-delay: 500ms;
}

.item6 {
    animation-delay: 600ms;
}

.item7 {
    animation-delay: 700ms;
}

.item8 {
    animation-delay: 800ms;
}

.item9 {
    animation-delay: 900ms;
}

.item10 {
    animation-delay: 1000ms;
}

.item11 {
    animation-delay: 1100ms;
}

.item12 {
    animation-delay: 1200ms;
}

@keyframes anim {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.grid-item:active {
    transform: scale(1.1);
}

.grid-item {
    position: relative;
}

.grid-item h3 {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 1.2rem;
    color: var(--clr-primary);
}

.grid-item p {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--clr-primary);
}

.grid-item p.center {
    width: 62%;
    overflow-wrap: break-word;
    font-size: 1.2rem;
    text-align: center;
    padding: 12px;
    background: var(--clr-tertiary);
    color: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    border-radius: 6px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
p.note {
    padding: 6px 12px;
    margin: 16px 0;
    color: var(--clr-primary);
    font-size: 1.2rem;
    text-align: center;
}
h3.read-more {
    width: 100%;
    text-align: center;
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--clr-neutral-100);
    background: var(--clr-secondary);
    margin: 24px auto;
    cursor: default;
}

div.links {
    max-width: 992px;
    margin: 24px auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

div.links a {
    display: block;
    text-decoration: none;
    color: var(--clr-primary);
    font-size: 1.175rem;
    transition: all .3s ease-out;
    margin: 12px 16px;
}

div.links a:hover {
    color: var(--clr-secondary);
    transform: scale(1.05);
}
