/* style.css */

/* Font face */
@font-face {
    font-family: 'ABC Maxi Round Variable Edu';
    src: url('ABCMaxiRoundVariableEdu.woff') format('woff'),
        url('ABCMaxiRoundVariableEdu.woff2') format('woff2');
}

@font-face {
    font-family: 'Karrik';
    src: url('Karrik-Regular.woff2') format('woff2'),
         url('Karrik-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


/* Common styles */
nav a, body, caption, h1, h2, h3, h4, h5, nav, figcaption, footer {
    font-family: 'ABC Maxi Round Variable Edu'; font-weight: normal;
}

p, figcaption, #video-text, .overlay-content li, sup, a {
    font-family: 'Karrik';
    font-weight: lighter;
}

body {
    margin: 0;
    font-family: 'Helvetica', sans-serif;
    color: #353535;
    background: linear-gradient(45deg, #fef8e6, #e6fefb, #d7fbf0, #ece4fb, #fbe4f9);
    animation: backgroundShift 15s infinite;
    overflow-x: hidden;
    background-size: 200% 200%; 
}


body::-webkit-scrollbar {
    display: none;
}

video::-webkit-media-controls-overlay-play-button {
    transition: opacity 0.3s ease;
}

video::-webkit-media-controls-play-button {
    transition: opacity 0.3s ease;
}

video.playing::-webkit-media-controls-overlay-play-button {
    opacity: 0;
    pointer-events: none;
}

nav ul li a {
    transition: color 0.3s ease;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding-bottom: 2rem;
}

footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #B64BAE;
}

/* Hide video mute indicator and all controls */
video::-webkit-media-controls {
  display: none !important;
}

video::-webkit-media-controls-enclosure {
  display: none !important;
}

video::-webkit-media-controls-panel {
  display: none !important;
}

video::-webkit-media-controls-mute-button {
  display: none !important;
}

video::-webkit-media-controls-volume-slider {
  display: none !important;
}

video::-moz-media-controls {
  display: none !important;
}

video::--webkit-media-controls-overlay-enclosure {
  display: none !important;
}


nav.desktop-nav {
    display: block;
}

nav.mobile-nav {
    display: none;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: #353535;
    font-size: 1.5rem;
    cursor: pointer;
}

body:has(#info-overlay.show) nav ul li a:not(.active),
body:has(#archive-overlay.show) nav ul li a:not(.active) {
    color: white !important;
}

body:has(#info-overlay.show) nav ul li a.active .nav-text,
body:has(#archive-overlay.show) nav ul li a.active .nav-text {
    color: white !important;
}

.nav-text {
    display: inline-block;
    width: 12vw;
    text-align: center;
}

nav ul {
    list-style-type: none;
    margin: 0 0.5rem;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 1rem;
    position: fixed;
    width: calc(100% - 1rem);
    max-width: 100%;
    top: 0;
    z-index: 3000;
    transition: color 0.5s, justify-content 0.5s ease;
}

nav ul li:nth-child(2) {
    text-align: center;
}

nav ul li:nth-child(3) {
    text-align: right;
}

@media (max-width: 767px) {
    nav.desktop-nav {
        display: none;
    }
    nav.mobile-nav {
        display: block;
    }
}

a {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.overlay-content a {
    display: inline-block; 
    position: relative;    
    color: inherit;        
    text-decoration: none; 
    width: fit-content;
}

.overlay-content a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0; 
    bottom: -2px;
    height: 3px; 
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.overlay-content a:hover::after {
    transform: scaleX(1);
}

span.nav-text {
    display: inline-block; 
    position: relative;   
    width: fit-content;
}

span.nav-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0; 
    bottom: -2px;
    height: 3px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

span.nav-text:hover::after {
    transform: scaleX(1);
}

.quantum-flirt {
    display: inline-block; 
    position: relative;    
    text-decoration: none; 
    color: inherit;  
}

.quantum-flirt::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0; 
    bottom: -2px;
    height: 3px; 
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.quantum-flirt:hover::after {
    transform: scaleX(1);
}

main {
    scroll-behavior: smooth;
}

#feature-text {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
    position: relative;
    font-size: clamp(3rem, 5vw, 76pt);
    line-break: auto;
    line-height: 1.1em;
}

#feature-text .text-container {
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}

#feature-text p {
    margin: 0;
}

::selection {
    background: #fbe4f9;
    color: white;
}

.scroll-arrow {
    width: 84px;
    height: auto;
    cursor: pointer;
    position: relative;
    margin-top: 4rem;
    align-self: center;
    transform: rotate(90deg);
    opacity: 1;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    transform: rotate(90deg) translateX(5px);
    filter: brightness(0) saturate(100%) invert(47%) sepia(88%) saturate(1247%) hue-rotate(283deg) brightness(93%) contrast(88%);
}

.arrow-left, .arrow-right {
    display: block;
    width: 84px;
    height: auto;
    position: absolute;
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

.arrow-left {
    display: none;
}

.arrow-right {
    right: 1.5rem;
}

.arrow-right:hover {
    transform: translateY(-50%) translateX(5px);
    filter: brightness(0) saturate(100%) invert(47%) sepia(88%) saturate(1247%) hue-rotate(283deg) brightness(93%) contrast(88%);
}

#video-next {
    z-index: 4;
}

#video-player {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    display: none;
}

.video-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.video-wrapper::-webkit-scrollbar {
    display: none;
}

.video-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    height: 100%;
    width: 100vw;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.video-slide {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    scroll-snap-align: start;
}

.video-slide figcaption {
    font-family: 'ABC Maxi Round Variable Edu'; font-weight: normal;
}

.video {
    max-width: 80%;
    max-height: 80vh;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    padding: 0.5rem;
    box-sizing: border-box;
}

