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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0C0E08;
    color: #B8B4A8;
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.65;
    overflow-x: hidden;
}

.page-wrapper {
    position: relative;
    width: 100%;
}

/* ==================== HERO SECTION ==================== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #0C0E08;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8%;
}

.hero-circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.circuit-trace {
    stroke: #5C8A58;
    stroke-width: 1.5px;
    fill: none;
    stroke-linecap: round;
    animation: drawPath 1500ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--delay);
}

.junction-node {
    fill: #A8E6A3;
    opacity: 0.4;
    animation: nodeAppear 300ms ease-out forwards, pulse 3s ease-in-out 1.5s infinite;
    animation-delay: var(--delay);
}

@keyframes drawPath {
    from {
        stroke-dashoffset: var(--stroke-length, 300);
        stroke: #5C8A58;
    }
    85% {
        stroke: #5C8A58;
    }
    100% {
        stroke-dashoffset: 0;
        stroke: #3B6B3A;
    }
}

@keyframes nodeAppear {
    from {
        opacity: 0;
        r: 0;
    }
    to {
        opacity: 1;
        r: 4;
    }
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-family: 'Poiret One', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #A8E6A3;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(168, 230, 163, 0.4), 0 0 60px rgba(168, 230, 163, 0.1);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 800ms ease-out 2500ms forwards;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #B8B4A8;
    font-weight: 400;
    letter-spacing: 0.01em;
    opacity: 0;
    animation: fadeInUp 600ms ease-out 2900ms forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Z-PATTERN CONTAINER ==================== */

.z-pattern-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(4rem, 10vh, 8rem) 4%;
    padding: 8rem 8% 6rem 8%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.content-block {
    position: relative;
    opacity: 0;
    animation: slideIn 600ms ease-out forwards;
}

.block-left {
    grid-column: 1 / 2;
    justify-self: start;
    animation-name: slideInLeft;
    max-width: 55%;
}

.block-right {
    grid-column: 2 / 3;
    justify-self: end;
    animation-name: slideInRight;
    max-width: 55%;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.content-block[data-block="1"] { animation-delay: 0.3s; }
.content-block[data-block="2"] { animation-delay: 0.6s; }
.content-block[data-block="3"] { animation-delay: 0.9s; }
.content-block[data-block="4"] { animation-delay: 1.2s; }

.connector-above {
    position: absolute;
    width: 100%;
    height: 120px;
    top: -120px;
    left: 0;
    pointer-events: none;
}

.connector-trace {
    stroke: #3B6B3A;
    stroke-width: 1.5px;
    fill: none;
    stroke-linecap: round;
    opacity: 0.7;
}

/* ==================== COLLAGE LAYERS ==================== */

.collage-container {
    position: relative;
    width: 100%;
    height: 320px;
    margin-bottom: 2rem;
    border-radius: 4px;
    overflow: hidden;
    background-color: #1A2418;
}

.collage-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.circuit-fragment {
    opacity: 0;
    animation: fadeIn 400ms ease-out 0.4s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.organic-texture {
    opacity: 0;
    animation: slideTexture 600ms ease-out 0.8s forwards;
    background-image:
        radial-gradient(circle at 3px 3px, #2A3E28 1px, transparent 1px),
        radial-gradient(circle at 8px 5px, #3B6B3A 0.5px, transparent 0.5px);
    background-size: 6px 6px, 12px 12px;
    background-position: 0 0, 3px 3px;
    mix-blend-mode: multiply;
}

.data-overlay {
    opacity: 0;
    animation: fadeIn 500ms ease-out 1.1s forwards;
    padding: 15px;
    z-index: 2;
}

.data-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1.3vw, 0.82rem);
    color: #3B6B3A;
    letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(59, 107, 58, 0.3);
    transform: rotate(2deg);
    opacity: 0.6;
}

.eye-motif {
    opacity: 0;
    animation: eyeScale 300ms ease-out 1.4s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-svg {
    width: 48px;
    height: 48px;
    position: absolute;
    bottom: 15px;
    right: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: inherit; }
}

@keyframes slideTexture {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.block-right .organic-texture {
    animation-name: slideTextureRight;
}

@keyframes slideTextureRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes eyeScale {
    from {
        opacity: 0;
        transform: scale(0);
    }
    60% {
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== TYPOGRAPHY ==================== */

.section-heading {
    font-family: 'Poiret One', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #D4CEBC;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.body-text {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 400;
    color: #B8B4A8;
    line-height: 1.65;
    letter-spacing: 0.01em;
    max-width: 58ch;
    margin: 0;
}

/* ==================== HOVER EFFECTS ==================== */

.content-block:hover .connector-trace {
    stroke: #A8E6A3;
    transition: stroke 300ms ease;
}

.content-block:hover .junction-node {
    animation-duration: 1s;
}

/* ==================== FOOTER ==================== */

.footer-section {
    position: relative;
    padding: 6rem 8%;
    background: linear-gradient(to bottom, #0C0E08, #1A2418);
    text-align: center;
    margin-top: 4rem;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-convergence {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.footer-trace {
    stroke: #3B6B3A;
    stroke-width: 1.5px;
    fill: none;
    stroke-linecap: round;
    animation: drawPath 2000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--delay);
}

.convergence-node {
    fill: #A8E6A3;
    opacity: 0;
    animation: nodeAppear 400ms ease-out forwards, convergePulse 4s ease-in-out 1.9s infinite;
    animation-delay: var(--delay);
}

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

.footer-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 600ms ease-out 2.5s forwards;
}

.footer-title {
    font-family: 'Poiret One', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #A8E6A3;
    text-shadow: 0 0 20px rgba(168, 230, 163, 0.3);
    margin-bottom: 1rem;
}

.footer-text {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #B8B4A8;
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.footer-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    color: #3B6B3A;
    letter-spacing: 0.08em;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    opacity: 0.8;
}

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

@media (max-width: 768px) {
    .z-pattern-container {
        grid-template-columns: 1fr;
        padding: 4rem 6%;
    }

    .block-left,
    .block-right {
        grid-column: 1 / 2;
        justify-self: start;
        max-width: 100%;
        animation-name: slideInLeft !important;
    }

    .connector-above {
        height: 80px;
        top: -80px;
    }

    .connector-trace {
        stroke: #3B6B3A;
    }

    .hero {
        padding-left: 6%;
    }

    .collage-container {
        height: 240px;
    }

    .footer-section {
        padding: 4rem 6%;
    }
}

@media (max-width: 480px) {
    .hero-circuit {
        display: none;
    }

    .hero {
        height: 80vh;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        animation-delay: 0.3s;
    }

    .hero-tagline {
        animation-delay: 0.5s;
    }

    .z-pattern-container {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .content-block {
        animation-name: slideInLeft !important;
    }

    .connector-above {
        display: none;
    }

    .collage-container {
        height: 180px;
    }

    .eye-svg {
        width: 32px;
        height: 32px;
    }

    .footer-convergence {
        display: none;
    }

    .footer-section {
        padding: 2rem 1rem;
    }
}
