* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #000 !important;
}

body {
    background-color: #000000;
    min-height: 100vh;
    font-family: "futura-pt", sans-serif;
    color: white;
    padding: 0;
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Grainy background effect */
body::before {
    content: none !important;
}

.container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* Main title style */
.title {
    font-family: "eckmannpsych-medium", serif;
    font-size: 15vw;
    font-weight: normal;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    margin: 0;
    padding: 0;
    /* letter-spacing: -0.05em; */
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
    transition: opacity 1s ease-in-out;
    box-sizing: border-box;
    mix-blend-mode: screen;
}

.title a {
    color: inherit;
    text-decoration: none;
}

.title a:hover {
    color: inherit;
    text-decoration: none;
}

/* Subtitle container style */
.subtitle-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem); /* Increased minimum from 1rem to 1.2rem */
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    transition: opacity 1s ease-in-out;
    box-sizing: border-box;
    mix-blend-mode: screen;
}

.left, .right {
    font-family: "anisette-std", sans-serif;
    font-weight: normal;
}

/* Style for the IDEO link */
.subtitle-container .left a {
    color: white; /* Set text color to white */
    text-decoration: none; /* Remove default underline */
    position: relative; /* For pseudo-element positioning */
}

.subtitle-container .left a:hover {
    text-decoration: underline; /* Add underline on hover */
}

/* Style for the IDEO logo */
.ideo-logo {
    height: clamp(1rem, 1.6vw, 1.2rem) !important; /* Increased minimum from 0.8rem to 1rem */
    width: auto !important; /* Maintain aspect ratio */
    max-height: 1.2rem !important; /* Fallback max height */
    min-height: 1rem !important; /* Ensure minimum size */
    vertical-align: top; /* Align with top of text */
    margin-top: -0.1em; /* Move logo up slightly */
    filter: brightness(1); /* Ensure logo is white */
    transition: opacity 0.3s ease; /* Smooth transition for hover effects */
}

.subtitle-container .left a:hover .ideo-logo {
    /* Remove border-bottom to avoid affecting image size */
}

.subtitle-container .left a:hover::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: white;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    /* Remove width, height, and aspect-ratio so JS controls size */
    z-index: 2;
    mix-blend-mode: screen;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    transition: opacity 1s ease-in-out;
}

.content-wrapper {
    width: 100%;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
}

.footer-text {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-family: "anisette-std", sans-serif;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem); /* Increased minimum from 1rem to 1.1rem */
    color: white;
    z-index: 3;
    transition: opacity 1s ease-in-out;
    text-align: right;
}

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

.footer-text a:hover {
    text-decoration: underline;
}

.description-text {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    font-family: "anisette-std", sans-serif;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem); /* Increased minimum from 1rem to 1.1rem */
    color: white;
    z-index: 3;
    text-align: left;
    line-height: 1.4;
    transition: opacity 1s ease-in-out;
    width: 30vw;
}

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

.description-text a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .footer-text,
    .footer-text.mobile-footer,
    .footer-links .footer-text,
    .description-text,
    .description-text.mobile-footer,
    .footer-links .description-text {
        text-align: center !important;
    }
    .footer-text,
    .footer-text.mobile-footer,
    .footer-links .footer-text {
        bottom: 5rem;
        right: 0;
        left: 0;
        font-size: clamp(1.1rem, 1.5vw, 1.4rem); /* Increased minimum from 1rem to 1.1rem */
        margin-bottom: 0.3rem !important;
    }
    .description-text,
    .description-text.mobile-footer,
    .footer-links .description-text {
        bottom: 2rem;
        left: 0;
        right: 0;
        max-width: none;
        font-size: clamp(1.1rem, 1.5vw, 1.4rem); /* Increased minimum from 1rem to 1.1rem */
        text-align: center !important;
    }
    .all-page .footer-text {
        margin-bottom: 0.3rem !important;
    }
    .all-page .description-text {
        margin-bottom: 0 !important;
    }
}

/* Back button style */
.back-button {
    position: fixed;
    top: 20px; /* Distance from the top */
    left: 20px; /* Distance from the left */
    color: white;
    font-family: "anisette-std", "futura-pt", sans-serif;
    font-size: 1.1rem; /* Base font size for the button text */
    text-decoration: none;
    z-index: 10001; /* Force above everything */
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: flex; /* Use flexbox to align the span and text */
    align-items: center;
    pointer-events: auto; /* Always clickable */
}

