/* ==========================================================
   naru.day — Vaporwave-Noir | Leather Texture | Flowing Curves
   ========================================================== */

:root {
    --deep-eggplant: #2D1B3D;
    --hot-pink: #FF10F0;
    --cool-teal: #00D9FF;
    --pale-cream: #EBEBEB;
    --warm-lavender: #B19CD9;
    --charcoal: #1A1A1A;
    --neon-purple: #8B4FBF;
    --pure-white: #FFFFFF;
    --mid-purple: #3D2B4D;
    --deep-shadow: #251535;
    --abyss: #0A0510;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Lora', serif;
    background: var(--deep-eggplant);
    color: var(--pale-cream);
    overflow-x: hidden;
    line-height: 1.8;
}

/* ---- Leather Texture System (CSS-generated) ---- */
.leather-bg {
    background:
        linear-gradient(45deg, #2D1B3D 0%, #3D2B4D 25%, #2D1B3D 50%, #251535 75%, #2D1B3D 100%);
}

/* Reusable leather texture mixin via pseudo-elements */
.hero-zone,
.z-section,
.epilogue-section {
    position: relative;
}

.hero-zone::before,
.z-section::before,
.epilogue-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80px 60px at 15% 25%, rgba(61,43,77,0.7) 0%, transparent 70%),
        radial-gradient(ellipse 120px 90px at 70% 60%, rgba(37,21,53,0.6) 0%, transparent 70%),
        radial-gradient(ellipse 60px 40px at 45% 80%, rgba(61,43,77,0.5) 0%, transparent 70%),
        radial-gradient(ellipse 100px 80px at 85% 15%, rgba(37,21,53,0.4) 0%, transparent 70%),
        radial-gradient(ellipse 90px 70px at 30% 50%, rgba(45,27,61,0.5) 0%, transparent 70%),
        linear-gradient(45deg, rgba(26,26,26,0.08) 25%, transparent 25%, transparent 50%, rgba(26,26,26,0.08) 50%, rgba(26,26,26,0.08) 75%, transparent 75%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 4px 4px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

/* Aging spots */
.hero-zone::after,
.z-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 8px at 20% 30%, rgba(10,5,16,0.25) 0%, transparent 70%),
        radial-gradient(circle 12px at 65% 70%, rgba(10,5,16,0.2) 0%, transparent 70%),
        radial-gradient(circle 6px at 80% 20%, rgba(10,5,16,0.3) 0%, transparent 70%),
        radial-gradient(circle 10px at 40% 85%, rgba(10,5,16,0.2) 0%, transparent 70%),
        radial-gradient(circle 7px at 55% 45%, rgba(10,5,16,0.15) 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

/* ================================================================
   HERO ZONE
   ================================================================ */
.hero-zone {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #2D1B3D 0%, #3D2B4D 25%, #2D1B3D 50%, #251535 75%, #2D1B3D 100%);
    overflow: hidden;
    opacity: 0;
    animation: heroFadeIn 1000ms ease forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-leather-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #2D1B3D 0%, #1A1A1A 50%, #0A0510 100%);
    opacity: 0.3;
    z-index: 0;
}

.hero-glow-layer {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 60%;
    height: 40%;
    background: radial-gradient(circle, rgba(255,16,240,0.12) 0%, rgba(255,16,240,0.04) 40%, transparent 70%);
    z-index: 2;
    pointer-events: none;
}

.hero-curve {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.hero-main-curve {
    filter: blur(1.5px) drop-shadow(0 0 30px rgba(255,16,240,0.6));
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawCurve 2500ms ease-out 1000ms forwards;
}

@keyframes drawCurve {
    to { stroke-dashoffset: 0; }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: left;
    padding-left: 10%;
    width: 100%;
    opacity: 0;
    transform: scale(0.95);
    animation: heroContentReveal 1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 800ms forwards;
}

@keyframes heroContentReveal {
    to {
        opacity: 1;
        transform: scale(1.0);
    }
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--pure-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 4px 8px 16px rgba(0,0,0,0.8);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.subtitle-line {
    font-family: 'Inter', 'Lora', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pale-cream);
    opacity: 0;
    transform: translateY(8px);
}

.subtitle-line:nth-child(1) {
    animation: subtitleReveal 800ms ease 1800ms forwards;
}

.subtitle-line:nth-child(2) {
    animation: subtitleReveal 800ms ease 2200ms forwards;
}

@keyframes subtitleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--cool-teal);
    opacity: 0.9;
    animation: blinkHint 1200ms ease-in-out infinite;
    transition: opacity 500ms ease;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes blinkHint {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.2; }
}

/* ================================================================
   LEATHER DIVIDERS
   ================================================================ */
.leather-divider {
    height: 60px;
    background: linear-gradient(45deg, #2D1B3D 0%, #3D2B4D 30%, #251535 60%, #2D1B3D 100%);
    position: relative;
    overflow: hidden;
}

.leather-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #1A1A1A 20%, #1A1A1A 80%, transparent 100%);
    opacity: 0.7;
}

