/* ============================================
   gunsul.quest -- Isometric Construction Quest
   ============================================ */

/* === CUSTOM CURSOR === */
@font-face {
    font-display: swap;
}

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

html {
    scroll-behavior: smooth;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M10,2 L10,12 M7,10 L10,14 L13,10' stroke='%23c4a35a' stroke-width='1.5' fill='none'/%3E%3Cpath d='M6,14 Q10,18 14,14' stroke='%23c4a35a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"), auto;
}

body {
    background-color: #141414;
    color: #d4d0c8;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

a, button, [data-floor] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M10,2 L10,10' stroke='%23c4a35a' stroke-width='1.5' fill='none'/%3E%3Cpath d='M6,10 L10,14 L14,10 Z' stroke='%23c4a35a' stroke-width='1.5' fill='%23c4a35a'/%3E%3C/svg%3E"), pointer;
}

/* === BLUEPRINT GRID OVERLAY === */
#blueprint-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
    background-image:
        linear-gradient(to right, #1e1e1e 1px, transparent 1px),
        linear-gradient(to bottom, #1e1e1e 1px, transparent 1px);
    background-size: 40px 40px;
}

#blueprint-grid.visible {
    opacity: 0.4;
}

#blueprint-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, #1e1e1e 0.5px, transparent 0.5px);
    background-size: 40px 40px;
    background-position: 0 0;
    opacity: 0.15;
}

/* === ELEVATOR PROGRESS INDICATOR === */
#elevator-track {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60vh;
    background: #1e1e1e;
    z-index: 100;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#elevator-track.visible {
    opacity: 1;
}

#elevator-car {
    position: absolute;
    top: 0;
    left: -4px;
    width: 12px;
    height: 12px;
    background: #f5c518;
    border-radius: 1px;
    transition: top 0.3s ease;
}

.elevator-label {
    position: absolute;
    right: 16px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #6b8f71;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transform: translateY(-50%);
}

/* === OPENING SECTION === */
#opening {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.opening-content {
    text-align: center;
    position: relative;
}

#building-svg {
    width: 400px;
    height: 600px;
    max-width: 90vw;
    max-height: 70vh;
}

.building-line {
    fill: none;
    stroke: #4a6fa5;
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.building-highlight {
    fill: #c4a35a;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.building-floor:hover .building-highlight,
.building-floor.active .building-highlight {
    opacity: 0.15;
}

.building-floor {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M10,2 L10,10' stroke='%23c4a35a' stroke-width='1.5' fill='none'/%3E%3Cpath d='M6,10 L10,14 L14,10 Z' stroke='%23c4a35a' stroke-width='1.5' fill='%23c4a35a'/%3E%3C/svg%3E"), pointer;
}

.building-floor:hover .building-line {
    stroke: #c4a35a;
}

.floor-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    fill: #c4a35a;
    opacity: 0;
    letter-spacing: 0.08em;
    transition: opacity 0.4s ease;
}

.floor-label.visible {
    opacity: 1;
}

.crane .building-line {
    stroke: #8a8a8a;
    stroke-width: 1;
}

.crane-hook {
    fill: #c4a35a;
    opacity: 0;
    transition: opacity 0.6s ease 2.5s;
}

.crane-hook.visible {
    opacity: 1;
}

.site-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    color: #c4a35a;
    letter-spacing: 0.08em;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 3s, transform 0.8s ease 3s;
}

.site-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-accent {
    color: #f5c518;
}

.site-tagline {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #6b8f71;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.8s ease 3.4s;
}

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

/* === STRUCTURAL COLUMNS === */
#structural-columns {
    position: fixed;
    left: 48px;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#structural-columns.visible {
    opacity: 1;
}

#column-svg {
    width: 100%;
    height: 100%;
}

.structural-line {
    stroke: #8a8a8a;
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

/* === FLOOR SECTIONS === */
.floor-section {
    position: relative;
    z-index: 1;
    padding: 64px 80px 64px 100px;
    transform: skewY(-2deg);
    transform-origin: left center;
}

.floor-section > * {
    transform: skewY(2deg);
}

.floor-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 10;
    transform: skewY(2deg);
}

.floor-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #5a5a5a, #3a3a3a);
    transition: width 0.1s linear;
}

.floor-divider {
    width: 100%;
    height: 0;
    border-top: 1px dashed #c4a35a;
    margin-bottom: 32px;
    opacity: 0.4;
}

.floor-grid {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 2fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.floor-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floor-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    color: #c4a35a;
    letter-spacing: 0.08em;
    line-height: 1;
}

.floor-annotation {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #6b8f71;
    letter-spacing: 0.05em;
}

.section-diagram {
    width: 100%;
    max-width: 180px;
    margin-top: 16px;
}

.floor-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.floor-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-panel {
    background: rgba(58, 58, 58, 0.3);
    border: 1px solid rgba(74, 111, 165, 0.2);
    padding: 32px;
    position: relative;
}

.content-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #c4a35a;
}

.content-panel:hover::before {
    background: #e85d26;
}

.floor-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    color: #c4a35a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.floor-content p {
    margin-bottom: 16px;
    color: #d4d0c8;
}

.detail-block {
    display: inline-flex;
    flex-direction: column;
    margin-right: 32px;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid rgba(74, 111, 165, 0.3);
    background: rgba(20, 20, 20, 0.5);
}

.detail-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #6b8f71;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-value {
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #d4d0c8;
}

/* === FOOTER === */
#site-footer {
    position: relative;
    z-index: 1;
    padding: 48px 80px;
    border-top: 1px solid #3a3a3a;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    color: #c4a35a;
    letter-spacing: 0.08em;
}

.footer-annotation {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #6b8f71;
    letter-spacing: 0.05em;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .floor-section {
        transform: skewY(0deg);
        padding: 48px 24px 48px 24px;
    }

    .floor-section > * {
        transform: skewY(0deg);
    }

    .floor-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-title {
        font-size: 40px;
    }

    .floor-number {
        font-size: 48px;
    }

    .floor-title {
        font-size: 28px;
    }

    #elevator-track {
        display: none;
    }

    #structural-columns {
        display: none;
    }

    .floor-section {
        padding-left: 24px;
    }

    .detail-block {
        display: flex;
        margin-right: 16px;
    }

    #building-svg {
        width: 280px;
        height: 420px;
    }

    #site-footer {
        padding: 32px 24px;
    }
}

/* === ANIMATIONS === */
@keyframes drawLine {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

.building-line.drawn {
    stroke-dashoffset: 0;
}

/* SVG animation class for building draw */
#building-svg.animate .building-floor[data-floor="0"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 0s;
}

#building-svg.animate .building-floor[data-floor="1"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 0.3s;
}

#building-svg.animate .building-floor[data-floor="2"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 0.7s;
}

#building-svg.animate .building-floor[data-floor="3"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 1.1s;
}

#building-svg.animate .building-floor[data-floor="4"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 1.5s;
}

#building-svg.animate .building-floor[data-floor="5"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 1.9s;
}

#building-svg.animate .building-floor[data-floor="6"] .building-line {
    stroke-dashoffset: 0;
    transition-delay: 2.3s;
}

#building-svg.animate .crane .building-line {
    stroke-dashoffset: 0;
    transition-delay: 0.5s;
}