figcaption {
    font-size: 1.5rem;
    margin: 1rem auto;
    text-align: center;
    width: 80%;
    max-width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.caption-text {
    flex: 1;
    text-align: center;
}

.sound-toggle {
    font-family: 'ABC Maxi Round Variable Edu';
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #353535;
    cursor: pointer;
    padding: 0;
    margin: 0;
    margin-right: 1rem;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.sound-toggle:hover {
    opacity: 0.6;
}

.sound-toggle[data-state="on"] {
    text-decoration: line-through;
}

#info-overlay, #archive-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    color: white;
    z-index: 2000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.5s;
}

#info-overlay.show, #archive-overlay.show {
    display: block;
    opacity: 1;
}


.overlay-content {
    padding: 2rem;
    font-size: 22pt;
}

.overlay-content article {
    margin-bottom: 2rem;
}

.overlay-content article::-webkit-scrollbar, .overlay-content::-webkit-scrollbar, .info-overlay::-webkit-scrollbar,.show::-webkit-scrollbar, .column::-webkit-scrollbar, .two-columns::-webkit-scrollbar {
    display: none;
}

.two-columns {
    display: flex;
}

.two-columns .column {
    flex: 1;
    padding: 1rem;
}

.column a {
    display: block;
}

.image-text {
    display: flex;
}

.image-text .column {
    flex: 1;
    padding: 1rem;
}

.image-text img {
    max-width: 100%;
    height: auto;
}

.archive-intro {
    margin: 4%; text-align: center;
}

.archive-list {
    margin-top: 10vh;
    list-style: none;
    padding: 0;
    font-size: 20pt;
}

.archive-list li {
    padding: 1rem;
    border-bottom: 3px solid #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: all 0.5s ease;
    flex-direction: column;
    overflow: hidden;
}

.archive-list .video-container {
    display: none;
    width: 100%;
    max-height: 0;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.archive-list .video-container video {
    width: 100%;
    height: auto;
}

#video-section {
    position: relative;
}

#video-text {
    display: block;
    position: absolute;
    writing-mode: vertical-lr;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 400;
    left: 0.5rem;
    font-size: 1.5rem;
    transition: opacity 0.8s ease-in-out, letter-spacing 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#video-text.changing {
    letter-spacing: 0.5em;
    opacity: 0.7;
}

@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes horizontal-shaking {0% { transform: translateX(0) }25% { transform: translateX(5px) }50% { transform: translateX(-5px) }75% { transform: translateX(5px) }100% { transform: translateX(0) }}
@keyframes tilt-shaking {0% { transform: rotate(0deg); }25% { transform: rotate(5deg); }50% { transform: rotate(0deg); }75% { transform: rotate(-5deg); }100% { transform: rotate(0deg); }}
@keyframes tilt-n-move-shaking {0% { transform: translate(0, 0) rotate(0deg); }25% { transform: translate(5px, 5px) rotate(5deg); }50% { transform: translate(0, 0) rotate(0deg); }75% { transform: translate(-5px, 5px) rotate(-5deg); }100% { transform: translate(0, 0) rotate(0deg); }}
@keyframes vertical-shaking {0% { transform: translateY(0) }25% { transform: translateY(5px) }50% { transform: translateY(-5px) }75% { transform: translateY(5px) }100% { transform: translateY(0) }}
@keyframes horizontal-shaking {0% { transform: translateX(0) }25% { transform: translateX(5px) }50% { transform: translateX(-5px) }75% { transform: translateX(5px) }100% { transform: translateX(0) }}
@keyframes jump-shaking {0% { transform: translateX(0) }25% { transform: translateY(-9px) }35% { transform: translateY(-9px) rotate(17deg) }55% { transform: translateY(-9px) rotate(-17deg) }65% { transform: translateY(-9px) rotate(17deg) }75% { transform: translateY(-9px) rotate(-17deg) }100% { transform: translateY(0) rotate(0) }}
@keyframes skew-x-shake {0% { transform: skewX(-15deg); }5% { transform: skewX(15deg); }10% { transform: skewX(-15deg); }15% { transform: skewX(15deg); }20% { transform: skewX(0deg); }100% { transform: skewX(0deg); }  }
@keyframes skew-y-shake {0% { transform: skewY(-15deg); }5% { transform: skewY(15deg); }10% { transform: skewY(-15deg); }15% { transform: skewY(15deg); }20% { transform: skewY(0deg); }100% { transform: skewY(0deg); }  }

.horizontal-shaking {
    animation: horizontal-shaking 0.65s ease-in-out;
}

.skew-x-shake {
    animation: skew-x-shake 1.42s ease-in-out;
}

.quantum-flirt {
    display: inline-block;
    transition: all 1s ease;
}

.portrait-warning {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    z-index: 9999;
    text-align: center;
    font-size: 1.5rem;
    border-radius: 10px;
}

@media only screen and (orientation: portrait) and (min-width: 768px) and (max-width: 1024px) {
    .portrait-warning {
        display: block;
    }

    #video-player, #mobile-video-grid {
        display: none !important;
    }
}

/* Video Control Enhancements */
video {
    cursor: pointer;
}

/* Ensure controls are always visible */
video::-webkit-media-controls {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

video::-webkit-media-controls-enclosure {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Make sound button more prominent */
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-volume-slider {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: scale(1.2);
}

/* Improve video hover state */
.video-slide:hover video,
.video-container:hover video {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

/* Add visual feedback for clickable videos */
.video {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video:active {
    transform: scale(0.98);
}

/* Ensure archive videos don't disappear on click */
.archive-list .video-container {
    pointer-events: auto !important;
}

.archive-list .video {
    pointer-events: auto !important;
    z-index: 10;
    position: relative;
}
