*[data-active="false"]{
    display: none !important;
}

*{
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.pacifico-regular {
    font-family: "Pacifico", cursive !important;
    font-weight: 400;
    font-style: normal;
}

html{
    background: #4a1a63;
    background-repeat: no-repeat;
    height: 100%;
    background-size: cover;
    background-position: 50%;
    font-family: 'Poppins', sans-serif;
    font-size: 10pt;
}

body{
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.fledglingLogo{
    font-family: "Lexend", sans-serif;
    display: inline-block;
}

.fledglingLogo span{
    font-weight: 100;
}

button, .button{
    background: rgb(51, 103, 250);
    background: linear-gradient(142deg, rgba(51, 103, 250, 1) 0%, rgba(51, 149, 250, 1) 100%);
    display: flex;
    justify-content: center;
    align-self: flex-end;
    margin-bottom: 0;
    padding: 0.75em 2em;
    cursor: pointer;
    border-radius: 3px;
    color: white;
    border: 0px solid transparent;
    font-weight: 600;
    text-shadow: 0 1px 1px black;
    box-shadow: 0 2px 3px #0000002e;
    text-decoration: none;
}

button.green, .button.green{
    background: #5cd551;
    background: linear-gradient(142deg, #5cd551 0%, #6abda4 100%);
}

button.red, .button.red{
    background: #b01717;
    background: linear-gradient(161deg, #b01717 0%, #fa3333 100%); 
}

body main{
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(var(--angle), #38176d, #722379);
    animation: rotate 15s linear infinite;
}

body main nav{
    position: fixed;
    right: 0;
    padding: 1em;
    font-weight: 200;
    top: 0;
    z-index: 5000;
}

body main nav a{
    text-decoration: none;
    font-size: 1em;
    padding: 0.2em 0.75em;
    border: 1px solid;
    border-radius: 0.5em;
    color: rgba(255, 255, 255, 0.5);
}

body main nav a:hover{
    color: white;
}

body main[data-display="about"] nav{
    display: none;
}

body main#intro canvas#starfield{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

body main#intro #welcomeText{
    color: white;
    width: 100%;
    padding: 1em;
    max-width: 1100px;
    display: flex;
    align-items: space-between;
    height: 50vh;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
    z-index: 2;
    transition: transform 1s ease-in-out;
}

body main#intro[data-display="capture"] #welcomeText{
    transform: translateY(-100%) scale(2);
}

body main#intro #welcomeText h1{
    font-size: 3.5em;
    text-shadow: 0px 2px 4px black;
    margin-bottom: 0;
}

body main#intro #welcomeText #title{
    position: relative;
}

body main#intro #welcomeText #title #versionBubble{
    display: block;
    top: 102%;
    left: 0;
    font-weight: 200;
    font-size: 15px;
    border: 1px solid #ffffff66;
    padding: 3px 11px;
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(1px) brightness(1.5) saturate(1.5) hue-rotate(340deg);
    box-shadow: 0 3px 5px #00000059;
}

body main#intro #welcomeText #title p{
    margin-top: 0;
    font-size: 1.2em;
    font-weight: 200;
    text-shadow: 0 1px 1px black;
}

body main#intro #welcomeText #startCall{
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: left;
    flex-direction: column;
    z-index: 1000;
    padding-top: 3em;
}

body main#intro #welcomeText #startCall .button{
    max-width: 125px;
    align-self: initial;
    margin-bottom: 0.75em;
}

body main#intro #welcomeText #startCall span{
    text-shadow: 0px 1px 3px black;
}

body main#intro #telephoneCord{
    position: fixed;
    right: 0;
    top: 0;
    width: 50vw;
    animation: telephoneCord 30s ease-in-out infinite;
}

body main#intro #telephoneCord img{
    width: 100%;
}

body main#intro #captureSetup{
    position: fixed;
    left: 50%;
    top: 50%;
    width: 500px;
    min-height: 400px;
    background: #00000057;
    /* transform: translate(-50%, -60%); */
    transform: translate(-50%, 100%);
    border-radius: 15px;
    box-shadow: 0 5px 10px #0000003d;
    transition: transform 1s ease-in-out;
    box-sizing: border-box;
    border: 1px solid #ffffff36;
    padding: 1em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

