/* ==========================================================================
   ppuzzl.works -- Neubrutalism + Glassmorphism
   ========================================================================== */

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

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

body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.65;
    color: #1A1A1A;
    background: #F5EDE0;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(40px, 6vw, 80px);
}

h2 {
    font-size: clamp(32px, 5vw, 64px);
}

h3 {
    font-size: clamp(20px, 2.5vw, 28px);
    margin-bottom: 0.5em;
}

.section-heading {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #A0522D;
    margin: 16px auto 0;
}

/* --- Manifesto Slab --- */
.manifesto-slab {
    min-height: 100vh;
    background: #C4A882;
    border: 4px solid #1A1A1A;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 60px 40px;
}

.manifesto-shadow {
    position: absolute;
    top: 6px;
    left: 6px;
    right: -6px;
    bottom: -6px;
    background: #1A1A1A;
    z-index: 0;
    pointer-events: none;
}

.manifesto-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
    background: #F5EDE0;
    border: 4px solid #1A1A1A;
    padding: 60px 50px;
    box-shadow: 6px 6px 0px #1A1A1A;
    transform: translateY(0);
}

.manifesto-title {
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.manifesto-title .dot {
    color: #A0522D;
}

.manifesto-text p {
    margin-bottom: 1.2em;
    opacity: 0;
    transform: translateY(10px);
}

.manifesto-text p.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Entrance animation state */
.manifesto-slab.entering .manifesto-content {
    transform: translateY(100vh);
}

.manifesto-slab.entering .manifesto-shadow {
    transform: translateY(100vh);
}

.manifesto-slab.entered .manifesto-content {
    transform: translateY(0);
    transition: transform 0.8s ease-out;
}

.manifesto-slab.entered .manifesto-shadow {
    transform: translate(6px, 6px) translateY(0);
    transition: transform 0.8s ease-out 0.1s;
}

/* --- Process Timeline --- */
.process-timeline {
    min-height: 100vh;
    padding: 100px 40px;
    background: #F5EDE0;
    position: relative;
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #A0522D;
    transform: translateX(-50%);
}

.timeline-line::before,
.timeline-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #A0522D;
    border: 3px solid #1A1A1A;
}

.timeline-line::before {
    top: -8px;
}

.timeline-line::after {
    bottom: -8px;
}

.timeline-block {
    width: 45%;
    margin-bottom: 60px;
    position: relative;
    opacity: 0;
}

.timeline-block.left {
    margin-right: auto;
    transform: translateX(-40px);
}

.timeline-block.right {
    margin-left: auto;
    transform: translateX(40px);
}

.timeline-block.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.sticky-note {
    padding: 30px;
    border: 3px solid #1A1A1A;
    box-shadow: 5px 5px 0px #1A1A1A;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-block[data-rotation="-1.2"] .sticky-note {
    transform: rotate(-1.2deg);
}

.timeline-block[data-rotation="0.8"] .sticky-note {
    transform: rotate(0.8deg);
}

.timeline-block[data-rotation="-0.5"] .sticky-note {
    transform: rotate(-0.5deg);
}

.timeline-block[data-rotation="1.5"] .sticky-note {
    transform: rotate(1.5deg);
}

.timeline-block[data-rotation="0.3"] .sticky-note {
    transform: rotate(0.3deg);
}

.sticky-note:hover {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: 8px 8px 0px #1A1A1A;
}

.step-number {
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 8px;
    color: #6B2D3E;
    font-weight: 400;
}

/* --- Work Showcase --- */
.work-showcase {
    min-height: 100vh;
    padding: 100px 40px;
    background: #C4A882;
    position: relative;
}

.showcase-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 3px solid #1A1A1A;
    box-shadow: 6px 6px 0px #1A1A1A;
    padding: 40px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #1A1A1A;
}

.card-decoration {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0.6;
}

.card-decoration svg {
    display: block;
}

.glass-card h3 {
    font-size: clamp(22px, 2.5vw, 30px);
    margin-bottom: 12px;
}

.glass-card p {
    margin-bottom: 16px;
    color: #1A1A1A;
    line-height: 1.65;
}

