/* ============================================================
   SHINROKU - 純喫茶シンロク × オーシマドーナツ奈良店
   style.css
   ============================================================ */

/* ------ CSS変数 ------ */
:root {
    --bg-color: #fdfcfb;
    --text-main: #1a1a1a;
    --text-sub: #4a4a4a;
    --line-color: #000000;
    --accent-color: #763911;
}

/* ------ ベース ------ */
body {
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "HGS明朝E", "Shippori Mincho", serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    letter-spacing: 0.15em;
    line-height: 2.2;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

/* ------ SNS・ポータルサイト アイコン グレースケール → カラー ------ */
.sns-icon-wrap .sns-icon {
    color: #9ca3af;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Instagram: ホバーでグラデーション背景 + 白アイコン */
.sns-icon-wrap:hover .sns-icon-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
    color: #fff;
}

/* LINE: ホバーでLINEグリーン */
.sns-icon-wrap:hover .sns-icon-line {
    color: #06C755;
    border-color: #06C755;
}

/* ポータルサイト favicon画像 */
.portal-icon {
    filter: grayscale(100%) opacity(0.55);
    transition: filter 0.3s ease;
}
.portal-icon-wrap:hover .portal-icon {
    filter: grayscale(0%) opacity(1);
}

/* ------ フォント ------ */
.font-title {
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Zen Old Mincho", serif;
}

.tategaki {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.3em;
    line-height: 2.5;
}

/* ------ 八角形（隅切り）スタイル ------ */
.chamfer-box {
    clip-path: polygon(
        24px 0, 100% 0,
        100% calc(100% - 24px), calc(100% - 24px) 100%,
        0 100%, 0 24px
    );
}

.chamfer-shadow-wrapper {
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.05));
}

/* ------ テクスチャオーバーレイ ------ */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: multiply;
}

/* ------ ウォーターマーク ------ */
.watermark-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    font-size: min(40vw, 500px);
    font-weight: 900;
    color: #000000;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
    white-space: nowrap;
    user-select: none;
    mix-blend-mode: multiply;
}

/* ------ アニメーション ------ */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-img {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.reveal-img.visible {
    clip-path: polygon(
        24px 0, 100% 0,
        100% calc(100% - 24px), calc(100% - 24px) 100%,
        0 100%, 0 24px
    );
}

/* ------ スチームアニメーション ------ */
.steam-container {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}
.steam {
    width: 4px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    margin: 0 4px;
    animation: steam 3s infinite ease-out;
    opacity: 0;
    filter: blur(5px);
}
.steam:nth-child(1) { animation-delay: 0s; height: 20px; }
.steam:nth-child(2) { animation-delay: 0.8s; height: 35px; }
.steam:nth-child(3) { animation-delay: 1.5s; height: 25px; }

@keyframes steam {
    0%   { transform: translateY(0) scaleX(1); opacity: 0; }
    40%  { opacity: 0.5; }
    100% { transform: translateY(-50px) scaleX(1.5); opacity: 0; }
}

/* ------ Ken Burnsエフェクト ------ */
.kenburns-slow {
    animation: kenburns-slow 30s ease-out infinite alternate;
}
@keyframes kenburns-slow {
    0%   { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* ------ SPA ユーティリティ ------ */
.spa-hidden {
    display: none !important;
}
.spa-padding {
    padding-top: 120px;
}

/* ------ サブページヘッダー ------ */
.sub-header {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
}
.sub-header::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: #000;
    margin: 40px auto 0;
}

/* ------ モバイルメニュー ------ */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#mobile-menu.menu-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#mobile-menu.menu-closed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ------ ヒーロー背景画像 ------ */
#hero-bg-0 {
    background-image: url('../img/top-01.jpg');
}
#hero-bg-1 {
    background-image: url('../img/top-02.jpg');
}

/* ------ フェードイン ディレイ ユーティリティ ------ */
.fade-delay-300 {
    transition-delay: 0.3s;
}
.fade-delay-600 {
    transition-delay: 0.6s;
}

/* ------ Google Maps iframe ------ */
.gmap-frame {
    border: 0;
}

/* ============================================================
   モバイル最適化（Tailwind md ブレークポイント: 768px未満）
   ============================================================ */
@media (max-width: 767px) {

    /* --- ベース：行間をやや詰めて可読性向上 --- */
    body {
        line-height: 2;
        letter-spacing: 0.1em;
    }

    /* --- ヒーロー：min-h-[800px] を解除し画面高さに合わせる --- */
    #hero {
        min-height: 100svh;
        min-height: 100vh;
        height: 100svh;
    }

    /* --- セクション共通：py-32 (128px) → py-16 (64px) 相当に縮小 --- */
    .page-section.py-32 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* --- 極小フォント (9-11px) をWCAG準拠の12pxへ引き上げ
           Tailwind CDN 動的生成ルールに勝つため !important を付与 --- */
    .text-\[9px\],
    .text-\[10px\],
    .text-\[11px\] {
        font-size: 0.75rem !important; /* 12px */
    }

    /* --- タップ領域：電話番号リンクを44px以上に --- */
    a[href^="tel:"] {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
        padding: 0 0.5rem;
    }

    /* --- タップ領域：フッター内リンク --- */
    footer a,
    footer button {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }

    /* --- フッターのSNSアイコン群：幅も44px確保 --- */
    footer .text-2xl,
    footer a.text-2xl {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    /* サイトマップ(sub-sitemap)のリストリンク */
    #sub-sitemap li > a {
        display: inline-block;
        min-height: 40px;
        line-height: 40px;
    }

    /* --- サブページヘッダー：パディング縮小 --- */
    .sub-header {
        padding: 40px 0 30px;
    }
    .sub-header::after {
        height: 40px;
        margin-top: 24px;
    }

    /* --- SPA パディング縮小 --- */
    .spa-padding {
        padding-top: 80px;
    }

    /* --- 隅切り：角を小さくして画面端の切れを防ぐ --- */
    .chamfer-box {
        clip-path: polygon(
            12px 0, 100% 0,
            100% calc(100% - 12px), calc(100% - 12px) 100%,
            0 100%, 0 12px
        );
    }

    /* --- reveal-img（隅切り開始表示） --- */
    .reveal-img.visible {
        clip-path: polygon(
            12px 0, 100% 0,
            100% calc(100% - 12px), calc(100% - 12px) 100%,
            0 100%, 0 12px
        );
    }

    /* --- ハンバーガーメニューボタン 32×32 → 44×44 --- */
    #mobile-menu-btn {
        width: 44px;
        height: 44px;
    }

    /* --- SNSアイコン：タップ領域を44px確保 --- */
    .sns-icon-wrap > a,
    nav .sns-icon-wrap,
    header .sns-icon-wrap a {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* --- 「詳細なアクセス情報を見る」「Googleマップで開く」等、
           text-sm の下線付きリンクを余白つきでタップしやすく --- */
    a.text-sm.border-b,
    a.text-xs.border-b {
        display: inline-block;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* --- h1〜h3 の巨大文字：モバイルで少し小さく --- */
    .text-9xl { font-size: 5rem; }      /* 128 → 80 */
    .text-8xl { font-size: 4rem; }      /* 96 → 64 */

    /* --- モバイルメニューオーバーレイの余白調整 --- */
    #mobile-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}
