/* ============================================
   SSETTL.com — Graffiti Wall Styles
   ============================================ */

:root {
    --concrete-base: #2B2D33;
    --deep-shadow: #1A1B1F;
    --paper-surface: #F0EDE6;
    --signal-red: #C9363C;
    --electric-violet: #7B5EA7;
    --fog-gray: #6E7178;
    --steel-gray: #8A8D91;
    --chrome-yellow: #E8C840;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Georgia', serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ---- Reset & Base ---- */

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

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

body {
    background-color: var(--deep-shadow);
    color: var(--paper-surface);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ---- SVG clip path defs (hidden) ---- */

.clip-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---- Concrete Wall Background ---- */

#concrete-wall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-color: var(--deep-shadow);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(43, 45, 51, 0.3) 2px,
            rgba(43, 45, 51, 0.3) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(43, 45, 51, 0.2) 2px,
            rgba(43, 45, 51, 0.2) 4px
        );
}

/* ---- Wall Marks (decorative SVGs) ---- */

.wall-mark {
    position: absolute;
    color: var(--fog-gray);
    opacity: 0.15;
    animation: slow-drift 120s linear infinite;
}

.mark-1 { width: 60px; top: 8%; left: 5%; animation-delay: -10s; }
.mark-2 { width: 80px; top: 25%; right: 8%; animation-delay: -30s; }
.mark-3 { width: 50px; top: 40%; left: 12%; animation-delay: -50s; }
.mark-4 { width: 70px; top: 55%; right: 15%; animation-delay: -70s; }
.mark-5 { width: 40px; top: 70%; left: 3%; animation-delay: -90s; }
.mark-6 { width: 60px; top: 85%; right: 4%; animation-delay: -20s; }
.mark-7 { width: 50px; top: 15%; right: 25%; animation-delay: -60s; }
.mark-8 { width: 80px; top: 92%; left: 30%; animation-delay: -100s; }

@keyframes slow-drift {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Opening Wall Section ---- */

#opening-wall {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--concrete-base);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(110, 113, 120, 0.04) 40px,
            rgba(110, 113, 120, 0.04) 42px
        );
    overflow: hidden;
}

.logo-container {
    text-align: center;
}

#logotype {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: -0.03em;
    color: var(--paper-surface);
    text-shadow:
        2px 2px 0 var(--signal-red),
        4px 4px 8px rgba(201, 54, 60, 0.4),
        8px 8px 20px rgba(201, 54, 60, 0.2);
    position: relative;
    line-height: 1;
}

#logotype .letter {
    display: inline-block;
    clip-path: inset(100% 0 0 0);
    animation: drip-reveal 0.6s ease-out forwards;
    animation-delay: calc(var(--delay) * 0.2s + 0.5s);
}

@keyframes drip-reveal {
    0% {
        clip-path: inset(100% 0 0 0);
        transform: translateY(-20px);
    }
    60% {
        clip-path: inset(0);
        transform: translateY(5px);
    }
    100% {
        clip-path: inset(0);
        transform: translateY(0);
    }
}

.tagline {
    margin-top: 1.5rem;
    opacity: 0;
    animation: fade-in 1s ease-out 2.5s forwards;
}

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

/* ---- Metadata / Breakpoint Zones ---- */

.metadata-text {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--steel-gray);
}

.breakpoint-zone {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1.2rem 2rem;
    text-align: center;
    background-color: var(--deep-shadow);
    border-top: 1px solid rgba(110, 113, 120, 0.2);
    border-bottom: 1px solid rgba(110, 113, 120, 0.2);
}

/* ---- Diagonal Sections ---- */

.diagonal-section {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    overflow: hidden;
}

.section-right {
    transform: skewY(4deg);
}

.section-left {
    transform: skewY(-4deg);
}

/* Counter-rotate content to keep text level */
.section-right .paper-panel {
    transform: skewY(-4deg);
}

.section-left .paper-panel {
    transform: skewY(4deg);
}

