/* ==========================================================================
   sim-ai.xyz - Japanese-Minimal Simulation Atelier
   Coastal Blend Palette | Split-Screen Layout | Watercolor + Tech Motifs
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #788C82;
    background-color: #F2F5F0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
.hero-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(3rem, 7vw, 5rem);
    color: #1A2A25;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-title-tech {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(3rem, 7vw, 5rem);
    color: #1A2A25;
}

.section-heading {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    color: #1A2A25;
    margin-bottom: 1.5rem;
    position: relative;
    cursor: default;
}

.tech-heading {
    font-family: 'Space Grotesk', sans-serif;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    color: #788C82;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.tech-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #788C82;
    margin-bottom: 1.25rem;
    max-width: 480px;
}

/* --- Split Screen Layout --- */
.split-screen {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    min-height: 100vh;
    position: relative;
}

.panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-nature {
    background-color: #F2F5F0;
}

.panel-tech {
    background-color: #F8F5F0;
}

.panel-content {
    position: relative;
    z-index: 2;
    padding: 4rem 3rem;
    max-width: 520px;
}

/* --- Panel Divider --- */
.panel-divider {
    position: relative;
    background-color: rgba(120, 140, 130, 0.2);
    width: 1px;
    z-index: 3;
}

.divider-glow {
    position: absolute;
    top: 0;
    left: -2px;
    width: 5px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(90, 138, 122, 0.15) 30%,
        rgba(90, 138, 122, 0.25) 50%,
        rgba(90, 138, 122, 0.15) 70%,
        transparent 100%
    );
    animation: dividerPulse 4s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.circuit-bridge {
    position: absolute;
    top: 0;
    left: -1px;
    width: 3px;
    height: 100%;
}

/* --- Watercolor Washes --- */
.watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.wash-hero-left {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(208, 136, 112, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(90, 138, 122, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 80%, rgba(208, 136, 112, 0.06) 0%, transparent 40%);
}

.wash-concepts-left {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(208, 136, 112, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 70%, rgba(90, 138, 122, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 20%, rgba(224, 213, 197, 0.15) 0%, transparent 40%);
}

.wash-methods-right {
    background:
        radial-gradient(ellipse at 70% 30%, rgba(208, 136, 112, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(90, 138, 122, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(208, 136, 112, 0.08) 0%, transparent 35%);
}

.wash-closing {
    background:
        radial-gradient(ellipse at 25% 35%, rgba(208, 136, 112, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 65%, rgba(90, 138, 122, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(224, 213, 197, 0.12) 0%, transparent 50%);
}

/* --- Circuit Patterns --- */
.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-svg-closing {
    opacity: 0.8;
}

/* --- Letter Drift Micro-interaction --- */
.letter {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* --- Accent Lines --- */
.nature-accent,
.tech-accent {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.accent-line {
    display: block;
    width: 40px;
    height: 1px;
    background-color: #D08870;
    transition: width 0.5s ease;
}

.tech-line {
    background-color: #5A8A7A;
}

.accent-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #788C82;
}

.nature-accent:hover .accent-line,
.tech-accent:hover .accent-line {
    width: 60px;
}

/* --- Link Underline Micro-interaction --- */
a {
    color: #5A8A7A;
    text-decoration: none;
    background-image: linear-gradient(#5A8A7A, #5A8A7A);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

a:hover {
    background-size: 100% 1px;
}

/* --- Card Hover --- */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 42, 37, 0.06);
}

/* --- Scroll Reveal --- */
.reveal-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Particle Effect on Headings --- */
.particle-trigger {
    position: relative;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: #5A8A7A;
    pointer-events: none;
    animation: particleFloat 600ms ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--px), var(--py)) scale(0.3);
    }
}

/* --- Merged Section (Section 4) --- */
.merged-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2F5F0;
    overflow: hidden;
}

.closing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 640px;
}

.closing-domain {
    font-size: 1.8rem;
    color: #1A2A25;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.closing-nature {
    font-family: 'Fraunces', serif;
    font-weight: 600;
}

.closing-tech {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.closing-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.125rem;
    color: #788C82;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.closing-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, #D08870, #5A8A7A);
    margin: 0 auto 2rem;
}

.closing-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #788C82;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Particle Burst in Closing --- */
.particle-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.burst-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    animation: burstFloat 1s ease-out forwards;
}

@keyframes burstFloat {
    0% {
        opacity: 0.8;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--bx), var(--by)) scale(0.2);
    }
}

/* --- Inverted Section --- */
.inverted .panel-nature {
    order: 2;
}

.inverted .panel-tech {
    order: 0;
}

.inverted .panel-divider {
    order: 1;
}

/* --- Selection Color --- */
::selection {
    background-color: rgba(90, 138, 122, 0.2);
    color: #1A2A25;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F2F5F0;
}

::-webkit-scrollbar-thumb {
    background: #E0D5C5;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #788C82;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .split-screen {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }

    .panel {
        min-height: 80vh;
    }

    .panel-divider {
        width: 100%;
        height: 1px;
        order: unset !important;
    }

    .divider-glow {
        top: -2px;
        left: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient(
            to right,
            transparent 0%,
            rgba(90, 138, 122, 0.15) 30%,
            rgba(90, 138, 122, 0.25) 50%,
            rgba(90, 138, 122, 0.15) 70%,
            transparent 100%
        );
    }

    .circuit-bridge {
        top: -1px;
        left: 0;
        width: 100%;
        height: 3px;
    }

    .panel-content {
        padding: 3rem 2rem;
    }

    .inverted .panel-nature {
        order: unset;
    }

    .inverted .panel-tech {
        order: unset;
    }

    .inverted .panel-divider {
        order: unset;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-title-tech {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .section-heading {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .body-text {
        max-width: 100%;
    }

    .merged-section {
        min-height: 60vh;
    }
}

@media (max-width: 480px) {
    .panel {
        min-height: 60vh;
    }

    .panel-content {
        padding: 2.5rem 1.5rem;
    }

    .closing-content {
        padding: 3rem 1.5rem;
    }
}
