/* ============================================================
   ronpa.day — styles.css
   Colors: #c6f0d4, #d4c6f0, #2d2d3a, #8a7f9e, #3a3a4d, #f0c6d4, #c6d4f0, #f5f0eb
   Fonts: Playfair Display, Cormorant Garamond, IBM Plex Mono, Inter, Space Mono
   ============================================================ */

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

:root {
    --mint: #c6f0d4;
    --lavender: #d4c6f0;
    --ink: #2d2d3a;
    --muted: #8a7f9e;
    --charcoal: #3a3a4d;
    --rose: #f0c6d4;
    --sky: #c6d4f0;
    --parchment: #f5f0eb;
    --hex-size: 220px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--parchment);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Fog Overlay */
#fog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212, 198, 240, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(198, 240, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(240, 198, 212, 0.1) 0%, transparent 55%);
    animation: fogDrift 20s ease-in-out infinite alternate;
}

@keyframes fogDrift {
    0% { opacity: 0.6; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(20px); }
}

/* ---- HERO ---- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--parchment) 0%, var(--lavender) 50%, var(--mint) 100%);
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.35em;
    color: var(--muted);
    vertical-align: super;
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-style: italic;
    color: var(--charcoal);
    margin-top: 1rem;
    letter-spacing: 0.02em;
}

.hero-line {
    width: 60px;
    height: 1.5px;
    background: var(--muted);
    margin: 2rem auto 0;
    animation: lineExpand 2s ease-out forwards;
}

@keyframes lineExpand {
    from { width: 0; opacity: 0; }
    to { width: 60px; opacity: 1; }
}

/* ---- HONEYCOMB GRID ---- */
#honeycomb-section {
    padding: 6rem 2rem;
    background: var(--parchment);
}

.honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 8px;
}

.hex-cell {
    width: var(--hex-size);
    height: calc(var(--hex-size) * 1.1547);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    position: relative;
}

.hex-cell:hover {
    transform: scale(1.08);
    z-index: 10;
}

.hex-cell--accent1 { background: var(--mint); }
.hex-cell--accent2 { background: var(--lavender); }
.hex-cell--accent3 { background: var(--rose); }
.hex-cell--accent4 { background: var(--sky); }
.hex-cell--accent5 { background: var(--parchment); border: 1px solid var(--muted); }

.hex-inner {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 85%;
}

.hex-illustration {
    width: 70px;
    height: 55px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.hex-cell h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 0.3rem;
}

.hex-cell p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    color: var(--charcoal);
    line-height: 1.4;
}

/* Adjacent hex tremble on hover */
.hex-cell.tremble {
    animation: hexTremble 0.4s ease-in-out;
}

@keyframes hexTremble {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, 2px); }
}

/* Hex cell entrance animation */
.hex-cell {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- TOPOGRAPHY ---- */
#topography {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--parchment) 0%, var(--mint) 100%);
}

.topo-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.section-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 3rem;
}

.topo-landscape {
    background: var(--parchment);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 2px 20px rgba(45, 45, 58, 0.08);
}

.topo-svg {
    width: 100%;
    height: auto;
}

.topo-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    fill: var(--muted);
    font-weight: 400;
}

/* ---- REFUTATION RIPPLE ---- */
#refutation {
    padding: 6rem 2rem;
    background: var(--parchment);
}

.refutation-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.ripple-canvas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
    position: relative;
}

.ripple-hex {
    width: 90px;
    height: 104px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--lavender);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.ripple-hex span {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--ink);
}

.ripple-hex:first-child {
    background: var(--rose);
}

.ripple-hex:hover {
    transform: scale(1.15);
    background: var(--mint);
}

.ripple-hex.rippling {
    animation: rippleWave 0.6s ease-out;
}

@keyframes rippleWave {
    0% { transform: scale(1); background-color: var(--lavender); }
    50% { transform: scale(1.1); background-color: var(--mint); }
    100% { transform: scale(1); background-color: var(--lavender); }
}

/* ---- FOOTER ---- */
#footer {
    padding: 4rem 2rem;
    background: var(--ink);
    text-align: center;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-kanji {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--parchment);
    opacity: 0.3;
    margin-bottom: 0.5rem;
}

.footer-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.footer-mono {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--charcoal);
    letter-spacing: 0.05em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    :root {
        --hex-size: 160px;
    }

    .hex-inner {
        padding: 1.5rem 1rem;
    }

    .hex-cell h3 {
        font-size: 0.85rem;
    }

    .hex-cell p {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    :root {
        --hex-size: 140px;
    }
}
