/* === continua.club styles === */
/* Colors: #1A2E1A, #E8E0D0, #4A7A4A, #6A5040, #C8A850, #F0EDE4, #2A2820, #A0A898 */
/* Gradient: #3A5A3A, #5A7A5A, #8AA08A, #C0D0B0 */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A2E1A;
    color: #F0EDE4;
    font-family: 'Nunito Sans', 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Grain Overlay */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    transition: opacity 1s ease;
    animation: grainFlicker 0.15s steps(1) infinite;
}

#grain-overlay.visible {
    opacity: 0.06;
}

@keyframes grainFlicker {
    0% { background-position: 0 0; }
    50% { background-position: 2px 2px; }
    100% { background-position: 0 0; }
}

/* === Navigation === */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
    background: transparent;
    transition: background-color 0.3s ease;
}

#nav-bar.scrolled {
    background: rgba(26, 46, 26, 0.9);
    backdrop-filter: blur(6px);
}

.nav-brand {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #F0EDE4;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #F0EDE4;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: #F0EDE4;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* === Hero === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.mountain-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        #1A2E1A 0%,
        #1A2E1A 15%,
        #3A5A3A 30%,
        #5A7A5A 50%,
        #8AA08A 70%,
        #C0D0B0 90%,
        #C0D0B0 100%
    );
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 0 15vh 8vw;
}

#hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #F0EDE4;
    opacity: 0;
    transform: scale(1.1);
    filter: blur(4px);
    transition: opacity 1.2s ease, transform 1.2s ease, filter 1.2s ease;
}

#hero-title.visible {
    opacity: 0.8;
    transform: scale(1);
    filter: blur(0);
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #A0A898;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-tagline.visible {
    opacity: 1;
}

.hero-tree {
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-tree.visible {
    opacity: 1;
}

/* === Mountain Ridgeline Transitions === */
.ridgeline {
    position: relative;
    height: 120px;
    width: 100%;
}

.ridgeline-dark-to-light {
    background: #E8E0D0;
    clip-path: polygon(
        0% 100%, 0% 60%, 3% 55%, 7% 65%, 12% 40%, 16% 50%,
        20% 30%, 25% 45%, 30% 20%, 35% 35%, 38% 15%, 42% 30%,
        47% 10%, 52% 25%, 55% 5%, 60% 20%, 65% 35%, 68% 15%,
        72% 30%, 75% 10%, 80% 25%, 85% 40%, 88% 20%, 92% 35%,
        95% 50%, 100% 30%, 100% 100%
    );
}

.ridgeline-light-to-dark {
    background: #1A2E1A;
    clip-path: polygon(
        0% 100%, 0% 45%, 4% 55%, 8% 35%, 13% 50%, 17% 25%,
        22% 40%, 27% 15%, 32% 30%, 36% 10%, 40% 25%, 45% 5%,
        50% 20%, 55% 35%, 58% 15%, 63% 30%, 67% 10%, 72% 25%,
        76% 40%, 80% 20%, 85% 35%, 90% 15%, 94% 30%, 97% 45%,
        100% 25%, 100% 100%
    );
}

/* === Forest Sections (Dark) === */
.section-forest {
    background: #1A2E1A;
    color: #F0EDE4;
    padding: 96px 0;
}

/* === Meadow Sections (Light) === */
.section-meadow {
    background: #E8E0D0;
    color: #2A2820;
    padding: 96px 0;
}

.section-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.nature-icon {
    margin-bottom: 16px;
}

.section-forest h2,
.section-meadow h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 24px;
    line-height: 1.2;
}

.section-forest p {
    color: #F0EDE4;
}

.section-meadow p {
    color: #2A2820;
}

p {
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

/* === Community Board === */
.section-board {
    padding: 96px 32px;
}

.board-header {
    text-align: center;
    margin-bottom: 48px;
}

.board-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #A0A898;
    margin-top: 8px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.torn-card {
    background: #E8E0D0;
    color: #2A2820;
    padding: 24px;
    box-shadow: 3px 4px 12px rgba(42, 40, 32, 0.15);
    clip-path: polygon(
        2px 4px, 98% 0px, calc(100% - 3px) 2px, 100% 98%,
        calc(100% - 2px) calc(100% - 3px), 4px 100%, 0px calc(100% - 4px), 3px 2px
    );
    transition: transform 0.4s ease, box-shadow 0.4s ease, translateY 0.4s ease;
    cursor: pointer;
}

.torn-card:hover {
    transform: rotate(0deg) translateY(-4px) !important;
    box-shadow: 4px 6px 16px rgba(106, 80, 64, 0.25);
}

.card-badge {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C8A850;
    display: inline-block;
    margin-bottom: 8px;
}

.torn-card h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #2A2820;
}

.torn-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2A2820;
}

/* === Footer === */
#footer {
    padding: 48px 32px;
    border-top: 1px solid rgba(74, 122, 74, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
}

.footer-brand {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #F0EDE4;
}

.footer-note {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 14px;
    color: #A0A898;
}

/* === Responsive === */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .hero-content {
        padding: 0 0 10vh 24px;
    }

    #nav-bar {
        padding: 0 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
}
