/* =========================================
   HHASSL.com - Zen Futurism Design System
   ========================================= */

:root {
    --color-burgundy: #5B1A2A;
    --color-cream: #F5EDE0;
    --color-burnt-umber: #8B3A3A;
    --color-kuro: #1A1615;
    --color-warm-stone: #C4B5A3;
    --color-rose-gold: #B8877A;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-accent: 'Noto Serif JP', serif;

    --baseline: 8px;
    --gutter: 32px;
    --section-gap: 160px;
}

/* =========================================
   Reset & Base
   ========================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--color-kuro);
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-cream);
    background-color: var(--color-kuro);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   Scroll Progress
   ========================================= */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 0%;
    background-color: var(--color-burgundy);
    z-index: 1000;
    transition: height 0.1s linear;
}

/* =========================================
   Noise Overlay
   ========================================= */

#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* =========================================
   Navigation Dots
   ========================================= */

#nav-dots {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 998;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--color-warm-stone);
    background: transparent;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, border-color 0.3s ease;
    padding: 0;
    outline: none;
}

.nav-dot:hover {
    transform: scale(1.4);
}

.nav-dot.active {
    background-color: var(--color-burgundy);
    border-color: var(--color-burgundy);
}

/* =========================================
   Section Base
   ========================================= */

.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* =========================================
   Typography
   ========================================= */

.logotype {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 96px;
    line-height: 1.0;
    letter-spacing: 0.02em;
    color: var(--color-cream);
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 64px;
    line-height: 1.1;
    color: var(--color-cream);
    margin-bottom: 32px;
}

.body-statement {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.6;
    color: var(--color-cream);
    margin-bottom: 24px;
    max-width: 640px;
}

.micro-text {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.08em;
    color: var(--color-warm-stone);
    text-transform: uppercase;
}

.decorative-kanji {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 120px;
    color: var(--color-burnt-umber);
    opacity: 0.15;
    position: absolute;
    bottom: 40px;
    left: 40px;
    user-select: none;
    pointer-events: none;
}

/* Hover underline on body statements */
.body-statement {
    background-image: linear-gradient(var(--color-burgundy), var(--color-burgundy));
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
    display: inline-block;
}

.body-statement:hover {
    background-size: 100% 1px;
}

/* =========================================
   GATE Section
   ========================================= */

#gate {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-burgundy);
    overflow: hidden;
}

.gate-leather-bg {
    position: absolute;
    inset: 0;
    background-color: var(--color-burgundy);
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='leather'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='6' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23leather)' opacity='0.4'/%3E%3C/svg%3E");
    background-blend-mode: multiply;
    background-repeat: repeat;
    background-size: 200px 200px;
    filter: contrast(1.1) saturate(0.9);
}

.gate-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

#hero-logotype {
    opacity: 0;
}

#hero-logotype .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#hero-logotype .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.chevron-pulse {
    color: var(--color-cream);
    opacity: 0.3;
    animation: chevronPulse 4s ease-in-out infinite;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.15; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(4px); }
}

.gate-void-wave {
    position: absolute;
    right: 0;
    top: 0;
    width: 33.33%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.gate-void-wave svg {
    width: 100%;
    height: 100%;
}

/* =========================================
   MANIFESTO Section
   ========================================= */

#manifesto {
    background-color: var(--color-cream);
    display: flex;
    align-items: center;
    padding: 0;
}

.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 7fr 4fr;
    width: 100%;
    min-height: 100vh;
    align-items: center;
}

.manifesto-content {
    grid-column: 2 / 3;
    padding: 80px 40px 80px 0;
    position: relative;
}

.manifesto-content .section-heading {
    color: var(--color-kuro);
}

.manifesto-content .body-statement {
    color: var(--color-kuro);
    background-image: linear-gradient(var(--color-burnt-umber), var(--color-burnt-umber));
}

.manifesto-void {
    grid-column: 3 / 4;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enso {
    position: absolute;
    top: 10%;
    right: 10%;
    width: 180px;
    height: 180px;
    animation: ensoRotate 120s linear infinite;
}

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

.manifesto-wave {
    width: 100%;
    height: 80%;
    opacity: 0.7;
}

/* =========================================
   ESSENCE Section
   ========================================= */

#essence {
    display: flex;
    flex-direction: column;
    min-height: auto;
}

.essence-panel {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.essence-panel-1 {
    background-color: var(--color-burgundy);
}

.essence-panel-2 {
    background-color: var(--color-kuro);
}

.essence-panel-3 {
    background-color: var(--color-burgundy);
}

.essence-leather-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='leather'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='6' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23leather)' opacity='0.2'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.15;
    pointer-events: none;
}

.essence-content {
    position: relative;
    z-index: 2;
    padding-left: calc(100% / 12 + var(--gutter));
    max-width: 66.66%;
}

/* =========================================
   Reveal Animation
   ========================================= */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   SIGNAL Section
   ========================================= */

#signal {
    background-color: var(--color-kuro);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.signal-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.signal-heading {
    font-size: 48px;
    color: var(--color-cream);
    opacity: 0.6;
}

#signal-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   CLOSE Section
   ========================================= */

#close {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-kuro);
    border-top: 1px solid rgba(196, 181, 163, 0.15);
}

.close-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.close-logotype {
    font-size: 48px;
    opacity: 0.6;
}

/* =========================================
   Mobile Adaptation
   ========================================= */

@media (max-width: 768px) {
    :root {
        --gutter: 16px;
    }

    .logotype {
        font-size: 48px;
    }

    .section-heading {
        font-size: 36px;
    }

    .body-statement {
        font-size: 18px;
    }

    /* Nav dots move to bottom horizontal bar */
    #nav-dots {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        flex-direction: row;
    }

    /* Manifesto grid collapses */
    .manifesto-grid {
        grid-template-columns: 1fr;
    }

    .manifesto-content {
        grid-column: 1;
        padding: 80px 24px;
    }

    .manifesto-void {
        grid-column: 1;
        height: 300px;
    }

    /* Void wave hidden on mobile */
    .gate-void-wave {
        display: none;
    }

    .essence-content {
        padding-left: 24px;
        padding-right: 24px;
        max-width: 100%;
    }

    .decorative-kanji {
        font-size: 80px;
        bottom: 20px;
        left: 20px;
    }

    .signal-heading {
        font-size: 32px;
    }

    .close-logotype {
        font-size: 32px;
    }

    .enso {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .logotype {
        font-size: 36px;
    }

    .section-heading {
        font-size: 28px;
    }

    .body-statement {
        font-size: 16px;
    }
}
