/* persopass.io - Flat Design / Gold-Black Luxury / Magazine Editorial */

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

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

body {
    background-color: #0A0A0A;
    color: #E8E0D0;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.72;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================
   Bokeh Background Layer
   ============================ */
.bokeh-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bokeh-bg-circle {
    position: absolute;
    border-radius: 50%;
    animation: bokehDrift 40s ease-in-out infinite alternate;
}

@keyframes bokehDrift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(8px, -12px); }
    50% { transform: translate(-6px, 10px); }
    75% { transform: translate(10px, 5px); }
    100% { transform: translate(-4px, -8px); }
}

/* ============================
   Spread Base
   ============================ */
.spread {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.spread-grid {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 20px;
}

/* ============================
   Grid Dots Pattern
   ============================ */
.grid-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #D4A843 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* ============================
   Gold Rules
   ============================ */
.gold-rule {
    background-color: #D4A843;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rule-horizontal {
    height: 1px;
    width: 100%;
    grid-column: 1 / -1;
}

.rule-vertical {
    width: 1px;
    height: 100%;
    background-color: #D4A843;
}

/* ============================
   Spread 1: Opening Plate
   ============================ */
.spread-1 {
    background-color: #0A0A0A;
}

.spread-1 .spread-grid {
    align-items: end;
    min-height: 100vh;
    padding-bottom: 80px;
}

.logotype {
    grid-column: 1 / 8;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    letter-spacing: 0.04em;
    color: #D4A843;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.logotype.visible {
    opacity: 1;
    transform: translateY(0);
}

.logotype .char {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logotype .char-dot {
    color: #8B7332;
}

.subtitle {
    grid-column: 9 / 13;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: #9A9284;
    text-align: right;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s;
}

.subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

.rule-spread1 {
    margin-top: 40px;
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rule-spread1.visible {
    clip-path: inset(0 0% 0 0%);
}

/* ============================
   Spread 2: Editorial
   ============================ */
.spread-2 {
    background-color: #141414;
}

.spread-2 .spread-grid {
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    align-items: start;
    padding-top: 80px;
    padding-bottom: 60px;
}

.bokeh-panel {
    grid-column: 1 / 4;
    grid-row: 1 / 3;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    background-color: #1A1408;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    animation: bokehDrift 40s ease-in-out infinite alternate;
}

.bc-1 { width: 120px; height: 120px; background-color: #D4A843; opacity: 0.08; top: 10%; left: 15%; animation-delay: 0s; }
.bc-2 { width: 200px; height: 200px; background-color: #F2D377; opacity: 0.05; top: 25%; left: 40%; animation-delay: -8s; }
.bc-3 { width: 80px; height: 80px; background-color: #8B7332; opacity: 0.12; top: 50%; left: 20%; animation-delay: -16s; }
.bc-4 { width: 160px; height: 160px; background-color: #D4A843; opacity: 0.06; top: 65%; left: 55%; animation-delay: -24s; }
.bc-5 { width: 60px; height: 60px; background-color: #F2D377; opacity: 0.08; top: 15%; left: 70%; animation-delay: -5s; }
.bc-6 { width: 240px; height: 240px; background-color: #8B7332; opacity: 0.04; top: 40%; left: -10%; animation-delay: -12s; }
.bc-7 { width: 100px; height: 100px; background-color: #D4A843; opacity: 0.07; top: 80%; left: 30%; animation-delay: -20s; }
.bc-8 { width: 140px; height: 140px; background-color: #F2D377; opacity: 0.05; top: 5%; left: -5%; animation-delay: -30s; }

.editorial-content {
    grid-column: 5 / 13;
    grid-row: 1 / 3;
}

.spread-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    color: #D4A843;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.spread-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.two-columns {
    display: flex;
    gap: 0;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.two-columns.visible {
    opacity: 1;
}

.column {
    flex: 1;
    text-align: justify;
}

.column p {
    margin-bottom: 1.2em;
    color: #E8E0D0;
}

.column p:last-child {
    margin-bottom: 0;
}

.rule-editorial {
    flex-shrink: 0;
    margin: 0 24px;
    align-self: stretch;
}

/* Hash Bands */
.hash-band {
    grid-column: 1 / -1;
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
    margin-top: 40px;
}

.hash-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.06em;
    color: #C9A84C;
    opacity: 0.3;
}

/* ============================
   Spread 3: Diagram
   ============================ */
.spread-3 {
    background-color: #0A0A0A;
}

.spread-3 .spread-grid {
    min-height: 100vh;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.diagram-title {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #D4A843;
    margin-bottom: 40px;
}

.diagram-container {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock-diagram {
    width: 100%;
    max-width: 1000px;
    height: auto;
}

.diagram-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.diagram-line.drawn {
    stroke-dashoffset: 0;
}

.callout-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.15em;
    fill: #C9A84C;
    text-anchor: middle;
    opacity: 0;
    transition: opacity 0.5s ease 1.5s, transform 0.4s ease;
}

.callout-label.visible {
    opacity: 1;
}

.callout-number {
    fill: #D4A843;
    font-size: 11px;
    font-weight: 400;
}

.spread-3 .hash-band {
    margin-top: 30px;
}

/* ============================
   Spread 4: Closing
   ============================ */
.spread-4 {
    background-color: #141414;
}

.spread-4 .spread-grid {
    min-height: 100vh;
    align-items: center;
    justify-items: center;
    grid-template-rows: auto auto auto auto;
}

.rule-closing-top,
.rule-closing-bottom {
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rule-closing-top.visible,
.rule-closing-bottom.visible {
    clip-path: inset(0 0% 0 0%);
}

.closing-aphorism {
    grid-column: 3 / 11;
    text-align: center;
    padding: 60px 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.closing-aphorism.visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-aphorism p {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 4vw, 3.2rem);
    letter-spacing: 0.02em;
    color: #E8E0D0;
    line-height: 1.4;
}

.closing-label {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 40px;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.closing-label.visible {
    opacity: 1;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9A9284;
}

.mono-separator {
    font-family: 'IBM Plex Mono', monospace;
    color: #8B7332;
    margin: 0 8px;
}

/* ============================
   Key Watermark
   ============================ */
.key-watermark {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.key-watermark-1 {
    right: 5%;
    top: 20%;
    width: 80px;
    opacity: 0.6;
}

.key-watermark svg {
    width: 100%;
    height: auto;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px) {
    .spread-grid {
        grid-template-columns: repeat(6, 1fr);
        padding: 40px 24px;
    }

    .logotype {
        grid-column: 1 / -1;
        font-size: clamp(2rem, 8vw, 3.6rem);
    }

    .subtitle {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 20px;
    }

    .bokeh-panel {
        grid-column: 1 / -1;
        min-height: 200px;
        margin-bottom: 30px;
    }

    .editorial-content {
        grid-column: 1 / -1;
    }

    .two-columns {
        flex-direction: column;
    }

    .rule-editorial {
        width: 100%;
        height: 1px;
        margin: 20px 0;
    }

    .diagram-title {
        grid-column: 1 / -1;
    }

    .diagram-container {
        grid-column: 1 / -1;
    }

    .closing-aphorism {
        grid-column: 1 / -1;
    }

    .closing-aphorism p {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }
}

@media (max-width: 600px) {
    .spread-grid {
        grid-template-columns: 1fr;
        padding: 30px 16px;
    }

    .logotype .char {
        letter-spacing: 0.02em;
    }

    .rule-spread1 {
        margin-top: 24px;
    }

    .bokeh-panel {
        min-height: 160px;
    }

    .hash-text {
        font-size: 0.65rem;
    }
}
