/* ============================================
   かふんねこすたじお — Official Website
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

/* ===== Loader ===== */
body.is-loading {
    overflow: hidden;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Two curtain halves */
.loader-curtain {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #0a0a0a;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.loader-curtain--left {
    left: 0;
}

.loader-curtain--right {
    right: 0;
}

/* When done: slide curtains out */
.loader.done .loader-curtain--left {
    transform: translateX(-100%);
}

.loader.done .loader-curtain--right {
    transform: translateX(100%);
}

/* Center content */
.loader-center {
    position: relative;
    z-index: 2;
    text-align: center;
    transition: opacity 0.3s ease;
}

.loader.done .loader-center {
    opacity: 0;
}

.loader-logo {
    font-size: clamp(20px, 5vw, 32px);
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    margin: 0 0 28px;
    animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* Progress bar */
.loader-bar {
    width: clamp(180px, 40vw, 280px);
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a78bfa, #818cf8);
    border-radius: 3px;
    transition: width 0.15s ease;
}

.loader-text {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', 'Noto Sans JP', Arial, sans-serif;
    background-color: #0a0a0a;
    color: #f0f0f0;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== Utility ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(24px, 5vw, 36px);
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #818cf8);
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ===== Scroll Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* stagger cards */
.fade-in.card:nth-child(2) { transition-delay: 0.1s; }
.fade-in.card:nth-child(3) { transition-delay: 0.2s; }
.fade-in.card:nth-child(4) { transition-delay: 0.3s; }

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

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    padding-bottom: 18px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    letter-spacing: 1.5px;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    z-index: 101;
}

.logo:hover {
    text-shadow: 0 0 12px rgba(200, 180, 255, 0.4);
    color: #e0d6ff;
}

/* ===== Nav ===== */
.nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #818cf8);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav a:hover {
    color: #fff;
}

.nav a:hover::after {
    width: 100%;
}

/* ===== Hamburger ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.55) 60%,
        rgba(10, 10, 10, 1) 100%
    );
    z-index: 1;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-size: clamp(28px, 7vw, 56px);
    font-weight: 700;
    letter-spacing: 4px;
    margin: 0 0 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-sub {
    font-size: clamp(14px, 3vw, 22px);
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 36px;
}

.hero-cta {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: #a78bfa;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}

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

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: #fff;
    border-radius: 3px;
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    50%  { opacity: 0.4; transform: translateX(-50%) translateY(10px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== About ===== */
.about {
    padding: 100px 0 80px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    color: #bbb;
    font-size: 15px;
    line-height: 2;
    margin: 0 0 20px;
}

.about-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    flex: 1;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat:hover {
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: #888;
    letter-spacing: 1px;
}

/* ===== Works / Product ===== */
.product {
    padding: 80px 0;
}

.productitem {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 15px 5px 30px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.productitem::-webkit-scrollbar {
    height: 6px;
}

.productitem::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.productitem::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.card {
    background: #141414;
    border-radius: 14px;
    width: 320px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(167, 139, 250, 0.25);
}

.img-container {
    width: 100%;
    height: 190px;
    overflow: hidden;
}

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

.card:hover img {
    transform: scale(1.08);
}

.card-content {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 20px;
    padding: 3px 12px;
    margin-bottom: 14px;
    width: fit-content;
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}

.card p {
    margin: 0;
    font-size: 13px;
    color: #999;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Contact ===== */
.contact {
    padding: 100px 0;
    text-align: center;
}

.contact-text {
    color: #999;
    font-size: 15px;
    margin-bottom: 36px;
}

.contact-btn {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.contact-btn:hover {
    box-shadow: 0 8px 30px rgba(167, 139, 250, 0.35);
    transform: translateY(-3px);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px 0 36px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* ============================================
   Responsive
   ============================================ */

/* ----- Tablet (≤768px) ----- */
@media (max-width: 768px) {

    /* Hamburger */
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.96);
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .nav.open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }

    .nav a {
        font-size: 20px;
        letter-spacing: 3px;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .about-stats {
        justify-content: center;
    }

    /* Cards */
    .card {
        width: 280px;
    }

    .img-container {
        height: 160px;
    }
}

/* ----- Mobile (≤480px) ----- */
@media (max-width: 480px) {

    .hero-title {
        letter-spacing: 2px;
    }

    .hero-sub {
        letter-spacing: 3px;
    }

    .hero-cta {
        padding: 12px 32px;
        font-size: 13px;
    }

    .about {
        padding: 70px 0 60px;
    }

    .about-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat {
        padding: 20px 16px;
    }

    .product {
        padding: 60px 0;
    }

    .card {
        width: 260px;
    }

    .contact {
        padding: 70px 0;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}