/* =========================================
   ipjosim.com - Watch Your Mouth
   Flat-design, raw-authentic, modular blocks
   ========================================= */

/* --- CSS Custom Properties --- */
:root {
    --color-warm-beige: #c9bfb0;
    --color-sage-green: #7ba68a;
    --color-cool-blue: #d4dce6;
    --color-terracotta: #d4756a;
    --color-muted-lavender: #9b8db8;
    --color-soft-purple: #dbd4e6;
    --color-pale-mint: #d4e3d8;
    --color-warm-brown: #8a7e6f;
    --color-light-sky: #c5d5e8;
    --color-cream: #f5f0e8;
    --color-warm-white: #f0eee8;
    --color-pale-olive: #e6e4d4;
    --color-blush: #e6dbd4;
    --color-dark-brown: #3D3429;
    --color-warm-sand: #E8DDD0;
    --color-light-linen: #EBE4D8;


    --font-display: 'Caveat', cursive;
    --font-body: 'Nunito', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius-block: 16px;
    --gap-block: 16px;
    --border-muted: 1px solid var(--color-warm-beige);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-warm-white);
    color: var(--color-dark-brown);
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

/* --- Notebook Paper Texture --- */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(201, 191, 176, 0.12) 31px,
            rgba(201, 191, 176, 0.12) 32px
        );
    background-size: 100% 32px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-warm-brown);
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(24px, 4vw, 40px);
    margin-bottom: 12px;
}

h3 {
    font-size: clamp(20px, 3vw, 32px);
    margin-bottom: 8px;
}

p {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.75;
    color: var(--color-warm-brown);
    max-width: 600px;
}

em {
    font-style: italic;
    color: var(--color-terracotta);
}

blockquote {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.5;
    color: var(--color-muted-lavender);
    border-left: 3px solid var(--color-muted-lavender);
    padding-left: 20px;
    margin-bottom: 12px;
}

cite {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-warm-beige);
    font-style: normal;
}

/* --- Section Base --- */
section {
    position: relative;
    z-index: 1;
    padding: 60px 24px;
}

/* =========================================
   ENTRANCE SECTION
   ========================================= */
.entrance-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-cream);
    position: relative;
    overflow: hidden;
}

.entrance-block {
    text-align: center;
    max-width: 700px;
    position: relative;
    padding: 60px 40px;
}

.site-title {
    font-size: clamp(48px, 8vw, 100px);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-dark-brown);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    animation: fadeInUp 1s ease-out;
}

.site-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(14px, 2vw, 18px);
    color: var(--color-warm-beige);
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.site-tagline {
    font-family: var(--font-body);
    font-size: clamp(16px, 2.2vw, 22px);
    color: var(--color-warm-brown);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 40px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Speech Bubble Decorations */
.speech-bubble-decor {
    position: absolute;
    opacity: 0.6;
    pointer-events: none;
}

.speech-bubble-1 {
    top: -10px;
    left: -60px;
    width: 120px;
    animation: floatBubble 6s ease-in-out infinite;
}

.speech-bubble-2 {
    bottom: 20px;
    right: -50px;
    width: 100px;
    animation: floatBubble 7s ease-in-out infinite 1s;
}

/* Scroll Hint */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.scroll-arrow {
    font-size: 24px;
    color: var(--color-warm-beige);
    animation: bounceDown 2s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-warm-beige);
    text-transform: lowercase;
    letter-spacing: 0.1em;
}

/* =========================================
   MODULAR BLOCK GRID
   ========================================= */
.block-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap-block);
    padding: 40px 24px;
}

.module-block {
    background-color: var(--color-cream);
    border-radius: var(--radius-block);
    border: var(--border-muted);
    padding: 32px 28px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.module-block.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.module-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(138, 126, 111, 0.1);
}

.block-wide {
    grid-column: span 2;
}

/* Block Color Variations */
.block-what {
    background-color: #E8DDD0;
}

.block-why {
    background-color: var(--color-blush);
}

.block-how {
    background-color: var(--color-pale-mint);
}

.block-philosophy-1 {
    background-color: var(--color-cream);
    border-color: var(--color-terracotta);
    border-width: 1.5px;
}

.block-philosophy-2 {
    background-color: #EBE4D8;
}

.block-philosophy-3 {
    background-color: var(--color-soft-purple);
}

.block-about {
    background-color: var(--color-light-sky);
    position: relative;
}

.block-principles {
    background-color: var(--color-pale-mint);
}

.block-quote {
    background-color: var(--color-soft-purple);
}

/* Block Icons */
.block-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

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

/* =========================================
   CHECKER SECTION
   ========================================= */
