/* miris.one — Cyberpunk-Zen Terracotta Design */
/* Colors: #1a120d #e8d5c4 #f2a65a #c4a88a #4a3628 #c87941 #8a6e58 #2b1f19 #3d2e24 */
/* Fonts: Space Grotesk, IBM Plex Mono, Inter */

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a120d;
    color: #e8d5c4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== SPREAD SYSTEM ========== */
.spread {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.spread-inner {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 55% 45%;
    padding: 4vh 5vw;
}

.spread-inner-three {
    grid-template-columns: 20% 60% 20%;
}

.spread-inner-asymmetric {
    grid-template-columns: 58% 42%;
}

.spread-inner-closing {
    grid-template-columns: 1fr;
    place-items: center;
}

/* ========== SPREAD 1: OPENING ========== */
.spread-1 {
    background: linear-gradient(135deg, #1a120d 0%, #2b1f19 40%, #3d2e24 100%);
}

.spread-col-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 4vw;
    position: relative;
    z-index: 2;
}

.spread-col-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wordmark-container {
    margin-bottom: 6vh;
}

.wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 7vw, 120px);
    letter-spacing: 0.04em;
    color: #e8d5c4;
    line-height: 1;
}

.wordmark-dot {
    color: #f2a65a;
}

.wordmark-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(12px, 1.4vw, 18px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a6e58;
    margin-top: 1.5vh;
}

.icon-cluster {
    display: flex;
    gap: 2.5vw;
    align-items: center;
}

.motif-icon {
    width: clamp(36px, 4vw, 56px);
    height: clamp(36px, 4vw, 56px);
    opacity: 0.7;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.motif-icon:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.vertical-text {
    position: absolute;
    top: 50%;
    right: 4vw;
    transform: rotate(90deg) translateX(-50%);
    transform-origin: right center;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(10px, 1vw, 14px);
    letter-spacing: 0.3em;
    color: #4a3628;
    text-transform: uppercase;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    pointer-events: none;
}

.grid-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #4a362820, transparent);
}

.ember-glow {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    background: radial-gradient(ellipse at center, #c8794108 0%, transparent 70%);
    filter: blur(40px);
    animation: ember-pulse 8s ease-in-out infinite;
}

@keyframes ember-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.spread-progress {
    position: absolute;
    bottom: 3vh;
    left: 5vw;
    display: flex;
    align-items: center;
    gap: 1vw;
    z-index: 10;
}

.spread-num {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    color: #8a6e58;
    letter-spacing: 0.1em;
}

.spread-progress-bar {
    width: 12vw;
    height: 2px;
    background: #4a3628;
    border-radius: 1px;
    overflow: hidden;
}

.spread-progress-fill {
    width: 25%;
    height: 100%;
    background: #c87941;
    border-radius: 1px;
    transition: width 0.6s ease;
}

/* ========== SPREAD 2: DISCIPLINES ========== */
.spread-2 {
    background: #2b1f19;
}

.spread-col-narrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 3vw;
    position: relative;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 64px);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: #e8d5c4;
}

.discipline-marker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(100px, 20vh, 300px);
    font-weight: 300;
    color: #4a362815;
    position: absolute;
    bottom: 8vh;
    left: 2vw;
    line-height: 1;
}

.spread-col-wide {
    display: flex;
    align-items: center;
    padding: 4vh 2vw;
}

.discipline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2.5vh 2vw;
    width: 100%;
    height: 80%;
}

.discipline-card {
    background: #3d2e2440;
    border: 1px solid #4a362830;
    border-radius: 4px;
    padding: clamp(12px, 2vh, 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.4s ease, background-color 0.4s ease, transform 0.3s ease;
}

.discipline-card:hover {
    border-color: #c8794140;
    background: #3d2e2470;
    transform: translateY(-2px);
}

.discipline-icon {
    width: clamp(28px, 3vw, 44px);
    height: clamp(28px, 3vw, 44px);
    margin-bottom: 1.5vh;
}

.discipline-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 1.6vw, 22px);
    color: #f2a65a;
    margin-bottom: 0.8vh;
    letter-spacing: 0.02em;
}

.discipline-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(10px, 0.9vw, 13px);
    color: #c4a88a;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

.spread-col-accent {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.accent-stripe {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #c87941, transparent);
    opacity: 0.3;
}

.icon-scatter {
    display: flex;
    flex-direction: column;
    gap: 6vh;
    align-items: center;
}

.scatter-icon {
    width: clamp(24px, 3vw, 40px);
    height: clamp(24px, 3vw, 40px);
    opacity: 0.4;
    animation: scatter-float 6s ease-in-out infinite;
}

.scatter-icon-1 { animation-delay: 0s; }
.scatter-icon-2 { animation-delay: 2s; }
.scatter-icon-3 { animation-delay: 4s; }

@keyframes scatter-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

/* ========== SPREAD 3: PHILOSOPHY ========== */
.spread-3 {
    background: linear-gradient(160deg, #1a120d 0%, #2b1f19 60%, #3d2e24 100%);
}

.spread-col-philosophy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 6vw;
}

.philosophy-block {
    max-width: 580px;
}

.philosophy-number {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: clamp(10px, 1vw, 13px);
    color: #c87941;
    letter-spacing: 0.3em;
    margin-bottom: 2vh;
}

.philosophy-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4.5vw, 72px);
    color: #e8d5c4;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 3vh;
}