.back-button:hover {
    opacity: 0.7; /* Reduce opacity slightly on hover */
    background-color: transparent; /* Ensure no background on hover */
}

.back-button span {
    font-size: 1.5em; /* Make the span (the <) larger than the rest of the text */
    margin-right: 5px; /* Add some space between the < and BACK */
}

/* Removed video styles as videos are now on separate pages */

/* Full-screen black overlay for transitions */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
    z-index: 9999;
    pointer-events: none;
}
.fade-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out;
    pointer-events: auto;
}

/* Video page layout (for hallucination*.html) */
.video-page {
    background-color: #000;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.video-page #videoPlayer {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    opacity: 1; /* Make visible immediately */
    transition: opacity 2s ease-in-out; /* Fade-in transition */
    background: #000;
    display: block;
    border: none;
}

/* Specific styling for YouTube iframes */
.video-page #videoPlayer {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
}

.video-page #videoPlayer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-page .video-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-page .video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* .back-button is already defined globally, but ensure z-index for video pages */
.video-page .back-button {
    z-index: 10001;
    pointer-events: auto;
}

/* --- Collection Page (collection.html) --- */
body.collection-page {
    background-color: #0a0a0a;
    color: white;
    font-family: "futura-pt", sans-serif;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    overflow-y: auto;
}
body.collection-page::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.grid-item {
    aspect-ratio: 1/1;
    overflow: visible;
    max-width: 250px;
    margin: 0 auto;
    position: relative;
    text-decoration: none;
    color: white;
    display: block;
}
.grid-item:hover {
    color: white;
}

.grid-item:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.grid-item .overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: "anisette-std", sans-serif;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem); /* Increased minimum from 1rem to 1.2rem */
    line-height: 1.4;
    width: 80%;
    opacity: 1;
    transition: none;
    pointer-events: none;
}
/* Remove hover effect for overlay-text */
.grid-item:hover .overlay-text {
    opacity: 1;
}
.no-style {
    text-decoration: none;
    color: inherit;
}
.no-style:hover {
    text-decoration: none;
    color: inherit;
}
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 1000;
    text-align: center;
}

/* --- Content visibility (simplified without fade effects) --- */
.content-wrapper,
.grid-container,
.footer-text,
.description-text,
#particleCanvas {
    opacity: 1;
}

