/* iisugi.com - Bauhaus meets Tokyo */
/* Colors: #b8c4b8 Sage, #d4a253 Gold, #2b2b2f Charcoal, #f2ede6 Parchment, #c75233 Vermillion, #1c1c1e Near Black, #e8e2d9 Stone, #c4908a Dusty Rose */

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

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

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

/* Panel Base */
.panel {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

/* Diagonal clips */
.panel-hero {
    background: #1c1c1e;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    padding-bottom: 8vh;
    z-index: 5;
}

.panel-threshold {
    background: #f2ede6;
    color: #1c1c1e;
    clip-path: polygon(0 0, 100% 8%, 100% 92%, 0 100%);
    margin-top: -8vh;
    padding: 12vh 0 10vh;
    z-index: 4;
}

.panel-weight {
    background: #2b2b2f;
    clip-path: polygon(0 0, 100% 8%, 100% 92%, 0 100%);
    margin-top: -8vh;
    padding: 12vh 0 10vh;
    z-index: 3;
}

.panel-tribunal {
    background: #1c1c1e;
    clip-path: polygon(0 0, 100% 8%, 100% 92%, 0 100%);
    margin-top: -8vh;
    padding: 12vh 0 10vh;
    z-index: 2;
}

.panel-resolution {
    background: #f2ede6;
    color: #1c1c1e;
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 100%);
    margin-top: -8vh;
    padding-top: 10vh;
    z-index: 1;
}

/* HERO SECTION */
.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.kanji-split {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 40px;
    overflow: hidden;
}

.kanji-top, .kanji-bottom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(140px, 20vw, 260px);
    font-weight: 900;
    line-height: 1;
    color: #e8e2d9;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.kanji-top {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 60%);
}

.kanji-bottom {
    clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%);
    color: #c75233;
}

.kanji-split:hover .kanji-top {
    transform: translate(-8px, -6px);
}

.kanji-split:hover .kanji-bottom {
    transform: translate(8px, 6px);
}

.diagonal-slice {
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    background: linear-gradient(170deg, transparent 48%, #d4a253 48%, #d4a253 52%, transparent 52%);
    pointer-events: none;
    opacity: 0.6;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(48px, 10vw, 144px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: #e8e2d9;
    margin-bottom: 16px;
}

.accent-gi {
    color: #c75233;
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #b8c4b8;
}

.scroll-indicator {
    position: absolute;
    bottom: 12vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: #d4a253;
}

.scroll-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d4a253;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(8px); }
}

/* THRESHOLD SECTION */
.threshold-content {
    width: 90%;
    max-width: 700px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin-bottom: 20px;
    color: #1c1c1e;
}

.section-title-light {
    color: #e8e2d9;
}

.threshold-desc {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 400;
    line-height: 1.6;
    color: #2b2b2f;
    margin-bottom: 40px;
}

.meter-container {
    margin-bottom: 30px;
}

.meter-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: #e8e2d9;
    border-radius: 4px;
    overflow: visible;
}

.meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b8c4b8, #d4a253, #c75233);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.meter-marker {
    position: absolute;
    top: -6px;
    left: 0%;
    width: 3px;
    height: 20px;
    background: #1c1c1e;
    border-radius: 1.5px;
    transition: left 0.3s ease;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2b2b2f;
    opacity: 0.6;
}

.word-input-area {
    position: relative;
}

#word-input {
    width: 100%;
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #1c1c1e;
    background: rgba(255,255,255,0.6);
    border: 2px solid #e8e2d9;
    border-radius: 8px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
}

#word-input:focus {
    border-color: #d4a253;
}

#word-input.over-threshold {
    border-color: #c75233;
    background: rgba(199, 82, 51, 0.05);
}

.word-count {
    text-align: right;
    margin-top: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #2b2b2f;
    opacity: 0.7;
}

.warning-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.warning-shape {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    transition: all 0.4s ease;
}

.warning-shape.active {
    opacity: 0.15;
}

/* WEIGHT OF WORDS SECTION */
.weight-content {
    width: 90%;
    max-width: 1100px;
}

.weight-content .section-title {
    color: #e8e2d9;
    text-align: center;
    margin-bottom: 50px;
}

.weight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.weight-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.weight-card:hover {
    transform: translateY(-6px);
}

.card-image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    filter: grayscale(0.7) contrast(1.15) brightness(0.95);
}

.card-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.card-blob {
    position: absolute;
    top: 10%;
    border-radius: 50% 40% 60% 30% / 40% 50% 30% 60%;
    background: #c4908a;
    opacity: 0.2;
    pointer-events: none;
}

