/* FOTZENENTERTAINMENT - CSS */

:root {
    --color-bg: #000000;
    --color-fg: #ffffff;
    --color-accent: #cc0000;
    --color-accent-hover: #ff0000;
    --color-muted: #666666;
    --color-border: #333333;
    --color-surface: #111111;
    --font-display: 'Datatype', monospace;
    --font-text: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 0 !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-fg);
    font-family: var(--font-display);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

img, video {
    display: block;
    border: 0;
    outline: 0;
}

ul, ol {
    list-style: none;
}

a {
    color: var(--color-fg);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-accent);
}

button {
    border-radius: 0 !important;
    cursor: pointer;
    font-family: var(--font-display);
    border: none;
    outline: none;
}

input, textarea, select {
    border-radius: 0 !important;
    font-family: var(--font-display);
    outline: none;
}

/* ========================
   LOADING SCREEN
   ======================== */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.3em;
    color: var(--color-fg);
    animation: loading-pulse 1.5s ease-in-out infinite;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.loading-bar-container {
    width: 300px;
    height: 2px;
    background: var(--color-border);
    position: relative;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: var(--color-fg);
    width: 0%;
    transition: width 0.3s ease;
}

.loading-percent {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.75rem;
    letter-spacing: 0.2em;
    text-align: center;
}

/* ========================
   MAIN CONTENT
   ======================== */

#main-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#main-content.visible {
    display: block;
    opacity: 1;
}

/* ========================
   LANGUAGE SWITCHER
   ======================== */

.lang-switcher {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9500;
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: none;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 20px;
    opacity: 0.4;
    transition: opacity 0.2s;
    filter: grayscale(100%) brightness(0.7);
    overflow: hidden;
    display: block;
}

.lang-btn:hover {
    opacity: 0.7;
}

.lang-btn.active {
    opacity: 1;
    filter: grayscale(60%) brightness(0.8) sepia(100%) hue-rotate(-30deg) saturate(5);
}

.lang-btn svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================
   VIEWPORT 1: HERO
   ======================== */

.hero-section {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--color-bg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-fg);
    padding: 0 2rem 3rem 2rem;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

/* ========================
   VIEWPORT 2: GOALS
   ======================== */

.goals-section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    background: var(--color-bg);
}

.goals-principles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 2px solid var(--color-accent);
    padding-left: 1.5rem;
    max-width: 800px;
}

.goals-principle {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.8;
}

.goals-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.goal-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    transition: background-color 0.4s;
    position: relative;
}

.goal-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--color-accent);
    transition: height 0.4s;
}

.goal-card:hover::before {
    height: 100%;
}

.goal-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.goal-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-fg);
    min-width: 220px;
    flex-shrink: 0;
}

.goal-card-text {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--color-muted);
    line-height: 1.8;
}

/* ========================
   VIEWPORT 3: INTRO
   ======================== */

.intro-section {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.intro-text-side {
    width: 50%;
    padding: 6rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg);
    position: relative;
    z-index: 2;
}

.intro-text {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--color-muted);
    line-height: 2;
    max-width: 600px;
    white-space: pre-line;
}

.intro-image-side {
    width: 50%;
    position: relative;
    overflow: hidden;
}

.intro-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

/* ========================
   VIEWPORT 4: HERO CARDS (ACTS)
   ======================== */

.acts-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.act-block {
    display: flex;
    min-height: 50vh;
    border-top: 1px solid var(--color-border);
}

.act-image-side {
    width: 50%;
    position: relative;
    overflow: hidden;
}

.act-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--dynamic-filter, grayscale(100%));
    transform: var(--dynamic-transform, none);
    will-change: filter, transform;
}

/* Ensure dynamic filters are NOT overridden by hover when playing */
.act-block:hover .act-image-side img {
    filter: var(--dynamic-filter, grayscale(80%));
}

.act-image-side.playing-active {
    overflow: visible !important;
}

.act-image-side.playing-active img {
    z-index: 10;
    animation: none !important; /* Stop panning when playing to avoid jitter conflicts */
}

.act-content-side {
    width: 50%;
    padding: 3rem 3rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    background: var(--color-bg);
    position: relative;
    z-index: 2;
    min-height: 50vh;
}

.act-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-fg);
    margin-top: 1rem;
}

.act-description {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--color-muted);
    line-height: 1.8;
}

