@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single+Ink:wght@100..900&family=Codystar:wght@300;400&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Imperial+Script&family=Inconsolata:wght@200..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Pinyon+Script&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Sixtyfour&family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single+Ink:wght@100..900&family=Codystar:wght@300;400&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Imperial+Script&family=Inconsolata:wght@200..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Pinyon+Script&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Sixtyfour&family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single+Ink:wght@100..900&family=Codystar:wght@300;400&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Imperial+Script&family=Inconsolata:wght@200..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Libre+Franklin:ital,wght@0,100..900;1,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Pinyon+Script&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Sixtyfour&family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

:root {
    --color:#FFFF00;
    --bg-color:#ebb9e0;

    --body-copy: .8rem;
    --heading-copy: calc(var(--body-copy)*4.5);

    --gutter: 2rem;
    --vertical: 8rem;
    --spacing: .5rem;

    --script: 'Pinyon Script';
    --sans-serif: 'Libre Franklin';
}

body {
    background-color: var(--bg-color);
    font-size: 100%;
}



header {
    padding-block: calc(var(--gutter)*4);
    padding-inline: var(--gutter);
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background-image: url("assets/cake.gif");
    background-size: cover;
    background-position: center;
    opacity: .9;
    z-index: -1; 

    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}

@media (width>600px) {
    header::before {
    height: 70vh;  
    }
}

/* I was trying to make background image fixed on main 
and found background-attachment: fixed on https://www.w3schools.com/cssref/pr_background-attachment.php
and then I found that I should change background-size to contain to make it work & fit the container without cropping the sides according to https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Backgrounds_and_borders/Resizing_background_images#:~:text=look%20at%20these.-,contain,to%20see%20this%20in%20action. */
/* and then I asked on the channel and learned that it’s an iOS Safari bug and Michael suggested putting the background on a ::before pseudo-element that is position: fixed instead, and it worked! */
main {
    text-align: right;

    &::before {
        background-image: url('assets/dining-table.png');
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        content: '';
        inset: 0;
        position: fixed;
        z-index: -2;
    }
}

/* and then I found out that background-attachment: fixed doesn't work on mobile, according to https://stackoverflow.com/questions/26372127/background-fixed-no-repeat-not-working-on-mobile. so I added a media query to make it work on desktop only. */
@media (width>600px) {
    main {
    background-size: cover;
    background-attachment: fixed;
    }
}

    
h1 {
    font-family: var(--script);
    color: var(--color);
    font-size: var(--heading-copy);
    padding-block: var(--spacing);
    text-align: center;
}


p {
    font-size: var(--body-copy);
    font-family: var(--sans-serif);
    color: var(--color);
    padding-top: var(--spacing);
}

@media (width>600px) {

    h1 {
        font-size: calc(var(--heading-copy)*1.5);
    }
}

@media (width>800px) {

    h1 {
        font-size: calc(var(--heading-copy)*2);
    }

    p {
        font-size: calc(var(--body-copy)*1.5);
    }
}

@media (width>1100px) {

    h1 {
        font-size: calc(var(--heading-copy)*2.5);
    }
}


.header-left {
    font-size: calc(var(--body-copy)*1.2);
}

.header-right {
    text-align: right;
    font-size: calc(var(--body-copy)*1.2);
}


@media (width>800px) {

    .header-left {
    padding-left: calc(var(--gutter)*3);
    font-size: calc(var(--body-copy)*1.5);

}
    .header-right {
    padding-right: calc(var(--gutter)*3);
    font-size: calc(var(--body-copy)*1.5);
}
}

@media (width>1100px) {

    .header-left {
    padding-left: calc(var(--gutter)*6);
    font-size: calc(var(--body-copy)*2);
}
    .header-right {
    padding-right: calc(var(--gutter)*6);
    font-size: calc(var(--body-copy)*2);
}
}

nav {
    display: flex;
    justify-content: center;
    gap: .3rem;
    list-style: none;
    text-decoration: underline var(--color);
    position:sticky;
    top: 5%;
    z-index: 10;
}

/* filter nav */
button {
    font-family: var(--sans-serif);
    color: var(--color);
    font-size: var(--body-copy);
    background: rgba(128, 19, 19, 0.5);
    padding: var(--spacing);
    border-radius: 2rem;
    margin-bottom: 2rem;
}

@media (width>600px){
    button {
    font-size: calc(var(--body-copy)*1.2);
    padding: calc(var(--spacing)*1.2);

}
}

@media (width>900px){
    button {
    font-size: calc(var(--body-copy)*1.5);
    padding: calc(var(--spacing)*1.5);

}

    nav {
    gap: 1rem;
    }
}


/* grid layout for blocks */
#channel-blocks {
  display: grid;
  justify-content: center;
  width: 65%;
  margin: 0 auto;
  grid-template-columns: 1fr;
}


#channel-blocks {

    &.show-images,
    &.show-videos,
    &.show-audios,
    &.show-texts,
    &.show-links {
        li {
            display: none;
        }
    }

    &.show-images li.image-block { display: grid; }
    &.show-videos li.video-block { display: grid; }
    &.show-audios li.audio-block { display: grid; }
    &.show-texts  li.text-block  { display: grid; }
    &.show-links  li.link-block  { display: grid; }
}



@media (width>600px) {

    #channel-blocks {
    grid-template-columns: repeat(2, 1fr);
    }
}

@media (width>900px) {

    #channel-blocks {
    grid-template-columns: repeat(3, 1fr);
    }
}

.des-spacing {
    margin-block: 1rem;
    display: flex;
    justify-content: center;
}

#channel-description p{
    font-family: var(--sans-serif);
    color: var(--color);
    font-size: calc(var(--body-copy)*1.2);
    max-width: 35ch;
    text-align: center;
}


@media (width>600px) {

    .des-spacing {
    margin-block: 5rem;
}

    #channel-description p{
    font-size: calc(var(--body-copy)*1.7);
}
}

@media (width>900px) {

    .des-spacing {
    padding-block: 4rem;
}
    #channel-description p{
    font-size: calc(var(--body-copy)*2);
    max-width: 40ch;
}
}



/* repeat plate-1, plate-2, plate-3 */
.block.plate:nth-child(4n+1){ background-image: url("assets/plate-1-t.png"); }
.block.plate:nth-child(4n+2){ background-image: url("assets/plate-2-t.png"); }
.block.plate:nth-child(4n+3){ background-image: url("assets/plate-3-t.png"); }
.block.plate:nth-child(4n+4){ background-image: url("assets/plate-4-t.png"); }



.block.plate {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    background-position: center;
    background-size: contain;
    position: relative;
}


/* circle crop for content on top */
.plate-content {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    overflow: hidden;
    display: block;
}

/* make contents fill the circle */
.plate-content video,
.plate-content iframe,
.plate-content text,
.plate-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


audio {
	block-size: revert;
	inline-size: 100%;
    width: 100%;
    display: block;
}

.audio-block .plate-content {
    display: flex;
    align-items: center;
    justify-content: center;
}


.view-text {
    display: flex;
    justify-content: center;
    align-items: center;
}


.plate-caption {
    color: rgb(128, 19, 19);
    font-size: .8rem;
    text-align: center;
    max-width: 20ch;
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translateX(-50%);
}


a {
    text-decoration: underline;
    color: var(--color);
}

.footer {
    display: grid;
    justify-content: center;
    text-align: center;
    padding-block:var(--gutter);
}

@media (width>600px) {

.footer {
    padding-block: calc(var(--gutter)*2);
    }
}