/* Story Section Styles */
.story-section {
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.story-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(203, 32, 64, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.story-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.story-act {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    overflow: visible;
    position: relative;
    min-height: 450px;
}

/* Broken glass shard containers */
.story-act::before,
.story-act::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    /* border: 1px solid rgba(203, 32, 64, 0.3); */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}


.story-act::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(203, 32, 64, 0.3);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.story-act:hover::before,
.story-act.revealed::before {
    opacity: 0;
    transform: scale(1.02);
    border-color: rgba(203, 32, 64, 0.6);
}

/* Glass crack effect overlay */
.story-act::after {
    inset: 0;
    background:
        linear-gradient(135deg, transparent 45%, rgba(203, 32, 64, 0.1) 45.5%, rgba(203, 32, 64, 0.1) 46%, transparent 46.5%),
        linear-gradient(-45deg, transparent 48%, rgba(146, 236, 245, 0.1) 48.5%, rgba(146, 236, 245, 0.1) 49%, transparent 49.5%),
        linear-gradient(90deg, transparent 30%, rgba(203, 32, 64, 0.05) 30.5%, transparent 31%),
        linear-gradient(60deg, transparent 65%, rgba(203, 32, 64, 0.08) 65.5%, transparent 66%);
    opacity: 1;
}

.story-act:hover::after,
.story-act.revealed::after {
    opacity: 0;
    animation: shatter 0.6s ease-out forwards;
}

@keyframes shatter {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.02) rotate(1deg);
    }

    100% {
        opacity: 0;
        transform: scale(1.05) rotate(2deg);
    }
}

.story-act:hover,
.story-act.revealed {
    filter: drop-shadow(0 0 30px rgba(203, 32, 64, 0.4)) drop-shadow(0 0 60px rgba(203, 32, 64, 0.2));
    animation: glassReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes glassReveal {
    0% {
        filter: brightness(0.8) contrast(1);
    }

    100% {
        filter: brightness(1.1) contrast(1.2) drop-shadow(0 0 30px rgba(203, 32, 64, 0.4));
    }
}

.story-act:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}

.story-act:nth-child(even) .story-image {
    order: 2;
}

.story-act:nth-child(even) .story-content {
    order: 1;
}

.story-image {
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
    filter: brightness(0.6) contrast(1) blur(2px);
}

.story-act:hover .story-image img,
.story-act.revealed .story-image img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2) blur(0px);
}

/* Frosted glass overlay that disappears */
.story-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(203, 32, 64, 0.2) 0%, transparent 50%);
    backdrop-filter: blur(3px);
    opacity: 1;
    transition: opacity 0.6s ease, backdrop-filter 0.6s ease;
    z-index: 2;
}

.story-act:hover .story-image::before,
.story-act.revealed .story-image::before {
    opacity: 0;
    backdrop-filter: blur(0px);
}

/* Glass shard reflections */
.story-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.1) 41%, transparent 50%),
        linear-gradient(-120deg, transparent 60%, rgba(203, 32, 64, 0.2) 70%, transparent 71%);
    opacity: 1;
    transform: translateX(-100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    pointer-events: none;
}

.story-act:hover .story-image::after,
.story-act.revealed .story-image::after {
    opacity: 0;
    transform: translateX(100%) scale(1.2);
}

.story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(16, 16, 20, 0.95) 0%,
            rgba(16, 16, 20, 0.7) 50%,
            transparent 100%);
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.6s ease, background 0.6s ease;
    opacity: 1;
}

.story-act:hover .story-overlay,
.story-act.revealed .story-overlay {
    opacity: 0.3;
    background: linear-gradient(to right,
            rgba(16, 16, 20, 0.6) 0%,
            rgba(16, 16, 20, 0.2) 50%,
            transparent 100%);
}

.story-act:nth-child(even) .story-overlay {
    background: linear-gradient(to left,
            rgba(16, 16, 20, 0.95) 0%,
            rgba(16, 16, 20, 0.7) 50%,
            transparent 100%);
}

.story-act:nth-child(even):hover .story-overlay,
.story-act:nth-child(even).revealed .story-overlay {
    opacity: 0.3;
    background: linear-gradient(to left,
            rgba(16, 16, 20, 0.6) 0%,
            rgba(16, 16, 20, 0.2) 50%,
            transparent 100%);
}

.story-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
}

/* Decorative corner brackets */
.story-content::after {
    content: '';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-right: 3px solid rgba(203, 32, 64, 0.4);
    border-bottom: 3px solid rgba(203, 32, 64, 0.4);
    transition: all 0.5s ease;
    z-index: 1;
}

.story-act:hover .story-content::after,
.story-act.revealed .story-content::after {
    width: 60px;
    height: 60px;
    border-color: rgba(203, 32, 64, 0.8);
    box-shadow: 0 0 15px rgba(203, 32, 64, 0.4);
}