.philosophy-divider {
    width: 80px;
    height: 2px;
    background: #c87941;
    margin-bottom: 3vh;
}

.philosophy-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(12px, 1.1vw, 16px);
    color: #c4a88a;
    line-height: 1.8;
    margin-bottom: 2.5vh;
    letter-spacing: 0.01em;
}

.philosophy-text em {
    color: #f2a65a;
    font-style: italic;
}

.icon-row {
    display: flex;
    gap: 3vw;
    margin-top: 4vh;
}

.row-icon {
    width: clamp(32px, 3.5vw, 48px);
    height: clamp(32px, 3.5vw, 48px);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.row-icon:hover {
    opacity: 0.9;
}

.spread-col-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.zen-pattern {
    position: relative;
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zen-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid #c8794120;
    animation: zen-breathe 10s ease-in-out infinite;
}

.zen-ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.zen-ring-2 {
    width: 75%;
    height: 75%;
    border-color: #c8794130;
    animation-delay: 2.5s;
}

.zen-ring-3 {
    width: 50%;
    height: 50%;
    border-color: #c8794140;
    animation-delay: 5s;
}

.zen-ring-4 {
    width: 25%;
    height: 25%;
    border-color: #c8794150;
    animation-delay: 7.5s;
}

.zen-center {
    width: 8px;
    height: 8px;
    background: #f2a65a;
    border-radius: 50%;
    z-index: 1;
    animation: zen-center-pulse 4s ease-in-out infinite;
}

@keyframes zen-breathe {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes zen-center-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #f2a65a40; }
    50% { transform: scale(1.2); box-shadow: 0 0 20px 8px #f2a65a20; }
}

.kanji-watermark {
    position: absolute;
    bottom: 8vh;
    right: 4vw;
    display: flex;
    gap: 1vw;
}

.kanji-char {
    color: #5E8C7A10;
    font-family: 'Inter', sans-serif;
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 100;
    line-height: 1;
}

/* ========== SPREAD 4: CLOSING ========== */
.spread-4 {
    background: linear-gradient(180deg, #2b1f19 0%, #1a120d 100%);
}

.spread-col-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

.closing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signal-container {
    display: flex;
    gap: 6px;
    margin-bottom: 5vh;
    height: 40px;
    align-items: flex-end;
}

.signal-line {
    width: 3px;
    background: #c87941;
    border-radius: 2px;
    animation: signal-wave 2s ease-in-out infinite;
}

.signal-line-1 {
    height: 20px;
    animation-delay: 0s;
}

.signal-line-2 {
    height: 32px;
    animation-delay: 0.3s;
}

.signal-line-3 {
    height: 14px;
    animation-delay: 0.6s;
}

@keyframes signal-wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.closing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 96px);
    color: #e8d5c4;
    letter-spacing: 0.04em;
    margin-bottom: 2vh;
}

.closing-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(12px, 1.3vw, 18px);
    color: #8a6e58;
    letter-spacing: 0.15em;
    margin-bottom: 4vh;
}

.closing-divider {
    width: 60px;
    height: 2px;
    background: #c87941;
    margin-bottom: 4vh;
}

.contact-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
    margin-bottom: 5vh;
}

.contact-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #4a3628;
}

.contact-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 1.6vw, 22px);
    color: #f2a65a;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f2a65a;
    transition: width 0.4s ease;
}

.contact-link:hover {
    color: #e8d5c4;
}

.contact-link:hover::after {
    width: 100%;
}

.closing-icons {
    display: flex;
    gap: 3vw;
}

.closing-icon {
    width: clamp(28px, 3vw, 44px);
    height: clamp(28px, 3vw, 44px);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.closing-icon:hover {
    opacity: 0.8;
}

.footer-mark {
    position: absolute;
    bottom: 3vh;
    display: flex;
    align-items: center;
    gap: 2vw;
}

.footer-wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #4a3628;
    letter-spacing: 0.1em;
}

.footer-year {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: #4a362860;
    letter-spacing: 0.2em;
}

/* ========== NAVIGATION DOTS ========== */
.spread-nav {
    position: fixed;
    right: 2.5vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.spread-nav-dot {
    width: 10px;
    height: 10px;
    border: 1px solid #8a6e58;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.spread-nav-dot:hover {
    border-color: #c87941;
    transform: scale(1.3);
}

.spread-nav-dot.active {
    background: #c87941;
    border-color: #c87941;
}

/* ========== SCROLL TRANSITION ========== */
.spread.transitioning-out {
    opacity: 0;
}

.spread.transitioning-in {
    opacity: 1;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .spread-inner {
        grid-template-columns: 1fr;
        padding: 3vh 6vw;
    }
    
    .spread-inner-three {
        grid-template-columns: 1fr;
    }
    
    .spread-inner-asymmetric {
        grid-template-columns: 1fr;
    }
    
    .spread-col-right {
        display: none;
    }
    
    .spread-col-left {
        padding-left: 0;
    }
    
    .spread-col-narrow {
        padding: 2vh 0;
    }
    
    .spread-col-accent {
        display: none;
    }
    
    .discipline-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .spread-col-visual {
        display: none;
    }
    
    .spread-col-philosophy {
        padding: 4vh 2vw;
    }
    
    .spread-nav {
        right: 3vw;
    }
    
    .vertical-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .discipline-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 2vh;
    }
    
    .discipline-card {
        padding: 16px;
    }
}