body main#intro[data-display="capture"] #captureSetup{
    transform: translate(-50%, -60%);
}

body main#intro #captureSetup #cameraDisplay{
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.5em;
    background-image: linear-gradient(var(--angle), #b86ad9, #3280ad);
    animation: rotate 15s linear infinite;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

body main#intro #captureSetup #cameraDisplay video{
    max-width: 100%;
    border-radius: 3px;
    border: 1px solid #ffffff5c;
    transform: rotateY(180deg);
    min-width: 100%;
    min-height: 345px;
    backdrop-filter: brightness(1.5);
}

body main#intro #captureSetup #cameraDisplay #audioLevels{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 30%;
    /* background: red; */
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    box-sizing: border-box;
    justify-content: space-evenly;
}

body main#intro #captureSetup #cameraDisplay #audioLevels span{
    height: 0%;
    display: inline-block;
    background-image: linear-gradient(var(--angle), #b86ad9, #3280ad);
    flex-grow: 1;
    margin: 0;
    border-radius: 5px 5px 0 0;
    border: 1px solid #ffffff96;
    border-bottom: 0;
    /* box-shadow: 0 2px 3px #0000006e; */
    box-sizing: border-box;
    transition: height 0.1s ease-out;
}

body main#intro #captureSetup #cameraDisplay video[data-loading="true"]{
    /* animation: pulse 2s ease-in-out infinite; */
}

body main#intro #captureSetup #controls{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1em;
}

body main#intro #captureSetup #controls button, body main#intro #captureSetup #controls a{
    box-shadow: 0 2px 3px #000000;
    margin-right: 1em;
    font-size: 0.85em;
}

body main#intro #captureSetup #controls a{
    position: absolute;
    right: 0;
}

body main #aboutInfoHolder{
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(10px) brightness(0.8);
    z-index: -2000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body main[data-display="about"] #aboutInfoHolder{
    opacity: 1.0;
    z-index: 2000;
}

body main #aboutInfoHolder #aboutInfo{
    width: 500px;
    max-width: 90%;
    height: 800px;
    max-height: 90%;
    border: 1px solid #ffffff4d;
    border-radius: 20px;
    background: linear-gradient(var(--angle), #1f0b41cc, #4d1352eb);
    box-shadow: 0 10px 15px #000000d9;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transform: translateY(25%) scale(1.0);
    transition: transform 0.5s ease-in-out;
    color: white;
    padding: 2em;
    box-sizing: border-box;
    line-height: 2em;
}

body main #aboutInfoHolder #aboutInfo h1{
    font-weight: 200;
    margin-top: 0;
}

body main #aboutInfoHolder #aboutInfo #aboutSection{
    overflow: scroll;
    border: 1px solid #ffffff45;
    border-width: 1px 0 1px;
}

body main #aboutInfoHolder #aboutInfo #aboutSection h2:not(:first-of-type){
    margin-top: 2em;
}

body main #aboutInfoHolder #aboutInfo #aboutSection p{
    font-size: 1.1em;
    font-weight: 200;
}

body main #aboutInfoHolder #aboutInfo #aboutSection p a[href]{
    color: #5e8fff;
    font-weight: 400;
}

body main #aboutInfoHolder #aboutInfo #aboutSection em{
    font-style: italic;
    text-decoration: underline;
}

body main[data-display="about"] #aboutInfoHolder #aboutInfo{
    transform: translateY(0%) scale(1.0);
}

body main #aboutInfoHolder #aboutInfo #closeAbout{
    align-self: center;
    margin-top: 2em;
}

body main#intro #hills{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 50vh;
    transform: scale(1.1);
    transition: transform 1s ease-in-out;
}

body main#intro[data-display="capture"] #hills{
    transform: scale(1.5) translateY(30%);
}

body main#intro #hills .hillImage{
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 61vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    animation: float 15s ease-in-out infinite;
}

body main#intro #hills .hillImage img{
    width: 100%;
}

body main#intro #hills .hillImage#hill1 #greenPerson{
    position: absolute;
    top: 35px;
    left: 250px;
    width: 30px;
    z-index: 20;
}

