/* ============================================
   iisugi.com - Pop Art Speech Bubble Experience
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1A1A1A;
    background: #FFFFFF;
    overflow-x: hidden;
}

/* --- Halftone Dot Pattern Overlay --- */
.halftone-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(26, 26, 26, 0.10) 1px, transparent 1px);
    background-size: 8px 8px;
}

/* --- Speech Bubble Base --- */
.speech-bubble,
.panel-bubble,
.floating-bubble {
    position: relative;
    background: #FFFFFF;
    border: 4px solid #1A1A1A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Bubble Tails */
.bubble-tail {
    position: absolute;
    width: 0;
    height: 0;
}

/* Tail pointing down (default) */
.bubble-tail,
.bubble-tail.tail-bottom {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #1A1A1A;
}

.bubble-tail::after,
.bubble-tail.tail-bottom::after {
    content: '';
    position: absolute;
    top: -24px;
    left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #FFFFFF;
}

/* Tail pointing left */
.bubble-tail.tail-left {
    bottom: auto;
    left: -20px;
    top: 60%;
    transform: none;
    border-left: none;
    border-right: 20px solid #1A1A1A;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.bubble-tail.tail-left::after {
    content: '';
    position: absolute;
    top: -10px;
    left: auto;
    right: -24px;
    border-left: none;
    border-right: 18px solid #FFFFFF;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* Tail pointing right */
.bubble-tail.tail-right {
    bottom: auto;
    right: -20px;
    left: auto;
    top: 60%;
    transform: none;
    border-right: none;
    border-left: 20px solid #1A1A1A;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.bubble-tail.tail-right::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -24px;
    right: auto;
    border-right: none;
    border-left: 18px solid #FFFFFF;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* ============================================
   SECTION 1: HERO - THE SHOUT
   ============================================ */
.hero {
    width: 100%;
    min-height: 100vh;
    background: #FFE135;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(26, 26, 26, 0.08) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.hero-bubble {
    width: clamp(280px, 60vw, 500px);
    height: clamp(280px, 60vw, 500px);
    transform: scale(0);
    opacity: 0;
}

.hero-bubble.animate-in {
    animation: bubblePopIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #1A1A1A;
    opacity: 0;
}

.hero-text.animate-shake {
    animation: shakeError 300ms ease-in-out forwards;
}

.hero-bubble .bubble-tail {
    opacity: 0;
    transition: opacity 200ms ease;
}

.hero-bubble .bubble-tail.animate-tail {
    opacity: 1;
    animation: tailSlideIn 200ms ease-out forwards;
}

.hero-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #1A1A1A;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(10px);
}

.hero-subtitle.animate-fade {
    animation: fadeInUp 400ms ease-out forwards;
}

/* Hero Animations */
@keyframes bubblePopIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shakeError {
    0% { transform: translateX(0); opacity: 1; }
    15% { transform: translateX(-3px); }
    30% { transform: translateX(3px); }
    45% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes tailSlideIn {
    0% { transform: translateX(-50%) translateY(-10px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTION 2: VOLUME SCALE
   ============================================ */
.scale-section {
    width: 100%;
    padding: 80px 20px;
    background: #FFCDD2;
    position: relative;
    overflow: hidden;
}

.scale-container {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.scale-panel {
    padding: 40px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateX(-40px);
}

.scale-panel.animate-slide {
    animation: slideInLeft 400ms ease-out forwards;
}

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-40px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Green Panel - soft, thin */
.panel-green {
    background: #4CAF50;
    border: 2px solid #1A1A1A;
    color: #FFFFFF;
}

.panel-green .panel-label {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}

.panel-green .panel-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.85rem;
}

/* Yellow Panel - medium intensity */
.panel-yellow {
    background: #FFE135;
    border: 3px solid #1A1A1A;
    color: #1A1A1A;
}

.panel-yellow .panel-label {
    font-family: 'Bangers', cursive;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
}

.panel-yellow .panel-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
}

/* Red Panel - maximum intensity */
.panel-red {
    background: #E53935;
    border: 4px solid #1A1A1A;
    color: #FFFFFF;
}

.panel-red .panel-label {
    font-family: 'Bangers', cursive;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
}

.panel-red .panel-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Panel Bubbles */
.panel-bubble {
    margin-bottom: 20px;
}

.panel-bubble span {
    font-family: 'Bangers', cursive;
    letter-spacing: 0.04em;
}

.small-bubble {
    width: 80px;
    height: 80px;
    border-width: 2px;
    font-size: 0.85rem;
}

.medium-bubble {
    width: 110px;
    height: 110px;
    border-width: 3px;
    font-size: 1rem;
}

.large-bubble {
    width: 150px;
    height: 150px;
    border-width: 4px;
    font-size: 1.2rem;
}

/* Red screen flash */
.red-flash {
    position: fixed;
    inset: 0;
    background: #E53935;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    animation: redFlash 50ms ease-out forwards;
}

@keyframes redFlash {
    0% { opacity: 0.10; }
    100% { opacity: 0; }
}

/* ============================================
   SECTION 3: BUBBLE GRID
   ============================================ */
.bubble-grid-section {
    width: 100%;
    min-height: 80vh;
    padding: 80px 20px;
    background: #FFE135;
    position: relative;
    overflow: hidden;
}

.bubble-grid-container {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    min-height: 600px;
    z-index: 1;
}

.floating-bubble {
    position: absolute;
    padding: 10px;
}

.floating-bubble span {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #1A1A1A;
}

/* Solid bubbles */
.solid-bubble {
    background: #FFFFFF;
    border: 3px solid #1A1A1A;
    opacity: 0;
    transform: scale(0);
}

.solid-bubble.animate-bounce {
    animation: bounceEnter 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Popped bubbles */
.popped-bubble {
    background: transparent;
    border: 2px dashed #64B5F6;
    opacity: 0;
    transform: scale(0);
}

.popped-bubble span {
    color: #64B5F6;
}

.popped-bubble .bubble-tail {
    display: none;
}

.popped-bubble.animate-pop {
    animation: popEnter 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceEnter {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes popEnter {
    0% { opacity: 0; transform: scale(1.2); }
    50% { opacity: 0.8; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* Bubble positions (scattered layout) */
.fb-1  { width: 140px; height: 140px; top: 5%;   left: 5%;  }
.fb-2  { width: 180px; height: 180px; top: 10%;  left: 55%; }
.fb-3  { width: 120px; height: 120px; top: 35%;  left: 25%; }
.fb-4  { width: 100px; height: 100px; top: 5%;   left: 35%; }
.fb-5  { width: 90px;  height: 90px;  top: 50%;  left: 65%; }
.fb-6  { width: 110px; height: 110px; top: 55%;  left: 10%; }
.fb-7  { width: 70px;  height: 70px;  top: 30%;  left: 75%; }
.fb-8  { width: 160px; height: 160px; top: 65%;  left: 40%; }
.fb-9  { width: 80px;  height: 80px;  top: 75%;  left: 80%; }
.fb-10 { width: 130px; height: 130px; top: 80%;  left: 5%;  }

.floating-bubble span {
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   SECTION 4: HOW IT WORKS
   ============================================ */
.how-section {
    width: 100%;
    padding: 80px 20px;
    background: #FFFFFF;
    position: relative;
}

.how-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(26, 26, 26, 0.05) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 48px;
    color: #1A1A1A;
    position: relative;
    z-index: 1;
}

.steps-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.step-panel {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: #FFFFFF;
    border: 3px solid #1A1A1A;
    border-radius: 16px;
    padding: 32px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.step-panel:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 #1A1A1A;
}

.step-number {
    display: inline-flex;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: #1A1A1A;
    color: #FFFFFF;
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
}

.step-content {
    flex: 1;
}

.step-label-text {
    font-family: 'Bangers', cursive;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #6B6B6B;
    margin-bottom: 4px;
}

.before-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #E53935;
    margin-bottom: 8px;
    transition: text-decoration-color 200ms ease;
    text-decoration: line-through transparent 3px;
}

.step-panel:hover .before-text {
    text-decoration: line-through #E53935 3px;
}

.step-arrow {
    font-size: 1.5rem;
    color: #6B6B6B;
    text-align: center;
    margin: 8px 0;
}

.after-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #6B6B6B;
    transition: color 200ms ease;
}

.step-panel:hover .after-text {
    color: #4CAF50;
}

/* ============================================
   FOOTER WHISPER
   ============================================ */
.footer-whisper {
    width: 100%;
    padding: 40px 20px;
    background: #1A1A1A;
    text-align: center;
}

.footer-whisper p {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.7rem;
    color: #6B6B6B;
    letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .scale-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .bubble-grid-container {
        min-height: 800px;
    }

    .fb-1  { width: 110px; height: 110px; top: 2%;   left: 5%;  }
    .fb-2  { width: 140px; height: 140px; top: 10%;  left: 50%; }
    .fb-3  { width: 100px; height: 100px; top: 22%;  left: 15%; }
    .fb-4  { width: 80px;  height: 80px;  top: 18%;  left: 65%; }
    .fb-5  { width: 70px;  height: 70px;  top: 35%;  left: 55%; }
    .fb-6  { width: 90px;  height: 90px;  top: 42%;  left: 5%;  }
    .fb-7  { width: 60px;  height: 60px;  top: 38%;  left: 75%; }
    .fb-8  { width: 130px; height: 130px; top: 55%;  left: 30%; }
    .fb-9  { width: 70px;  height: 70px;  top: 68%;  left: 70%; }
    .fb-10 { width: 100px; height: 100px; top: 72%;  left: 5%;  }
}

@media (max-width: 480px) {
    .hero-bubble {
        width: 240px;
        height: 240px;
    }

    .large-bubble {
        width: 110px;
        height: 110px;
    }

    .medium-bubble {
        width: 90px;
        height: 90px;
    }
}
