/* ======================================
   lower.quest - Styles
   Earth-tones + Retro Computing Aesthetic
   ====================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #e4dcd0;
    color: #3a3428;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    color: #3a3428;
}

.section-title {
    font-size: clamp(24px, 4vw, 44px);
    margin-bottom: clamp(24px, 4vh, 48px);
}

.retro-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    font-weight: 400;
    color: #6a6050;
    letter-spacing: 1px;
}

/* ======================================
   HERO SECTION
   ====================================== */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #e4dcd0;
    position: relative;
    overflow: hidden;
}

.hero-left {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hero-right {
    width: 60%;
    padding-right: 10%;
    padding-left: 4%;
}

.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    color: #3a3428;
    line-height: 1;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-title.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(18px, 3vw, 36px);
    color: #c4943a;
    margin-top: 8px;
    margin-left: 15%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease 0.3s, transform 0.3s ease 0.3s;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-tagline {
    font-style: italic;
    font-weight: 400;
    color: #6a6050;
    margin-top: 24px;
    font-size: clamp(14px, 1.5vw, 18px);
    opacity: 0;
    transition: opacity 0.5s ease 0.6s;
}

.hero-tagline.visible {
    opacity: 1;
}

/* --- Retro Downward Arrow (Chunky Pixel Style) --- */
.retro-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.retro-arrow.visible {
    transform: scale(1);
}

.arrow-shaft {
    width: 24px;
    height: 80px;
    background-color: #c4943a;
    border-radius: 0;
}

.arrow-head {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow-head-row {
    background-color: #c4943a;
    border-radius: 0;
    height: 12px;
}

.arrow-row-1 { width: 72px; }
.arrow-row-2 { width: 56px; }
.arrow-row-3 { width: 40px; }
.arrow-row-4 { width: 24px; }
.arrow-row-5 { width: 8px; }

/* Closing section arrow - larger */
.section-closing .retro-arrow,
#closingArrow {
    transform: scale(1);
}

#closingArrow .arrow-shaft {
    width: 36px;
    height: 120px;
}

#closingArrow .arrow-head-row {
    height: 18px;
}

#closingArrow .arrow-row-1 { width: 108px; }
#closingArrow .arrow-row-2 { width: 84px; }
#closingArrow .arrow-row-3 { width: 60px; }
#closingArrow .arrow-row-4 { width: 36px; }
#closingArrow .arrow-row-5 { width: 12px; }

/* Arrow descent animation */
@keyframes arrowDescent {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
}

#closingArrow {
    animation: arrowDescent 4s ease-in-out infinite;
}

/* ======================================
   BARRIERS SECTION
   ====================================== */
.section-barriers {
    min-height: 100vh;
    display: flex;
    background-color: #d4c8b8;
    padding: clamp(40px, 8vh, 100px) 0;
}

.barriers-content {
    width: 55%;
    padding-left: 10%;
    padding-right: 4%;
}

.barriers-art {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: clamp(40px, 8vh, 100px);
}

#generativeCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- Barrier Items --- */
.barrier-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: clamp(24px, 4vh, 48px);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.barrier-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.barrier-item h3 {
    font-size: clamp(18px, 2vw, 24px);
    margin-bottom: 6px;
    color: #3a3428;
}

.barrier-item p {
    color: #6a6050;
    font-size: clamp(14px, 1.3vw, 16px);
}

/* --- Retro Checkboxes --- */
.retro-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 4px;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #3a3428;
    border-radius: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.retro-checkbox.checked .checkbox-box {
    opacity: 1;
}

.checkbox-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #c4943a;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.retro-checkbox.checked .checkbox-check {
    transform: translate(-50%, -50%) scale(1);
}

/* ======================================
   SOLUTIONS SECTION
   ====================================== */
.section-solutions {
    min-height: 100vh;
    display: flex;
    background-color: #e4dcd0;
    padding: clamp(40px, 8vh, 100px) 0;
}

.solutions-art {
    width: 40%;
}

.solutions-content {
    width: 60%;
    padding-right: 10%;
    padding-left: 4%;
}

/* --- Solution Items --- */
.solution-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: clamp(24px, 4vh, 48px);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.solution-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.solution-item h3 {
    font-size: clamp(18px, 2vw, 24px);
    margin-bottom: 6px;
    color: #3a3428;
}

.solution-item p {
    color: #6a6050;
    font-size: clamp(14px, 1.3vw, 16px);
}

/* --- CSS-Constructed Retro Icons --- */
.solution-icon {
    min-width: 36px;
    width: 36px;
    height: 36px;
    position: relative;
    margin-top: 2px;
}

/* Wrench icon */
.icon-wrench .wrench-handle {
    position: absolute;
    width: 8px;
    height: 24px;
    background-color: #c4943a;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

.icon-wrench .wrench-head {
    position: absolute;
    width: 18px;
    height: 10px;
    background-color: #c4943a;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

/* Door icon */
.icon-door .door-frame {
    position: absolute;
    width: 22px;
    height: 32px;
    border: 3px solid #c4943a;
    background: transparent;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

.icon-door .door-knob {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #c4943a;
    border-radius: 50%;
    top: 18px;
    right: 6px;
}

/* Bridge icon */
.icon-bridge .bridge-pillar {
    position: absolute;
    width: 8px;
    height: 24px;
    background-color: #c4943a;
    bottom: 0;
    border-radius: 0;
}

.icon-bridge .bridge-left {
    left: 2px;
}

.icon-bridge .bridge-right {
    right: 2px;
}

.icon-bridge .bridge-span {
    position: absolute;
    width: 100%;
    height: 6px;
    background-color: #c4943a;
    top: 8px;
    border-radius: 0;
}

/* Arrow-down mini icon */
.icon-arrow-down .mini-arrow-shaft {
    position: absolute;
    width: 6px;
    height: 18px;
    background-color: #c4943a;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

.icon-arrow-down .mini-arrow-head {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 14px solid #c4943a;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

/* ======================================
   CLOSING SECTION
   ====================================== */
.section-closing {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #d4c8b8;
    text-align: center;
    padding: clamp(40px, 8vh, 100px) 5%;
    gap: 32px;
}

.closing-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 44px);
    color: #3a3428;
}

.closing-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #c4943a;
    letter-spacing: 2px;
    margin-top: 16px;
}

/* --- Retro Olive Accent (green screen secondary) --- */
.section-barriers .section-title {
    color: #3a3428;
    border-left: 4px solid #7a8a5a;
    padding-left: 16px;
}

.section-solutions .section-title {
    color: #3a3428;
    border-right: 4px solid #7a8a5a;
    padding-right: 16px;
    text-align: right;
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 768px) {
    .section-hero {
        flex-direction: column;
        padding: 10vh 5% 5vh;
    }

    .hero-left {
        width: 100%;
        min-height: auto;
        padding: 40px 0;
    }

    .hero-right {
        width: 100%;
        padding: 0 5%;
        text-align: left;
    }

    .hero-subtitle {
        margin-left: 5%;
    }

    .section-barriers {
        flex-direction: column;
    }

    .barriers-content {
        width: 100%;
        padding: 0 8%;
    }

    .barriers-art {
        width: 100%;
        padding: 24px 8%;
    }

    #generativeCanvas {
        width: 100%;
        max-height: 300px;
    }

    .section-solutions {
        flex-direction: column;
    }

    .solutions-art {
        width: 100%;
        height: 0;
    }

    .solutions-content {
        width: 100%;
        padding: 0 8%;
    }
}
