:root {
    --bg-dark: rgba(0, 0, 0, 0.8);
    --bg-medium: rgba(0, 0, 0, 0.5);
    --bg-light: rgba(0, 0, 0, 0.3);
    --blur-std: blur(10px);
}

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

html {
    scroll-behavior: smooth;
}

body,
button,
input,
textarea,
select {
    font-family: 'Inter', Arial, sans-serif;
}

body {
    color: #333;
    overflow-x: hidden;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Container */
.content-container {
    position: relative;
    z-index: 1;
}

/* Sections */
.section {
    min-height: 100vh;
    padding: 120px 20px 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin: 20px;
    border-radius: 10px;
}

.landing-section {
    min-height: 100vh;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-section .section-content {
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.landing-section h1 {
    font-family: 'Lugrasimo', cursive;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    animation: fadeInDown 1s ease-out;
}

.landing-section p {
    font-size: 1.5rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Content */
.section-content {
    max-width: 1000px;
    width: 100%;
}

.section h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Stories Grid */
.horizontal-scroll .section-content {
    width: 100%;
    overflow: visible;
}

.horizontal-content {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

.horizontal-item {
    flex: 0 0 calc(33.333% - 20px);
    background: transparent;
    padding: 30px;
    border-radius: 10px;
    will-change: transform;
}

.horizontal-item p {
    margin: 0;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.about-text-box {
    background: var(--bg-light);
    backdrop-filter: var(--blur-std);
    -webkit-backdrop-filter: var(--blur-std);
    margin-top: 0;
    flex: 0 0 auto;
    width: 100%;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.about-text-box p {
    margin-bottom: 20px;
}

.about-text-box p:last-child {
    margin-bottom: 0;
}

.about-inline-link {
    /* (rules now merged above for all links) */
}

#about .section-content {
    max-width: 1200px;
}

#about .horizontal-content {
    margin-top: 2.5cm;
    justify-content: center;
}

.about-map-wrap {
    margin-top: 3cm;
    margin-bottom: 10cm;
    display: flex;
    justify-content: center;
    width: 100%;
}

.about-map-wrap picture {
    display: flex;
    justify-content: center;
    width: 100%;
}

.about-map-image {
    width: min(100%, 1100px);
    height: auto;
    border-radius: 10px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.story-card {
    background: var(--bg-light);
    backdrop-filter: var(--blur-std);
    -webkit-backdrop-filter: var(--blur-std);
    padding: 30px;
    position: relative;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card-with-sound {
    padding-bottom: 88px;
}

.story-card-extra-bottom-space {
    margin-bottom: 1cm;
}

.story-sound-icon {
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.story-sound-icon:hover,
.story-sound-icon:focus-visible {
    background: var(--bg-dark);
    outline: none;
}

.story-sound-icon img {
    width: 28px;
    height: 28px;
}

.story-card:hover {
    transform: translateY(-10px);
}

.story-card h3 {
    font-family: 'Lugrasimo', cursive;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    text-transform: lowercase;
}

/* Story links: start white, turn yellow on scroll */

.story-card p {
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* NFT Gallery Grid */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.nft-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
}

.nft-item:hover {
    transform: scale(1.05) translateY(-10px);
}

.nft-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: block;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.nft-placeholder-transparent {
    background: transparent;
}

.nft-item p {
    padding: 15px;
    text-align: center;
    font-size: 0.95rem;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    background: var(--bg-light);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: var(--blur-std);
    -webkit-backdrop-filter: var(--blur-std);
}

.contact-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-text p {
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-family: 'Inter', Arial, sans-serif;
    transition: border-color 0.3s ease;
    background: var(--bg-medium);
    color: white;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
}

.contact-form button {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Donate Section */
.donate-section {
    text-align: center;
    padding: 40px;
    background: transparent;
    border-radius: 10px;
    margin-top: 40px;
}

.donate-section h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.donate-section p {
    margin-bottom: 25px;
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.donate-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.donate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Link Effects */
a:not(.nav-link),
a:not(.nav-link):visited,
.about-inline-link:not(.nav-link) {
    color: white;
    transition: color 1.5s;
    text-decoration: none;
}

a.link-in-view:not(.nav-link),
a:visited.link-in-view:not(.nav-link),
.about-inline-link.link-in-view:not(.nav-link) {
    color: #ffff00 !important;
}

a:hover:not(.nav-link),
a:focus-visible:not(.nav-link),
.about-inline-link:hover:not(.nav-link),
.about-inline-link:focus-visible:not(.nav-link) {
    color: #ffff00;
}

/* Responsive Design */
@media (max-width: 768px) {
    .landing-section h1 {
        font-size: 2.5rem;
        transform: none !important;
    }

    .landing-section p {
        font-size: 1.2rem;
        transform: none !important;
        margin-top: 10px;
    }

    .section h2 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section {
        padding: 50px 15px;
        margin: 10px;
    }

    .stories-grid,
    .nft-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-content {
        flex-direction: column;
        gap: 20px;
    }

    .horizontal-item {
        flex: 0 0 auto;
        width: 100%;
    }

    .about-text-box {
        max-width: 100%;
    }

    #about .section-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 5px;
    }

    #about .horizontal-content {
        margin-top: 40px;
    }

    .about-map-wrap {
        margin-top: 40px;
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .landing-section h1 {
        font-size: 1.8rem;
    }

    .landing-section p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .section {
        padding: 40px 10px;
        margin: 5px;
    }

    .section p {
        font-size: 0.95rem;
    }

    .horizontal-content {
        flex-direction: column;
        gap: 15px;
    }

    .horizontal-item {
        flex: 0 0 auto;
        width: 100%;
        padding: 20px;
    }
}