/* ========================
   AUDIO PLAYER (Custom styled)
   ======================== */

.audio-player {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: row-reverse; /* Button on the right */
    align-items: flex-end;
    background: transparent;
    border: none;
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.audio-play-btn {
    width: 33.333%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: var(--color-accent);
    color: var(--color-bg) !important; /* Button icon remains readable */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s;
    padding: 0;
    z-index: 10;
}

.audio-play-btn:hover {
    background: #ff1a1a;
}

.audio-play-btn .material-icons {
    font-size: 5rem;
    color: inherit;
}

.audio-info {
    flex: 1;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    gap: 1rem;
    min-width: 0;
}

.audio-track-name {
    font-family: var(--font-display);
    font-size: 1.2rem; /* Bigger track name */
    color: var(--dynamic-text-color, inherit);
    text-shadow: var(--dynamic-shadow, none);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    position: relative;
}

.audio-progress-container:hover {
    height: 8px;
}

.audio-progress-bar {
    height: 100%;
    background: var(--dynamic-text-color, var(--color-accent));
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-family: var(--font-display);
    font-size: 1rem; /* Bigger time display */
    color: var(--dynamic-text-color, inherit);
    text-shadow: var(--dynamic-shadow, none);
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.audio-volume-btn {
    display: none;
}

/* ========================
   VIEWPORT 5: FOOTER
   ======================== */

.footer-section {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    background: transparent;
    position: relative;
    z-index: 2;
}

.footer-link {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-fg);
    cursor: pointer;
    transition: all 0.2s linear;
    background: none;
    border: none;
    padding: 0;
}

.middot {
    font-size: 2rem;
}

.footer-link:hover {
    color: var(--color-accent-hover);
    transition: all 0.2s linear;
}

a.footer-link {
    width: 100%;
    background: var(--color-fg);
    text-align: center;
    padding: 2rem 0;
    color: var(--color-muted);
    display: block;
    font-size: 1rem;
    transition: color 0.2s;
}
a.footer-link:hover {
    color: var(--color-bg);
    transition: color 0.2s;
}
.skull-icon {
    font-size: 3rem;
    vertical-align: sub;
}
button {
    border-radius: 0 !important;
    cursor: pointer;
    font-family: var(--font-display);
    border: none !important; /* Rules: No borders on buttons */
    outline: none;
}

/* ========================
   MODALS
   ======================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(10px);
}

/* Add a subtle grain texture to the overlay */
.modal-overlay::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url(/static/img/textures/grain_light.jpg);
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

.modal-overlay.active {
    display: flex;
}

body.no-scroll {
    overflow: hidden !important;
}

.modal-content {
    background: var(--color-bg);
    max-width: 800px;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden; /* Rules: No scrolling */
    padding: 4rem 4rem 1rem 4rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Red accent lines inside modal */
.modal-content::before,
.modal-content::after {
    content: "";
    position: absolute;
    background: var(--color-accent);
    opacity: 0.4;
    z-index: 5;
}

.modal-content::before {
    left: 2rem; top: 0; width: 1px; height: 100%;
}

.modal-content::after {
    left: 0; top: 4rem; width: 100%; height: 1px;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    padding: 0;
    z-index: 100;
}

.modal-close:hover {
    background: #ff1a1a;
    transform: scale(1.05);
}

.modal-close .material-icons {
    font-size: 32px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 2rem 0;
    color: var(--color-fg);
    position: relative;
    flex-shrink: 0;
}

.modal-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-muted);
    line-height: 1.6;
    white-space: pre-line;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 1.5rem;
}

/* Theme-consistent scrollbar for modal text */
.modal-text::-webkit-scrollbar {
    width: 2px;
}

.modal-text::-webkit-scrollbar-track {
    background: transparent;
}

.modal-text::-webkit-scrollbar-thumb {
    background: var(--color-accent);
}