.story-act:nth-child(even) .story-content::after {
    right: auto;
    left: 1rem;
    border-right: none;
    border-left: 3px solid rgba(203, 32, 64, 0.4);
}

.story-act:nth-child(even):hover .story-content::after,
.story-act:nth-child(even).revealed .story-content::after {
    border-left-color: rgba(203, 32, 64, 0.8);
}

.story-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0%;
    background: linear-gradient(to bottom,
            var(--primary-color),
            var(--secondary-color));
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-act:hover .story-content::before,
.story-act.revealed .story-content::before {
    height: 80%;
}

.story-act:nth-child(even) .story-content::before {
    left: auto;
    right: 0;
}

.story-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

/* Top corner bracket */
.story-header::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -1rem;
    width: 30px;
    height: 30px;
    border-top: 3px solid rgba(203, 32, 64, 0.4);
    border-left: 3px solid rgba(203, 32, 64, 0.4);
    transition: all 0.5s ease;
}

.story-act:hover .story-header::before,
.story-act.revealed .story-header::before {
    width: 50px;
    height: 50px;
    border-color: rgba(203, 32, 64, 0.8);
}

.story-header::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-act:hover .story-header::after,
.story-act.revealed .story-header::after {
    width: 100%;
}

.story-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--primary-color);
    margin: 0;
    text-shadow: 0 0 10px rgba(203, 32, 64, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(203, 32, 64, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(203, 32, 64, 0.8), 0 0 30px rgba(203, 32, 64, 0.4);
    }
}

.story-header h4 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    background: linear-gradient(135deg,
            var(--text-color) 0%,
            var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
}

.story-act:hover .story-header h4,
.story-act.revealed .story-header h4 {
    background-position: 100% 100%;
}

.story-date {
    font-size: 0.875rem;
    color: var(--text-fade);
    font-style: italic;
    font-family: monospace;
    letter-spacing: 0.05em;
    position: relative;
    padding-left: 1.5rem;
}

.story-date::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 49%, 100% {
        opacity: 1;
    }

    50%, 99% {
        opacity: 0.3;
    }
}

.story-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.85;
    margin: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.story-act:hover .story-description,
.story-act.revealed .story-description {
    opacity: 1;
}

.story-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-fade);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-style: italic;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.story-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(203, 32, 64, 0.2) 50%,
            transparent 100%);
    transform: translateX(-100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

a.story-link {
    color: var(--primary-color);
    font-style: normal;
    cursor: pointer;
}

a.story-link:hover {
    color: var(--secondary-color);
    gap: 1rem;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(203, 32, 64, 0.3);
}

/* Decorative elements */
.story-act::after {
    content: attr(data-act);
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 10rem;
    font-weight: 900;
    color: rgba(203, 32, 64, 0.05);
    pointer-events: none;
    z-index: 0;
    transition: all 0.5s ease;
}

.story-act:nth-child(odd)::after {
    text-align: end;
}

.story-act:hover::after,
.story-act.revealed::after {
    color: rgba(203, 32, 64, 0.1);
    transform: scale(1.1) rotate(-5deg);
}

/* Tablet and Mobile Responsive */
@media (max-width: 1024px) {
    .story-section {
        padding: 6rem 1.5rem;
    }

    .story-container {
        gap: 3rem;
    }

    .story-act {
        grid-template-columns: 1fr;
    }

    .story-act:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .story-act:nth-child(even) .story-image,
    .story-act:nth-child(even) .story-content {
        order: initial;
    }

    .story-image {
        min-height: 300px;
    }

    .story-overlay {
        background: linear-gradient(to bottom,
                transparent 0%,
                rgba(16, 16, 20, 0.6) 70%,
                rgba(16, 16, 20, 0.9) 100%) !important;
    }

    .story-content {
        padding: 2rem;
    }

    .story-content::before {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 0%;
        height: 4px;
        top: 0;
    }

    .story-act:hover .story-content::before,
    .story-act.revealed .story-content::before {
        width: 80%;
        height: 4px;
    }

    .story-header h4 {
        font-size: 1.5rem;
    }

    .story-act::after {
        font-size: 5rem;
    }
}

@media (max-width: 768px) {
    .story-section {
        padding: 4rem 1rem;
    }

    .story-container {
        gap: 2rem;
    }

    .story-image {
        min-height: 250px;
    }

    .story-content {
        padding: 1.5rem;
        gap: 1rem;
    }

    .story-header h3 {
        font-size: 0.75rem;
    }

    .story-header h4 {
        font-size: 1.25rem;
    }

    .story-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .story-link {
        font-size: 0.75rem;
    }

    .story-act::after {
        font-size: 4rem;
        opacity: 0.5;
    }
}