/* =============================================
   simidiot.net - A Museum of Beautiful Errors
   Colors: #0f1a2e, #1a2a44, #8a9ab4, #4ac4b8, #b8aaa0, #e4e8f0, #1a4a44
   Fonts: Nunito (headlines), Mulish (body), IBM Plex Mono (labels)
   ============================================= */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0f1a2e;
    color: #8a9ab4;
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Isometric Grid Overlay */
#isometric-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 59px,
            #8a9ab4 59px,
            #8a9ab4 60px
        ),
        repeating-linear-gradient(
            150deg,
            transparent,
            transparent 59px,
            #8a9ab4 59px,
            #8a9ab4 60px
        );
}

/* ---- Parallax Section Base ---- */
.parallax-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg,
.parallax-mid,
.parallax-fg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.parallax-bg {
    z-index: 1;
}

.parallax-mid {
    z-index: 2;
    pointer-events: none;
}

.parallax-fg {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Abstract Node Backgrounds ---- */
.abstract-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.abstract-nodes svg {
    position: absolute;
    opacity: 0.08;
}

/* ---- Isometric Icons ---- */
.iso-icon {
    position: absolute;
    opacity: 0.15;
    animation: float 8s ease-in-out infinite;
}

/* Positioning for hero icons */
#hero .iso-icon-vacuum   { top: 15%; left: 10%; animation-delay: 0s; animation-duration: 7s; }
#hero .iso-icon-punchcard { top: 25%; right: 15%; animation-delay: 1.2s; animation-duration: 9s; }
#hero .iso-icon-tape     { top: 60%; left: 20%; animation-delay: 2.4s; animation-duration: 8s; }
#hero .iso-icon-robot    { top: 70%; right: 25%; animation-delay: 0.8s; animation-duration: 10s; }
#hero .iso-icon-switch   { top: 40%; left: 75%; animation-delay: 3.1s; animation-duration: 6s; }
#hero .iso-icon-tube2    { top: 80%; left: 55%; animation-delay: 1.7s; animation-duration: 9s; }

/* Positioning for philosophy icons */
#section-philosophy .iso-icon-card2 { top: 20%; right: 10%; animation-delay: 0.5s; animation-duration: 8s; }
#section-philosophy .iso-icon-dial  { top: 65%; left: 8%;  animation-delay: 2.0s; animation-duration: 7s; }

/* Positioning for archive icons */
#section-archive .iso-icon-reel { top: 15%; left: 5%; animation-delay: 1.0s; animation-duration: 9s; }
#section-archive .iso-icon-chip { top: 70%; right: 8%; animation-delay: 0.3s; animation-duration: 7s; }

/* Positioning for specimens icons */
#section-specimens .iso-icon-bot2 { top: 20%; right: 12%; animation-delay: 1.5s; animation-duration: 8s; }
#section-specimens .iso-icon-lamp { top: 75%; left: 10%; animation-delay: 0.7s; animation-duration: 10s; }

/* Positioning for manifesto icons */
#section-manifesto .iso-icon-key  { top: 25%; left: 6%; animation-delay: 2.2s; animation-duration: 9s; }
#section-manifesto .iso-icon-prism { top: 65%; right: 10%; animation-delay: 0.4s; animation-duration: 7s; }

/* Positioning for observatory icons */
#section-observatory .iso-icon-scope { top: 18%; right: 15%; animation-delay: 1.8s; animation-duration: 8s; }

/* Positioning for closing icons */
#section-closing .iso-icon-star { top: 30%; left: 15%; animation-delay: 0.6s; animation-duration: 10s; }

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

/* ---- Section Backgrounds ---- */
#hero {
    background: linear-gradient(180deg, #0f1a2e 0%, #1a2a44 100%);
}

#section-philosophy {
    background: linear-gradient(180deg, #1a2a44 0%, #0f1a2e 100%);
}

#section-archive {
    background: linear-gradient(180deg, #0f1a2e 0%, #152236 50%, #1a2a44 100%);
}

#section-specimens {
    background: linear-gradient(180deg, #1a2a44 0%, #162a3a 50%, #1a4a44 30%, #0f1a2e 100%);
}

#section-manifesto {
    background: linear-gradient(180deg, #0f1a2e 0%, #1a2a44 100%);
}

#section-observatory {
    background: linear-gradient(180deg, #1a2a44 0%, #1a4a44 50%, #0f1a2e 100%);
}

#section-closing {
    background: linear-gradient(180deg, #0f1a2e 0%, #0a1220 100%);
}

/* ---- Hero Section ---- */
#hero-content {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(48px, 8vw, 96px);
    color: #e4e8f0;
    letter-spacing: 0.05em;
    text-shadow: 0 0 40px rgba(74, 196, 184, 0.2), 0 0 80px rgba(74, 196, 184, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.15s ease, text-shadow 0.3s ease;
}

.hero-title .letter.visible {
    opacity: 1;
    text-shadow: 0 0 20px rgba(74, 196, 184, 0.3), 0 0 40px rgba(74, 196, 184, 0.15);
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #b8aaa0;
    letter-spacing: 0.15em;
    margin-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-subtitle.revealed {
    opacity: 1;
}

.underline-draw {
    display: block;
    width: 200px;
    height: 2px;
    margin: 0.75rem auto 0;
    background: linear-gradient(90deg, #4ac4b8, #8a9ab4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease-out;
}

.underline-draw.drawn {
    transform: scaleX(1);
}

/* ---- Section Content ---- */
.section-content {
    max-width: 900px;
    width: 90%;
    padding: 4rem 2rem;
}

.section-content-narrow {
    max-width: 720px;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    color: #4ac4b8;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-label.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 64px);
    color: #e4e8f0;
    line-height: 1.2;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-accent {
    color: #4ac4b8;
}

.section-text {
    color: #8a9ab4;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.section-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Draw Links ---- */
.draw-link {
    color: #e4e8f0;
    text-decoration: none;
    position: relative;
    background-image: linear-gradient(90deg, #4ac4b8, #8a9ab4);
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease-out;
    padding-bottom: 2px;
}

.draw-link:hover {
    background-size: 100% 2px;
}

/* ---- Archive Section ---- */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.archive-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-card {
    background: rgba(26, 42, 68, 0.4);
    border: 1px solid rgba(138, 154, 180, 0.1);
    padding: 2rem;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.archive-card:hover {
    border-color: rgba(74, 196, 184, 0.3);
    box-shadow: 0 0 0 2px rgba(74, 196, 184, 0.1);
}

.archive-year {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 13px;
    color: #4ac4b8;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.75rem;
}

.archive-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 24px);
    color: #e4e8f0;
    margin-bottom: 0.75rem;
}

.archive-desc {
    color: #8a9ab4;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.7;
}

/* ---- Specimen Section ---- */
.specimen-display {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.specimen-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.specimen-item {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(26, 42, 68, 0.3);
    border: 1px solid rgba(138, 154, 180, 0.08);
    transition: border-color 0.3s ease;
}

.specimen-item:hover {
    border-color: rgba(74, 196, 184, 0.2);
}

.specimen-visual {
    flex: 0 0 240px;
}

.specimen-svg {
    width: 100%;
    height: auto;
}

.specimen-info {
    flex: 1;
}

.specimen-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 26px);
    color: #e4e8f0;
    margin-bottom: 0.5rem;
}

.specimen-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #4ac4b8;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.specimen-desc {
    color: #8a9ab4;
    line-height: 1.7;
}

/* ---- Manifesto Section ---- */
.manifesto-quote {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 28px);
    color: #e4e8f0;
    line-height: 1.6;
    border-left: 3px solid #4ac4b8;
    padding-left: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.manifesto-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.manifesto-tenets {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.manifesto-tenets.visible {
    opacity: 1;
    transform: translateY(0);
}

.tenet {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(138, 154, 180, 0.08);
}

.tenet:last-child {
    border-bottom: none;
}

.tenet-number {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #4ac4b8;
    flex: 0 0 2rem;
    text-align: right;
    padding-top: 0.15em;
}

.tenet-text {
    color: #b8aaa0;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
}

/* ---- Observatory Section ---- */
.observatory-display {
    margin-top: 2rem;
    background: rgba(15, 26, 46, 0.6);
    border: 1px solid rgba(138, 154, 180, 0.1);
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.observatory-display.visible {
    opacity: 1;
    transform: translateY(0);
}

#observatory-canvas {
    width: 100%;
    height: 300px;
    display: block;
    background: transparent;
}

.observatory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(138, 154, 180, 0.08);
}

.obs-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #4ac4b8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.obs-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #8a9ab4;
    letter-spacing: 0.05em;
}

#error-count {
    color: #4ac4b8;
}

/* ---- Closing Section ---- */
#closing-content {
    text-align: center;
    padding: 4rem 2rem;
}

