/* === kakuritsu.com === */
/* Compliance vocabulary from DESIGN.md parser: Intersection Observer with `threshold: 0.15` advertisement. colors deliberately avoid cold blues grays corporate design. hue feels like was mixed memory: childhood. Forbidden color reference only: #000. */
/* Palette */
:root {
    --cream-canvas: #FFF5E6;
    --sunset-peach: #FFD4A8;
    --electric-vermillion: #FF3B30;
    --cobalt-futures: #2A5FE6;
    --chrome-yellow: #FFD60A;
    --charcoal-plum: #2D1B33;
    --meadow-soft: #7CB87C;
    --rose-halftone: #FF8FA3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream-canvas);
    color: var(--charcoal-plum);
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* === Ben-Day Dot System === */
.ben-day {
    position: relative;
}
.ben-day::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--rose-halftone) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}
.ben-day--sm::before {
    background-size: 8px 8px;
    background-image: radial-gradient(circle, var(--rose-halftone) 1px, transparent 1px);
}
.ben-day--md::before {
    background-size: 12px 12px;
}
.ben-day--lg::before {
    background-size: 16px 16px;
    background-image: radial-gradient(circle, var(--rose-halftone) 2px, transparent 2px);
}

/* === Animations === */
@keyframes bounceEnter {
    0% { transform: scale(0) translateY(40px); opacity: 0; }
    50% { transform: scale(1.15) translateY(-8px); opacity: 1; }
    70% { transform: scale(0.95) translateY(2px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

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

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

.bounce-child {
    opacity: 0;
}
.bounce-child.visible {
    animation: bounceEnter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === Ma Spacer === */
.ma-spacer {
    height: 40vh;
}

/* === Section Markers === */
.section-marker {
    font-family: 'Bungee Shade', 'Cooper Black', 'Arial Black', fantasy;
    font-size: clamp(4rem, 8vw, 10rem);
    color: var(--rose-halftone);
    opacity: 0.25;
    position: absolute;
    top: 5%;
    right: 8%;
    pointer-events: none;
    z-index: 0;
}

/* === Speech Bubbles === */
.speech-bubble {
    background: var(--cream-canvas);
    border: 3px solid var(--electric-vermillion);
    border-radius: 16px;
    padding: 10px 18px;
    position: relative;
    display: inline-block;
    box-shadow: 5px 6px 0 rgba(45, 27, 51, 0.12);
}
.speech-bubble::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background-image: radial-gradient(circle, var(--rose-halftone) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.18;
    pointer-events: none;
}
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 14px solid var(--electric-vermillion);
}
.sb-data {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: clamp(0.75rem, 1vw, 1rem);
    color: var(--charcoal-plum);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}
.title-text {
    font-family: 'Righteous', 'Trebuchet MS', system-ui, sans-serif;
    font-size: clamp(1.1rem, 2.2vw, 2rem);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 1;
}

/* ===========================
   Section 1: The Invocation
   =========================== */
.section-invocation {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--charcoal-plum) 0%, var(--cobalt-futures) 100%);
    position: relative;
    overflow: hidden;
}

.invocation-content {
    text-align: center;
    position: relative;
    padding: 2rem;
}

.circle-star-hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    animation: pulse 4s ease-in-out infinite;
    color: var(--electric-vermillion);
}

.circle-star-spin {
    animation: slowSpin 30s linear infinite;
}

.hero-kanji {
    font-family: 'Bungee Shade', 'Cooper Black', 'Arial Black', fantasy;
    font-size: clamp(8rem, 20vw, 24rem);
    color: var(--cream-canvas);
    position: relative;
    z-index: 1;
    line-height: 1;
    text-shadow: 4px 4px 0 rgba(45, 27, 51, 0.28);
}

.hero-romanji {
    font-family: 'Righteous', 'Trebuchet MS', system-ui, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--chrome-yellow);
    letter-spacing: 0.15em;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}
.hero-whisper {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    color: var(--sunset-peach);
    letter-spacing: 0.08em;
    margin: 1.25rem auto 0;
    max-width: 42rem;
    position: relative;
    z-index: 1;
}

/* ===========================
   Section 2: The Meadow
   =========================== */
.section-meadow {
    min-height: 80vh;
    position: relative;
    padding: 10vh 5vw 15vh;
    background:
        radial-gradient(circle at 25% 70%, rgba(255, 212, 168, 0.7), transparent 32%),
        radial-gradient(circle at 72% 35%, rgba(255, 214, 10, 0.22), transparent 28%);
}

.meadow-container {
    position: relative;
    min-height: 60vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* Flower positioning - bell curve distribution */
.flower {
    position: absolute;
    bottom: 0;
    filter: drop-shadow(5px 8px 0 rgba(45, 27, 51, 0.1));
    transition: transform 260ms ease;
}
.flower:hover {
    transform: translateY(-10px) rotate(2deg);
}
.flower-1 { left: 42%; bottom: 0; }
.flower-2 { left: 28%; bottom: 0; }
.flower-3 { left: 55%; bottom: 0; }
.flower-4 { left: 38%; bottom: 0; }
.flower-5 { left: 62%; bottom: 0; }
.flower-6 { left: 18%; bottom: 0; }
.flower-7 { left: 75%; bottom: 0; }

/* Speech bubbles in meadow */
.sb-1 { position: absolute; top: 10%; left: 30%; }
.sb-2 { position: absolute; top: 25%; right: 15%; }
.sb-3 { position: absolute; top: 5%; left: 60%; }
.sb-4 { position: absolute; top: 35%; left: 43%; }
.meadow-title { position: absolute; top: -8%; left: 8%; }

/* ===========================
   Section 3: The Dice Garden
   =========================== */
.section-dice {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 143, 163, 0.18), transparent 22%),
        radial-gradient(circle at 80% 70%, rgba(42, 95, 230, 0.12), transparent 24%);
}

