/* =========================================================================
 * ME Theme - 共通カスタムスタイル
 * 静的サイトの各ページ <style> を統合。Tailwind ユーティリティは styles.css。
 * 背景色（ダーク/ライト）は <body class="theme-dark"> で切替。
 * ========================================================================= */

/* ---- Base ---- */
body {
    font-family: "Noto Sans JP", sans-serif;
    color: #000;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
body.theme-dark { color: #1f2937; background-color: #0a0a0a; }

h1 { font-size: 40px; line-height: 1.3; font-weight: 900; }
h2 { font-size: 32px; line-height: 1.4; font-weight: 900; }
h3 { font-size: 24px; line-height: 1.5; font-weight: 700; }
p  { font-size: 16px; line-height: 1.8; }

@media (min-width: 768px) {
    h1 { font-size: 80px; }
    h2 { font-size: 50px; }
    h3 { font-size: 38px; }
    p  { font-size: 17px; }
}

/* ---- フォント・装飾 ---- */
.font-en { font-family: 'Syncopate', sans-serif; }
.vertical-text { writing-mode: vertical-rl; }

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.hover-underline:hover::after { width: 100%; }

.about-static-bg {
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.18), transparent 32%),
        radial-gradient(circle at 88% 35%, rgba(170,170,170,.24), transparent 34%),
        radial-gradient(circle at 48% 100%, rgba(255,255,255,.12), transparent 38%);
}

/* ---- 古物バナー 横スライド ---- */
@keyframes slideX {
    0%, 15% { transform: translateX(0); }
    25%, 40% { transform: translateX(-20%); }
    50%, 65% { transform: translateX(-40%); }
    75%, 90% { transform: translateX(-60%); }
    100% { transform: translateX(-80%); }
}
.animate-slide-x { animation: slideX 25s infinite cubic-bezier(0.77, 0, 0.175, 1); }

/* ---- 横スクロール用 スクロールバー非表示 ---- */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ---- スクロール表示アニメーション ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.is-visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }

/* ---- 背景動画 ---- */
.bg-video { opacity: 0; transition: opacity 1s ease; }
.bg-video.is-playing { opacity: 1; }

/* ---- 料金表 ---- */
.price-row:hover { background-color: rgba(255,255,255,0.03); }

/* ---- ローダー（TOPページのみ） ---- */
body.is-loading { overflow: hidden; }
.loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .8s ease, visibility .8s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.loader-logo {
    height: 96px;
    width: auto;
    opacity: 0;
    transform: scale(.92);
    transition: opacity 1s ease, transform 1s ease;
    margin-bottom: 18px;
}
.loader-logo.shown { opacity: 1; transform: scale(1); }
.loader-text {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 10px;
    letter-spacing: .28em;
    min-height: 1.5em;
    white-space: nowrap;
}
.loader-cursor {
    display: inline-block;
    width: 2px;
    margin-left: 4px;
    background: #fff;
    animation: loader-blink 1s steps(1) infinite;
}
@keyframes loader-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---- BUSINESS 横スクロール（GSAP） ---- */
#service-list { flex-wrap: nowrap !important; width: max-content !important; transition: none !important; }
#business { transition: none !important; }
.pin-spacer { flex-shrink: 0 !important; margin: 0 !important; }

/* =========================================================================
 *  モバイル最適化（〜640px）
 * ========================================================================= */
@media (max-width: 640px) {
    header { padding: 10px 16px !important; }
    header img { height: 52px !important; }
    #mobile-menu nav { gap: 28px !important; }
    #mobile-menu a { font-size: 16px !important; }
    #mobile-menu a:last-child { font-size: 13px !important; padding: 12px 32px !important; }

    section[class*="py-40"] { padding-top: 72px !important; padding-bottom: 72px !important; }
    section[class*="py-20"] { padding-top: 56px !important; padding-bottom: 56px !important; }
    section[class*="py-24"] { padding-top: 56px !important; padding-bottom: 56px !important; }
    section[class*="pt-40"] { padding-top: 112px !important; }
    section[class*="pb-20"] { padding-bottom: 48px !important; }
    section[class*="min-h-screen"] { min-height: 760px !important; }
    section[class*="min-h-screen"] .absolute.bottom-10 { display: none !important; }
    section[class*="min-h-[80vh]"] { min-height: 640px !important; }
    section[class*="min-h-[80vh]"] .absolute.bottom-10 { display: none !important; }
    #contact { min-height: 520px !important; }

    h1, h1[class] { font-size: 34px !important; line-height: 1.28 !important; margin-bottom: 32px !important; }
    h1 span[class*="-ml"] { margin-left: 0 !important; }
    h2, h2[class] { font-size: 30px !important; line-height: 1.25 !important; }
    h2[class*="font-en"] { font-size: 32px !important; line-height: 1.05 !important; letter-spacing: 0.02em !important; }
    h3, h3[class] { font-size: 23px !important; line-height: 1.45 !important; margin-bottom: 20px !important; }
    p, p[class] { font-size: 15px !important; line-height: 1.78 !important; }

    div[class*="mb-32"] { margin-bottom: 64px !important; }
    div[class*="mb-24"] { margin-bottom: 48px !important; }
    div[class*="mb-20"] { margin-bottom: 44px !important; }
    div[class*="mb-16"] { margin-bottom: 40px !important; }
    div[class*="mb-12"] { margin-bottom: 32px !important; }
    div[class*="mb-10"] { margin-bottom: 28px !important; }
    div[class*="mb-8"]  { margin-bottom: 24px !important; }
    div[class*="gap-y-24"] { row-gap: 48px !important; }
    div[class*="gap-12"] { gap: 32px !important; }
    div[class*="gap-8"]  { gap: 24px !important; }
    div[class*="space-y-12"] > * + * { margin-top: 28px !important; }

    div[class*="h-[420px]"] { height: 280px !important; }
    div[class*="h-[350px]"] { height: 240px !important; }
    div[class*="h-[300px]"] { height: 220px !important; }
    div[class*="h-[260px]"] { height: 210px !important; }
    div[class*="h-[220px]"] { height: 200px !important; }
    div[class*="h-[200px]"] { height: 180px !important; }
    div[class*="p-10"] { padding: 24px !important; }

    section[class*="min-h-screen"] video,
    section[class*="min-h-screen"] img[aria-hidden] { object-position: 30% center !important; }
    section[class*="min-h-screen"] div[class*="grid-cols-2"] { gap: 8px !important; margin-top: 24px !important; }
    section[class*="min-h-screen"] div[class*="grid-cols-2"] > div { height: 112px !important; margin-top: 0 !important; }

    dl > div[class*="py-5"], dl > div[class*="py-6"] { padding-top: 16px !important; padding-bottom: 16px !important; }
    form { padding: 24px 18px !important; }
    input, select, textarea { font-size: 16px !important; }
    div[class*="p-6"], div[class*="p-8"] { padding: 18px !important; }

    a[class*="px-10"], a[class*="px-12"], a[class*="px-16"], a[class*="px-20"],
    button[class*="px-16"], button[class*="px-20"] {
        width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .price-row[class*="flex"] { align-items: flex-start !important; gap: 8px !important; }
    .price-row[class*="flex"] > span:last-child { text-align: right !important; font-size: 16px !important; line-height: 1.4 !important; }

    footer p.font-en { font-size: 11px !important; letter-spacing: 0.1em !important; line-height: 1.6 !important; }
    .loader p.loader-text { font-size: 8px !important; line-height: 1.5 !important; }
}
