@font-face {
  font-family: "InclusiveSans";
  src: url("./files/webfonts/InclusiveSans-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*{
    box-sizing: border-box;
    
}
html, body{
    margin: 0 auto;
    padding: 0;
    height: 100vh;
    width: 100vw;
    color: aliceblue;
    font-family: "InclusiveSans", sans-serif;
}
.layout{
    display: grid;
    grid-template:
        "header"
        "nav"
        "main"
        "footer";
    
}
header{
    height: 9vh;    
    background-color: #14213d;
    grid-area: header;
    color: aliceblue;
    text-align: center;
    font-size: 7vh;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
}
nav{
    grid-area: nav;
    height: 7vh;    
    background-color: #0e3057;
    color: aliceblue;
    font-size:  4vh;
    text-align: center;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
    z-index: 10;
    align-items: center;
    position: sticky;
}
main{
    height: 80vh;
    background-color: #e5e5e5;
    grid-area: main;
    color: black;
    font-size: 40%;
    overflow-y: auto;
    padding: 14vh;
}
footer{
    height: 4vh;
    background-color: #14213d;
    grid-area: footer;
    color: aliceblue;
    text-align: center;
    font-size: 2.8vh;
    display: flex;
    bottom: 0;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

a{
    color: white;
    text-decoration: none;
}

.powitanie{
    text-align: center;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.powitanie h1{
    font-size: 9vh;
}
.powitanie p{
    font-size: 2.5vh;
}

button{
    border-radius: 7px;
    box-shadow: 0 0 7px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    header {
        font-size: 8vw;
    }
    nav {
        font-size: 5vw;
    }
    main {
        font-size: 3.5vw;
        padding: 5%;
    }
    footer {
        font-size: 3vw;
        position: fixed;    
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }
    button {
        width: 80%;
        font-size: 4vw;
    }
}

/* TV page transition */
@keyframes tv-in {
  0%   { width: 120px; height: 8px;  opacity: 0; border-radius: 6px; }
  15%  { width: 120px; height: 8px;  opacity: 1; border-radius: 6px; }
  50%  { width: 100%;  height: 8px;  opacity: 1; border-radius: 6px; }
  75%  { width: 100%;  height: 100%; opacity: 1; border-radius: 0px; }
  88%  { width: 100%;  height: 100%; opacity: 1; border-radius: 0px; }
  100% { width: 100%;  height: 100%; opacity: 0; border-radius: 0px; }
}

@keyframes tv-out {
  0%   { width: 100%;  height: 100%; opacity: 1; border-radius: 0px; }
  40%  { width: 100%;  height: 8px;  opacity: 1; border-radius: 6px; }
  65%  { width: 120px; height: 8px;  opacity: 1; border-radius: 6px; }
  85%  { width: 120px; height: 8px;  opacity: 0; border-radius: 6px; }
  100% { width: 120px; height: 8px;  opacity: 0; border-radius: 6px; }
}

.tv-overlay {
  position: fixed;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #1e3460 0%, #14213d 100%);
  pointer-events: none;
  opacity: 0;
  width: 120px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 6px;
  will-change: width, height, opacity, border-radius;
}

.tv-overlay.tv-out {
  opacity: 1;
  width: 100%;
  height: 100%;
  border-radius: 0px;
  animation: tv-out 900ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.tv-overlay.tv-in {
  opacity: 0;
  width: 120px;
  height: 8px;
  border-radius: 6px;
  animation: tv-in 1600ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

/* Hide page content during transition */
.tv-content-hidden .layout {
  opacity: 0;
}
