/* ================================================================
   DEMODEMODATTE.COM — Design Language: Goblincore Edgy-Rebellious
   Colors: #0D0D0B #3B2E1A #1C2B1A #F0ECD8 #C8F400 #39FF14 #C43B1B #B8C4A0
   Fonts: Space Grotesk 800, Bebas Neue, Share Tech Mono, VT323
================================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: #0D0D0B;
    color: #F0ECD8;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* Scan-line overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.12) 2px,
        rgba(0, 0, 0, 0.12) 4px
    );
    pointer-events: none;
    z-index: 9998;
}

/* Noise texture layer */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9997;
    opacity: 0.04;
}

/* ----------------------------------------------------------------
   NAVIGATION TOGGLE
---------------------------------------------------------------- */
.nav-toggle {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 1000;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nav-toggle:hover {
    transform: scale(1.15);
}

.goblin-ear-icon {
    width: 28px;
    height: 36px;
    filter: drop-shadow(0 0 6px rgba(200, 244, 0, 0.5));
}

/* ----------------------------------------------------------------
   NAVIGATION DRAWER
---------------------------------------------------------------- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 11, 0.7);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer-inner {
    background: #3B2E1A;
    height: 100%;
    padding: 60px 40px 40px;
    clip-path: polygon(
        12% 0%, 100% 0%, 100% 100%, 12% 100%,
        9% 92%, 11% 85%, 8% 78%, 12% 70%,
        9% 62%, 11% 54%, 8% 46%, 12% 38%,
        9% 30%, 11% 22%, 8% 14%, 12% 6%
    );
    position: relative;
    overflow: hidden;
}

.nav-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: transparent;
    border: none;
    color: #B8C4A0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.15s;
}

.nav-close:hover {
    color: #C8F400;
}

.nav-corrupt-fragment {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #39FF14;
    opacity: 0.6;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-links a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: #F0ECD8;
    text-decoration: none;
    letter-spacing: 0.12em;
    transition: color 0.15s, letter-spacing 0.15s;
    display: block;
}

.nav-links a:hover {
    color: #C8F400;
    letter-spacing: 0.18em;
}

.nav-circuit-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 200'%3E%3Cg stroke='%23F0ECD8' stroke-width='1' fill='none' opacity='0.08'%3E%3Cpath d='M5 20 L50 20 L50 60 L110 60'/%3E%3Cpath d='M50 60 L50 120 L145 120'/%3E%3Ccircle cx='50' cy='20' r='3' fill='%23F0ECD8' opacity='0.1'/%3E%3Ccircle cx='50' cy='60' r='3' fill='%23F0ECD8' opacity='0.1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   HERO SECTION (Entry Layer 0-100vh)
---------------------------------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    background: #0D0D0B;
    overflow: hidden;
    perspective: 1200px;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8vw;
}

/* Hero illustration grid (background) */
.hero-illustration-grid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 40px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    gap: 12px;
}

.hero-illustration-grid .specimen-cell {
    flex: 0 0 auto;
}

.hero-illustration-grid .specimen-svg {
    width: 100px;
    height: auto;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 85vw;
}

.hero-wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: clamp(52px, 12vw, 200px);
    letter-spacing: -0.03em;
    color: #F0ECD8;
    position: relative;
    z-index: 3;
    transition: transform 0.08s ease-out;
    line-height: 0.9;
    white-space: nowrap;
}

.hero-sub-corrupt {
    margin-top: 20px;
    position: relative;
    z-index: 3;
}

/* Circuit decoration in hero */
.hero-circuit {
    position: absolute;
    bottom: 40px;
    left: 30px;
    width: 200px;
    height: 200px;
    z-index: 2;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   GLITCH TEXT EFFECT
---------------------------------------------------------------- */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: glitch-channels 4s steps(1) infinite;
}

.glitch-text::before {
    color: #C8F400;
    clip-path: inset(0 0 60% 0);
}

.glitch-text::after {
    color: #39FF14;
    clip-path: inset(40% 0 0 0);
    transform: translateX(3px);
}

@keyframes glitch-channels {
    0%,   90%, 100% { transform: translateX(0);              opacity: 1;   }
    91%              { transform: translateX(-4px);           opacity: 0.8; }
    93%              { transform: translateX(3px) skewX(2deg); opacity: 0.9; }
    95%              { transform: translateX(-2px);           opacity: 0.7; }
    97%              { transform: translateX(0);              opacity: 1;   }
}

