/* ============================================================
   sarampass.com -- Maximalist Gold-Black Luxury Credential
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    background: #0A0A0A;
}

body {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    color: #E8D8B0;
    background: #0A0A0A;
    overflow-x: hidden;
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noiseFilter);
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

/* --- Viewport Retro-Pattern Borders --- */
.viewport-border {
    position: fixed;
    z-index: 1000;
    background-repeat: repeat;
    overflow: hidden;
}

.viewport-border--top,
.viewport-border--bottom {
    left: 0;
    right: 0;
    height: 0;
}

.viewport-border--left,
.viewport-border--right {
    top: 0;
    bottom: 0;
    width: 0;
}

.viewport-border--top {
    top: 0;
    background: repeating-linear-gradient(
        90deg,
        #C8A040 0px,
        #C8A040 8px,
        #D97706 8px,
        #D97706 16px,
        #C8A040 16px,
        #C8A040 20px,
        transparent 20px,
        transparent 24px
    );
}

.viewport-border--bottom {
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        #D97706 0px,
        #D97706 8px,
        #C8A040 8px,
        #C8A040 16px,
        #D97706 16px,
        #D97706 20px,
        transparent 20px,
        transparent 24px
    );
}

.viewport-border--left {
    left: 0;
    background: repeating-linear-gradient(
        180deg,
        #C8A040 0px,
        #C8A040 6px,
        transparent 6px,
        transparent 10px,
        #D97706 10px,
        #D97706 16px,
        transparent 16px,
        transparent 20px
    );
}

.viewport-border--right {
    right: 0;
    background: repeating-linear-gradient(
        180deg,
        #D97706 0px,
        #D97706 6px,
        transparent 6px,
        transparent 10px,
        #C8A040 10px,
        #C8A040 16px,
        transparent 16px,
        transparent 20px
    );
}

