/* ============================================================
   persopass.io -- Neomorphic Identity Theater
   Colors: #E8E4DF, #CCC9C3, #FFFFFF, #2D2B29, #7A7672,
           #5B8A8A, #3D6B6B, #B8943F, #C17A5A, #7BAB7B
   Fonts: Outfit, Nunito Sans, DM Mono
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #E8E4DF;
    color: #2D2B29;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
.hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    color: #2D2B29;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-align: center;
}

.section-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: #2D2B29;
    margin-bottom: 1.5rem;
}

.card-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #2D2B29;
    margin-bottom: 0.75rem;
}

.panel-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #2D2B29;
    margin-bottom: 0.5rem;
}

.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: #2D2B29;
    margin-bottom: 1.25rem;
}

.secondary-text {
    color: #7A7672;
    font-weight: 300;
}

.mono-accent {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #5B8A8A;
    letter-spacing: 0.05em;
}

.hero-mono {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: #7A7672;
    letter-spacing: 0.12em;
    text-align: center;
    margin-top: 1.5rem;
}

/* --- Background Guilloche SVG --- */
#guilloche-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    transition: transform 200ms ease;
}

/* --- Dot-matrix watermark --- */
#dot-watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #CCC9C3 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.02;
}

/* --- Progress Indicator --- */
#progress-track {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 100vh;
    z-index: 100;
    background-color: #CCC9C3;
}

#progress-fill {
    width: 100%;
    height: 0%;
    background-color: #5B8A8A;
    transition: height 0.3s ease;
}

/* --- Neomorphic Utilities --- */
.neo-raised {
    background-color: #E8E4DF;
    border-radius: clamp(12px, 2vw, 24px);
    box-shadow: 12px 12px 24px #CCC9C3, -12px -12px 24px #FFFFFF;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neo-raised:hover {
    box-shadow: 7px 7px 14px #CCC9C3, -7px -7px 14px #FFFFFF;
}

.neo-inset {
    background-color: #E8E4DF;
    border-radius: clamp(12px, 2vw, 24px);
    box-shadow: inset 8px 8px 16px #CCC9C3, inset -8px -8px 16px #FFFFFF;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neo-inset:hover {
    box-shadow: inset 5px 5px 10px #CCC9C3, inset -5px -5px 10px #FFFFFF;
}

.neo-groove {
    background-color: #E8E4DF;
    box-shadow: inset 2px 2px 4px #CCC9C3, inset -2px -2px 4px #FFFFFF;
}

/* --- Stratum (Section) Base --- */
.stratum {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: clamp(2rem, 5vw, 6rem) clamp(1.5rem, 4vw, 4rem);
}

.stratum-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Stratum Content Animation (scroll-triggered) --- */
.stratum .stratum-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stratum.in-view .stratum-inner {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   STRATUM 1: SURFACE (Hero)
   ============================================================ */
#surface {
    min-height: 100vh;
}

.hero-card {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 4rem);
    overflow: hidden;
    text-align: center;
}

.card-guilloche {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
}

/* Microprint borders */
.microprint-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.microprint-border::before {
    content: 'persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC ';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    font-family: 'DM Mono', monospace;
    font-size: 5px;
    letter-spacing: 0.1em;
    color: #CCC9C3;
    line-height: 1;
    white-space: nowrap;
}

.microprint-border::after {
    content: 'persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC persopass.io VERIFIED AUTHENTIC ';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    font-family: 'DM Mono', monospace;
    font-size: 5px;
    letter-spacing: 0.1em;
    color: #CCC9C3;
    line-height: 1;
    white-space: nowrap;
}

/* ============================================================
   STRATUM 2: IMPRESSION
   ============================================================ */
#impression {
    min-height: 100vh;
}

.impression-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    max-width: 900px;
    margin: 0 auto;
}

.impression-card {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    transform: rotate(var(--tilt, 0deg));
    overflow: hidden;
}

.impression-card .card-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.7;
    color: #2D2B29;
    margin-bottom: 1rem;
}

.card-stamp {
    display: block;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* ============================================================
   STRATUM 3: VERIFICATION
   ============================================================ */
#verification {
    min-height: 100vh;
}

.verification-split {
    display: flex;
    align-items: center;
    gap: 0;
}

