/* ============================================
   Hatakeyama Charlene — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(45, 90, 61, 0.2);
    color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
    background: #93b896;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #487a50;
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Menu --- */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 60%;
}

/* --- Hero Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-label {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

.hero-scroll {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

/* --- Scroll Line Animation --- */
@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* --- Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Service Cards --- */
.group:hover .group-hover\:translate-x-1 {
    transition: transform 0.3s ease;
}

/* --- Form Focus States --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* --- Button Hover --- */
button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover::before {
    left: 100%;
}

/* --- Image Hover --- */
.group img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Smooth transitions for all interactive elements --- */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* --- Print Styles --- */
@media print {
    #site-header,
    .hero-scroll,
    button[type="submit"] {
        display: none;
    }
    
    body {
        color: #1a3625;
        background: white;
    }
    
    a {
        color: #2D5A3D;
    }
}

/* --- Reduced Motion --- */
@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;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}
