/* Museum of Broken Systems - Live Experience Styles */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Inter:wght@300;400;500&display=swap');

:root {
    --bg-parchment: #F2F0E9;
    /* Slightly warmer/lighter based on image */
    --text-charcoal: #333333;
    --border-color: #D6D3C9;
    --card-shadow-light: #FFFFFF;
    --card-shadow-dark: #D1CEC4;

    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-parchment);
    color: var(--text-charcoal);
    font-family: var(--font-serif);
    /* Default to serif for this aesthetic */
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    /* App-like feel, or snap scroll */
}

/* Texture overlay to simulate paper grain (optional, can use CSS pattern) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

h1,
h2,
h3 {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-charcoal);
}

.screen {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    position: relative;
    scroll-snap-align: start;
    overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────── 
   SLIDE 1: LANDING
   ─────────────────────────────────────────────────────────── */
.landing-frame {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0;
    width: 100%;
    max-width: 800px;
    text-align: center;
    position: relative;
}

/* Double line effect */
.landing-frame::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    border-top: 1px solid var(--border-color);
}

.landing-frame::after {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border-color);
}

.title-main {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: #666;
}

.enter-link {
    margin-top: 4rem;
    text-decoration: none;
    color: var(--text-charcoal);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
    font-size: 1rem;
    position: relative;
    cursor: pointer;
}

.enter-link:hover {
    border-color: var(--text-charcoal);
}

/* ─────────────────────────────────────────────────────────── 
   SLIDE 2: COLLECTION (The Framed Cards)
   ─────────────────────────────────────────────────────────── */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
}

.framed-card {
    background: #FDFCF9;
    border: 1px solid #E0DED5;
    padding: 0.75rem 0.5rem;
    box-shadow:
        inset 1px 1px 0px #FFFFFF,
        inset -1px -1px 0px #DCD9D0,
        2px 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.framed-card:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 1px 1px 0px #FFFFFF,
        inset -1px -1px 0px #DCD9D0,
        4px 4px 10px rgba(0, 0, 0, 0.08);
}

.card-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 0.5rem;
    display: block;
    border-bottom: 1px solid #EEE;
    padding-bottom: 4px;
    width: max-content;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.card-desc {
    font-style: italic;
    font-size: 0.9rem;
    color: #666;
}

/* ─────────────────────────────────────────────────────────── 
   SLIDE 3: EXHIBIT DETAIL (The Grid Layout)
   ─────────────────────────────────────────────────────────── */
.exhibit-container {
    width: 100%;
    max-width: 900px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 3rem 0;
}

.exhibit-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.row-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    padding-top: 0.5rem;
}

.row-content {
    font-size: 1.2rem;
}

.row-content.italic {
    font-style: italic;
    color: #555;
    font-family: var(--font-serif);
}

.comparison-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.comp-frame {
    background: #EAE8E0;
    border: 4px solid #DFDBD0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.comp-label {
    display: block;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.5rem;
}

/* ─────────────────────────────────────────────────────────── 
   NAVIGATION CONTROLS
   ─────────────────────────────────────────────────────────── */
.nav-dots {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--text-charcoal);
}

.return-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-decoration: none;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 99999;
    /* Fix: Ensure button is clickable above all layers */
    cursor: pointer;
}

@media (max-width: 768px) {
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .screen {
        padding: 1rem 0.5rem;
        height: auto;
        min-height: 100vh;
    }

    /* Force dense grid on mobile */
    .collection-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0;
    }
}

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

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
    display: none;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
    display: none;
}