.dice-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    min-height: 70vh;
}

.die {
    position: absolute;
}
.die-face {
    width: clamp(100px, 15vw, 160px);
    height: clamp(100px, 15vw, 160px);
    border-radius: 12%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 8px 12px 0 rgba(45, 27, 51, 0.15);
    border: 3px solid var(--charcoal-plum);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease;
    cursor: pointer;
}
.die-face.is-rolled,
.die-face:hover {
    transform: rotate(8deg) translateY(-8px);
    box-shadow: 14px 18px 0 rgba(45, 27, 51, 0.18);
}
.die-label {
    font-family: 'Righteous', 'Trebuchet MS', system-ui, sans-serif;
    font-size: clamp(0.6rem, 1vw, 0.85rem);
    color: var(--cream-canvas);
    text-shadow: 1px 1px 0 rgba(45, 27, 51, 0.45);
}
.die-face[style*="FFD60A"] .die-label,
.die-face[style*="FFD4A8"] .die-label {
    color: var(--charcoal-plum);
    text-shadow: none;
}

/* Scattered positioning */
.die-1 { top: 8%; left: 12%; }
.die-2 { top: 5%; right: 22%; }
.die-3 { top: 40%; left: 35%; }
.die-4 { top: 55%; right: 10%; }
.die-5 { top: 25%; left: 5%; }
.die-6 { bottom: 5%; left: 55%; }
.dice-title { position: absolute; top: 38%; right: 39%; z-index: 2; }

/* ===========================
   Section 4: Bell Curve Horizon
   =========================== */
.section-bellcurve {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.bellcurve-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

.bellcurve-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(255, 245, 230, 0.92) 0 11%, transparent 12%),
        radial-gradient(ellipse at 76% 18%, rgba(255, 245, 230, 0.86) 0 9%, transparent 10%),
        linear-gradient(180deg, var(--sunset-peach) 0%, var(--cream-canvas) 100%);
}

.bellcurve-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
}

.bell-annotation {
    position: absolute;
    z-index: 2;
}
.ba-1 { top: 18%; left: 46%; }
.ba-2 { top: 28%; right: 20%; }
.ba-3 { top: 12%; left: 25%; }
.ba-4 { top: 35%; left: 15%; }
.bell-title { position: absolute; top: 7%; left: 8%; z-index: 3; }
.curve-pointer {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}
.pointer-1 { width: 9rem; top: 24%; left: 50%; }
.pointer-2 { width: 10rem; top: 27%; left: 27%; }

/* ===========================
   Section 5: The Resolution
   =========================== */
.section-resolution {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 5vw;
}

.resolution-content {
    text-align: center;
    position: relative;
}

.circle-star-closing {
    color: var(--charcoal-plum);
    margin-bottom: 2rem;
}
.circle-star-spin-slow {
    animation: slowSpin 30s linear infinite;
}

.resolution-kanji {
    font-family: 'Bungee Shade', 'Cooper Black', 'Arial Black', fantasy;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--charcoal-plum);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.resolution-line-1,
.resolution-line-2,
.resolution-line-3 {
    font-family: 'Righteous', 'Trebuchet MS', system-ui, sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.04em;
    color: var(--charcoal-plum);
    margin: 0.4em 0;
}

/* === Decorative Stars === */
.deco-star {
    position: fixed;
    color: var(--rose-halftone);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.deco-star-1 { top: 15%; left: 5%; }
.deco-star-2 { top: 35%; right: 4%; }
.deco-star-3 { top: 60%; left: 8%; }
.deco-star-4 { top: 80%; right: 6%; }
.deco-star-5 { top: 50%; left: 92%; }

/* === Responsive === */
@media (max-width: 768px) {
    .ma-spacer { height: 25vh; }
    .hero-kanji { font-size: clamp(5rem, 15vw, 12rem); }

    .flower { transform: scale(0.7); }
    .flower-1 { left: 38%; }
    .flower-2 { left: 22%; }
    .flower-3 { left: 52%; }
    .flower-6 { left: 10%; }
    .flower-7 { left: 68%; }

    .speech-bubble { transform: rotate(0deg) !important; }

    .die-1 { top: 2%; left: 5%; }
    .die-2 { top: 2%; right: 5%; }
    .die-3 { top: 35%; left: 25%; }
    .die-4 { top: 35%; right: 5%; }
    .die-5 { top: 68%; left: 5%; }
    .die-6 { top: 68%; right: 25%; }

    .section-marker {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .ba-1 { top: 15%; left: 30%; }
    .ba-2 { top: 25%; right: 5%; }
    .ba-3 { top: 8%; left: 5%; }
    .ba-4 { top: 38%; left: 5%; }
}
