/* rational.group - Japanese-minimal design */
/* Palette:
   Rice Paper: #F5F0E8
   Warm Clay: #E8DFD0
   Earth Brown: #5C4A38
   Earth Moss: #6B8B5E
   Stone Gray: #8B8178
   Tatami Gold: #C8A868
   Pool Teal: #5B9EA8
   White: #FFFFFF
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zen Old Mincho', serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.85;
    color: #5C4A38;
    background-color: #F5F0E8;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ===== ENGAWA ENTRANCE ===== */
.engawa-entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #E8DFD0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    top: 8%;
    left: 15%;
    width: 350px;
    height: 260px;
    opacity: 0;
    animation: blobDrift 8s ease-in-out infinite;
    transition: opacity 1.5s ease;
}

.hero-blob.visible {
    opacity: 0.2;
}

.hero-blob path {
    fill: #6B8B5E;
}

.koi-hero {
    position: absolute;
    top: 25%;
    width: 45px;
    height: auto;
    opacity: 0;
    animation: koiSwimHero 25s linear infinite;
    transition: opacity 0.8s ease;
}

.koi-hero.visible {
    opacity: 0.8;
}

.engawa-content {
    position: relative;
    padding: 0 8vw 15vh;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 2;
}

.engawa-content.visible {
    opacity: 1;
}

.wordmark {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 44px);
    letter-spacing: 0.02em;
    color: #5C4A38;
    margin-bottom: 12px;
}

.engawa-tagline {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #8B8178;
    letter-spacing: 0.04em;
}

.engawa-shadow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, rgba(92, 74, 56, 0.03), transparent);
    z-index: 3;
}

/* ===== STONE GARDEN GRID ===== */
.stone-garden {
    padding: 80px 24px;
    background-color: #F5F0E8;
}

.garden-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 1080px;
    margin: 0 auto;
}

.garden-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.garden-card.visible {
    opacity: 1;
}

.card-light {
    background-color: #F5F0E8;
}

.card-white {
    background-color: #FFFFFF;
}

.card-blob {
    position: absolute;
    top: -10px;
    right: -20px;
    width: 160px;
    height: 120px;
    opacity: 0.15;
    animation: blobDrift 8s ease-in-out infinite;
    z-index: 0;
}

.card-blob path {
    fill: #6B8B5E;
}

.garden-card h2 {
    position: relative;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 22px);
    letter-spacing: 0.02em;
    color: #5C4A38;
    margin-bottom: 14px;
    z-index: 1;
}

.garden-card p {
    position: relative;
    font-family: 'Zen Old Mincho', serif;
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.85;
    color: #8B8178;
    z-index: 1;
}

.garden-card:hover {
    background-color: #E8DFD0;
    transition: background-color 0.5s ease;
}

.garden-card:hover h2 {
    color: #C8A868;
    transition: color 0.4s ease;
}

/* ===== KOI INTERLUDE ===== */
.koi-interlude {
    position: relative;
    height: 120px;
    background-color: #F5F0E8;
    overflow: hidden;
}

.koi-swim-1 {
    position: absolute;
    top: 20%;
    width: 40px;
    height: auto;
    opacity: 0.7;
    animation: koiSwim 25s linear infinite;
}

.koi-swim-2 {
    position: absolute;
    top: 50%;
    width: 35px;
    height: auto;
    opacity: 0.6;
    animation: koiSwim 30s linear infinite;
    animation-delay: -8s;
}

.koi-swim-3 {
    position: absolute;
    top: 75%;
    width: 30px;
    height: auto;
    opacity: 0.5;
    animation: koiSwim 22s linear infinite;
    animation-delay: -15s;
}

/* ===== TOKONOMA FEATURE ===== */
.tokonoma-feature {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: #E8DFD0;
    padding: 200px 24px;
}

.tokonoma-content {
    max-width: 480px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.tokonoma-content.visible {
    opacity: 1;
}

.tokonoma-heading {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 44px);
    letter-spacing: 0.02em;
    color: #5C4A38;
    margin-bottom: 32px;
    line-height: 1.4;
}

.tokonoma-text {
    font-family: 'Zen Old Mincho', serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.85;
    color: #8B8178;
}

/* ===== RIVER DIVIDER ===== */
.river-divider {
    background-color: #E8DFD0;
    line-height: 0;
}

.river-divider svg {
    width: 100%;
    height: 80px;
    display: block;
}

/* ===== RIVER FOOTER ===== */
.river-footer {
    background-color: #5C4A38;
    padding: 60px 24px 48px;
}

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

.footer-brand {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: #E8DFD0;
    margin-bottom: 8px;
}

.footer-philosophy {
    font-family: 'Zen Old Mincho', serif;
    font-weight: 400;
    font-size: 14px;
    color: #8B8178;
    margin-bottom: 24px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-link {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #C8A868;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #F5F0E8;
}

.footer-divider {
    color: #8B8178;
    font-size: 13px;
}

/* ===== ANIMATIONS ===== */
@keyframes blobDrift {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(3px, -2px);
    }
    50% {
        transform: translate(5px, 0);
    }
    75% {
        transform: translate(2px, 3px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes koiSwimHero {
    0% {
        transform: translateX(-50px) skewX(0deg);
    }
    25% {
        transform: translateX(25vw) skewX(2deg);
    }
    50% {
        transform: translateX(50vw) skewX(0deg);
    }
    75% {
        transform: translateX(75vw) skewX(-2deg);
    }
    100% {
        transform: translateX(100vw) skewX(0deg);
    }
}

@keyframes koiSwim {
    0% {
        transform: translateX(-60px) skewX(0deg);
    }
    25% {
        transform: translateX(25vw) skewX(2deg);
    }
    50% {
        transform: translateX(50vw) skewX(0deg);
    }
    75% {
        transform: translateX(75vw) skewX(-2deg);
    }
    100% {
        transform: translateX(100vw) skewX(0deg);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .garden-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .tokonoma-feature {
        padding: 120px 24px;
    }
}

@media (max-width: 600px) {
    .garden-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .engawa-content {
        padding: 0 6vw 12vh;
    }

    .hero-blob {
        width: 240px;
        height: 180px;
        top: 12%;
        left: 10%;
    }

    .tokonoma-feature {
        padding: 80px 20px;
        min-height: 60vh;
    }

    .koi-interlude {
        height: 80px;
    }
}
