/* ==========================================================================
   mechanic.stream — Graffiti-Tagged Vertical Scroll of Mechanical Knowledge
   Colors: #8B8580, #2A2825, #6B4A3A, #7A8B6A, #6A7A8B, #A89878, #5A7A4A
   Font: EB Garamond (400, 700, 800, 400 italic)
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    color: #2A2825;
    background-color: #8B8580;
    overflow-x: hidden;
}

/* --- SVG noise filter (hidden) --- */
#noise-svg {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- Concrete Wall Texture Overlay --- */
.wall-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(160, 155, 148, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse at 30% 60%, rgba(100, 95, 88, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(110, 105, 98, 0.12) 0%, transparent 55%);
    filter: url(#concrete-noise);
}

.wall-texture.visible {
    opacity: 0.06;
}

/* --- Wall Section Base --- */
.wall-section {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
}

/* ===== HERO SECTION ===== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(155, 150, 143, 0.3) 0%, transparent 60%);
}

.hero-content {
    text-align: left;
    position: relative;
}

.hero-title {
    position: relative;
    display: inline-block;
}

.title-main {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 800;
    font-size: clamp(4rem, 10vw, 8rem);
    color: #2A2825;
    text-shadow: 2px 0 8px rgba(42, 40, 37, 0), -1px 0 6px rgba(42, 40, 37, 0);
    letter-spacing: 0.02em;
    display: block;
    transition: text-shadow 0.4s ease;
}

.title-main.spray-in {
    text-shadow: 2px 0 8px rgba(42, 40, 37, 0.3), -1px 0 6px rgba(42, 40, 37, 0.2);
}

.hero-subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #6B4A3A;
    text-shadow: 2px 0 8px rgba(107, 74, 58, 0), -1px 0 6px rgba(107, 74, 58, 0);
    letter-spacing: 0.05em;
    margin-top: -0.3em;
    opacity: 0;
    transition: text-shadow 0.4s ease, opacity 0.3s ease;
}

.hero-subtitle.spray-in {
    opacity: 1;
    text-shadow: 2px 0 8px rgba(107, 74, 58, 0.3), -1px 0 6px rgba(107, 74, 58, 0.2);
}

/* --- SVG Drips --- */
.drip {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drip.visible {
    opacity: 1;
}

.drip-1 {
    width: 5px;
    height: 40px;
    bottom: -35px;
    left: 18%;
}

.drip-2 {
    width: 4px;
    height: 28px;
    bottom: -23px;
    left: 52%;
}

.drip-3 {
    width: 4px;
    height: 50px;
    bottom: -45px;
    left: 78%;
}

/* Drip pulse animation */
@keyframes dripPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.drip.visible {
    animation: dripPulse 4s ease-in-out infinite;
}

.drip-1.visible { animation-delay: 0s; }
.drip-2.visible { animation-delay: 1.3s; }
.drip-3.visible { animation-delay: 2.6s; }

/* ===== TAGGED SECTIONS ===== */
.tagged-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

/* --- Spray Circle (background accent) --- */
.spray-circle {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.spray-circle.visible {
    opacity: 1;
}

.spray-olive {
    background: #7A8B6A;
    opacity: 0;
}
.spray-olive.visible {
    opacity: 0.12;
}

.spray-slate {
    background: #6A7A8B;
    opacity: 0;
}
.spray-slate.visible {
    opacity: 0.13;
}

.spray-sand {
    background: #A89878;
    opacity: 0;
}
.spray-sand.visible {
    opacity: 0.14;
}

/* Position spray circles differently per section */
#section-practice .spray-circle {
    top: 15%;
    left: -5%;
}

#section-diagnostics .spray-circle {
    top: 20%;
    right: -8%;
    left: auto;
}

#section-tools .spray-circle {
    bottom: 15%;
    left: 5%;
}

#section-hood .spray-circle {
    top: 10%;
    right: -3%;
    left: auto;
}

#section-stream .spray-circle {
    bottom: 20%;
    left: -6%;
}

/* --- Glassmorphic Content Cards --- */
.glass-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 3rem 2.5rem;
    max-width: 750px;
    width: 100%;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-tag {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #2A2825;
    text-shadow: 2px 0 8px rgba(42, 40, 37, 0.3), -1px 0 6px rgba(42, 40, 37, 0.2);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.glass-card p {
    color: #2A2825;
    margin-bottom: 1.2rem;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.85;
}

.glass-card p:last-child {
    margin-bottom: 0;
}

/* ===== STENCIL SECTION ===== */
.stencil-section {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.stencil-text {
    text-align: center;
}

.stencil-line {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.04em;
    background: linear-gradient(
        135deg,
        #8B8580 0%,
        #9A9590 25%,
        #7A7570 50%,
        #8B8580 75%,
        #9A9590 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stencil-line.visible {
    opacity: 1;
}

/* Stencil glow pulse */
@keyframes stencilPulse {
    0%, 96% {
        filter: drop-shadow(0 0 0px rgba(107, 74, 58, 0));
    }
    97% {
        filter: drop-shadow(0 0 10px rgba(107, 74, 58, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 0px rgba(107, 74, 58, 0));
    }
}

.stencil-line.pulsing {
    animation: stencilPulse 6s ease-in-out infinite;
}

.stencil-line.pulsing:nth-child(2) {
    animation-delay: 0.3s;
}

/* Initial strong glow on enter */
@keyframes stencilEnterGlow {
    0% {
        filter: drop-shadow(0 0 0px rgba(107, 74, 58, 0));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(107, 74, 58, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 0px rgba(107, 74, 58, 0));
    }
}

.stencil-line.enter-glow {
    animation: stencilEnterGlow 0.6s ease-out forwards;
}

/* ===== FOOTER / NATURE RECLAIMS ===== */
.footer-section {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.footer-plants {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.plant {
    height: auto;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.plant.visible {
    opacity: 1;
    transform: translateY(0);
}

.plant-1 { width: 30px; transition-delay: 0s; }
.plant-2 { width: 40px; transition-delay: 0.15s; }
.plant-3 { width: 25px; transition-delay: 0.3s; }
.plant-4 { width: 35px; transition-delay: 0.45s; }
.plant-5 { width: 20px; transition-delay: 0.6s; }

.footer-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.1rem;
    color: #6B4A3A;
    text-align: center;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.8s ease 0.4s;
}

.footer-text.visible {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tagged-section {
        padding: 3rem 1.2rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .spray-circle {
        width: 180px;
        height: 180px;
    }

    .hero-content {
        text-align: left;
        padding-left: 1rem;
    }

    .footer-plants {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem 1.2rem;
    }

    .hero-section {
        padding: 1rem;
    }

    .spray-circle {
        width: 140px;
        height: 140px;
    }
}