body main#intro #hills .hillImage#hill1 #greenPerson .arm{
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    transform-origin: bottom left;
    animation: wave 5s ease-in-out infinite;
}

body main#intro #hills .hillImage#hill2{
    left: auto;
    right: 0;
    animation-delay: 1s;
    animation-direction: reverse;
}

body main#intro #hills .hillImage#hill3{
    left: 16%;
    bottom: 10%;
    animation-delay: 2s;
}

body main#intro #hills .hillImage#hill4{
    bottom: 11%;
    left: auto;
    right: 0;
    animation-delay: 2ss;
    animation-direction: reverse;
    animation-duration: 15s;
}

body main#intro #hills .hillImage#hill4 #yellowPerson{
    position: absolute;
    top: 35px;
    right: 250px;
    width: 15px;
    z-index: 20;
}

body main#intro #hills .hillImage#hill4 #yellowPerson .arm{
    position: absolute;
    top: -3px;
    left: -1px;
    width: 8px;
    transform-origin: bottom right;
    animation: wave 2s ease-in-out infinite;
}

body main#call{
    color: #fff;
    font-family: sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body main#call > *{
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* body {
    background: #111;
    color: #fff;
    font-family: sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
} */

body main#call #video-grid {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    justify-content: center;
    min-height: 0;
    align-items: center;
}

/*
    Default tile: half width, wraps into two rows naturally.
    Covers 2-up (one row, full height), 3-up (two rows, 50% each),
    and 4-up (two rows of two, 50% each).
    justify-content: center handles the lone third tile in 3-up.
*/
body main#call .video-tile {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 calc(50% - 4px);
    max-width: calc(50% - 4px);
    min-height: 0;
    overflow: hidden;
    max-height: 100%;

    max-width: 100%;
    max-height: 88vh;
    align-items: center;
    justify-content: center;
    display: flex;
}

/* 1-up: single tile fills everything */
body main#call #video-grid[data-count="1"] .video-tile {
    flex: 1 1 100%;
    max-width: 100%;
}

body main#call #video-grid .video-tile.local video{
    transform: rotateY(180deg);
}

#video-grid[data-count="3"] .video-tile{
    max-width: 32%;
    height: 100vh;
    max-height: 78vh;
}

body main#call #video-grid[data-count="4"] .video-tile {
    height: 100vh;
    max-height: 40vh;
}

body main#call .video-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body main#call .video-tile .label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: black;
    border: 3px solid #b86ad9;
    outline: 0;
    box-shadow: 0 1px 2px black;
}

body main#call #controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #1a1a1a6b;
    border-top: 1px solid #ffe8e842;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

body main#call #controls #callLink{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 1em;
    font-weight: 600;
    font-size: 0.8em;
    color: white;
    background: #ffffff2e;
    padding: 0.5em 1.25em 0.5em 1em;
    box-sizing: border-box;
    border-radius: 20px;
    border: 1px solid #ffffff87;
    cursor: pointer;
}

body main#call #controls #callLink #copiedMessage{
    position: absolute;
    left: 100%;
    max-width: 0px;
    overflow: hidden;
    box-sizing: border-box;
    margin-left: 1em;
    transition: max-width 0.1s ease-in-out;;
}

body main#call #controls #callLink #copiedMessage[data-visible="true"]{
    max-width: 45px;
}

body main#call #controls #callLink[data-clicked="true"]{
    background-color: white;
}

body main#call #controls #callLink img{
    height: 1em;
    margin-right: 0.75em;
}

body main#call #controls button {
    padding: 10px 26px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 2px 3px black;
}

body main#call #controls button:hover { background: rgba(255,255,255,0.25); }
body main#call #controls button[data-enabled="true"] { background: linear-gradient(161deg, #b01717 0%, #fa3333 100%); }
body main#call #controls button[data-enabled="true"]:hover { background: #a93226; }
body main#call #controls #leaveCall { 
    background: linear-gradient(161deg, #b01717 0%, #fa3333 100%); 
    position: absolute;
    right: 1em;
}
body main#call #leaveCall:hover { background: #a93226; }

