/* ========================================
   Common Styles - SPstyle Corporate Site
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-bg: #1a1a1a;
    --color-bg-dark: #000;
    --color-bg-card: #252525;
    --color-bg-card-alt: #2a2a2a;
    --color-text: #c0c4cc;
    --color-text-muted: #808690;
    --color-text-light: #ccc;
    --color-white: #fff;
    --color-accent: #a8b4c4;
    --color-accent-light: #c0c8d4;
    --color-accent-dark: #8090a4;
    --color-cyan: #00BFFF;
    --color-border: #333;
    --color-border-light: #444;

    --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-md: 18px;
    --font-size-lg: 22px;
    --font-size-xl: 28px;
    --font-size-2xl: 36px;
    --font-size-3xl: 48px;

    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;
    --spacing-xl: 80px;
    --spacing-2xl: 120px;

    --header-height: 80px;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    --shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

ul, ol {
    list-style: none;
}

/* Selection */
::selection {
    background-color: var(--color-accent);
    color: var(--color-bg-dark);
}

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

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(168, 180, 196, 0.15);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo:hover {
    opacity: 1;
}

.logo-icon {
    display: none;
}

.logo-img {
    height: 56px;
    width: auto;
    transition: all var(--transition-fast);
}

.logo:hover .logo-img {
    filter: brightness(1.2);
}

.footer-logo-img {
    height: 50px;
    width: auto;
    margin-bottom: 20px;
}

.logo-text {
    display: none;
}

.icon-img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Navigation */
.nav-list {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-list a {
    color: var(--color-white);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.nav-list a:hover {
    opacity: 1;
    color: var(--color-accent-light);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-white);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Section Common */
.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title-en {
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--color-accent);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-title-ja {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

/* Section Title Decoration */
.section-title-ja::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    margin: 20px auto 0;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    position: relative;
    background-image: url('../images/background.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-white);
    text-align: center;
    padding: 100px 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 26, 26, 0.7) 100%);
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.cta-text {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
    line-height: 2;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 50px;
    min-width: 280px;
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-accent);
    font-size: var(--font-size-md);
    font-weight: 600;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    color: var(--color-bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(168, 180, 196, 0.3);
    opacity: 1;
}

.cta-button.phone {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    border-color: var(--color-accent);
    color: var(--color-bg-dark);
}

.cta-button.phone::before {
    background: linear-gradient(90deg, var(--color-accent-light), var(--color-white));
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding: 80px 0 30px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.footer-description {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact a {
    font-size: var(--font-size-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: 1px;
    color: var(--color-white);
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    position: relative;
    padding-left: 15px;
    transition: all var(--transition-fast);
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background-color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
    opacity: 1;
    padding-left: 20px;
}

.footer-links a:hover::before {
    background-color: var(--color-accent);
    width: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    letter-spacing: 1px;
}

/* ========================================
   Animations
   ======================================== */

/* Fade In (default - from bottom) */
.fade-in {
    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);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left */
.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    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);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right */
.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    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);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Scale */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    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);
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-bg-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 900;
    box-shadow: 0 5px 20px rgba(168, 180, 196, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(168, 180, 196, 0.5);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Floating CTA (Mobile)
   ======================================== */
.floating-cta {
    display: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.sp-only {
    display: none;
}

.pc-only {
    display: inline;
}

/* ========================================
   Page Header (Subpages)
   ======================================== */
.page-header {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/background.png') center center / cover no-repeat;
    background-attachment: fixed;
    margin-top: var(--header-height);
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(26, 26, 26, 0.6) 100%);
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--color-bg), transparent);
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.png') center center / cover no-repeat;
    animation: pageHeaderZoom 20s ease-in-out infinite alternate;
}

@keyframes pageHeaderZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
}

.page-header-en {
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 5px;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.page-header-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    letter-spacing: 5px;
}

/* Breadcrumb */
.breadcrumb {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.breadcrumb-separator {
    opacity: 0.5;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .sp-only {
        display: inline;
    }

    .pc-only {
        display: none;
    }

    .header {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .header-inner {
        padding: 0 20px;
        height: var(--header-height);
    }

    .logo-text {
        font-size: 24px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.98);
        padding: 100px 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
        border-left: 1px solid rgba(168, 180, 196, 0.15);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 25px;
        align-items: flex-start;
    }

    .nav-list a {
        font-size: var(--font-size-base);
        padding: 5px 0;
    }

    .menu-toggle {
        display: flex;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-title {
        margin-bottom: 50px;
    }

    .section-title-ja {
        font-size: var(--font-size-xl);
    }

    .cta-section {
        padding: 70px 0;
        background-attachment: scroll;
    }

    .cta-title {
        font-size: 24px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 18px 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .page-header {
        height: 300px;
        margin-top: var(--header-height);
        background-attachment: scroll;
    }

    .page-header-title {
        font-size: 32px;
        letter-spacing: 3px;
    }

    .scroll-top {
        bottom: 90px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    /* Floating CTA for mobile */
    .floating-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 800;
        background-color: var(--color-bg-dark);
        border-top: 1px solid rgba(168, 180, 196, 0.2);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    }

    .floating-cta a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px 10px;
        font-size: var(--font-size-sm);
        font-weight: 600;
        color: var(--color-white);
        text-align: center;
    }

    .floating-cta a:hover {
        opacity: 1;
    }

    .floating-cta .floating-phone {
        background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
        color: var(--color-bg-dark);
    }

    .floating-cta .floating-line {
        background-color: #06C755;
        color: var(--color-white);
    }

    .floating-cta .icon-img {
        width: 18px;
        height: 18px;
    }

    /* Add bottom padding to body for floating CTA */
    body {
        padding-bottom: 56px;
    }
}

/* ========================================
   Page Loader - Pixel Assemble
   ======================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.page-loader .loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.page-loader .loader-logo {
    width: 200px;
    animation: pixelAssemble 2s ease-in-out infinite;
}

.page-loader .loader-text {
    font-size: var(--font-size-xs);
    letter-spacing: 5px;
    color: var(--color-accent);
    text-transform: uppercase;
}

@keyframes pixelAssemble {
    0% {
        filter: blur(10px);
        opacity: 0;
        transform: scale(1.2);
    }
    50%, 80% {
        filter: blur(0);
        opacity: 1;
        transform: scale(1);
    }
    100% {
        filter: blur(10px);
        opacity: 0;
        transform: scale(0.8);
    }
}
