/* ppuzzl.dev - Cottagecore Duotone Workshop */
/* Color Palette:
   Workshop Brown: #2A1808
   Warm Oak: #5A4028
   Duotone Amber: #A07848
   Cottagecore Sage: #88A070
   Linen Cream: #FBF6EE
   Card Parchment: #FFF8F0
   Error Blush: #D08060
   Shadow Depth: rgba(90,60,30,0.15)
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FBF6EE;
    color: #5A4028;
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Workshop Column - Single Column Layout */
.workshop-column {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    padding: 60px 0;
}

.hero-badge {
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.2s forwards;
}

.hero-badge-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: #A07848;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #FFF8F0;
    padding: 6px 14px;
    border: 1px solid #A07848;
    border-radius: 2px;
    display: inline-block;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 5rem);
    color: #2A1808;
    letter-spacing: 0.04em;
    line-height: 1.05;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.4s forwards;
}

.hero-title-dot {
    color: #D08060;
}

.hero-subtitle {
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #5A4028;
    max-width: 440px;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.6s forwards;
}

/* 3D Puzzle Render */
.puzzle-render {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.8s forwards;
}

.puzzle-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 4px 6px rgba(90,60,30,0.15));
}

.puzzle-piece {
    transition: transform 0.4s ease;
}

.piece-1 {
    animation: floatPiece 4s ease-in-out infinite;
}

.piece-2 {
    animation: floatPiece 4s ease-in-out 1.3s infinite;
}

.piece-3 {
    animation: floatPiece 4s ease-in-out 2.6s infinite;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.scroll-hint-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #A07848;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-hint-arrow {
    animation: bounceDown 2s ease-in-out infinite;
}

/* ========== SECTIONS ========== */
.section {
    padding: clamp(60px, 10vh, 120px) 0;
}

.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #2A1808;
    letter-spacing: 0.02em;
    margin-bottom: 40px;
    position: relative;
}

.section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #A07848;
    margin-top: 12px;
    border-radius: 1px;
}

/* ========== CARD STACK - Layered Depth ========== */
.card-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.card {
    background: #FFF8F0;
    padding: 32px;
    border-radius: 4px;
    border: 1px solid rgba(160,120,72,0.2);
    box-shadow: 0 2px 8px rgba(90,60,30,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(90,60,30,0.15);
}

.card-layer-1 {
    z-index: 2;
    margin-bottom: -8px;
}

.card-layer-2 {
    z-index: 1;
    margin-left: 12px;
    margin-top: -8px;
}

.card-code-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: #A07848;
    display: block;
    margin-bottom: 12px;
}

.card-text {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    color: #5A4028;
    line-height: 1.85;
}

/* ========== COMPONENT GRID ========== */
.component-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.component-item {
    background: #FFF8F0;
    padding: 28px 32px;
    border-radius: 4px;
    border: 1px solid rgba(160,120,72,0.15);
    border-left: 3px solid #A07848;
    box-shadow: 0 2px 8px rgba(90,60,30,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.component-item:hover {
    box-shadow: 0 4px 12px rgba(90,60,30,0.12);
    transform: translateY(-2px);
}

.component-icon {
    margin-bottom: 16px;
}

.component-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    color: #2A1808;
    margin-bottom: 8px;
}

.component-desc {
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    color: #5A4028;
    margin-bottom: 12px;
    line-height: 1.7;
}

.component-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #A07848;
    background: rgba(160,120,72,0.08);
    padding: 4px 10px;
    border-radius: 2px;
}

/* ========== CODE BLOCK ========== */
.code-block {
    background: #2A1808;
    border-radius: 6px;
    border-left: 3px solid #A07848;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(90,60,30,0.2);
    transition: transform 0.3s ease;
}

.code-block:hover {
    transform: translateY(-2px);
}

.code-block-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(160,120,72,0.15);
}

.code-block-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(160,120,72,0.4);
}

.code-block-dot:first-child {
    background: #D08060;
}

.code-block-dot:nth-child(2) {
    background: #A07848;
}

.code-block-dot:nth-child(3) {
    background: #88A070;
}

.code-block-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #A07848;
    margin-left: auto;
}

.code-block-content {
    padding: 24px;
    overflow-x: auto;
}

.code-block-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.75;
    color: #FBF6EE;
}

.code-keyword {
    color: #D08060;
}

.code-string {
    color: #88A070;
}

.code-number {
    color: #A07848;
}

/* ========== PROCESS STEPS ========== */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.process-step {
    display: flex;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid rgba(160,120,72,0.15);
    transition: transform 0.3s ease;
    cursor: default;
}

.process-step:last-child {
    border-bottom: none;
}

.process-step:hover {
    transform: translateX(4px);
}

.process-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #A07848;
    opacity: 0.5;
    min-width: 48px;
    line-height: 1;
    padding-top: 4px;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.process-content {
    flex: 1;
}

.process-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #2A1808;
    margin-bottom: 6px;
}

.process-desc {
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    color: #5A4028;
    line-height: 1.75;
}

/* ========== SPEC ROWS ========== */
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(160,120,72,0.2);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #A07848;
}

.spec-value {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    color: #5A4028;
    font-size: 0.9rem;
}

/* ========== FOOTER ========== */
.footer {
    padding: clamp(60px, 10vh, 120px) 0 48px;
    text-align: center;
}

.footer-puzzle {
    margin-bottom: 24px;
    opacity: 0.6;
}

.footer-puzzle svg {
    filter: drop-shadow(1px 2px 4px rgba(90,60,30,0.1));
}

.footer-text {
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #A07848;
    margin-bottom: 4px;
}

.footer-domain {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #5A4028;
    letter-spacing: 0.06em;
}

/* ========== SHAKE ANIMATION ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.shake-active {
    animation: shake 0.4s ease-in-out;
    box-shadow: 0 0 0 2px #D08060 !important;
}

/* ========== ENTRANCE ANIMATIONS ========== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes floatPiece {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Scroll-triggered reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .workshop-column {
        padding: 0 20px;
    }

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

    .card {
        padding: 24px;
    }

    .card-layer-2 {
        margin-left: 8px;
    }

    .component-item {
        padding: 20px 24px;
    }

    .process-step {
        gap: 16px;
    }

    .process-number {
        font-size: 1.5rem;
        min-width: 36px;
    }

    .code-block-content {
        padding: 16px;
    }

    .spec-row {
        flex-direction: column;
        gap: 2px;
    }
}
