/* ============================================
   ronri.xyz — Logic as Luxury (McBling)
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

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

/* --- Particle Canvas Overlay --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* --- Gem Accent Colors (Sapphire & Amethyst) --- */
.z-icon svg,
.vault-gem svg {
    --gem-sapphire: #3B82F6;
    --gem-amethyst: #8B5CF6;
}

/* --- Chrome Text Effect --- */
.chrome-text {
    background: linear-gradient(135deg, #C0C8D0, #E8E8F0, #C0C8D0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Elastic Entrance Animation --- */
@keyframes elastic-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1.0);
    }
}

@keyframes elastic-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    70% {
        transform: scale(1.03) translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: scale(1.0) translateY(0);
    }
}

@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
    }
}

@keyframes scroll-hint-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* --- Diamond Entrance Section --- */
#diamond-entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #0F172A;
    overflow: hidden;
}

.entrance-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(30px, 5vw, 80px);
    z-index: 2;
}

.wordmark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(42px, 8vw, 96px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #C0C8D0 0%, #E8E8F0 30%, #D4A843 50%, #E8E8F0 70%, #C0C8D0 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: elastic-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both,
               shimmer 4s ease-in-out infinite 1s;
    z-index: 2;
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 2vw, 20px);
    color: #C0C8D0;
    letter-spacing: 0.15em;
    text-align: center;
    margin-top: -10px;
    position: absolute;
    bottom: calc(50vh - 80px);
    opacity: 0;
    animation: elastic-fade-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both;
    z-index: 2;
}

.isometric-icon {
    width: clamp(60px, 8vw, 120px);
    height: auto;
    opacity: 0;
    animation: elastic-fade-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both,
               float-gentle 4s ease-in-out infinite 1.2s;
    z-index: 2;
}

.isometric-icon svg {
    width: 100%;
    height: auto;
}

.icon-left svg {
    animation: pulse-glow 3s ease-in-out infinite;
}

.icon-right svg {
    animation: pulse-glow 3s ease-in-out infinite 1.5s;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #C0C8D0;
    font-size: 24px;
    animation: scroll-hint-bounce 2s ease-in-out infinite;
    z-index: 2;
}

/* --- Logic Showcase Z-Sections --- */
#logic-showcase {
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

.z-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px clamp(20px, 5vw, 60px);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Normal Z-pattern: headline top-left, icon top-right, body bottom-left */
.z-normal .z-headline {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
}

.z-normal .z-icon {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.z-normal .z-body {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* Reversed Z: icon top-left, headline top-right, body bottom-right */
.z-reversed .z-headline {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    align-self: end;
}

.z-reversed .z-icon {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
}

.z-reversed .z-body {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: right;
}

.z-headline {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(32px, 5vw, 68px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
}

.z-icon {
    width: clamp(70px, 10vw, 120px);
    height: auto;
}

.z-icon svg {
    width: 100%;
    height: auto;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.z-icon:hover svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 16px #3B82F6);
}

.z-body p {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.75;
    color: #E8E8F0;
    margin-bottom: 12px;
}

.logic-notation {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #D4A843;
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid rgba(212, 168, 67, 0.2);
    padding: 6px 14px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* Separators between z-sections */
.z-section + .z-section {
    border-top: 1px solid rgba(192, 200, 208, 0.08);
}

/* --- The Vault --- */
#the-vault {
    position: relative;
    z-index: 1;
    padding: 100px clamp(20px, 5vw, 60px);
    background: linear-gradient(180deg, #0F172A 0%, #050A1A 100%);
    text-align: center;
}

.vault-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 68px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.vault-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #C0C8D0;
    letter-spacing: 0.1em;
    margin-bottom: 60px;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 30px;
    max-width: 900px;
    margin: 0 auto;
}

.vault-gem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vault-gem svg {
    width: clamp(60px, 8vw, 90px);
    height: auto;
    transition: filter 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vault-gem:hover {
    transform: translateY(-8px);
}

.vault-gem:hover svg {
    filter: drop-shadow(0 0 20px #8B5CF6) drop-shadow(0 0 40px #3B82F6);
    transform: scale(1.08);
}

.gem-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #C0C8D0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.vault-gem:hover .gem-label {
    opacity: 1;
    color: #D4A843;
}

/* --- Velvet Footer --- */
#velvet-footer {
    position: relative;
    z-index: 1;
    background-color: #050A1A;
    padding: 80px clamp(20px, 5vw, 60px) 60px;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-wordmark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 16px);
    color: #C0C8D0;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
}

.footer-symbols {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-symbols span {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    color: #C0C8D0;
    opacity: 0.4;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.footer-symbols span:hover {
    opacity: 1;
    color: #D4A843;
    transform: scale(1.3);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .entrance-content {
        flex-direction: column;
        gap: 20px;
    }

    .isometric-icon {
        width: 60px;
    }

    .icon-left,
    .icon-right {
        display: none;
    }

    .tagline {
        bottom: calc(50vh - 60px);
    }

    .z-section {
        grid-template-columns: 1fr;
        padding: 50px 20px;
    }

    .z-normal .z-headline,
    .z-reversed .z-headline {
        grid-column: 1;
        text-align: left;
    }

    .z-normal .z-icon,
    .z-reversed .z-icon {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .z-normal .z-body,
    .z-reversed .z-body {
        grid-column: 1;
        text-align: left;
    }

    .vault-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
}

@media (max-width: 480px) {
    .vault-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
}
