/* ================================
   Global Styles & Reset
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b5cf6;
    --secondary-color: #1e40af;
    --dark-bg: #0a0a0a;
    --dark-bg-alt: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --border-color: #333333;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ================================
   Custom Cursor
   ================================ */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: 0.1s;
    z-index: 999;
    mix-blend-mode: normal;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: 0.2s;
    z-index: 998;
}

a:hover ~ .cursor,
button:hover ~ .cursor {
    transform: translate(-50%, -50%) scale(1.5);
    background: var(--primary-color);
}

/* ================================
   Loading Screen
   ================================ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 1s ease, visibility 1s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
}

.loading-logo {
    width: 200px;
    height: auto;
    animation: pulse 2s infinite;
    margin-bottom: 2rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loading-progress {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: loading-bar 1.5s infinite;
}

@keyframes loading-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ================================
   Navigation
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    z-index: 1001;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 150px;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a2a 0%, #0a0a0a 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(30, 64, 175, 0.05) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 10px;
    background: var(--primary-color);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(15px); opacity: 0; }
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
}

/* ================================
   Sections
   ================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    background: var(--dark-bg-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-container:hover .about-img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    pointer-events: none;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--dark-bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.service-link:hover {
    gap: 1rem;
}

/* Message Section */
.message {
    background: var(--dark-bg-alt);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
}

.message-photo {
    position: relative;
}

.ceo-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.message-info {
    text-align: center;
}

.ceo-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ceo-title {
    color: var(--text-secondary);
}

.message-paragraph {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.message-signature {
    text-align: right;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.message-signature .ceo-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.message-signature .ceo-name {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: var(--dark-bg-alt);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.google-map {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

/* Footer */
.footer {
    background: #000000;
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 30px;
    width: auto;
    max-width: 120px;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: var(--dark-bg);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* ================================
   Responsive Design - Mobile First
   ================================ */

/* Extra Small Devices (〜320px) */
@media (max-width: 320px) {
    html { font-size: 14px; }

    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }

    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.9rem; }

    .nav-container { padding: 0 1rem; }
    .container { padding: 0 1rem; }

    .about-stats { flex-direction: column; gap: 1.5rem; }
    .stat-number { font-size: 2rem; }

    .service-card { padding: 1.5rem; }
    .service-icon { font-size: 2rem; }

    .about-title { font-size: 1.3rem !important; }

    .footer-links { grid-template-columns: 1fr; }
}

/* Small Devices (321px〜480px) */
@media (min-width: 321px) and (max-width: 480px) {
    html { font-size: 15px; }

    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
    .btn { padding: 0.9rem 2rem; }

    .section-title { font-size: 2rem; }

    .about-stats { flex-direction: column; gap: 2rem; }

    .services-grid { grid-template-columns: 1fr; }

    .gallery-grid { grid-template-columns: 1fr; }

    .about-title { font-size: 1.5rem !important; }

    .footer-links { grid-template-columns: 1fr; }
}

/* Medium Devices (481px〜767px) */
@media (min-width: 481px) and (max-width: 767px) {
    html { font-size: 15px; }

    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .section-title { font-size: 2.5rem; }

    .about-content { grid-template-columns: 1fr; }

    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .contact-content { grid-template-columns: 1fr; }

    .footer-links { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets (768px〜1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    html { font-size: 16px; }

    .hero-title { font-size: 3.5rem; }

    .about-content { gap: 3rem; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }

    .gallery-grid { grid-template-columns: repeat(3, 1fr); }

    .message-content { gap: 3rem; }

    .contact-content { gap: 3rem; }
}

/* Small Desktop (1025px〜1279px) */
@media (min-width: 1025px) and (max-width: 1279px) {
    .container { max-width: 1100px; }

    .hero-title { font-size: 4rem; }

    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Standard Desktop (1280px〜1440px) */
@media (min-width: 1280px) and (max-width: 1440px) {
    .container { max-width: 1200px; }

    .hero-title { font-size: 4.5rem; }
}

/* Wide Desktop (1441px〜1919px) */
@media (min-width: 1441px) and (max-width: 1919px) {
    html { font-size: 17px; }

    .container { max-width: 1400px; }

    .hero-title { font-size: 5rem; }
}

/* Ultra Wide (1920px〜) */
@media (min-width: 1920px) {
    html { font-size: 18px; }

    .container { max-width: 1600px; }

    .hero-title { font-size: 5.5rem; }
    .hero-subtitle { font-size: 1.8rem; }

    .section-title { font-size: 4rem; }

    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Hamburger Menu Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        transition: left 0.3s ease;
        padding-top: 5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .about-content,
    .message-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Hide cursor on touch devices */
@media (hover: none) {
    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    .footer,
    .back-to-top,
    .cursor,
    .cursor-follower,
    #loading-screen {
        display: none;
    }
}