.verification-left {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.verification-divider {
    flex: 0 0 2px;
    height: 60vh;
    border-radius: 1px;
}

.verification-right {
    flex: 0 0 calc(45% - 2px);
    padding: clamp(1.5rem, 3vw, 3rem);
}

/* --- Identity Prism --- */
.prism-container {
    position: relative;
    width: clamp(200px, 30vw, 360px);
    height: clamp(200px, 30vw, 360px);
    animation: prism-rotate 60s linear infinite;
}

@keyframes prism-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.prism-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    background-color: #E8E4DF;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.prism-segment[data-seg="0"] {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 8px 8px 16px #CCC9C3, -8px -8px 16px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * -8px), calc(var(--prism-offset, 0) * -12px));
}

.prism-segment[data-seg="1"] {
    clip-path: polygon(50% 0%, 100% 25%, 50% 50%);
    box-shadow: 6px 6px 12px #CCC9C3, -6px -6px 12px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * 10px), calc(var(--prism-offset, 0) * -8px));
}

.prism-segment[data-seg="2"] {
    clip-path: polygon(100% 25%, 100% 75%, 50% 50%);
    box-shadow: 10px 4px 14px #CCC9C3, -6px -10px 14px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * 14px), calc(var(--prism-offset, 0) * 4px));
}

.prism-segment[data-seg="3"] {
    clip-path: polygon(100% 75%, 50% 100%, 50% 50%);
    box-shadow: 6px 10px 14px #CCC9C3, -10px -4px 14px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * 8px), calc(var(--prism-offset, 0) * 12px));
}

.prism-segment[data-seg="4"] {
    clip-path: polygon(50% 100%, 0% 75%, 50% 50%);
    box-shadow: -6px 8px 14px #CCC9C3, -8px -8px 14px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * -10px), calc(var(--prism-offset, 0) * 8px));
}

.prism-segment[data-seg="5"] {
    clip-path: polygon(0% 75%, 0% 25%, 50% 50%);
    box-shadow: -10px -4px 14px #CCC9C3, 6px -10px 14px #FFFFFF;
    transform: translate(calc(var(--prism-offset, 0) * -14px), calc(var(--prism-offset, 0) * -4px));
}

/* Verification data rows */
.verification-data {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: clamp(12px, 2vw, 24px);
    box-shadow: inset 4px 4px 8px #CCC9C3, inset -4px -4px 8px #FFFFFF;
    background-color: #E8E4DF;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(204, 201, 195, 0.5);
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #7A7672;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   STRATUM 4: ARCHIVE
   ============================================================ */
#archive {
    min-height: 100vh;
}

.archive-heading {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 4rem);
}

.archive-panels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    max-width: 1000px;
    margin: 0 auto;
}

.archive-panel {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.panel-number {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.panel-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.7;
    color: #7A7672;
}

/* ============================================================
   STRATUM 5: SEAL (Footer)
   ============================================================ */
#seal {
    min-height: 100vh;
}

.seal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.seal-element {
    position: relative;
    width: clamp(280px, 40vw, 420px);
    height: clamp(280px, 40vw, 420px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.seal-guilloche {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.18;
}

/* Embossment rings */
.embossment-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 50%;
}

.embossment-rings::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    border-radius: 50%;
    box-shadow: 3px 3px 6px #CCC9C3, -3px -3px 6px #FFFFFF;
}

.embossment-rings::after {
    content: '';
    position: absolute;
    top: 14%;
    left: 14%;
    width: 72%;
    height: 72%;
    border-radius: 50%;
    box-shadow: inset 2px 2px 4px #CCC9C3, inset -2px -2px 4px #FFFFFF;
}

.seal-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.seal-domain {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #2D2B29;
    margin-bottom: 0.5rem;
}

.seal-tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: #7A7672;
    margin-bottom: 1.25rem;
}

.seal-divider {
    width: 40px;
    height: 2px;
    background-color: #B8943F;
    margin: 0 auto 1.25rem auto;
    border-radius: 1px;
}

.seal-contact {
    display: block;
    margin-bottom: 0.5rem;
}

.seal-hash {
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
}

.seal-footer-text {
    margin-top: 3rem;
    font-size: 0.85rem;
}

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

    .impression-card {
        transform: rotate(0deg);
    }

    .verification-split {
        flex-direction: column;
    }

    .verification-left {
        flex: none;
        width: 100%;
        padding: 2rem 0;
    }

    .verification-divider {
        width: 60%;
        height: 2px;
        flex: none;
    }

    .verification-right {
        flex: none;
        width: 100%;
        padding: 2rem 0;
    }

    .archive-panels {
        grid-template-columns: 1fr;
    }

    .prism-container {
        width: 200px;
        height: 200px;
    }

    .seal-element {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 480px) {
    .hero-card {
        padding: 2rem 1.5rem;
    }

    .seal-element {
        width: 240px;
        height: 240px;
    }
}