/* ----------------------------------------------------------------
   SPECIMEN CELLS (shared)
---------------------------------------------------------------- */
.specimen-cell {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.specimen-cell[data-rot="-3"]  { transform: rotate(-3deg); }
.specimen-cell[data-rot="-4"]  { transform: rotate(-4deg); }
.specimen-cell[data-rot="-5"]  { transform: rotate(-5deg); }
.specimen-cell[data-rot="-6"]  { transform: rotate(-6deg) translateY(8px); }
.specimen-cell[data-rot="-7"]  { transform: rotate(-7deg) translateY(8px); }
.specimen-cell[data-rot="3"]   { transform: rotate(3deg); }
.specimen-cell[data-rot="4"]   { transform: rotate(4deg); }
.specimen-cell[data-rot="5"]   { transform: rotate(5deg); }

.specimen-cell:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.7));
}

.specimen-svg {
    display: block;
}

/* ----------------------------------------------------------------
   STRATUM DIVIDERS (torn-edge)
---------------------------------------------------------------- */
.stratum-divider {
    width: 100%;
    height: 80px;
    position: relative;
    z-index: 5;
}

.stratum-divider--1 {
    background: #3B2E1A;
    clip-path: polygon(
        0% 0%, 3% 60%, 7% 20%, 12% 80%, 18% 30%,
        25% 90%, 32% 40%, 38% 70%, 44% 10%, 50% 65%,
        57% 25%, 63% 75%, 70% 15%, 76% 85%, 83% 35%,
        89% 70%, 95% 20%, 100% 55%, 100% 100%, 0% 100%
    );
}

.stratum-divider--2 {
    background: #1C2B1A;
    clip-path: polygon(
        0% 0%, 4% 40%, 9% 10%, 15% 70%, 21% 25%,
        28% 85%, 35% 30%, 42% 60%, 48% 5%, 54% 50%,
        61% 20%, 67% 80%, 73% 35%, 80% 65%, 87% 15%,
        92% 75%, 97% 30%, 100% 50%, 100% 100%, 0% 100%
    );
}

.stratum-divider--3 {
    background: #0D0D0B;
    clip-path: polygon(
        0% 0%, 2% 70%, 6% 30%, 11% 90%, 17% 20%,
        23% 80%, 30% 40%, 37% 65%, 43% 15%, 49% 55%,
        56% 10%, 62% 70%, 68% 30%, 75% 80%, 82% 25%,
        88% 65%, 94% 20%, 100% 45%, 100% 100%, 0% 100%
    );
}

/* ----------------------------------------------------------------
   STRATUM SECTIONS
---------------------------------------------------------------- */
.stratum {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    min-height: 100vh;
    padding: 80px 8vw 100px;
}

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

.stratum-layer-label {
    margin-bottom: 20px;
}

.stratum-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 7vw, 72px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C8F400;
    line-height: 1;
    margin-bottom: 32px;
    filter: drop-shadow(0 4px 20px rgba(200,244,0,0.2));
}

.stratum-heading--light {
    color: #C8F400;
}

.stratum-heading--glitch {
    color: #F0ECD8;
}

/* ----------------------------------------------------------------
   ARCHIVE SECTION
---------------------------------------------------------------- */
.stratum--archive {
    background: #3B2E1A;
    padding-bottom: 120px;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    max-width: 1200px;
}

@media (max-width: 900px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

.archive-body {
    font-family: 'Share Tech Mono', monospace;
    font-size: 15px;
    color: #B8C4A0;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
}

.archive-body p {
    margin-bottom: 18px;
}

.inline-accent {
    color: #C8F400;
    position: relative;
}

.archive-manifest {
    border-left: 2px solid #C8F400;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
}

.manifest-entry {
    display: flex;
    gap: 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    align-items: baseline;
}

.manifest-key {
    color: #39FF14;
    min-width: 80px;
    font-size: 11px;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.manifest-val {
    color: #B8C4A0;
}

/* Aside column */
.archive-column--aside {
    position: relative;
}

.corrupt-data-block {
    background: #1C2B1A;
    border: 1px solid rgba(57, 255, 20, 0.2);
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.corrupt-data-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: #39FF14;
    opacity: 0.5;
}

.corrupt-overflow {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 16px;
    font-size: 14px;
}

.corrupt-stack {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #B8C4A0;
    line-height: 2;
}

.corrupt-stack div:nth-child(even) {
    color: #C43B1B;
    opacity: 0.9;
}

.aside-circuit {
    width: 150px;
    height: 200px;
    opacity: 0.7;
}

/* ----------------------------------------------------------------
   SPECIMEN SECTION
---------------------------------------------------------------- */
.stratum--specimen {
    background: #1C2B1A;
}

.specimen-container {
    max-width: 1200px;
}

.specimen-intro {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #B8C4A0;
    max-width: 500px;
    margin-bottom: 60px;
    line-height: 1.8;
}

.specimen-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-end;
    padding: 20px 0 40px;
}

.specimen-cell--large .specimen-svg {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.6));
}

