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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #d4d0c8;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* === SCAN-LINE OVERLAY === */
body::after {
    content: '';
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    z-index: 9999;
}

/* === GLOBAL GLITCH === */
body.glitch-active {
    animation: global-tear 0.3s steps(3) forwards;
}

@keyframes global-tear {
    0% { clip-path: inset(0); filter: none; }
    25% { clip-path: inset(10% 0 60% 0); filter: saturate(2) hue-rotate(45deg); }
    50% { clip-path: inset(40% 0 20% 0); filter: saturate(0.5) hue-rotate(-30deg); }
    75% { clip-path: inset(70% 0 5% 0); filter: saturate(3); }
    100% { clip-path: inset(0); filter: none; }
}

/* === THE VESTIBULE (HERO) === */
.vestibule {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

.vestibule-watermark {
    position: absolute;
    font-size: clamp(20rem, 40vw, 50rem);
    color: rgba(201, 168, 76, 0.04);
    font-family: serif;
    transform: rotate(-3deg);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.vestibule-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(5rem, 14vw, 12rem);
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
    animation: vestibule-glitch 8s ease-in-out infinite;
}

@keyframes vestibule-glitch {
    0%, 92% { transform: translate(0); filter: none; }
    93% { transform: translate(-4px, 2px); filter: hue-rotate(90deg); }
    94% { transform: translate(3px, -1px); clip-path: inset(20% 0 40% 0); }
    95% { transform: translate(-2px, 3px); clip-path: inset(60% 0 10% 0); }
    96% { transform: translate(0); filter: none; clip-path: none; }
    100% { transform: translate(0); filter: none; }
}

.vestibule-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #8a8680;
    font-style: italic;
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

/* === THE COLLECTION === */
.collection {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.collection-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #c9a84c;
    text-align: center;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
}

/* === ORNAMENTAL RULE === */
.ornamental-rule {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    position: relative;
    margin: 2rem 0 3rem;
}

.ornamental-rule::after {
    content: '✠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0a0a0a;
    padding: 0 1em;
    color: #c9a84c;
    font-size: 1.2rem;
}

/* === MASONRY === */
.masonry {
    columns: 3;
    column-gap: 1.5rem;
}

/* === SPECIMEN CARDS === */
.specimen {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #1a1a1a;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.specimen.revealed {
    animation: card-ascend 0.6s ease-out forwards;
}

@keyframes card-ascend {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.gold-tier {
    border: 3px double #c9a84c;
}

.iron-tier {
    border: 2px solid #3a3a3a;
    background: #1a1a1a;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 0 0 1px #2d2d2d;
}

/* Corner flourishes */
.specimen::before,
.specimen::after {
    content: '✦';
    position: absolute;
    font-size: 0.75rem;
    color: #c9a84c;
    opacity: 0.6;
}

.specimen::before { top: 0.4rem; left: 0.5rem; }
.specimen::after { bottom: 0.4rem; right: 0.5rem; }

.specimen-icon {
    margin-bottom: 0.75rem;
}

.specimen h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: #d4d0c8;
    margin-bottom: 0.75rem;
}

.specimen p {
    color: #8a8680;
    margin-bottom: 0.75rem;
}

.specimen .drop-cap::first-letter {
    font-size: 4em;
    float: left;
    line-height: 0.8;
    margin-right: 0.1em;
    color: #c9a84c;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
}

.specimen-meta {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #4af626;
    margin-top: 0.5rem;
    display: block;
}

/* === CORRUPTED CARDS === */
.specimen.corrupted {
    border-color: #4af626;
    animation: corrupt-jitter 0.15s infinite alternate, card-ascend 0.6s ease-out forwards;
}

.specimen.corrupted h2 {
    text-shadow: 2px 0 #e83030, -2px 0 #30c8e8;
}

@keyframes corrupt-jitter {
    from { transform: translate(0.5px, -0.5px); }
    to { transform: translate(-0.5px, 0.5px); }
}

/* === DATA BLOBS === */
.data-blob {
    position: absolute;
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: radial-gradient(ellipse, rgba(74, 246, 38, 0.06), transparent 70%);
    animation: blob-morph 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.data-blob--cyan {
    background: radial-gradient(ellipse, rgba(48, 200, 232, 0.06), transparent 70%);
    animation-duration: 12s;
}

@keyframes blob-morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    100% { border-radius: 40% 60% 60% 40% / 50% 60% 40% 50%; }
}

/* === THE ARCHIVE (FOOTER) === */
.archive {
    background: #050505;
    padding: 4rem 2rem;
    text-align: center;
}

.archive-flourish {
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    margin-bottom: 2rem;
    position: relative;
}

.archive-flourish::after {
    content: '❋';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #050505;
    padding: 0 1em;
    color: #c9a84c;
    font-size: 1rem;
}

.archive-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-variant: small-caps;
    margin-bottom: 0.5rem;
}

.archive-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #8a8680;
    font-style: italic;
    font-size: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .masonry {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .masonry {
        columns: 1;
    }
}
