/* Bokotoro - Ancient Japanese Inspired Styles */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Washi paper texture overlay */
.texture-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Ink wash (sumi-e) background effects */
.ink-wash {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.04;
    pointer-events: none;
}

.ink-wash-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #1a1a1a 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: ink-drift 30s ease-in-out infinite;
}

.ink-wash-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #1a1a1a 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: ink-drift 25s ease-in-out infinite reverse;
}

@keyframes ink-drift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, 20px) scale(1.1);
    }
}

/* Mon (family crest) circle */
.mon-circle {
    animation: fade-in 1.5s ease-out;
}

/* Brush stroke decoration */
.brush-stroke {
    width: 60px;
    height: 3px;
    margin: 0 auto;
    background: linear-gradient(90deg,
        transparent 0%,
        #1a1a1a 20%,
        #1a1a1a 80%,
        transparent 100%
    );
    opacity: 0.2;
    position: relative;
}

.brush-stroke::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #8b2500;
    border-radius: 50%;
}

/* Hanko (seal) style */
.hanko {
    width: 40px;
    height: 40px;
    border: 1.5px solid #8b2500;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b2500;
    font-family: 'Noto Serif JP', serif;
    transform: rotate(-5deg);
    opacity: 0.7;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slow pulse for scroll indicator */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.15;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Form input styles */
input::placeholder {
    font-style: italic;
}

input:focus {
    caret-color: #8b2500;
}

/* Button hover ink spread effect */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #1a1a1a;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: -1;
}

button:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Custom scrollbar - minimal */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f5f1eb;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    opacity: 0.2;
    border-radius: 2px;
}

/* Selection color */
::selection {
    background: rgba(139, 37, 0, 0.15);
    color: #1a1a1a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ink-wash-1 {
        width: 300px;
        height: 300px;
    }

    .ink-wash-2 {
        width: 250px;
        height: 250px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