.specimen-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #39FF14;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
    text-align: center;
    opacity: 0.8;
}

/* ----------------------------------------------------------------
   SIGNAL SECTION
---------------------------------------------------------------- */
.stratum--signal {
    background: #0D0D0B;
    position: relative;
}

.signal-container {
    max-width: 1200px;
}

.signal-container .stratum-heading {
    color: #F0ECD8;
    margin-bottom: 50px;
}

.signal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

@media (max-width: 800px) {
    .signal-grid {
        grid-template-columns: 1fr;
    }
}

/* Terminal block */
.signal-terminal {
    background: #0D0D0B;
    border: 1px solid rgba(57, 255, 20, 0.3);
    padding: 28px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.8;
    position: relative;
}

.signal-terminal::before {
    content: 'TERMINAL // DEMODEMODATTE SYS';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #0D0D0B;
    padding: 0 8px;
    font-size: 12px;
    font-family: 'Share Tech Mono', monospace;
    color: #39FF14;
    opacity: 0.7;
}

.terminal-line {
    color: #39FF14;
    display: flex;
    gap: 10px;
}

.terminal-error {
    color: #C43B1B;
}

.prompt {
    color: #C8F400;
    opacity: 0.8;
}

.terminal-blink .prompt {
    animation: cursor-blink 1s steps(1) infinite;
}

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

/* Manifesto block */
.signal-manifesto {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: #B8C4A0;
    line-height: 2;
    margin-bottom: 40px;
}

.signal-manifesto p {
    margin-bottom: 16px;
}

.accent-rust {
    color: #C43B1B;
}

.accent-yellow {
    color: #C8F400;
}

/* Glitch wordmark sequence */
.glitch-wordmark-sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.glitch-seq-item {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: #F0ECD8;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.glitch-seq-item--full {
    color: #C8F400;
    opacity: 1;
}

/* Circuit in signal section */
.signal-circuit {
    width: 100%;
    max-width: 600px;
    height: 100px;
    display: block;
    margin-top: 20px;
}

/* ----------------------------------------------------------------
   SHARED VT323 FRAGMENT STYLE
---------------------------------------------------------------- */
.vt-fragment {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #39FF14;
    letter-spacing: 0.05em;
}

/* ----------------------------------------------------------------
   CIRCUIT TRACES (shared)
---------------------------------------------------------------- */
.circuit-trace {
    pointer-events: none;
}

/* ----------------------------------------------------------------
   FIXED TICKER STRIP
---------------------------------------------------------------- */
.ticker-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #1C2B1A;
    border-top: 1px solid #39FF14;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 9999;
}

.ticker-content {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #39FF14;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    padding-left: 100vw;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------
   DEPTH CUES (z-layer brightness degradation)
---------------------------------------------------------------- */
.stratum--archive {
    filter: brightness(0.95);
}

.stratum--specimen {
    filter: blur(0px) brightness(0.9);
}

.stratum--signal {
    filter: brightness(0.85);
}

/* Foreground drop shadows */
.hero-content,
.specimen-cell--large,
.signal-block--primary {
    filter: drop-shadow(0 8px 40px rgba(0,0,0,0.6));
}

/* ----------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
---------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero {
        padding-left: 5vw;
    }

    .hero-wordmark {
        font-size: clamp(40px, 14vw, 120px);
    }

    .hero-illustration-grid .specimen-svg {
        width: 60px;
    }

    .stratum {
        padding: 60px 5vw 80px;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .nav-drawer {
        width: 280px;
    }

    .specimen-cell--large .specimen-svg {
        width: 150px;
    }
}

/* ----------------------------------------------------------------
   SCROLLBAR STYLING
---------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0D0D0B;
}

::-webkit-scrollbar-thumb {
    background: #3B2E1A;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #C8F400;
}