@media all and (max-width: 768px){

    body{
        box-sizing: border-box;
    }

    body main{
        overflow: hidden;
    }

    body main#intro #captureSetup{
        left: 0;
        transform: translate(0, 100%);
    }

    body main#intro[data-display="capture"] #captureSetup{
        max-width: 100%;
        transform: translate(0, -75%);
        left: 0;
        min-height: auto;
        margin: 1em;
        min-width: auto;
        width: auto;
    }

    body main#intro #captureSetup #controls button, body main#intro #captureSetup #controls a{
        font-size: 0.85em;
        padding: 0.75em 1em;
    }

    body main#intro #captureSetup #cameraDisplay video{
        min-height: 100%;
    }

    body main#intro #telephoneCord{
        width: 100vw;
        top: 30vh;
    }

    body main#intro #welcomeText{
        flex-direction: column;
        justify-content: center;
        height: 35vh;
        text-align: center;
    }

    body main#intro #welcomeText #title #versionBubble{
        font-weight: 400;
        font-size: 10px;
    }

    body main#intro[data-display="capture"] #welcomeText{
        transform: translateY(-200%) scale(3);
    }

    body main#intro #welcomeText #title h1{
        font-size: 1.5em;
    }

    body main#intro #welcomeText #title p{
        margin-top: 0.2em;
        font-size: 0.9em;
    }

    body main#intro #welcomeText #startCall .button{
        margin-bottom: 1em;
    }

    body main#intro #welcomeText #startCall span{
        font-weight: 200;
    }
    
    body main#intro[data-display="capture"] #hills{
        transform: scale(1.2) translateY(3%);
    }

    body main#intro #hills .hillImage#hill1 #greenPerson{
        left: 85px;
        top: 0;
    }

    body main#intro #hills .hillImage#hill3{
        bottom: -10px;
        width: 84vw;
    }

    body main#intro #hills .hillImage#hill4{
        bottom: 0;
    }

    body main#intro #hills .hillImage#hill4 #yellowPerson{
        top: 0px;
        right: 50px;
    }

    body main#call #video-grid{
        flex-direction: column;
        margin-bottom: 3em;
    }

    body main#call .video-tile{
        width: 100%;
        max-width: 100%;
        max-height: 42vh;
        box-sizing: border-box;
    }

    body main#call #video-grid[data-count="3"]{
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    #video-grid[data-count="3"] .video-tile, body main#call #video-grid[data-count="4"] .video-tile{
        height: 100vh;
        max-height: 42vh;
        box-sizing: border-box;
        max-width: initial;
    }

    body main#call #video-grid[data-count="4"]{
        flex-direction: row;
    }

    body main#call #controls{
        justify-content: flex-start;
    }

    body main#call #controls #callLink{
        position: fixed;
        left: 50%;
        bottom: 7em;
        transform: translateX(-50%);
    }

    body main#call #controls button{
        font-size: 0.75em;
    }

}

@property --angle {
    syntax: '<angle>';
    initial-value: 130deg;
    inherits: false;
}

@keyframes pulse {

    0%{
        opacity: 0.75;
    }

    50%{
        opacity: 0.25;
    }

    100%{
        opacity: 0.75;
    }
    
}

@keyframes float {

    0%{
        transform: translateY(0px);
    }

    33%{
        transform: translateY(15px);
    }

    66%{
        transform: translateY(-15px);
    }

    100%{
        transform: translateY(0px);
    }
    
}

@keyframes wave {

    0%{
        transform: rotate(10deg);
    }

    50%{
        transform: rotate(-10deg);
    }

    100%{
        transform: rotate(10deg);
    }
    
}

@keyframes telephoneCord {
    
    0%{
        opacity: 1.0;
        transform: rotate(0deg) scale(1.1);
    }

    33%{
        opacity: 0.5;
        transform: rotate(-5deg) scale(1.1);
    }

    66%{
        opacity: 0.5;
        transform: rotate(5deg) scale(1.1);
    }

    100%{
        opacity: 1.0;
        transform: rotate(0) scale(1.1);
    }

}

@keyframes rotate {
    
    from {
        --angle: 360deg;
    }
    to {
        --angle: 0deg;
    }

}
