/* a6c.xyz - Neubrutalism / Isometric Technical */
/* Palette: #f4f1eb, #2b2b2b, #ff5c00, #0057ff, #1a1a1a, #c8c0b4 */

:root {
    --parchment: #f4f1eb;
    --charcoal: #2b2b2b;
    --orange: #ff5c00;
    --blue: #0057ff;
    --shadow: #1a1a1a;
    --grid-line: #c8c0b4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--parchment);
    color: var(--shadow);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   ISOMETRIC GRID BACKGROUND (SVG)
   ======================================== */
.iso-grid-bg {
    position: fixed;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.iso-grid-bg svg {
    width: 100%;
    height: 100%;
}

/* ========================================
   SPINNING CONSTRUCTION MARKERS
   ======================================== */
.construction-markers {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.construction-marker {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--orange);
    animation: spinMarker 4s linear infinite;
    opacity: 0.25;
}

@keyframes spinMarker {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */
.iso-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: var(--charcoal);
    box-shadow: 4px 4px 0px var(--shadow);
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.icon-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cube-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cube-front {
    background: var(--charcoal);
    border: 1px solid rgba(200, 192, 180, 0.2);
}

.cube-side {
    background: var(--orange);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.sidebar-icon:hover .icon-cube {
    transform: translateX(-100%);
}

.sidebar-icon:hover .cube-side {
    opacity: 1;
}

.sidebar-icon::after {
    content: attr(data-label);
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--orange);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.sidebar-icon:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Sidebar icon inner marks */
.sidebar-icon:nth-child(1) .cube-front::after {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid var(--grid-line);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidebar-icon:nth-child(2) .cube-front::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid var(--grid-line);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidebar-icon:nth-child(3) .cube-front::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--grid-line);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   SECTIONS
   ======================================== */
.iso-section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
}

/* ========================================
   HERO / OPENING
   ======================================== */
#opening {
    min-height: 100vh;
}

.hero-block {
    text-align: center;
    position: relative;
}

.brand-3d {
    position: relative;
    display: inline-block;
    height: clamp(5rem, 14vw, 10rem);
}

/* Three isometric faces of the brand mark */
.face-top {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 8rem);
    letter-spacing: 0.02em;
    color: var(--parchment);
    -webkit-text-stroke: 3px var(--shadow);
    display: block;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(-40px) skewY(-5deg);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.face-top.assembled {
    opacity: 1;
    transform: translateY(0) skewY(0);
}

.face-left {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 8rem);
    letter-spacing: 0.02em;
    color: var(--blue);
    position: absolute;
    top: 4px;
    left: -6px;
    z-index: 1;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.face-left.assembled {
    opacity: 0.3;
    transform: translateX(0);
}

.face-front {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 8rem);
    letter-spacing: 0.02em;
    color: var(--charcoal);
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    text-shadow:
        1px 1px 0 var(--shadow),
        2px 2px 0 var(--shadow),
        3px 3px 0 var(--shadow),
        4px 4px 0 var(--shadow),
        5px 5px 0 var(--shadow),
        6px 6px 0 var(--shadow),
        7px 7px 0 var(--shadow),
        8px 8px 0 var(--shadow);
    opacity: 0;
    transform: translateX(40px) translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}

.face-front.assembled {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.assembly-label {
    margin-top: 3rem;
    min-height: 1.5rem;
}

.label-type {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--orange);
}

.typing-cursor {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--orange);
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.coord-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--grid-line);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-coord {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
}

/* ========================================
   CONVEYOR BELTS
   ======================================== */
.conveyor-belt {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: -2rem 0;
}

.conveyor-line {
    animation: conveyorFlow 1.5s linear infinite;
}

@keyframes conveyorFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -30; }
}

/* ========================================
   MODULE GRID
   ======================================== */
.module-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 560px;
    width: 100%;
}

.op-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 640px;
    width: 100%;
}

/* ========================================
   ISO MODULES
   ======================================== */
