/* undo.systems — Isometric Technical Docs */

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

:root {
    --ink-brown: #2E2A24;
    --pencil: #8A7E70;
    --parchment: #E8E4DC;
    --dark-wood: #4A443C;
    --sand: #B0A898;
    --ivory: #F8F6F2;
    --verdigris: #5B8C6E;
    --light-stone: #C8C0B4;
}

body {
    background: var(--ivory);
    color: var(--ink-brown);
    font-family: 'IBM Plex Sans', sans-serif;
    overflow-x: hidden;
}

/* Isometric grid background */
.iso-grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 59px,
            rgba(232, 228, 220, 0.2) 59px,
            rgba(232, 228, 220, 0.2) 60px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 59px,
            rgba(232, 228, 220, 0.2) 59px,
            rgba(232, 228, 220, 0.2) 60px
        );
}

/* Page content */
.page-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Panels */
.panel {
    width: 100%;
    position: relative;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
}

.panel.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-border {
    position: absolute;
    inset: 0;
    border: 1px solid var(--light-stone);
    pointer-events: none;
    opacity: 0;
}

.panel.revealed .panel-border {
    opacity: 1;
    animation: drawBorder 0.6s ease forwards;
}

@keyframes drawBorder {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.panel-inner {
    padding: 40px;
    opacity: 0;
    transition: opacity 0.4s ease 0.5s;
}

.panel.revealed .panel-inner {
    opacity: 1;
}

/* Tech labels */
.tech-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pencil);
    display: block;
    margin-bottom: 16px;
}

/* Panel headings */
.panel-heading {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 28px;
    color: var(--ink-brown);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    line-height: 1.3;
}

.panel-hero .panel-heading {
    font-size: 36px;
}

/* Panel body */
.panel-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.75;
    color: var(--dark-wood);
    margin-bottom: 20px;
}

.note-italic {
    font-style: italic;
    color: var(--pencil);
}

/* Dimension lines */
.dimension-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--parchment);
}

.dimension-line::before,
.dimension-line::after {
    content: '';
    flex: 1;
    height: 0;
    border-top: 1px solid var(--light-stone);
}

.dim-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pencil);
    white-space: nowrap;
}

/* Spec rows */
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dotted var(--parchment);
}

.spec-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pencil);
}

.spec-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--verdigris);
}

/* Machine diagram */
.machine-diagram {
    margin-top: 20px;
    padding: 16px;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

/* Connectors */
.connector {
    display: block;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.connector.drawn {
    opacity: 1;
}

.conn-path {
    stroke-dasharray: 4 4;
    animation: none;
}

.connector.drawn .conn-path {
    animation: dashFlow 2s linear infinite;
}

@keyframes dashFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -16; }
}

/* Footer */
.footer {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--parchment);
    text-align: center;
}

.footer .tech-label {
    margin-bottom: 0;
}