.checker-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.checker-block {
    background-color: var(--color-cream);
    border-radius: var(--radius-block);
    border: 2px solid var(--color-terracotta);
    padding: 40px 32px;
    opacity: 0;
    transform: translateY(20px);
}

.checker-block.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.checker-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.megaphone-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.checker-header h2 {
    color: var(--color-terracotta);
}

.checker-desc {
    margin-bottom: 24px;
    max-width: 100%;
}

.checker-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

#comment-input {
    width: 100%;
    min-height: 140px;
    padding: 20px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-warm-brown);
    background-color: var(--color-warm-white);
    border: var(--border-muted);
    border-radius: 12px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
    line-height: 1.7;
}

#comment-input:focus {
    border-color: var(--color-terracotta);
}

#comment-input::placeholder {
    color: var(--color-warm-beige);
    font-style: italic;
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-warm-beige);
}

/* Check Button */
.check-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: var(--color-terracotta);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
}

.check-button:hover {
    background-color: #c0655b;
    transform: scale(1.02);
}

.check-button:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.check-button:hover .btn-icon {
    transform: translateX(4px);
}

/* =========================================
   REFLECTION AREA
   ========================================= */
.reflection-area {
    margin-top: 32px;
    overflow: hidden;
}

.reflection-area.hidden {
    display: none;
}

.reflection-area.visible {
    display: block;
    animation: slideDown 0.5s ease;
}

.reflection-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--color-warm-beige);
}

.reflection-header h3 {
    color: var(--color-muted-lavender);
}

.reflection-card {
    background-color: var(--color-warm-white);
    border: var(--border-muted);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reflection-card.show {
    opacity: 1;
    transform: translateX(0);
}

.card-label {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-muted-lavender);
    margin-bottom: 8px;
}

.card-text {
    font-size: 15px;
    line-height: 1.7;
    max-width: 100%;
}

#mirror-card {
    border-left: 3px solid var(--color-sage-green);
}

#tone-card {
    border-left: 3px solid var(--color-terracotta);
}

#receiver-card {
    border-left: 3px solid var(--color-muted-lavender);
}

#rewrite-card {
    border-left: 3px solid var(--color-light-sky);
}

/* Reflection Actions */
.reflection-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-send {
    background-color: transparent;
    border-color: var(--color-warm-beige);
    color: var(--color-warm-beige);
}

.btn-send:hover {
    border-color: var(--color-warm-brown);
    color: var(--color-warm-brown);
}

.btn-revise {
    background-color: var(--color-sage-green);
    color: #fff;
    border-color: var(--color-sage-green);
}

.btn-revise:hover {
    background-color: #6b9479;
}

/* =========================================
   PHILOSOPHY GRID
   ========================================= */
.philosophy-grid {
    padding-top: 20px;
}

.thought-cloud {
    width: 140px;
    margin: 0 auto 16px;
}

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

/* =========================================
   ABOUT GRID
   ========================================= */
.about-grid {
    padding-bottom: 20px;
}

.pin-decor {
    position: absolute;
    top: -8px;
    right: 24px;
    width: 30px;
}

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

.principles-list {
    list-style: none;
    padding: 0;
}

.principles-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px dotted rgba(201, 191, 176, 0.4);
}

.principles-list li:last-child {
    border-bottom: none;
}

.principle-marker {
    color: var(--color-sage-green);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer-section {
    padding: 40px 24px 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-block {
    max-width: 500px;
    margin: 0 auto;
}

.footer-domain {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--color-warm-beige);
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.footer-note {
    font-size: 14px;
    color: var(--color-warm-beige);
    margin-bottom: 20px;
    max-width: 100%;
}

.footer-doodle {
    width: 200px;
    margin: 0 auto;
    opacity: 0.5;
}

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

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

@keyframes floatBubble {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-8px) rotate(2deg);
    }
    66% {
        transform: translateY(4px) rotate(-1deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 700px) {
    .block-wide {
        grid-column: span 1;
    }

    .speech-bubble-1 {
        left: -20px;
        width: 80px;
    }

    .speech-bubble-2 {
        right: -20px;
        width: 70px;
    }

    .entrance-block {
        padding: 40px 20px;
    }

    .checker-block {
        padding: 28px 20px;
    }

    .reflection-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 40px 16px;
    }

    .block-grid {
        gap: 12px;
        padding: 30px 16px;
    }

    .module-block {
        padding: 24px 20px;
    }
}

@media (max-width: 400px) {
    .site-title {
        font-size: 42px;
    }

    .checker-header {
        flex-direction: column;
        text-align: center;
    }
}