@charset "UTF-8";

/* ==========================================================================
   Cool Header (Glassmorphism & Sticky)
   ========================================================================== */

:root {
    --hd-height: 80px;
    --hd-bg: rgba(255, 255, 255, 0.85);
    --hd-blur: 16px;
    --hd-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    --hd-color: #0f172a;
    --hd-primary: #3b82f6;
    --hd-z: 1000;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    /* Flexible height */
    min-height: 80px;
    padding: 10px 0;
    /* Add vertical padding */
    background: var(--hd-bg);
    backdrop-filter: blur(var(--hd-blur));
    -webkit-backdrop-filter: blur(var(--hd-blur));
    box-shadow: var(--hd-shadow);
    z-index: var(--hd-z);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--hd-color);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.site-brand {
    flex-shrink: 0;
}

.site-brand img {
    height: 120px;
    /* Increased for visibility */
    width: auto;
    object-fit: contain;
}

/* Desktop Navigation */
.site-nav {
    display: none;
    /* Mobile default */
    flex-grow: 1;
    /* Allow taking space */
    margin: 0 40px;
    /* Space from logo and CTA */
}

@media (min-width: 1024px) {
    .site-nav {
        display: block;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 8px 10px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-menu li {
        flex: 0 0 auto;
    }

    .nav-menu li a {
        display: inline-block;
        color: #475569;
        font-size: 0.75rem;
        font-weight: 700;
        text-decoration: none;
        padding: 6px 12px;
        background: rgba(241, 245, 249, 0.6);
        border: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 50px;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
        line-height: 1.2;
        letter-spacing: 0.02em;
    }

    .nav-menu li a:hover {
        background: var(--hd-primary);
        color: #fff;
        border-color: var(--hd-primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    }
}

/* Actions (CTA) */
.header-actions {
    display: none;
}

@media (min-width: 1024px) {
    .header-actions {
        display: block;
        flex-shrink: 0;
    }

    .btn-header {
        display: inline-block;
        white-space: nowrap;
        padding: 10px 24px;
        background: var(--hd-primary);
        color: #fff;
        border-radius: 50px;
        font-weight: 700;
        font-size: 0.9rem;
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .btn-header:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        color: #fff;
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--hd-color);
    position: relative;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--hd-color);
    left: 0;
    transition: all 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

@media (min-width: 1024px) {
    .mobile-toggle {
        display: none;
    }
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 80px 32px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    right: 0;
}

/* Close Button */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--hd-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--hd-primary);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hd-color);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav-list a:hover {
    color: var(--hd-primary);
    padding-left: 8px;
}

/* Hamburger → X animation */
.hamburger.open {
    background: transparent;
}

.hamburger.open::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.open::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Body scroll lock when menu open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Spacer to prevent content overlap */
.header-spacer {
    height: var(--hd-height);
}