.card-tag {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #FFE566;
    border: 2px solid #1A1A1A;
    padding: 4px 12px;
    box-shadow: 3px 3px 0px #1A1A1A;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-tag:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #1A1A1A;
}

/* --- Contact Slab --- */
.contact-slab {
    background: #6B2D3E;
    min-height: 100vh;
    padding: 0 40px 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.torn-edge {
    width: 100%;
    height: 30px;
    position: absolute;
    top: 0;
    left: 0;
    background: #F5EDE0;
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 40%, 97% 70%, 95% 30%, 92% 60%, 89% 20%, 86% 55%,
        83% 25%, 80% 65%, 77% 35%, 74% 70%, 71% 30%, 68% 60%,
        65% 20%, 62% 50%, 59% 25%, 56% 65%, 53% 30%, 50% 55%,
        47% 20%, 44% 60%, 41% 35%, 38% 70%, 35% 25%, 32% 55%,
        29% 30%, 26% 65%, 23% 20%, 20% 50%, 17% 35%, 14% 60%,
        11% 25%, 8% 55%, 5% 30%, 2% 65%, 0% 40%
    );
    z-index: 2;
}

.notebook-page {
    max-width: 650px;
    width: 100%;
    background: #F5EDE0;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 31px,
        #C4A882 31px,
        #C4A882 32px
    );
    border: 3px solid #1A1A1A;
    box-shadow: 8px 8px 0px #1A1A1A;
    padding: 50px 50px 40px;
    position: relative;
    clip-path: polygon(
        0% 3%, 2% 0%, 5% 4%, 8% 1%, 11% 3%, 14% 0%, 17% 4%, 20% 1%,
        23% 3%, 26% 0%, 29% 4%, 32% 1%, 35% 3%, 38% 0%, 41% 4%, 44% 1%,
        47% 3%, 50% 0%, 53% 4%, 56% 1%, 59% 3%, 62% 0%, 65% 4%, 68% 1%,
        71% 3%, 74% 0%, 77% 4%, 80% 1%, 83% 3%, 86% 0%, 89% 4%, 92% 1%,
        95% 3%, 98% 0%, 100% 3%,
        100% 100%, 0% 100%
    );
}

.contact-heading {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    color: #1A1A1A;
    font-size: clamp(24px, 3.5vw, 40px);
    margin-bottom: 40px;
    text-align: center;
}

.notebook-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6B2D3E;
    font-weight: 400;
}

.form-field input,
.form-field textarea {
    font-family: 'Karla', sans-serif;
    font-size: 16px;
    color: #1A1A1A;
    border: none;
    border-bottom: 2px solid #1A1A1A;
    background: transparent;
    padding: 8px 4px;
    outline: none;
    transition: border-color 0.2s ease;
    resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #A0522D;
    opacity: 0.6;
    font-style: italic;
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: #A0522D;
}

.submit-btn {
    align-self: flex-start;
    position: relative;
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
    background: #FFE566;
    border: 3px solid #1A1A1A;
    padding: 14px 40px;
    cursor: pointer;
    box-shadow: 5px 5px 0px #1A1A1A;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px #1A1A1A;
    background: #ffe94d;
}

.submit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1A1A1A;
}

/* --- Footer --- */
.site-footer {
    background: #1A1A1A;
    color: #F5EDE0;
    text-align: center;
    padding: 30px 40px;
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .manifesto-content {
        padding: 40px 30px;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-block {
        width: calc(100% - 50px);
        margin-left: 50px !important;
        margin-right: 0 !important;
    }

    .timeline-block.left,
    .timeline-block.right {
        transform: translateX(30px);
    }

    .timeline-block.visible {
        transform: translateX(0);
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .notebook-page {
        padding: 40px 30px 30px;
    }

    .manifesto-slab {
        padding: 40px 20px;
    }

    .process-timeline,
    .work-showcase,
    .contact-slab {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .manifesto-content {
        padding: 30px 20px;
    }

    .sticky-note {
        padding: 20px;
    }

    .glass-card {
        padding: 28px;
    }

    .notebook-page {
        padding: 30px 20px 24px;
    }
}
