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

body {
    font-family: "Helvetica Neue", "Noto Sans JP", sans-serif;
    color: #222;
    line-height: 1.7;
    background: #fff;
}

/* -----------------------------------
   HEADER
----------------------------------- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 200;
}

.logo img {
    height: 42px;
}

.nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #222;
    font-size: 14px;
    position: relative;
    padding-bottom: 4px;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #222;
    transition: 0.3s;
}

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

/* FOLLOW US */
.follow-us {
    margin-left: 20px;
    font-size: 12px;
    opacity: 0.8;
}

.insta-icon img {
    width: 20px;
    margin-left: 6px;
}

/* -----------------------------------
   TOPページ専用 (スクロールなし)
----------------------------------- */
body.top {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
}

body.top .hero {
    flex: 1;
    height: auto;
    margin-top: 0;
    min-height: 0;
}

body.top .footer {
    margin-top: 0;
    padding: 8px 40px;
    flex-shrink: 0;
}

/* -----------------------------------
   HERO
----------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    margin-top: 80px;
}

/* 背景動画 */
.hero-video {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    overflow: hidden;
    background-color: #fff;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translate(-50%, -50%);
    opacity: 0.55;
}

/* GIF中央 */
.hero-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.hero-gif img {
    width: 320px;
    border-radius: 30px;
}

/* キャッチコピー */
.catchcopy {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    -webkit-text-stroke: 7px #fff;
    paint-order: stroke fill;
    text-shadow:
        -4px -4px 0 #fff,
        4px -4px 0 #fff,
        -4px 4px 0 #fff,
        4px 4px 0 #fff,
        0 -4px 0 #fff,
        0 4px 0 #fff,
        -4px 0 0 #fff,
        4px 0 0 #fff,
        0 0 12px rgba(255, 255, 255, 1),
        0 0 24px rgba(255, 255, 255, 1),
        0 0 36px rgba(255, 255, 255, 1),
        0 0 50px rgba(255, 255, 255, 0.95),
        0 0 70px rgba(255, 255, 255, 0.9);
    z-index: 10;
    white-space: nowrap;
}

/* タイピング */
#typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    width: 0;
    border-right: .15em solid rgba(0, 0, 0, 0.7);
    animation: typing 3s steps(30, end) forwards, blink .7s infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* -----------------------------------
   SECTION 共通
----------------------------------- */
.section {
    padding: 120px 12%;
    text-align: center;
}

.section-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-desc {
    font-size: 15px;
    color: #444;
    margin-bottom: 30px;
}

/* -----------------------------------
   WORKS
----------------------------------- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.work-card {
    text-align: left;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.work-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.work-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

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

.work-card:hover .work-title {
    opacity: 0.7;
}

.work-title {
    font-size: 16px;
    font-weight: bold;
    margin-top: 4px;
    line-height: 1.4;
}

.work-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
}

/* -----------------------------------
   ABOUT ロゴ
----------------------------------- */
.about-logo {
    width: 100%;
    text-align: center;
    margin-top: 140px;
}

.about-logo img {
    width: 300px;
}

/* -----------------------------------
   COMPANY TABLE
----------------------------------- */
.company-table td {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.business-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 4px;
}

.business-list span {
    white-space: nowrap;
}

/* -----------------------------------
   MAP
----------------------------------- */
.map-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 50px 0;
}

.map-box {
    width: 90%;
    max-width: 800px;
    border: 3px solid #000;
    border-radius: 10px;
    overflow: hidden;
}

.access-title {
    font-size: 34px;
    font-weight: 700;
    margin-top: 80px;
}

/* -----------------------------------
   CONTACT セクション（完全中央揃え版）
----------------------------------- */

.contact-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 40px;
}

.contact-half {
    width: 100%;
    max-width: 360px;
}

/* aタグの下線を完全に消す */
.contact-flex a {
    text-decoration: none !important;
}

/* BOX 全体を中央揃え・縦レイアウト */
.tel-btn-inner,
.mail-btn-inner {
    height: 120px;
    padding: 20px;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    /* 横中央 */
    align-items: center;
    /* 縦中央 */
    flex-direction: column;
    /* 上下配置 */
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.tel-btn-inner:hover,
.mail-btn-inner:hover {
    opacity: 0.85;
}

.tel-btn-inner {
    background: #1ba236;
}

.mail-btn-inner {
    background: #0078ff;
}

/* テキスト中央揃え */
.tel-text,
.mail-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* 白帯（電話番号・メール） */
.tel-box,
.mail-box {
    background: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
    margin-top: 8px;
    text-decoration: none !important;
}

.tel-box {
    color: #1ba236;
    border: 2px solid #1ba236;
}

.mail-box {
    color: #0078ff;
    border: 2px solid #0078ff;
}

/* -----------------------------------
   フェードイン統一
----------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease-out forwards;
}

.fade-delay-0 {
    animation-delay: 0s;
}

.fade-delay-1 {
    animation-delay: 0.2s;
}

.fade-delay-2 {
    animation-delay: 0.4s;
}

.fade-delay-3 {
    animation-delay: 0.6s;
}

.fade-delay-4 {
    animation-delay: 0.8s;
}

.fade-delay-5 {
    animation-delay: 1.0s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* WORKS 用の遅延 */
.fade-w-delay-1 {
    animation-delay: 0.2s;
}

.fade-w-delay-2 {
    animation-delay: 0.4s;
}

.fade-w-delay-3 {
    animation-delay: 0.6s;
}

.fade-w-delay-4 {
    animation-delay: 0.8s;
}

.fade-w-delay-5 {
    animation-delay: 1.0s;
}

.fade-w-delay-6 {
    animation-delay: 1.2s;
}

.fade-w-delay-7 {
    animation-delay: 1.4s;
}

/* -----------------------------------
   FOOTER
----------------------------------- */
.footer {
    padding: 40px;
    text-align: center;
    background: #fff;
    font-size: 12px;
    margin-top: 80px;
}

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

    .section {
        padding: 80px 6%;
    }

    .catchcopy {
        font-size: 32px;
        top: 70%;
    }

    .contact-flex {
        flex-direction: column;
        gap: 25px;
    }

    .contact-half {
        max-width: 100%;
    }

    .hero-gif img {
        width: 250px;
    }
}

