/* ============================================
   namu.biz - Flat-Design Classical HUD Catalogue
   ============================================ */
:root {
    --deep-claret: #3A0A1E;
    --oxblood: #5B0E2D;
    --burgundy-mist: #7A1B3D;
    --bone: #F2EDE4;
    --charcoal-slate: #2C2C30;
    --veined-gold: #C9A84C;
    --marble-white: #E8E0D4;
    --nero: #0E0E10;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--nero);
    color: var(--bone);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ==============================
   MARBLE VEINS BACKGROUND
   ============================== */
.marble-veins {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==============================
   HUD FRAME
   ============================== */
.hud-frame {
    position: fixed;
    inset: 24px;
    border: 1px solid var(--oxblood);
    z-index: 50;
    pointer-events: none;
    clip-path: inset(0 0 0 0);
    animation: frameDrawIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes frameDrawIn {
    from { clip-path: inset(50% 50% 50% 50%); }
    to { clip-path: inset(0 0 0 0); }
}
.hud-corner {
    position: absolute;
    width: 16px;
    height: 16px;
}
.hud-corner--tl { top: -1px; left: -1px; border-top: 2px solid var(--oxblood); border-left: 2px solid var(--oxblood); }
.hud-corner--tr { top: -1px; right: -1px; border-top: 2px solid var(--oxblood); border-right: 2px solid var(--oxblood); }
.hud-corner--bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--oxblood); border-left: 2px solid var(--oxblood); }
.hud-corner--br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--oxblood); border-right: 2px solid var(--oxblood); }

/* ==============================
   STATUS BAR
   ============================== */
.status-bar {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    height: 48px;
    z-index: 60;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--oxblood);
}
.status-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 0.35em;
    color: var(--bone);
}
.status-divider {
    flex: 1;
    height: 1px;
    background: var(--oxblood);
    margin: 0 16px;
    opacity: 0.5;
}
.status-meta {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--bone);
    opacity: 0.6;
}

/* ==============================
   NAVIGATION RAIL
   ============================== */
.nav-rail {
    position: fixed;
    left: 24px;
    top: 72px;
    bottom: 24px;
    width: 200px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}
.nav-item {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 0.35em;
    color: var(--bone);
    text-decoration: none;
    padding: 10px 12px;
    border: 1px solid var(--oxblood);
    text-align: center;
    transition: none;
}
.nav-item:hover,
.nav-item.active {
    background: var(--oxblood);
    color: var(--bone);
}

/* ==============================
   INFO OVERLAY
   ============================== */
.info-overlay {
    position: fixed;
    bottom: 48px;
    right: 48px;
    width: 280px;
    padding: 20px;
    background: rgba(44, 44, 48, 0.85);
    z-index: 55;
    border: 1px solid var(--oxblood);
}
.info-title {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.2em;
    color: var(--bone);
    margin-bottom: 8px;
}
.info-desc {
    display: block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--bone);
    opacity: 0.7;
    margin-bottom: 12px;
}
.info-catalog {
    display: block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--veined-gold);
}

/* ==============================
   PANELS
   ============================== */
.panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* VESTIBULE */
.panel--vestibule {
    min-height: 100vh;
    background: var(--nero);
}
.watermark {
    position: absolute;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(20vw, 30vw, 40vw);
    letter-spacing: 0.08em;
    line-height: 0.92;
    color: var(--bone);
    opacity: 0.08;
    z-index: 0;
    user-select: none;
}
.vestibule-center {
    position: relative;
    z-index: 2;
    text-align: center;
}
.vestibule-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.45;
    color: var(--veined-gold);
}

/* GALLERY */
.panel--gallery {
    min-height: 100vh;
    background: var(--deep-claret);
    padding: 72px 24px 24px calc(224px + 24px);
}
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    max-width: 900px;
}

/* FLIP CARD */
.flip-card {
    perspective: 1200px;
    cursor: pointer;
    min-height: 240px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.flip-card-front {
    background: var(--charcoal-slate);
    border: 1px solid var(--oxblood);
    opacity: 0;
    transform: translateY(12px);
}
.flip-card-front.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.flip-card-back {
    background: var(--charcoal-slate);
    border: 1px solid var(--oxblood);
    transform: rotateY(180deg);
    text-align: center;
}
.flip-card:hover .flip-card-front {
    border-color: var(--burgundy-mist);
}
.card-catalog {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.35em;
    color: var(--bone);
    opacity: 0.6;
    margin-bottom: 8px;
}
.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.08em;
    line-height: 0.92;
    color: var(--bone);
    margin-bottom: 16px;
}
.card-desc {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--bone);
    opacity: 0.8;
}