.modal-imprint {
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.modal-imprint .modal-text strong {
    color: var(--color-fg);
    letter-spacing: 0.1em;
    font-size: 1.2rem;
}

/* ========================
   CONTACT FORM
   ======================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.contact-recorder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 0;
    background: transparent;
    position: relative;
}

.record-btn {
    width: 120px;
    height: 120px;
    background: var(--color-accent);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    padding: 0;
}

.record-btn:hover {
    background: #ff1a1a;
}

.record-btn.recording {
    background: #fff;
    color: var(--color-accent);
    animation: record-blink 1s ease-in-out infinite;
}

@keyframes record-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
}

.record-btn .material-icons {
    font-size: 56px;
}

.record-status {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-fg);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.record-timer {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.record-actions {
    display: flex;
    gap: 1.5rem;
}

.record-action-btn {
    background: var(--color-surface);
    color: var(--color-fg);
    padding: 1.25rem 2.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s;
}

.record-action-btn:hover {
    background: var(--color-border);
}

.record-action-btn .material-icons {
    font-size: 24px;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.contact-input {
    background: var(--color-surface);
    border: none;
    color: var(--color-fg);
    padding: 1.5rem 2rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    transition: background-color 0.2s;
    width: 100%;
}

.contact-input:focus {
    background: var(--color-border);
}

.contact-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    cursor: pointer;
}

.contact-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--color-surface);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
}

.contact-checkbox input[type="checkbox"]:checked {
    background: var(--color-accent);
}

.contact-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 8px;
    height: 16px;
    border: solid var(--color-bg);
    border-width: 0 4px 4px 0;
    transform: rotate(45deg);
}

.contact-checkbox-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.contact-submit-btn {
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    padding: 1.5rem 4rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    align-self: flex-start;
}

.contact-submit-btn:hover {
    background: #ff1a1a;
}

.contact-submit-btn:active {
    transform: scale(0.98);
}

.contact-submit-btn:disabled {
    background: var(--color-surface);
    color: var(--color-muted);
    cursor: not-allowed;
}

.contact-success {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: none;
}

.contact-success.visible {
    display: block;
}

/* ========================
   VISUAL ENGINE LAYERS
   ======================== */

.visual-fragment {
    transition: opacity 0.8s ease;
}

.parallax-bg {
    transition: none;
}

/* Ensure content sits above visual layers */
.hero-title,
.goals-principles,
.goals-cards,
.intro-text-side,
.act-content-side,
.footer-link,
.footer-separator {
    position: relative;
    z-index: 2;
}


.act-image-side {
    z-index: 1;
}

.intro-image-side {
    z-index: 1;
}

/* Slow drift animation for scattered fragments */
@keyframes fragment-drift {
    0% { transform: rotate(var(--frag-rotation, 0deg)) scale(var(--frag-scale, 1)) translate(0, 0); }
    33% { transform: rotate(calc(var(--frag-rotation, 0deg) + 2deg)) scale(var(--frag-scale, 1)) translate(15px, -10px); }
    66% { transform: rotate(calc(var(--frag-rotation, 0deg) - 1deg)) scale(var(--frag-scale, 1)) translate(-10px, 15px); }
    100% { transform: rotate(var(--frag-rotation, 0deg)) scale(var(--frag-scale, 1)) translate(0, 0); }
}

/* Subtle pulse for certain fragments */
@keyframes fragment-pulse {
    0%, 100% { opacity: var(--frag-opacity, 0.06); }
    50% { opacity: calc(var(--frag-opacity, 0.06) * 1.8); }
}

/* Act images slow pan */
.act-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--dynamic-filter, grayscale(100%));
    will-change: filter;
    animation: act-img-pan 25s ease-in-out infinite alternate;
    transform-origin: center center;
}

/* Act images slow pan */
@keyframes act-img-pan {
    0% { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1.12) translate(-2%, 1%); }
}

/* Intro image slow zoom */
.intro-image-side img {
    animation: intro-zoom 20s ease-in-out infinite alternate;
}

@keyframes intro-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

/* Goal card hover gets red border flash */
.goal-card {
    transition: border-color 0.15s, background-color 0.3s;
}

.goal-card:hover {
    background-color: rgba(204, 0, 0, 0.03);
}

/* Loading screen gets subtle fragment background */
#loading-screen {
    background-image: url(/static/img/collages/hero_main.jpg);
    background-size: cover;
    background-position: center;
}

