/* ==========================================
   RESET & BASE STYLES
   ========================================== */

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

:root {
    --color-white: #FFFFFF;
    --color-light-gray: #F9F9F9;
    --color-dark-charcoal: #333333;
    --color-deep-indigo: #2B3A42;
    --font-japanese: 'Noto Sans JP', sans-serif;
    --font-english: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-japanese);
    color: var(--color-dark-charcoal);
    background-color: var(--color-white);
    line-height: 1.8;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide placeholder text overlay */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100px;
    background-color: #F9F9F9;
    z-index: 2;
}

#fogCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: clamp(300px, 40vw, 600px);
    height: auto;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.3));
    animation: fadeInScale 1.5s ease-out;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--color-white);
    opacity: 0.6;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(15px);
        opacity: 0.2;
    }
}

/* ==========================================
   PHILOSOPHY SECTION
   ========================================== */

.philosophy-section {
    padding: 120px 20px;
    background-color: var(--color-light-gray);
}

.section-title {
    font-family: var(--font-english);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-deep-indigo);
    letter-spacing: 0.05em;
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
}

.philosophy-heading {
    font-family: var(--font-japanese);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    margin-bottom: 30px;
    text-align: center;
    color: var(--color-dark-charcoal);
}

/* Hide mobile line break on desktop */
.mobile-br {
    display: none;
}

.philosophy-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 2;
    text-align: justify;
    color: var(--color-dark-charcoal);
}

/* Blur effect (will be animated via GSAP) */
[data-blur] {
    filter: blur(5px);
    opacity: 0.5;
    transition: filter 1s ease, opacity 1s ease;
}

[data-blur].in-view {
    filter: blur(0);
    opacity: 1;
}

/* ==========================================
   SERVICES SECTION
   ========================================== */

.services-section {
    padding: 120px 20px;
    background-color: var(--color-white);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 40px;
    background-color: var(--color-light-gray);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Initial tilted state */
.service-item[data-tilt] {
    transform: rotate(-1deg) translateX(-5px);
}

.service-item[data-tilt]:nth-child(2) {
    transform: rotate(1.5deg) translateX(5px);
}

.service-item[data-tilt]:nth-child(3) {
    transform: rotate(-0.8deg) translateX(-3px);
}

/* Hover state - snap to alignment */
.service-item:hover {
    transform: rotate(0deg) translateX(0) translateY(-5px) !important;
    background-color: var(--color-deep-indigo);
    color: var(--color-white);
    box-shadow: 0 10px 40px rgba(43, 58, 66, 0.2);
}

.service-number {
    font-family: var(--font-english);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-deep-indigo);
    line-height: 1;
    transition: color 0.4s ease;
}

.service-item:hover .service-number {
    color: var(--color-white);
}

.service-content {
    flex: 1;
}

.service-title {
    font-family: var(--font-english);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-dark-charcoal);
    transition: color 0.4s ease;
}

.service-item:hover .service-title {
    color: var(--color-white);
}

.service-description {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--color-dark-charcoal);
    transition: color 0.4s ease;
}

.service-item:hover .service-description {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact-section {
    padding: 120px 20px;
    background-color: var(--color-white);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-family: var(--font-english);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    color: var(--color-dark-charcoal);
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    font-family: var(--font-japanese);
    font-size: 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    background-color: var(--color-white);
    color: var(--color-dark-charcoal);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-deep-indigo);
    box-shadow: 0 0 0 3px rgba(43, 58, 66, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    width: 100%;
    padding: 18px 40px;
    font-family: var(--font-english);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-white);
    background-color: var(--color-deep-indigo);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #1f2c33;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(43, 58, 66, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: 60px 20px 40px;
    background-color: var(--color-deep-indigo);
    color: var(--color-white);
    text-align: center;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    display: inline-block;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .philosophy-section,
    .services-section,
    .contact-section {
        padding: 80px 20px;
    }
    
    .philosophy-heading {
        line-height: 1.6;
    }
    
    /* Show mobile line break on tablet/mobile */
    .mobile-br {
        display: inline;
    }
    
    .service-item {
        flex-direction: column;
        gap: 20px;
        padding: 30px;
    }
    
    .service-number {
        font-size: 2.5rem;
    }
    
    .service-description {
        line-height: 1.8;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .footer-logo img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .philosophy-heading {
        font-size: 1.4rem;
        line-height: 1.8;
    }
    
    .service-item {
        padding: 25px;
    }
    
    .service-description {
        font-size: 0.9rem;
        line-height: 1.8;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .footer-logo img {
        height: 40px;
    }
}