.leather-divider::after {
    content: '';
    position: absolute;
    top: calc(50% + 8px);
    left: 5%;
    right: 10%;
    height: 0.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(26,26,26,0.5) 30%, rgba(26,26,26,0.5) 70%, transparent 100%);
}

/* ================================================================
   FLOWING RIBBON DIVIDERS
   ================================================================ */
.ribbon-divider {
    height: 80px;
    position: relative;
    background: linear-gradient(180deg, var(--deep-eggplant), var(--charcoal), var(--deep-eggplant));
    overflow: hidden;
}

.ribbon-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.flowing-ribbon {
    filter: blur(1px) drop-shadow(0 0 15px rgba(255,16,240,0.4));
    animation: ribbonUndulate 6s ease-in-out infinite;
}

@keyframes ribbonUndulate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ================================================================
   Z-PATTERN SECTIONS
   ================================================================ */
.z-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 2rem;
    padding: 6rem 4rem;
    position: relative;
    overflow: hidden;
}

/* Section-specific backgrounds with depth progression */
.scene-1 {
    background: linear-gradient(45deg, #2D1B3D 0%, #3D2B4D 25%, #2D1B3D 50%, #251535 75%, #2D1B3D 100%);
}

.scene-2 {
    background: linear-gradient(45deg, #2A1839 0%, #3A284A 25%, #2A1839 50%, #231333 75%, #2A1839 100%);
}

.scene-3 {
    background: linear-gradient(45deg, #241530 0%, #342242 25%, #241530 50%, #1E1028 75%, #241530 100%);
}

.scene-4 {
    background: linear-gradient(45deg, #1E1028 0%, #2C1C3A 25%, #1E1028 50%, #180C22 75%, #1E1028 100%);
}

.scene-5 {
    background: linear-gradient(180deg, #180C22 0%, #1A1A1A 50%, #0A0510 100%);
}

/* Depth overlay that darkens as scenes progress */
.scene-3::after,
.scene-4::after,
.scene-5::after {
    background:
        radial-gradient(circle 12px at 25% 35%, rgba(10,5,16,0.3) 0%, transparent 70%),
        radial-gradient(circle 15px at 60% 75%, rgba(10,5,16,0.25) 0%, transparent 70%),
        radial-gradient(circle 8px at 75% 25%, rgba(10,5,16,0.35) 0%, transparent 70%),
        radial-gradient(circle 10px at 35% 80%, rgba(10,5,16,0.25) 0%, transparent 70%),
        radial-gradient(circle 9px at 50% 50%, rgba(10,5,16,0.2) 0%, transparent 70%),
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 100%);
}

/* Diagonal SVG curve */
.z-diagonal-curve {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.diagonal-path {
    filter: blur(1px) drop-shadow(0 0 30px rgba(255,16,240,0.5));
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke 400ms ease;
}

.diagonal-path.revealed {
    animation: drawDiagonal 1200ms ease-out forwards;
}

@keyframes drawDiagonal {
    to { stroke-dashoffset: 0; }
}

/* Z-Anchors */
.z-anchor {
    position: relative;
    z-index: 5;
}

.z-top-left {
    grid-column: 1 / 5;
    grid-row: 1;
    align-self: center;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 800ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.z-top-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.z-top-right {
    grid-column: 8 / 13;
    grid-row: 1;
    text-align: right;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 800ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms,
                transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms;
}

.z-top-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.z-bottom-left {
    grid-column: 1 / 7;
    grid-row: 2;
    align-self: start;
    opacity: 0;
    transition: opacity 1200ms ease 400ms;
}

.z-bottom-left.revealed {
    opacity: 1;
}

.z-bottom-right {
    grid-column: 7 / 13;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 800ms ease 600ms,
                transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms;
}

.z-bottom-right.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Typography within Z-Sections */
.scene-numeral {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--pure-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    display: block;
    position: relative;
}

/* Leather texture behind numerals */
.scene-numeral::before {
    content: '';
    position: absolute;
    inset: -10px -20px;
    background:
        radial-gradient(ellipse 60px 40px at 30% 40%, rgba(61,43,77,0.6) 0%, transparent 70%),
        radial-gradient(ellipse 40px 30px at 70% 60%, rgba(37,21,53,0.5) 0%, transparent 70%),
        linear-gradient(45deg, rgba(26,26,26,0.06) 25%, transparent 25%, transparent 50%, rgba(26,26,26,0.06) 50%, rgba(26,26,26,0.06) 75%, transparent 75%);
    background-size: 100% 100%, 100% 100%, 3px 3px;
    opacity: 0.7;
    border-radius: 4px;
    z-index: -1;
}

.scene-label {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--hot-pink);
    opacity: 0.8;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.scene-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    color: var(--pure-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-shadow: 0 0 10px rgba(255,16,240,0.3), 0 0 20px rgba(0,217,255,0.15);
}

.scene-body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.2rem);
    color: var(--pale-cream);
    line-height: 1.8;
    max-width: 560px;
    position: relative;
    padding: 1.5rem 2rem;
    background:
        radial-gradient(ellipse 100px 70px at 20% 30%, rgba(61,43,77,0.4) 0%, transparent 70%),
        radial-gradient(ellipse 80px 60px at 80% 70%, rgba(37,21,53,0.3) 0%, transparent 70%);
    border-radius: 2px;
}

/* ================================================================
   ACCENT SHAPES & DOTS
   ================================================================ */
.accent-shape {
    display: block;
    margin-bottom: 1.5rem;
}

.accent-triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--hot-pink);
    opacity: 0.3;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 20px rgba(255,16,240,0.4));
}

.accent-inverted {
    transform: rotate(225deg);
}

.accent-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
    opacity: 0.5;
    filter: drop-shadow(0 0 20px rgba(139,79,191,0.5));
}

