/* style.css */
:root {
    --text-main: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #ffffff;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --primary-color: #3cb6fe;
    --font-sans: 'Yusei Magic', sans-serif;
    --font-en: 'Yusei Magic', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    letter-spacing: 0.05em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
    color: var(--primary-color);
}

/* 画像保護用クラス */
.protected-img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Layout */
.section-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 60px 0;
}

/* Hero */
.hero-slider {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translateX(42px);
    transition: opacity 0.75s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.hero-slide.is-leaving {
    opacity: 0;
    transform: translateX(0);
    z-index: 1;
}

.hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(60, 182, 254, 0.35);
    transition: transform 0.35s ease, background-color 0.35s ease;
}

.hero-dot.is-active {
    width: 11px;
    height: 11px;
    background: var(--primary-color);
    transform: scale(1.05);
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--gray-light);
}

.logo-text h1 {
    font-family: var(--font-en);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.global-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.global-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-light);
}

.global-nav a:hover {
    color: var(--primary-color);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-border);
}

.section-title {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
}

.view-all {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: bold;
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

#featured .works-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    justify-content: center;
}

.work-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, filter 0.35s ease;
    will-change: transform;
}

.work-image {
    position: relative;
    background-color: var(--gray-light);
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.work-image img {
    transition: transform 0.35s ease;
}

.read-label {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.work-image-natural {
    aspect-ratio: auto;
    height: auto;
}

.work-card:hover .work-image {
    opacity: 0.96;
    transform: translateY(-8px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.work-card:hover .work-image img {
    transform: scale(1.025);
}

.work-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.work-title {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.work-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.work-desc-compact {
    font-size: 0.86rem;
    letter-spacing: 0.01em;
}

.work-link {
    display: inline-block;
    margin-top: 16px;
    padding: 9px 18px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
}

.work-link:hover {
    color: #ffffff;
    opacity: 1;
    background: #2a9be0;
}

/* About */
.about-content {
    display: flex;
    gap: 40px;
}

.about-image {
    width: 200px;
    height: 200px;
    background-color: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    flex-shrink: 0;
    overflow: hidden;
}

.ip-intro-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: stretch;
    gap: 22px;
    max-width: 720px;
    margin-top: 36px;
    margin-left: auto;
    margin-right: auto;
}

.ip-title-group {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 8px;
}

.ip-title {
    font-size: 1.65rem;
    line-height: 1.25;
}

.ip-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: normal;
}

.ip-intro p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.7;
}

.ip-banner {
    display: block;
    width: 100%;
    border: 2px solid rgba(60, 182, 254, 0.3);
    border-radius: 8px;
    background: var(--gray-light);
    box-shadow: 0 12px 30px rgba(60, 182, 254, 0.12);
    overflow: hidden;
}

.ip-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    color: var(--bg-color);
    background-color: #2a9be0;
    /* 少し濃い色にして「押せる」感を出す */
    transform: translateY(-2px);
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        letter-spacing: 0.03em;
    }

    .section-inner {
        padding: 0 20px;
    }

    .section {
        padding: 44px 0;
    }

    .hero {
        margin-bottom: 36px !important;
    }

    .hero-slider {
        aspect-ratio: 4 / 3;
        border-radius: 6px;
    }

    .hero-slide {
        object-position: center;
    }

    .section-header {
        align-items: flex-start;
        margin-bottom: 28px;
        padding-bottom: 12px;
    }

    .title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .section-title {
        font-size: 1.65rem;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 0.82rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    #featured .works-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
        margin: 0 auto;
    }

    .work-image {
        margin-bottom: 14px;
    }

    .work-title {
        font-size: 1.16rem;
        line-height: 1.35;
    }

    .work-desc {
        font-size: 0.86rem;
    }

    .read-label {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .about-image {
        width: 160px;
        height: 160px;
    }

    .ip-banner {
        width: min(360px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .ip-intro-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ip-intro {
        text-align: center;
    }

    .ip-title-group {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon img {
        width: 42px;
        height: 42px;
    }

    .logo-text h1 {
        font-size: 1.18rem;
    }

    .logo-text p {
        font-size: 0.66rem;
    }

    .global-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .global-nav a {
        font-size: 0.82rem;
    }

    #top {
        height: 128px !important;
    }
}

.title-group {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: normal;
}

/* Horizontal Scroll */
.horizontal-scroll-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.horizontal-scroll {
    display: flex;
    overflow-x: hidden;
    /* 手動スクロールを禁止 */
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 40px calc(50vw - 150px);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll .work-card {
    flex: 0 0 300px;
    scroll-snap-align: center;
    transition: opacity 0.4s ease, transform 0.45s ease, filter 0.45s ease;
    opacity: 0;
    transform: scale(0.78);
}

.horizontal-scroll .work-card.is-center {
    opacity: 1;
    transform: scale(1.05);
}

.horizontal-scroll .work-card.is-near-center {
    opacity: 0.55;
    transform: scale(0.9);
}

.horizontal-scroll .work-card.is-edge-fade {
    opacity: 0.18;
    transform: scale(0.82);
}

.horizontal-scroll .work-card:hover .work-image,
.horizontal-scroll .work-card:hover .work-image img {
    transform: none;
}

.horizontal-scroll .work-card:hover .work-image {
    opacity: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.horizontal-scroll .work-card.is-center:hover {
    transform: translateY(-4px) scale(1.055);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.horizontal-scroll .work-card.is-center:hover .work-image {
    opacity: 0.98;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.horizontal-scroll .work-card.is-center:hover .work-image img {
    transform: scale(1.01);
}

.horizontal-scroll .work-image {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: 4px solid #fff;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0.95;
}

.scroll-btn:hover {
    background-color: #2a9be0;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* 中央の作品の1つ隣の作品の外側に配置する（スマホなどの場合は画面端） */
.scroll-btn.prev-btn {
    left: max(10px, calc(50vw - 560px));
}

.scroll-btn.next-btn {
    right: max(10px, calc(50vw - 560px));
}

.zoomable-img {
    cursor: default;
}

.work-card.is-center .zoomable-img {
    cursor: zoom-in;
}

.lightbox-open {
    overflow: hidden;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 112px;
    background: rgba(0, 0, 0, 0.82);
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: 96vw;
    max-height: calc(100vh - 148px);
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    cursor: default;
    user-select: none;
}

.image-lightbox-loader {
    min-width: 9em;
    padding: 14px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.image-lightbox-loader::before {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-right: 0.55em;
    border: 2px solid rgba(60, 182, 254, 0.24);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    vertical-align: -0.12em;
    animation: lightboxSpin 0.8s linear infinite;
}

.image-lightbox-loader[hidden] {
    display: none;
}

.image-lightbox img.slide-left {
    animation: lightboxSlideLeft 0.28s ease;
}

.image-lightbox img.slide-right {
    animation: lightboxSlideRight 0.28s ease;
}

.image-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

@keyframes lightboxSlideLeft {
    from {
        opacity: 0;
        transform: translateX(32px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lightboxSlideRight {
    from {
        opacity: 0;
        transform: translateX(-32px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lightboxSpin {
    to {
        transform: rotate(360deg);
    }
}

.image-lightbox-close:hover {
    background: #2a9be0;
}

.image-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.image-lightbox-nav-label {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 5em;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.image-lightbox-nav:hover {
    background: #2a9be0;
}

.image-lightbox-nav:disabled {
    cursor: default;
    opacity: 0.35;
}

.image-lightbox-nav:disabled:hover {
    background: var(--primary-color);
}

.image-lightbox-controls {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1001;
    width: min(560px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.image-lightbox-page {
    min-width: 5.5em;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.image-lightbox-progress {
    width: 100%;
    height: 22px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
}

.image-lightbox-key-hint {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    line-height: 1.3;
    text-align: center;
}

.image-lightbox-progress.is-reversed {
    direction: rtl;
}

.image-lightbox-progress:disabled {
    cursor: default;
    opacity: 0.5;
}

.image-lightbox-progress::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--primary-color) 0 var(--progress, 0%), rgba(255, 255, 255, 0.7) var(--progress, 0%) 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.image-lightbox-progress.is-reversed::-webkit-slider-runnable-track {
    background: linear-gradient(to left, var(--primary-color) 0 var(--progress, 0%), rgba(255, 255, 255, 0.7) var(--progress, 0%) 100%);
}

.image-lightbox-progress::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.image-lightbox-progress.is-reversed::-moz-range-track {
    background: linear-gradient(to left, var(--primary-color) 0 var(--progress, 0%), rgba(255, 255, 255, 0.7) var(--progress, 0%) 100%);
}

.image-lightbox-progress::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--primary-color);
}

.image-lightbox-progress.is-reversed::-moz-range-progress {
    background: transparent;
}

.image-lightbox-progress::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -7px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
}

.image-lightbox-progress::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
}

.image-lightbox-prev {
    left: 18px;
}

.image-lightbox-next {
    right: 18px;
}

@media (max-width: 640px) {
    .horizontal-scroll {
        gap: 18px;
        padding: 32px calc(50vw - 120px);
    }

    .horizontal-scroll .work-card {
        flex-basis: 240px;
    }

    .horizontal-scroll .work-card.is-center {
        transform: scale(1.02);
    }

    .horizontal-scroll .work-card.is-near-center {
        opacity: 0.45;
        transform: scale(0.86);
    }

    .horizontal-scroll .work-card.is-edge-fade {
        opacity: 0.08;
        transform: scale(0.78);
    }

    .scroll-btn {
        width: 44px;
        height: 44px;
        border-width: 3px;
        font-size: 1.3rem;
    }

    .scroll-btn.prev-btn {
        left: 10px;
    }

    .scroll-btn.next-btn {
        right: 10px;
    }

    .image-lightbox {
        padding: 18px 18px 104px;
    }

    .image-lightbox img {
        max-width: 92vw;
        max-height: calc(100vh - 132px);
    }

    .image-lightbox-nav {
        width: 46px;
        height: 46px;
        font-size: 1.4rem;
    }

    .image-lightbox-nav-label {
        font-size: 0.75rem;
    }

    .image-lightbox-controls {
        bottom: 16px;
        width: min(420px, calc(100vw - 36px));
    }

    .image-lightbox-page {
        font-size: 0.85rem;
    }

    .image-lightbox-key-hint {
        display: none;
    }
}

@media (max-width: 768px) {
    .title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .section-subtitle {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .section-inner {
        padding: 0 16px;
    }

    .section {
        padding: 36px 0;
    }

    .hero-slider {
        aspect-ratio: 1 / 1;
    }

    .hero-dots {
        gap: 12px;
        margin-top: 14px;
    }

    .header-inner {
        padding: 10px 14px;
    }

    .global-nav ul {
        gap: 6px 12px;
    }

    .global-nav a {
        font-size: 0.78rem;
    }

    #top {
        height: 122px !important;
    }

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

    .work-title {
        font-size: 1.08rem;
    }

    .work-desc,
    .work-desc-compact {
        font-size: 0.82rem;
        line-height: 1.65;
    }

    .work-link,
    .btn {
        width: 100%;
        text-align: center;
    }

    .horizontal-scroll {
        gap: 16px;
        padding: 28px calc(50vw - 110px);
    }

    .horizontal-scroll .work-card {
        flex-basis: 220px;
    }

    .horizontal-scroll .work-title {
        font-size: 1rem;
    }

    .horizontal-scroll .work-desc,
    .horizontal-scroll .work-desc-compact {
        font-size: 0.78rem;
    }

    .about-image {
        width: 140px;
        height: 140px;
    }

    .ip-title {
        font-size: 1.32rem;
    }
}