.blob-1 {
    width: 60%;
    height: 50%;
    left: 20%;
    animation: blobFloat1 8s ease-in-out infinite;
}

.blob-2 {
    width: 55%;
    height: 45%;
    left: 25%;
    top: 15%;
    animation: blobFloat2 9s ease-in-out infinite;
}

.blob-3 {
    width: 65%;
    height: 55%;
    left: 15%;
    top: 5%;
    animation: blobFloat3 7s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(5deg); }
    66% { transform: translate(-5px, 5px) rotate(-3deg); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-8px, 8px) rotate(-4deg); }
    66% { transform: translate(6px, -4px) rotate(3deg); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5px, 8px) rotate(3deg); }
    66% { transform: translate(-10px, -6px) rotate(-5deg); }
}

.card-text {
    padding: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    color: #b8c4b8;
}

/* TRIBUNAL SECTION */
.tribunal-content {
    width: 90%;
    max-width: 900px;
    text-align: center;
}

.tribunal-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
}

.tribunal-column {
    flex: 1;
    padding: 30px;
}

.verdict-block {
    margin-bottom: 24px;
}

.verdict-kanji {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: #b8c4b8;
    margin-bottom: 8px;
}

.verdict-kanji-danger {
    color: #c75233;
}

.verdict-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #d4a253;
    margin-bottom: 16px;
}

.verdict-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
}

.verdict-bar-safe {
    background: linear-gradient(90deg, #b8c4b8, #d4a253);
}

.verdict-bar-danger {
    background: linear-gradient(90deg, #d4a253, #c75233);
}

.tribunal-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: #e8e2d9;
    opacity: 0.8;
}

.tribunal-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    flex-shrink: 0;
}

.divider-line {
    width: 1px;
    flex: 1;
    background: #d4a253;
    opacity: 0.4;
}

.divider-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 24px;
    color: #d4a253;
    padding: 12px 0;
}

.bauhaus-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
}

.bauhaus-shape {
    opacity: 0.15;
}

.bauhaus-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #c75233;
}

.bauhaus-triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid #d4a253;
}

.bauhaus-square {
    width: 52px;
    height: 52px;
    background: #b8c4b8;
    margin-top: 4px;
}

/* RESOLUTION SECTION */
.resolution-content {
    text-align: center;
    padding: 60px 20px;
}

.resolution-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(80px, 15vw, 200px);
    font-weight: 900;
    color: #c75233;
    opacity: 0.12;
    line-height: 1;
    margin-bottom: -30px;
    position: relative;
    z-index: 0;
}

.resolution-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1c1c1e;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.resolution-sub {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(16px, 2.5vw, 24px);
    font-weight: 400;
    color: #2b2b2f;
    margin-bottom: 40px;
}

.resolution-line {
    width: 60px;
    height: 3px;
    background: #d4a253;
    margin: 0 auto 24px;
}

.resolution-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: #2b2b2f;
    opacity: 0.5;
}

/* Scroll-triggered animations */
.panel .section-title,
.panel .threshold-desc,
.panel .meter-container,
.panel .word-input-area,
.weight-card,
.tribunal-column,
.tribunal-divider,
.resolution-content > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel.in-view .section-title,
.panel.in-view .threshold-desc,
.panel.in-view .meter-container,
.panel.in-view .word-input-area,
.panel.in-view .weight-card,
.panel.in-view .tribunal-column,
.panel.in-view .tribunal-divider,
.panel.in-view .resolution-content > * {
    opacity: 1;
    transform: translateY(0);
}

.panel.in-view .weight-card:nth-child(2) { transition-delay: 0.15s; }
.panel.in-view .weight-card:nth-child(3) { transition-delay: 0.3s; }
.panel.in-view .threshold-desc { transition-delay: 0.1s; }
.panel.in-view .meter-container { transition-delay: 0.2s; }
.panel.in-view .word-input-area { transition-delay: 0.3s; }
.panel.in-view .tribunal-divider { transition-delay: 0.15s; }
.panel.in-view .tribunal-column:last-child { transition-delay: 0.25s; }

/* Hero always visible */
.panel-hero .hero-content,
.panel-hero .scroll-indicator {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .weight-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .tribunal-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .tribunal-divider {
        flex-direction: row;
        width: 100%;
        height: 60px;
        gap: 16px;
    }
    
    .divider-line {
        height: 1px;
        width: 100%;
        flex: 1;
    }
    
    .kanji-split {
        width: 200px;
        height: 200px;
    }
    
    .bauhaus-grid {
        gap: 24px;
        margin-top: 40px;
    }
}