.accent-diamond {
    width: 60px;
    height: 60px;
    background: var(--hot-pink);
    opacity: 0.25;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 15px rgba(255,16,240,0.4));
}

.accent-glow {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--cool-teal) 0%, rgba(0,217,255,0.2) 40%, transparent 70%);
    opacity: 0.6;
    filter: drop-shadow(0 0 25px rgba(0,217,255,0.5));
}

.accent-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cool-teal);
    opacity: 0.7;
}

/* ================================================================
   CREASE OVERLAYS
   ================================================================ */
.crease-overlay {
    position: fixed;
    width: 100%;
    height: 2px;
    z-index: 100;
    pointer-events: none;
    animation: creasePulse 8s ease-in-out infinite;
}

.crease-1 {
    top: 33%;
}

.crease-2 {
    top: 66%;
}

@keyframes creasePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}

/* ================================================================
   EPILOGUE
   ================================================================ */
.epilogue-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 4rem;
    background: linear-gradient(180deg, #0A0510 0%, #1A1A1A 50%, #0A0510 100%);
    text-align: center;
}

.epilogue-content {
    position: relative;
    z-index: 5;
    max-width: 600px;
}

.epilogue-annotation {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--cool-teal);
    opacity: 0.9;
    margin-bottom: 2rem;
}

.epilogue-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--pale-cream);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.epilogue-mark {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--pure-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-shadow:
        0 0 10px rgba(255,16,240,0.6),
        0 0 20px rgba(0,217,255,0.3);
    display: inline-block;
}

/* ================================================================
   NEON GLOW & HOVER STATES
   ================================================================ */
.scene-heading:hover {
    text-shadow:
        0 0 10px rgba(255,16,240,0.6),
        0 0 25px rgba(0,217,255,0.4);
    transition: text-shadow 400ms ease;
}

.scene-label:hover {
    color: var(--cool-teal);
    transition: color 400ms ease;
}

.accent-triangle:hover,
.accent-circle:hover,
.accent-diamond:hover {
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255,16,240,0.4)); }
    50% { filter: drop-shadow(0 0 25px rgba(0,217,255,0.6)); }
}

/* Horizontal thin lines as subtle dividers within sections */
.z-section .z-bottom-left::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--charcoal) 20%, var(--charcoal) 80%, transparent 100%);
    opacity: 0.5;
}

/* ================================================================
   RESPONSIVE: TABLET
   ================================================================ */
@media (max-width: 768px) {
    .z-section {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        padding: 4rem 2rem;
        gap: 1.5rem;
    }

    .z-top-left {
        grid-column: 1;
        grid-row: 1;
    }

    .z-top-right {
        grid-column: 1;
        grid-row: 2;
        text-align: left;
    }

    .z-bottom-left {
        grid-column: 1;
        grid-row: 3;
    }

    .z-bottom-right {
        grid-column: 1;
        grid-row: 4;
        justify-self: start;
    }

    .scene-numeral {
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .z-diagonal-curve {
        opacity: 0.3;
    }

    .hero-content {
        padding-left: 5%;
    }

    .scene-body {
        padding: 1rem;
    }
}

/* ================================================================
   RESPONSIVE: MOBILE
   ================================================================ */
@media (max-width: 480px) {
    .hero-zone {
        min-height: 90vh;
    }

    .hero-title {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .hero-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .z-section {
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    .scene-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .z-diagonal-curve {
        display: none;
    }

    .z-section::before {
        display: none;
    }

    /* Replace curves with simple hot pink divider */
    .ribbon-divider {
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--hot-pink), transparent);
    }

    .ribbon-svg {
        display: none;
    }

    .crease-overlay {
        display: none;
    }

    .z-top-left {
        transform: translateX(-20px);
    }

    .z-top-right {
        transform: translateX(20px);
    }
}