.glitch:hover::before,
.glitch:hover::after {
    display: block;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    5% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    10% {
        clip: rect(70px, 9999px, 20px, 0);
    }

    15% {
        clip: rect(20px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 5px, 0);
    }

    25% {
        clip: rect(5px, 9999px, 60px, 0);
    }

    30% {
        clip: rect(60px, 9999px, 40px, 0);
    }

    35% {
        clip: rect(40px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 30px, 0);
    }

    45% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    50% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    55% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    65% {
        clip: rect(10px, 9999px, 70px, 0);
    }

    70% {
        clip: rect(70px, 9999px, 20px, 0);
    }

    75% {
        clip: rect(20px, 9999px, 90px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    85% {
        clip: rect(10px, 9999px, 60px, 0);
    }

    90% {
        clip: rect(60px, 9999px, 30px, 0);
    }

    95% {
        clip: rect(30px, 9999px, 80px, 0);
    }

    100% {
        clip: rect(80px, 9999px, 10px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    5% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    10% {
        clip: rect(20px, 9999px, 70px, 0);
    }

    15% {
        clip: rect(70px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    25% {
        clip: rect(80px, 9999px, 30px, 0);
    }

    30% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    35% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    45% {
        clip: rect(90px, 9999px, 20px, 0);
    }

    50% {
        clip: rect(20px, 9999px, 70px, 0);
    }

    55% {
        clip: rect(70px, 9999px, 10px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    65% {
        clip: rect(80px, 9999px, 30px, 0);
    }

    70% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    75% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 90px, 0);
    }

    85% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    90% {
        clip: rect(10px, 9999px, 70px, 0);
    }

    95% {
        clip: rect(70px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(20px, 9999px, 90px, 0);
    }
}

/* ─────────────────────────────────────────────────────────── 
   COMPARISON SLIDER
   ─────────────────────────────────────────────────────────── */
.comparison-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border: 4px solid #DFDBD0;
    background: #EAE8E0;
    margin-top: 1rem;
    touch-action: none;
}

.comp-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
}

.comp-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.comp-overlay {
    width: 50%;
    border-right: 2px solid white;
    z-index: 2;
}

.comp-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--text-charcoal);
    border: 2px solid white;
    border-radius: 50%;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.comp-handle::after {
    content: '↔';
}

.landing-frame.breaking-apart {
    animation: fadeOutBlur 1s forwards;
}

@keyframes fadeOutBlur {
    0% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }

    100% {
        opacity: 0;
        filter: blur(10px);
        transform: scale(1.1);
    }
}

/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 04: VOTING (Butterfly Ballot)
   ─────────────────────────────────────────────────────────── */
.ballot-card {
    background: #F4F1EA;
    border: 2px solid #000;
    padding: 2rem;
    position: relative;
    font-family: 'Courier New', monospace;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.ballot-header {
    text-align: center;
    border-bottom: 2px solid #000;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.ballot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.candidate-left {
    text-align: right;
    width: 40%;
    font-weight: bold;
    padding-right: 1rem;
}

.candidate-right {
    text-align: left;
    width: 40%;
    padding-left: 1rem;
}

.punch-strip {
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.punch-hole {
    width: 24px;
    height: 24px;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    background: white;
    position: relative;
    z-index: 2;
}

.punch-hole.selected {
    background: #000;
}

/* confusing lines */
.arrow-line {
    position: absolute;
    height: 2px;
    background: #000;
    z-index: 1;
}

.line-left {
    left: 40%;
    width: 15%;
    top: 50%;
}

/* The trick line */
.line-confusing {
    right: 40%;
    width: 15%;
    top: -20px;
    /* Points to wrong hole */
    transform: rotate(25deg);
    transform-origin: right center;
}

.vote-feedback {
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    min-height: 1.5em;
    color: #CC0000;
}


/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 05: DARK PATTERNS (Roach Motel)
   ─────────────────────────────────────────────────────────── */
.subscription-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #ccc;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    text-align: center;
    position: relative;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #333;
}

.modal-text {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-keep {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #00C851;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 200, 81, 0.3);
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.btn-keep:hover {
    transform: scale(1.02);
}

.btn-cancel-trap {
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.7rem;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s;
}

.btn-cancel-trap:hover {
    color: #999;
}

/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 06: ALGORITHMIC BIAS (Resume Scanner)
   ─────────────────────────────────────────────────────────── */
.scanner-zone {
    width: 300px;
    height: 400px;
    border: 2px dashed #999;
    margin: 0 auto;
    position: relative;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scanner-zone.scanning {
    border-color: #ff0000;
    background: #ffe6e6;
}

.resume-icon {
    width: 80px;
    height: 100px;
    background: white;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: grab;
    z-index: 5;
    transition: transform 0.2s;
    user-select: none;
}

.resume-icon:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.scan-line {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ff0000;
    box-shadow: 0 0 15px #ff0000;
    z-index: 10;
    display: none;
}

.ats-interaction-area {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.scanner-zone.scanning .scan-line {
    display: block;
    animation: scanMove 1.5s linear infinite;
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.scan-result {
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    color: #ff0000;
    font-weight: bold;
    min-height: 1.5em;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 07: ATTENTION ECONOMY (Popup Barrage)
   ─────────────────────────────────────────────────────────── */
.reading-area {
    background: #fff;
    padding: 2rem;
    max-width: 500px;
    height: 300px;
    overflow-y: scroll;
    margin: 0 auto;
    position: relative;
    border: 1px solid #ccc;
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
}

.popup-trap {
    position: absolute;
    background: white;
    border: 2px solid #000;
    padding: 1rem;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
    z-index: 100;
    width: 200px;
    text-align: center;
    display: none;
    animation: popupPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-trap.active {
    display: block;
}

.popup-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 10px;
    padding: 2px 5px;
}

.popup-btn-fake {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: #007bff;
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
}

@keyframes popupPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 02: RED TAPE
   ─────────────────────────────────────────────────────────── */
.red-tape-container {
    position: relative;
    cursor: crosshair;
}

.red-tape-overlay {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    transition: opacity 0.4s ease;
    opacity: 1;
}

.red-tape-container:hover .red-tape-overlay {
    opacity: 0;
    pointer-events: none;
}

.tape-strip {
    background: red;
    color: white;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.2rem 1rem;
    margin: 0.5rem;
    transform: rotate(-5deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tape-strip:nth-child(even) {
    transform: rotate(3deg);
    background: #cc0000;
}

.tape-strip:nth-child(3n) {
    transform: rotate(-10deg);
}

/* ─────────────────────────────────────────────────────────── 
   EXHIBIT 03: CHAT INTERFACE
   ─────────────────────────────────────────────────────────── */
.chat-interface {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: var(--font-sans);
    margin-top: 1rem;
    max-width: 400px;
}

.chat-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 24px;
    height: 24px;
    background: #007bff;
    border-radius: 50%;
}

.chat-status {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-left: auto;
}

.chat-body {
    height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 80%;
    line-height: 1.4;
}

.msg-bot {
    background: #f1f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg-user {
    background: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-options {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chat-btn {
    background: white;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-btn:hover {
    background: #007bff;
    color: white;
}