/* Marble Shapes */
.marble-shape {
    background: var(--marble-white);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 58px, #D8D0C4 58px, #D8D0C4 60px);
}
.marble-shape--circle {
    width: 60px;
    height: 60px;
    clip-path: circle(50%);
}
.marble-shape--hex {
    width: 60px;
    height: 52px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.marble-shape--rect {
    width: 40px;
    height: 70px;
}
.marble-shape--diamond {
    width: 50px;
    height: 50px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.marble-shape--octagon {
    width: 60px;
    height: 60px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}
.marble-shape--wide {
    width: 80px;
    height: 40px;
}

/* ARCHIVE */
.panel--archive {
    min-height: 100vh;
    background: var(--charcoal-slate);
    padding: 72px 24px 24px calc(224px + 24px);
}
.archive-column {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.archive-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    color: var(--bone);
    opacity: 0.8;
    margin-bottom: 2rem;
}
.archive-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.45;
    color: var(--veined-gold);
    margin: 2.5rem 0 2.5rem 2rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--veined-gold);
}

/* Column Divider */
.column-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem auto;
    height: 120px;
}
.col-line {
    flex: 1;
    width: 1px;
    background: var(--veined-gold);
    opacity: 0.4;
}
.col-dash {
    width: 16px;
    height: 1px;
    background: var(--veined-gold);
    opacity: 0.4;
}

/* VAULT */
.panel--vault {
    min-height: 100vh;
    background: var(--nero);
    padding: 72px 24px 24px calc(224px + 24px);
}
.vault-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.flip-card--vault {
    width: 60vmin;
    height: 60vmin;
    max-width: 500px;
    max-height: 500px;
}
.flip-card--vault .flip-card-inner {
    min-height: 100%;
}
.vault-octagon-front {
    background: var(--nero);
    border: none;
    position: relative;
}
.vault-octagon-front.revealed {
    opacity: 1;
    transform: translateY(0);
}
.vault-octagon {
    width: 80%;
    height: 80%;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    background: var(--marble-white);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 58px, #D8D0C4 58px, #D8D0C4 60px);
    position: relative;
}
.octagon-veins {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(135deg, transparent, transparent 80px, rgba(196, 186, 168, 0.3) 80px, rgba(196, 186, 168, 0.3) 81px),
        repeating-linear-gradient(67deg, transparent, transparent 120px, rgba(196, 186, 168, 0.2) 120px, rgba(196, 186, 168, 0.2) 121px);
}
.vault-meta {
    position: absolute;
    bottom: 8%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.vault-meta span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12px;
    letter-spacing: 0.35em;
    color: var(--bone);
    opacity: 0.5;
}
.vault-octagon-back {
    background: var(--charcoal-slate);
    border: 1px solid var(--oxblood);
    transform: rotateY(180deg);
}
.vault-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.7;
    color: var(--bone);
    opacity: 0.85;
    text-align: center;
    max-width: 400px;
}

/* COLOPHON */
.panel--colophon {
    min-height: 50vh;
    background: var(--deep-claret);
    padding: 48px 24px 48px calc(224px + 24px);
}
.colophon-content {
    text-align: center;
}
.colophon-domain {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.08em;
    line-height: 0.92;
    color: var(--bone);
    display: block;
    margin-bottom: 2rem;
}
.colophon-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.45;
    color: var(--veined-gold);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .hud-frame { inset: 12px; }
    .status-bar { top: 12px; left: 12px; right: 12px; }
    .nav-rail {
        top: auto;
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        height: 56px;
        flex-direction: row;
        justify-content: center;
        gap: 1px;
    }
    .nav-item {
        font-size: 10px;
        letter-spacing: 0.15em;
        padding: 8px 6px;
    }
    .info-overlay { display: none; }
    .panel--gallery,
    .panel--archive,
    .panel--vault,
    .panel--colophon {
        padding: 72px 24px 80px 24px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .flip-card--vault {
        width: 80vmin;
        height: 80vmin;
    }
    .vault-meta {
        gap: 0.5rem;
    }
    .vault-meta span {
        font-size: 10px;
    }
}