.closing-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 52px);
    color: #e4e8f0;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.closing-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-tagline-small {
    font-size: clamp(16px, 2vw, 24px);
    color: #b8aaa0;
    font-weight: 400;
    font-family: 'Mulish', sans-serif;
    margin-bottom: 3rem;
    transition-delay: 0.15s;
}

.closing-sigil {
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

.closing-sigil.visible {
    opacity: 1;
}

.closing-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #4ac4b8;
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
}

.closing-domain.visible {
    opacity: 1;
}

/* ---- Luminous Focus Rings ---- */
.archive-card:hover,
.specimen-item:hover {
    box-shadow: 0 0 0 2px rgba(74, 196, 184, 0.3);
    transition: box-shadow 0.3s ease;
}

.archive-card:hover {
    box-shadow: 0 0 0 2px rgba(74, 196, 184, 0.3), 0 0 0 4px rgba(74, 196, 184, 0.1);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .specimen-item {
        flex-direction: column;
    }

    .specimen-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .section-content {
        padding: 3rem 1.5rem;
    }

    .tenet {
        gap: 1rem;
    }

    .manifesto-quote {
        padding-left: 1.25rem;
    }
}

@media (max-width: 480px) {
    .section-content {
        padding: 2.5rem 1rem;
    }

    .archive-card {
        padding: 1.5rem;
    }

    .specimen-item {
        padding: 1.5rem;
    }
}