/* Slide-in animation states */
.diagonal-section {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-right {
    transform: translateX(-80px) skewY(4deg);
}

.section-left {
    transform: translateX(80px) skewY(-4deg);
}

.diagonal-section.in-view {
    opacity: 1;
}

.section-right.in-view {
    transform: translateX(0) skewY(4deg);
}

.section-left.in-view {
    transform: translateX(0) skewY(-4deg);
}

/* ---- Paper Panels ---- */

.paper-panel {
    background-color: var(--paper-surface);
    color: var(--deep-shadow);
    max-width: 700px;
    width: 100%;
    padding: 3rem 2.5rem;
    position: relative;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

.torn-1 { clip-path: url(#torn-edge-1); }
.torn-2 { clip-path: url(#torn-edge-2); }
.torn-3 { clip-path: url(#torn-edge-3); }
.torn-4 { clip-path: url(#torn-edge-4); }

.panel-content {
    padding: 1rem 0;
}

/* ---- Section Headings ---- */

.section-heading {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--deep-shadow);
    position: relative;
}

/* Spray-paint drip effect on headings */
.drip-heading {
    position: relative;
}

.drip-heading::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 15%;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--signal-red), transparent);
    transition: height 1.2s ease-out;
}

.drip-heading.drip-active::after {
    height: 50px;
}

/* Secondary drip line */
.drip-heading::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 55%;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--electric-violet), transparent);
    transition: height 1.2s ease-out 0.3s;
}

.drip-heading.drip-active::before {
    height: 35px;
}

/* ---- Body Text ---- */

.paper-panel p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--concrete-base);
}

.paper-panel p:last-child {
    margin-bottom: 0;
}

/* ---- Accent Colors ---- */

.accent-red {
    color: var(--signal-red);
    text-shadow: 1px 1px 3px rgba(201, 54, 60, 0.3);
}

.accent-violet {
    color: var(--electric-violet);
    text-shadow: 1px 1px 3px rgba(123, 94, 167, 0.3);
}

.accent-yellow {
    color: var(--chrome-yellow);
    text-shadow: 1px 1px 3px rgba(232, 200, 64, 0.3);
}

/* ---- Glitch Animation ---- */

@keyframes glitch-burst {
    0% {
        transform: translateX(0);
        text-shadow: none;
        clip-path: inset(0);
    }
    15% {
        transform: translateX(4px);
        text-shadow: -2px 0 rgba(201, 54, 60, 0.7), 2px 0 rgba(0, 200, 200, 0.7);
    }
    30% {
        transform: translateX(-3px);
        clip-path: inset(5% 0 10% 0);
    }
    50% {
        transform: translateX(2px);
        text-shadow: 2px 0 rgba(201, 54, 60, 0.5), -2px 0 rgba(0, 200, 200, 0.5);
        clip-path: inset(15% 0 5% 0);
    }
    70% {
        transform: translateX(-1px);
        clip-path: inset(0);
    }
    100% {
        transform: translateX(0);
        text-shadow: none;
        clip-path: inset(0);
    }
}

.glitch-active {
    animation: glitch-burst 150ms linear;
}

/* Glitch on the paper panel inside diagonal sections */
.diagonal-section.glitch-active .paper-panel {
    animation: glitch-burst 150ms linear;
}

/* Glitch on terminal section */
#terminal-section.glitch-active .terminal-panel {
    animation: glitch-burst 150ms linear;
}

/* ---- Terminal Section ---- */

#terminal-section {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#terminal-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.terminal-panel {
    max-width: 800px;
    text-align: center;
}

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

.closing-tag {
    margin-top: 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--fog-gray);
}

/* Terminal section text on paper */
.terminal-panel p {
    font-size: 1.1rem;
}

/* ---- Noise Texture Overlay for Paper Panels ---- */

.paper-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
}

.paper-panel .panel-content {
    position: relative;
    z-index: 2;
}

/* ---- Concrete background grain for opening wall ---- */

#opening-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.06'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.logo-container {
    position: relative;
    z-index: 1;
}

/* ---- Responsive Adjustments ---- */

@media (max-width: 768px) {
    .diagonal-section {
        padding: 4rem 1rem;
    }

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

    .section-right {
        transform: translateX(-40px) skewY(3deg);
    }

    .section-left {
        transform: translateX(40px) skewY(-3deg);
    }

    .section-right.in-view {
        transform: translateX(0) skewY(3deg);
    }

    .section-left.in-view {
        transform: translateX(0) skewY(-3deg);
    }

    .section-right .paper-panel {
        transform: skewY(-3deg);
    }

    .section-left .paper-panel {
        transform: skewY(3deg);
    }

    .breakpoint-zone {
        padding: 0.8rem 1rem;
    }

    .breakpoint-zone .metadata-text {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .paper-panel {
        padding: 2rem 1.2rem;
    }

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

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
    #logotype .letter {
        animation: none;
        clip-path: inset(0);
    }

    .tagline {
        animation: none;
        opacity: 1;
    }

    .diagonal-section {
        opacity: 1;
        transition: none;
    }

    .section-right {
        transform: skewY(4deg);
    }

    .section-left {
        transform: skewY(-4deg);
    }

    #terminal-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .wall-mark {
        animation: none;
    }

    .glitch-active {
        animation: none;
    }

    .drip-heading::after,
    .drip-heading::before {
        transition: none;
    }
}