.iso-module {
    padding: 2rem 2rem 1.5rem;
    position: relative;
    box-shadow: 8px 8px 0px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.iso-module:hover {
    transform: translate(-2px, -2px) skewY(-1deg);
    box-shadow: 12px 12px 0px var(--shadow);
}

/* Scroll reveal states */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px) translateX(-20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

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

.scroll-reveal.visible:hover {
    transform: translate(-2px, -2px) skewY(-1deg);
    box-shadow: 12px 12px 0px var(--shadow);
}

/* Dark module */
.dark-mod {
    background: var(--charcoal);
    color: var(--parchment);
}

.dark-mod .mod-title { color: var(--parchment); }
.dark-mod .mod-body { color: rgba(244, 241, 235, 0.7); }
.dark-mod .coord-label { color: rgba(244, 241, 235, 0.25); }
.dark-mod .measure-label { color: rgba(244, 241, 235, 0.3); }
.dark-mod .measure-bar { background: rgba(244, 241, 235, 0.15); }

/* Light module */
.light-mod {
    background: var(--parchment);
    border: 2px solid var(--shadow);
    color: var(--shadow);
}

.wide-mod {
    max-width: 640px;
}

/* ========================================
   CORNER BRACKETS (technical documentation)
   ======================================== */
.bracket {
    position: absolute;
    width: 14px;
    height: 14px;
}

.bracket.tl {
    top: -2px;
    left: -2px;
    border-top: 3px solid var(--orange);
    border-left: 3px solid var(--orange);
}

.bracket.tr {
    top: -2px;
    right: -2px;
    border-top: 3px solid var(--orange);
    border-right: 3px solid var(--orange);
}

.bracket.bl {
    bottom: -2px;
    left: -2px;
    border-bottom: 3px solid var(--orange);
    border-left: 3px solid var(--orange);
}

.bracket.br {
    bottom: -2px;
    right: -2px;
    border-bottom: 3px solid var(--orange);
    border-right: 3px solid var(--orange);
}

/* ========================================
   MODULE CONTENT STYLES
   ======================================== */
.mod-marker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--orange);
    display: block;
    margin-bottom: 0.75rem;
}

.mod-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    color: var(--shadow);
}

.mod-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(26, 26, 26, 0.7);
}

/* ========================================
   BLUEPRINT MEASUREMENT LINES
   ======================================== */
.measure-line {
    margin-top: 1.25rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.measure-bar {
    width: 60px;
    height: 1px;
    background: var(--grid-line);
    position: relative;
}

.measure-bar::before,
.measure-bar::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 6px;
    background: var(--grid-line);
    top: -3px;
}

.measure-bar::before { left: 0; }
.measure-bar::after { right: 0; }

.measure-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--grid-line);
    letter-spacing: 0.05em;
}

/* ========================================
   INDICATOR LIGHTS
   ======================================== */
.indicator-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.indicator.active {
    background: var(--orange);
    animation: pulse 2s ease-in-out infinite;
}

.indicator.idle {
    background: var(--grid-line);
}

.indicator.warning {
    background: var(--blue);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========================================
   SIGNATURE SECTION
   ======================================== */
#signature {
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.converging-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
}

.converging-grid svg {
    width: 100%;
    height: 100%;
}

.sig-block {
    text-align: center;
    position: relative;
    z-index: 2;
}

.sig-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: 0.15em;
    color: var(--shadow);
    text-shadow:
        2px 2px 0 var(--charcoal),
        4px 4px 0 rgba(26, 26, 26, 0.3);
}

.sig-coord {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--grid-line);
    margin-top: 1rem;
    letter-spacing: 0.15em;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 780px;
        gap: 2.5rem;
    }

    .module-grid .iso-module:nth-child(2) {
        margin-top: 3rem;
    }

    .module-grid .iso-module:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 380px;
        justify-self: center;
    }

    .op-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: 2.5rem;
    }

    .op-grid .iso-module:nth-child(2) {
        margin-top: 2rem;
    }

    .op-grid .iso-module:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 440px;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .iso-module {
        box-shadow: 5px 5px 0px var(--shadow);
    }

    .iso-module:hover {
        box-shadow: 7px 7px 0px var(--shadow);
    }

    .hero-coord { display: none; }

    .iso-sidebar {
        display: none;
    }

    .iso-section {
        padding: 4rem 1.25rem 3rem;
    }

    .face-front {
        text-shadow:
            1px 1px 0 var(--shadow),
            2px 2px 0 var(--shadow),
            3px 3px 0 var(--shadow),
            4px 4px 0 var(--shadow);
    }
}