/* --- Index Page (index.html) --- */
@media (max-width: 500px) {
    .subtitle-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2em;
    }
    .subtitle-container .right {
        margin-left: 0;
        margin-top: 0.2em;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .back-button {
        font-family: "anisette-std", "futura-pt", sans-serif !important;
    }
    .footer-text:not(.mobile-footer), .description-text:not(.mobile-footer) {
        display: none !important;
    }
    body.index-page .content-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: transparent;
        padding: 1rem 2rem;
    }
    .footer-links {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 2rem;
        padding: 1.5rem 2rem;
        z-index: 10;
        background: none;
        gap: 0.5em;
    }
    .footer-links .footer-text,
    .footer-links .description-text {
        position: static;
        margin: 0;
        width: 100%;
        text-align: center;
        font-family: "anisette-std", sans-serif;
        font-size: clamp(1.1rem, 1.5vw, 1.4rem); /* Increased minimum from 1rem to 1.1rem */
    }
    .content-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 1rem 2rem;
        width: 100vw;
        margin-top: 0; /* Reset margin since it's now fixed */
    }
    .title {
        font-size: 12vw;
        white-space: normal;
        text-align: center;
        width: 100%;
        word-break: break-word;
    }
    .subtitle-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        gap: 0.2em;
        margin-top: 0.5em;
    }
    .subtitle-container .left,
    .subtitle-container .right {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    body.collection-page .footer-links {
        position: static !important;
        padding: 1.5rem 2rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

/* --- Manifesto Page (manifesto.html) --- */
body.manifesto-page {
    background: #000;
    color: #fff;
    font-family: 'Barlow', sans-serif;
}
.content-wrapper.manifesto {
    margin-bottom: 4rem;
}
.manifesto-columns {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    margin-top: 3.5rem;
    position: relative;
    width: 100%;
    gap: 2rem;
}
.manifesto-col {
    position: relative;
    min-height: 500px;
    width: 100%;
    flex: 1 1 0;
    min-width: 0;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    padding-left: 0;
}
.manifesto-col:nth-child(2) {
    margin-top: 12rem;
}
.manifesto-col .giant-letter {
    font-family: 'anisette-std', sans-serif;
    font-size: clamp(60px, 18vw, 320px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: right;
    display: block;
    white-space: nowrap;
}
.manifesto-col:nth-child(1) .giant-letter {
    text-align: left;
    display: block;
    margin-left: -0.07em;
}
.manifesto-col:nth-child(2) .giant-letter {
    text-align: center;
    display: block;
}
.manifesto-col:nth-child(3) {
    position: relative;
    margin-right: 2rem;
}
.manifesto-col:nth-child(3) .giant-letter {
    text-align: right;
    display: block;
    margin: 0;
    width: auto;
    max-width: none;
    position: relative;
    left: 0;
    transform: none;
    will-change: transform;
}
.manifesto-col .manifesto-text {
    position: relative;
    z-index: 1;
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: #fff;
    margin-top: 0.5rem;
    width: 100%;
}
.manifesto-col blockquote {
    font-style: italic;
    margin: 2em 0 1em 0;
    padding: 0;
    color: #fff;
}
.manifesto-col blockquote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 13px;
    font-style: normal;
    opacity: 0.7;
}
/* Default: 4 columns */
.manifesto-footer {
    width: 100%;
    margin: 4rem 0 0 0;
    padding: 2rem 2rem 2.5rem 2rem;
    box-sizing: border-box;
    border-top: 1px solid #888;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    font-family: 'anisette-std', sans-serif;
    font-size: 1.1rem;
}
.manifesto-footer h4 {
    font-size: 1.1rem;
    font-family: 'anisette-std', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin: 0 0 1.2em 0;
}
.manifesto-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 300;
}
.manifesto-footer li {
    margin-bottom: 0.5em;
}
.manifesto-footer a {
    color: inherit;
    text-decoration: none;
    transition: text-decoration 0.2s;
}
.manifesto-footer a:hover {
    text-decoration: underline;
}
.giant-letter.top-mobile,
.giant-letter.bottom-mobile {
    display: none !important;
}
.giant-letter.top-desktop,
.giant-letter.bottom-desktop {
    display: block !important;
}
@media (max-width: 900px) {
    .manifesto-columns {
        flex-direction: column;
        align-items: center;
        padding: 0 2rem;
        gap: 1rem;
    }
    .manifesto-col {
        max-width: 500px;
        width: 100%;
        margin: 0 auto 1rem auto;
        min-width: 0;
        padding-left: 0;
        position: relative;
        background: none;
        overflow: visible;
        min-height: unset !important;
    }
    .manifesto-col .manifesto-text {
        text-align: initial;
    }
    .manifesto-col:nth-child(2) {
        margin-top: 0 !important;
    }
    .manifesto-col:nth-child(3) {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 500px !important;
        width: 100% !important;
    }
    .manifesto-col:nth-child(3) .giant-letter {
        text-align: right !important;
    }
    .manifesto-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .giant-letter.top-desktop,
    .giant-letter.bottom-desktop {
        display: none !important;
    }
    .giant-letter.top-mobile {
        display: block !important;
        text-align: center;
        width: 100%;
        margin: 0 0 0 0;
        position: static;
        line-height: 1;
    }
    .giant-letter.bottom-mobile {
        display: block !important;
        text-align: center;
        width: 100%;
        margin: 0 0 0.2em 0;
        position: static;
        line-height: 1;
    }
}

@media (max-width: 1000px) {
    .manifesto-footer {
        grid-template-columns: repeat(2, 1fr);
        text-align: initial;
    }
}
@media (max-width: 400px) {
    .manifesto-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

body.index-page .footer-links {
    display: none !important;
}

@media (max-width: 600px) {
    body.index-page .footer-links {
        display: flex !important;
    }
}
body.collection-page .footer-links {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 2rem;
    padding: 1.5rem 2rem;
    z-index: 10;
    background: none;
    gap: 0.5em;
}

@media (min-width: 1000px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
} 

.canvas-expanded {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000;
    transition: width 0.7s cubic-bezier(0.4,0,0.2,1), height 0.7s cubic-bezier(0.4,0,0.2,1);
} 

@media (min-width: 1400px) {
    .grid-container {
        gap: 36px;
    }
    .grid-item {
        max-width: 320px;
    }
} 