.access-title {
    width: 100%;
    text-align: center;
    margin: 80px auto 30px;
    font-size: 34px;
}

@media (max-width: 768px) {

    /* ヘッダー改善：縦に並べる */
    .header {
        padding: 12px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .nav a {
        margin-left: 0;
        font-size: 13px;
    }

    .follow-us {
        margin-left: 0;
        font-size: 8px;
        order: 999;
    }

    .insta-icon img {
        margin-left: 0;
        width: 18px;
    }

    /* HERO 高さ問題修正：vh → 動的高さに変更 */
    .hero {
        height: auto;
        padding-top: 60px;
        padding-bottom: 80px;
    }

    /* 背景動画を画面いっぱいに */
    .hero-video {
        position: absolute;
        inset: 0;
        border-radius: 0;
        /* スマホは角丸なしの方が綺麗 */
    }

    /* ロゴサイズ調整 */
    .hero-gif img {
        width: 200px;
        border-radius: 20px;
    }

    /* キャッチコピー調整 */
    .catchcopy {
        font-size: 26px;
        top: 78%;
        transform: translate(-50%, -50%);
        white-space: wrap;
        text-align: center;
    }

    /* フッター余白調整 */
    .footer {
        margin-top: 40px;
        padding: 20px;
    }
}

@media (max-width: 768px) {

    /* HEROの高さを調整して画像をデカく見せる */
    .hero {
        height: auto;
        min-height: 100vh;
        /* 背景がしっかり表示される */
        padding-top: 70px;
        padding-bottom: 120px;
        position: relative;
    }

    /* 背景動画をスマホで全体表示 */
    .hero-video {
        border-radius: 0;
        height: 100%;
    }

    .hero-video-bg {
        object-fit: contain;
        object-position: center;
        height: 100%;
    }

    /* ロゴ（GIF）をスマホで大きく表示 */
    .hero-gif img {
        width: 300px;
        /* 今までより+60pxアップ */
        max-width: 110%;
        border-radius: 20px;
    }

    /* ロゴの位置を少し上に */
    .hero-gif {
        top: 40%;
        /* 50% → 40% に変更 */
    }

    /* キャッチコピー（重ならないように下へ） */
    .catchcopy {
        top: 50%;
        /* ロゴより下に配置 */
        font-size: 24px;
        width: 90%;
        white-space: normal;
        text-align: center;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {

    /* WORKS / ABOUT / CONTACT の上余白を広げる */
    .section {
        padding-top: 150px !important;
        /* ← 80 → 150 に増やす */
    }

    /* ABOUT ロゴの位置とサイズを調整 */
    .about-logo {
        margin-top: 180px !important;
    }

    .about-logo img {
        width: 160px !important;
    }

    /* 事業内容：改行させない */
    .business-list {
        column-gap: 10px !important;
        font-size: 12px !important;
    }

    .business-list span {
        white-space: nowrap !important;
    }

    .company-table {
        font-size: 14px !important;
    }

    /* WORKS 専用、さらに少し余白を追加しておくと安全 */
    .works.section {
        padding-top: 160px !important;
    }
}

/* -----------------------------------
   GALLERY DETAIL
----------------------------------- */
.gallery-script-title {
    font-family: "Great Vibes", "Apple Chancery", "Snell Roundhand", cursive;
    font-size: 96px;
    font-weight: 400;
    text-align: center;
    color: #222;
    margin-bottom: 30px;
    line-height: 1.1;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .gallery-script-title {
        font-size: 64px;
    }
}

.gallery-detail-inner {
    max-width: 900px;
    margin: 0 auto;
}

.gallery-date {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 30px;
}

.gallery-main-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    margin-bottom: 50px;
}

.gallery-main-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-main-image:hover img {
    transform: scale(1.04);
}

.gallery-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-image-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    background: #f5f5f5;
}

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

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 28px;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@media (max-width: 600px) {
    .lightbox-nav {
        font-size: 22px;
        padding: 10px 14px;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
}

.related-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.1em;
    color: #444;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.related-image {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.related-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

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

.related-card-title {
    font-size: 14px;
    font-weight: bold;
}

.gallery-back {
    text-align: center;
    margin-top: 60px;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    color: #444;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.back-link:hover {
    background-color: #444;
    color: #fff;
    border-color: #444;
}

/* -----------------------------------
   LIGHTBOX
----------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10000;
    padding: 40px 20px;
}

.lightbox.hidden {
    display: none !important;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 20px;
    font-size: 16px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    z-index: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