/* Animated border width */
.viewport-border--top.animate,
.viewport-border--bottom.animate {
    height: 24px;
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.viewport-border--left.animate,
.viewport-border--right.animate {
    width: 24px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stagger: top first, then right, bottom, left */
.viewport-border--top.animate    { transition-delay: 0s; }
.viewport-border--right.animate  { transition-delay: 0.1s; }
.viewport-border--bottom.animate { transition-delay: 0.2s; }
.viewport-border--left.animate   { transition-delay: 0.3s; }

/* --- Typography --- */
h1, h2 {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #E8D8B0;
}

.label-code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #C8A040;
}

/* --- Liftable Elements --- */
.liftable {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* ============================================================
   SECTION 1: THE CREDENTIAL (Hero)
   ============================================================ */
.credential {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A0A0A;
    overflow: hidden;
    padding: 24px;
}

.credential__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.credential__inner.visible {
    opacity: 1;
}

.credential__wordmark {
    font-size: clamp(48px, 10vw, 120px);
    line-height: 1;
    color: #E8D8B0;
    margin: 24px 0;
    display: inline-block;
}

.credential__subtitle {
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #C8A040;
    letter-spacing: 0.15em;
    margin-top: 16px;
}

.credential__subtitle .label-code {
    font-size: clamp(14px, 1.5vw, 18px);
}

/* Gold Accent Lines (SVG) */
.credential__accent-line {
    display: block;
    width: 100%;
    height: 4px;
}

.credential__accent-line line {
    transition: stroke-dashoffset 0.8s ease;
}

.credential__accent-line.animate line {
    stroke-dashoffset: 0;
}

/* Stamp */
.credential__stamp {
    display: inline-block;
    margin-top: 48px;
    padding: 12px 32px;
    border: 3px solid #B91C1C;
    border-radius: 4px;
    transform: rotate(-6deg);
    position: relative;
}

.credential__stamp::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(185, 28, 28, 0.4);
    border-radius: 6px;
}

.credential__stamp-text {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 3vw, 32px);
    color: #B91C1C;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ============================================================
   SECTION 2-4: IDENTITY SECTIONS (F-Pattern)
   ============================================================ */
.identity-section {
    position: relative;
    background: #0A0A0A;
    padding: 80px 24px;
    overflow: hidden;
}

.identity-section--alt {
    background: #050505;
}

.identity-section__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.identity-section__headline {
    grid-column: 1 / -1;
    font-size: clamp(48px, 10vw, 120px);
    line-height: 1;
    color: #E8D8B0;
}

.identity-section__body {
    grid-column: 1 / 2;
}

.identity-section__body p {
    margin-bottom: 20px;
    color: #E8D8B0;
}

.identity-section__body .label-code {
    display: block;
    margin-top: 24px;
    padding: 8px 0;
    border-top: 1px solid rgba(200, 160, 64, 0.2);
}

.identity-section__sidebar {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
}

/* --- Retro Patterns (Sidebar Decorations) --- */
.retro-pattern {
    width: 100%;
    height: 48px;
    background-repeat: repeat-x;
}

.retro-pattern--zigzag {
    background-image:
        linear-gradient(135deg, #C8A040 25%, transparent 25%),
        linear-gradient(225deg, #C8A040 25%, transparent 25%),
        linear-gradient(315deg, #C8A040 25%, transparent 25%),
        linear-gradient(45deg, #C8A040 25%, transparent 25%);
    background-size: 24px 24px;
    background-position: 0 0, 0 0, 12px 12px, 12px 12px;
}

.retro-pattern--diamond {
    background-image:
        linear-gradient(45deg, #D97706 25%, transparent 25%),
        linear-gradient(-45deg, #D97706 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #D97706 75%),
        linear-gradient(-45deg, transparent 75%, #D97706 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.retro-pattern--chevron {
    background-image:
        linear-gradient(135deg, #C8A040 33.33%, transparent 33.33%),
        linear-gradient(225deg, #C8A040 33.33%, transparent 33.33%);
    background-size: 24px 48px;
    background-position: 0 0, 12px 0;
}

.retro-pattern--wave {
    background-image: repeating-linear-gradient(
        90deg,
        #D97706 0px,
        #D97706 4px,
        transparent 4px,
        transparent 8px,
        #C8A040 8px,
        #C8A040 12px,
        transparent 12px,
        transparent 16px
    );
    height: 24px;
    position: relative;
}

.retro-pattern--wave::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        #C8A040 4px,
        #C8A040 8px,
        transparent 8px,
        transparent 12px,
        #D97706 12px,
        #D97706 16px
    );
}

/* Section gold border accent */
.identity-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C8A040 20%, #C8A040 80%, transparent);
    z-index: 3;
}

/* ============================================================
   SECTION 5: THE ARCHIVE
   ============================================================ */
.archive {
    position: relative;
    background: #1A1A1A;
    padding: 80px 24px;
    overflow: hidden;
}

.archive__headline {
    text-align: center;
    font-size: clamp(48px, 8vw, 96px);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.archive__intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
    color: #E8D8B0;
    position: relative;
    z-index: 2;
}

.archive__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.archive__card {
    background: #0A0A0A;
    border: 2px solid rgba(200, 160, 64, 0.3);
    padding: 24px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Retro-pattern frame on cards */
.archive__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #C8A040 0px,
        #C8A040 4px,
        #D97706 4px,
        #D97706 8px
    );
}

.archive__card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #D97706 0px,
        #D97706 4px,
        #C8A040 4px,
        #C8A040 8px
    );
}

.archive__card-label {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 2vw, 22px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #C8A040;
}

/* ============================================================
   SECTION 6: VAULT FOOTER
   ============================================================ */
.vault {
    position: relative;
    background: #050505;
    padding: 60px 24px;
    overflow: hidden;
}

.vault__border-top,
.vault__border-bottom {
    height: 24px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.vault__border-top {
    background:
        repeating-linear-gradient(
            90deg,
            #C8A040 0px, #C8A040 6px,
            transparent 6px, transparent 10px,
            #D97706 10px, #D97706 16px,
            transparent 16px, transparent 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px, transparent 3px,
            #D97706 3px, #D97706 5px,
            transparent 5px, transparent 10px,
            #C8A040 10px, #C8A040 12px,
            transparent 12px, transparent 20px
        );
    background-size: 20px 12px, 20px 12px;
    background-position: 0 0, 0 12px;
}

.vault__border-bottom {
    background:
        repeating-linear-gradient(
            90deg,
            #D97706 0px, #D97706 6px,
            transparent 6px, transparent 10px,
            #C8A040 10px, #C8A040 16px,
            transparent 16px, transparent 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px, transparent 3px,
            #C8A040 3px, #C8A040 5px,
            transparent 5px, transparent 10px,
            #D97706 10px, #D97706 12px,
            transparent 12px, transparent 20px
        );
    background-size: 20px 12px, 20px 12px;
    background-position: 0 0, 0 12px;
}

.vault__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 0;
}

.vault__text {
    color: #E8D8B0;
    margin-bottom: 12px;
}

.vault__text .label-code {
    font-size: 15px;
}

.vault__text--small {
    font-size: 13px;
    color: rgba(232, 216, 176, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .identity-section__grid {
        grid-template-columns: 1fr;
    }

    .identity-section__headline {
        grid-column: 1;
    }

    .identity-section__body {
        grid-column: 1;
    }

    .identity-section__sidebar {
        grid-column: 1;
        flex-direction: row;
        overflow-x: auto;
    }

    .identity-section__sidebar .retro-pattern {
        min-width: 80px;
    }

    .archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .viewport-border--top.animate,
    .viewport-border--bottom.animate {
        height: 12px;
    }

    .viewport-border--left.animate,
    .viewport-border--right.animate {
        width: 12px;
    }

    .credential {
        padding: 24px 12px;
    }
}

@media (max-width: 480px) {
    .archive__grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