#loading-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.loading-title,
.loading-bar-container,
.loading-percent {
    position: relative;
    z-index: 1;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {

    /* --- HERO --- */
    .hero-title {
        font-size: 5rem;
        padding: 0 1.5rem 2rem 1.5rem;
    }

    /* --- LANG SWITCHER --- */
    .lang-switcher {
        top: 0.75rem;
        right: 0.75rem;
    }

    .lang-btn {
        width: 24px;
        height: 17px;
    }

    /* --- GOALS --- */
    .goals-section {
        padding: 3rem 1.25rem;
    }

    .goal-card {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.5rem 1.25rem;
    }

    .goal-card-title {
        min-width: 0;
        font-size: 1rem;
        letter-spacing: 0.1em;
    }

    .goal-card-text {
        font-size: 0.75rem;
    }

    .goals-principles {
        padding-left: 1rem;
    }

    .goals-principle {
        font-size: 0.75rem;
    }

    /* --- INTRO --- */
    .intro-section {
        flex-direction: column;
    }

    .intro-text-side {
        width: 100%;
        padding: 3rem 1.5rem;
    }

    .intro-image-side {
        width: 100%;
        height: 50vh;
    }

    /* --- ACTS --- */
    .acts-section .act-block {
        flex-direction: column;
    }

    .act-image-side {
        width: 100%;
        height: 40vh;
    }

    .act-content-side {
        width: 100%;
        padding: 2rem 1.5rem;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .act-name {
        font-size: 1.8rem;
    }

    /* --- AUDIO PLAYER (MOBILE) --- */
    .audio-player {
        position: relative;
        width: 100%;
        height: 120px;
        margin-top: 2rem;
        display: flex;
        align-items: flex-end;
    }

    .audio-play-btn {
        width: 120px;
        height: 120px;
        aspect-ratio: 1 / 1;
    }

    .audio-play-btn .material-icons {
        font-size: 3rem;
    }

    .audio-info {
        padding: 1rem;
    }

    .audio-time {
        min-width: 0;
        font-size: 0.55rem;
    }

    .audio-volume-btn {
        display: none;
    }

    /* --- FOOTER --- */
    .footer-section {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .footer-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    /* --- MODALS --- */
    .modal-overlay {
        padding: 0;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        max-height: 100vh;
        height: 100%;
    }

    /* --- LOADING --- */
    .loading-title {
        font-size: 1.5rem;
        letter-spacing: 0.15em;
    }

    .loading-bar-container {
        width: 200px;
    }

    /* --- VISUAL ENGINE: mobile-friendly animations --- */
    .visual-fragment {
        --frag-opacity: 0.03 !important;
        animation: fragment-drift 20s ease-in-out infinite alternate;
        will-change: transform;
    }

    /* Vary the drift timing for randomness */
    .visual-fragment:nth-child(2n) {
        animation-duration: 25s;
        animation-delay: -5s;
    }

    .visual-fragment:nth-child(3n) {
        animation-duration: 30s;
        animation-delay: -12s;
        animation-direction: alternate-reverse;
    }

    /* Red accent lines: Subtle random shiver (MOBILE ONLY) */
    .red-accent-line {
        opacity: var(--line-opacity);
        animation: red-line-subtle-flicker infinite;
        will-change: opacity;
    }

    @keyframes red-line-subtle-flicker {
        0%, 15%, 45%, 60%, 85%, 100% { opacity: var(--line-opacity); }
        10%, 50%, 90% { opacity: calc(var(--line-opacity) * 0.3); }
        11%, 51%, 91% { opacity: var(--line-opacity); }
        13%, 53%, 93% { opacity: calc(var(--line-opacity) * 0.6); }
        14%, 54%, 94% { opacity: var(--line-opacity); }
    }

    /* Smooth grain animation for mobile */
    .mobile-grain-animate {
        animation: mobile-grain-drift 8s steps(8) infinite;
        opacity: 0.03 !important;
    }

    @keyframes mobile-grain-drift {
        0% { transform: translate(0, 0); }
        20% { transform: translate(-2%, -1%); }
        40% { transform: translate(1%, -2%); }
        60% { transform: translate(-1%, 2%); }
        80% { transform: translate(2%, 1%); }
        100% { transform: translate(0, 0); }
    }

    .act-image-side img {
        animation: mobile-fade-pulse 12s ease-in-out infinite alternate;
        transform: scale(1.02);
    }

    .intro-image-side img {
        animation: mobile-fade-pulse 15s ease-in-out infinite alternate;
        transform: scale(1.02);
    }
}

@keyframes mobile-fade-pulse {
    0% { opacity: 0.85; }
    100% { opacity: 1; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .act-name {
        font-size: 1.4rem;
    }

    .goal-card-title {
        font-size: 0.85rem;
    }
}
